Hallo,
I have problems with linking of kernel 2.5.8-usagi. Compilation
ended with:
ld -m elf_i386 -T /usr/src/usagi/kernel/linux25/arch/i386/vmlinux.lds -e
stext arch/i386/kernel/head.o arch/i386/kernel/init_task.o init/main.o
init/version.o init/do_mounts.o \
--start-group \
arch/i386/kernel/kernel.o arch/i386/mm/mm.o kernel/kernel.o
mm/mm.o fs/fs.o ipc/ipc.o \
/usr/src/usagi/kernel/linux25/arch/i386/lib/lib.a
/usr/src/usagi/kernel/linux25/lib/lib.a
/usr/src/usagi/kernel/linux25/arch/i386/lib/lib.a \
drivers/base/base.o drivers/char/char.o drivers/block/block.o
drivers/misc/misc.o drivers/net/net.o drivers/media/media.o
drivers/char/agp/agp.o drivers/ide/idedriver.o drivers/cdrom/driver.o
sound/sound.o drivers/pci/driver.o drivers/pnp/pnp.o
drivers/video/video.o \
net/network.o \
--end-group \
-o vmlinux
init/main.o: In function `start_kernel':
init/main.o(.text.init+0x5db): undefined reference to
`setup_per_cpu_areas'
make: *** [vmlinux] Error 1
My .config is appended...
Am I wrong in any way?
Sincerely
Jan Marek
PS: I'm in the lkml...
--
Ing. Jan Marek
University of South Bohemia
Academic Computer Centre
Phone: +420-38-7772080
In article <[email protected]> Jan Marek wrote:
> --VbJkn9YxBvnuCH5J
> Content-Type: text/plain; charset=us-ascii
> Content-Disposition: inline
> Hallo,
> I have problems with linking of kernel 2.5.8-usagi. Compilation
> ended with:
> ld -m elf_i386 -T /usr/src/usagi/kernel/linux25/arch/i386/vmlinux.lds -e
> stext arch/i386/kernel/head.o arch/i386/kernel/init_task.o init/main.o
> init/version.o init/do_mounts.o \
> --start-group \
> arch/i386/kernel/kernel.o arch/i386/mm/mm.o kernel/kernel.o
> mm/mm.o fs/fs.o ipc/ipc.o \
> /usr/src/usagi/kernel/linux25/arch/i386/lib/lib.a
> /usr/src/usagi/kernel/linux25/lib/lib.a
> /usr/src/usagi/kernel/linux25/arch/i386/lib/lib.a \
> drivers/base/base.o drivers/char/char.o drivers/block/block.o
> drivers/misc/misc.o drivers/net/net.o drivers/media/media.o
> drivers/char/agp/agp.o drivers/ide/idedriver.o drivers/cdrom/driver.o
> sound/sound.o drivers/pci/driver.o drivers/pnp/pnp.o
> drivers/video/video.o \
> net/network.o \
> --end-group \
> -o vmlinux
> init/main.o: In function `start_kernel':
> init/main.o(.text.init+0x5db): undefined reference to
> `setup_per_cpu_areas'
> make: *** [vmlinux] Error 1
You can use the attached (text/plain) patch to fix this.
Thanks
--
Dipankar Sarma <[email protected]> http://lse.sourceforge.net
Linux Technology Center, IBM Software Lab, Bangalore, India.
> You can use the attached (text/plain) patch to fix this.
>
> Thanks
Why will moving init smp_init help? Because as far as I can see
setup_per_cpu_areas() is called by start_kernel. But it
is only defined for SMP so this should do it:
--- init/main.c Wed Apr 10 15:00:25 2002
+++ init/main.c_new Mon Apr 22 15:33:45 2002
@@ -269,6 +269,9 @@
}
#else
#define smp_init() do { } while (0)
+static inline void setup_per_cpu_areas(void)
+{
+}
#endif
#else
> --
> Dipankar Sarma <[email protected]> http://lse.sourceforge.net
> Linux Technology Center, IBM Software Lab, Bangalore, India.
>
---------------------------------------------
This message was sent using M-Web Airmail.
JUST LIKE THAT
Are you ready for 10-digit dialling on the 8th of May?
To find out how this will affect your Internet connection go to http://www.mweb.co.za/ten
http://airmail.mweb.co.za/
On Mon, Apr 22, 2002 at 01:34:58PM +0000, [email protected] wrote:
> > You can use the attached (text/plain) patch to fix this.
> >
> > Thanks
>
> Why will moving init smp_init help? Because as far as I can see
> setup_per_cpu_areas() is called by start_kernel. But it
> is only defined for SMP so this should do it:
The idea is not just to move smp_init(), but to move
#ifdef __GENERIC_PER_CPU portion to outside #else of
#ifndef CONFIG_SMP.
__GENERIC_PER_CPU will not be defined for UP and hence
setup_per_cpu_areas() wil be an empty function in UP case.
Rusty suggested this and I have been using it.
Thanks
--
Dipankar Sarma <[email protected]> http://lse.sourceforge.net
Linux Technology Center, IBM Software Lab, Bangalore, India.