View previous topic :: View next topic |
Author |
Message |
racerxdl n00b
Joined: 13 Apr 2006 Posts: 13
|
Posted: Mon May 22, 2006 9:38 pm Post subject: Compile Problems with Kernel 2.6.16 |
|
|
I compiling a Kernel 2.6.16 for Mips..
I installed crossdev and i maked crossdev -t mips-uknown-linux-gnu
and for kenerl i make
emerge gentoo-sources
cd /newtmp/src/
tar -xvjpf /usr/portage/distfiles/linux-2.6.16.tar.bz
cd linux-2.6.16
make ARCH=mips menuconfig
i configured and i make:
make ARCH=mips CROSS_COMPILE=mips-uknown-linux-gnu-
and i get this error
Quote: |
drivers/built-in.o: In function `pnp_check_dma':
: undefined reference to `request_dma'
drivers/built-in.o: In function `pnp_check_dma':
: relocation truncated to fit: R_MIPS_26 against `request_dma'
drivers/built-in.o: In function `pnp_check_dma':
: undefined reference to `free_dma'
drivers/built-in.o: In function `pnp_check_dma':
: relocation truncated to fit: R_MIPS_26 against `free_dma'
make: *** [.tmp_vmlinux1] Error 1
|
The target is a NEC-VR41xx (VR4121) |
|
Back to top |
|
|
Redhatter Retired Dev
Joined: 20 Sep 2003 Posts: 548 Location: Brisbane, QLD, Australia
|
Posted: Tue May 23, 2006 2:20 pm Post subject: Re: Compile Problems with Kernel 2.6.16 |
|
|
racerxdl wrote: | I compiling a Kernel 2.6.16 for Mips..
I installed crossdev and i maked crossdev -t mips-uknown-linux-gnu
and for kenerl i make
emerge gentoo-sources |
Well, on MIPS, you must use mips-sources, or a snapshot from Linux/MIPS Git. Stock kernels that work on x86 will fail on MIPS because they lack several critical patches required to make the kernel compile & work correctly. These do eventually wind up in the upstream sources, but not often enough to be trusted it seems.
Quote: | cd /newtmp/src/
tar -xvjpf /usr/portage/distfiles/linux-2.6.16.tar.bz
cd linux-2.6.16
make ARCH=mips menuconfig
i configured and i make:
make ARCH=mips CROSS_COMPILE=mips-uknown-linux-gnu-
and i get this error
Quote: |
drivers/built-in.o: In function `pnp_check_dma':
: undefined reference to `request_dma'
drivers/built-in.o: In function `pnp_check_dma':
: relocation truncated to fit: R_MIPS_26 against `request_dma'
drivers/built-in.o: In function `pnp_check_dma':
: undefined reference to `free_dma'
drivers/built-in.o: In function `pnp_check_dma':
: relocation truncated to fit: R_MIPS_26 against `free_dma'
make: *** [.tmp_vmlinux1] Error 1
|
|
Yep... that's what I'm talking about... I'll bet the right kernel source tree would fix that.
Quote: | The target is a NEC-VR41xx (VR4121) |
I'll warn you now ... we (Gentoo/MIPS team) don't support any machine with an NEC VR41xx CPU. If it works, great, we're happy for you ... but it very likely won't work, and none of us are in a position to assist.
Also, I strongly suspect the VR-41xx code is heavily bitrotted, so even with the correct source tree, it still is unlikely to work without quite a bit of hacking.
That said, good luck in your endevours... _________________ Stuart Longland (a.k.a Redhatter, VK4MSL)
I haven't lost my mind - it's backed up on a tape somewhere...
Gentoo/MIPS Cobalt developer, Mozilla herd member. |
|
Back to top |
|
|
racerxdl n00b
Joined: 13 Apr 2006 Posts: 13
|
Posted: Tue May 23, 2006 7:21 pm Post subject: |
|
|
Ah ok, thanks... |
|
Back to top |
|
|
racerxdl n00b
Joined: 13 Apr 2006 Posts: 13
|
Posted: Tue May 23, 2006 7:35 pm Post subject: |
|
|
Now i get more errors:
But ok...
Quote: |
pclucas linux-2.6.16.13-20060320 # make ARCH=mips CROSS_COMPILE=mips-unknown-linux-gnu-
CHK include/linux/version.h
CC arch/mips/kernel/asm-offsets.s
In file included from include/linux/bitops.h:77,
from include/linux/thread_info.h:20,
from include/linux/preempt.h:10,
from include/linux/spinlock.h:50,
from include/linux/capability.h:45,
from include/linux/sched.h:7,
from arch/mips/kernel/asm-offsets.c:14:
include/asm/bitops.h: In function '__ffs':
include/asm/bitops.h:595: warning: unused variable 's'
include/asm/bitops.h:595: warning: unused variable 'b'
include/asm/bitops.h:617: warning: no return statement in function returning non-void
include/asm/bitops.h: In function 'fls':
include/asm/bitops.h:712: warning: no return statement in function returning non-void
include/asm/bitops.h: In function 'sched_find_first_bit':
include/asm/bitops.h:848: warning: no return statement in function returning non-void
In file included from arch/mips/kernel/asm-offsets.c:14:
include/linux/sched.h: At top level:
include/linux/sched.h:1005: error: 'THREAD_SIZE_ORDER' undeclared here (not in a function)
include/linux/sched.h: In function 'arch_pick_mmap_layout':
include/linux/sched.h:1379: error: 'TASK_UNMAPPED_BASE' undeclared (first use in this function)
include/linux/sched.h:1379: error: (Each undeclared identifier is reported only once
include/linux/sched.h:1379: error: for each function it appears in.)
In file included from include/asm/pgtable.h:19,
from include/linux/mm.h:38,
from arch/mips/kernel/asm-offsets.c:15:
include/asm/io.h: In function 'virt_to_phys':
include/asm/io.h:162: error: 'PAGE_OFFSET' undeclared (first use in this function)
include/asm/io.h: In function 'phys_to_virt':
include/asm/io.h:179: error: 'PAGE_OFFSET' undeclared (first use in this function)
include/asm/io.h: In function 'isa_virt_to_bus':
include/asm/io.h:187: error: 'PAGE_OFFSET' undeclared (first use in this function)
include/asm/io.h: In function 'isa_bus_to_virt':
include/asm/io.h:192: error: 'PAGE_OFFSET' undeclared (first use in this function)
include/asm/io.h: In function '__ioremap_mode':
include/asm/io.h:226: error: 'cpu_has_64bit_addresses' undeclared (first use in this function)
include/asm/io.h:227: error: 'UNCAC_BASE' undeclared (first use in this function)
include/asm/io.h:234: error: 'IO_BASE' undeclared (first use in this function)
include/asm/io.h: In function 'iounmap':
include/asm/io.h:330: error: 'cpu_has_64bit_addresses' undeclared (first use in this function)
include/asm/io.h: In function '__raw_writeb':
include/asm/io.h:452: error: 'cpu_has_64bits' undeclared (first use in this function)
include/asm/io.h: In function '__raw_readb':
include/asm/io.h:452: error: 'cpu_has_64bits' undeclared (first use in this function)
include/asm/io.h: In function 'writeb':
include/asm/io.h:452: error: 'cpu_has_64bits' undeclared (first use in this function)
include/asm/io.h: In function 'readb':
include/asm/io.h:452: error: 'cpu_has_64bits' undeclared (first use in this function)
include/asm/io.h: In function '__mem_writeb':
include/asm/io.h:452: error: 'cpu_has_64bits' undeclared (first use in this function)
include/asm/io.h: In function '__mem_readb':
include/asm/io.h:452: error: 'cpu_has_64bits' undeclared (first use in this function)
include/asm/io.h: In function '__raw_writew':
include/asm/io.h:453: error: 'cpu_has_64bits' undeclared (first use in this function)
include/asm/io.h: In function '__raw_readw':
include/asm/io.h:453: error: 'cpu_has_64bits' undeclared (first use in this function)
include/asm/io.h: In function 'writew':
include/asm/io.h:453: error: 'cpu_has_64bits' undeclared (first use in this function)
include/asm/io.h: In function 'readw':
include/asm/io.h:453: error: 'cpu_has_64bits' undeclared (first use in this function)
include/asm/io.h: In function '__mem_writew':
include/asm/io.h:453: error: 'cpu_has_64bits' undeclared (first use in this function)
include/asm/io.h: In function '__mem_readw':
include/asm/io.h:453: error: 'cpu_has_64bits' undeclared (first use in this function)
include/asm/io.h: In function '__raw_writel':
include/asm/io.h:454: error: 'cpu_has_64bits' undeclared (first use in this function)
include/asm/io.h: In function '__raw_readl':
include/asm/io.h:454: error: 'cpu_has_64bits' undeclared (first use in this function)
include/asm/io.h: In function 'writel':
include/asm/io.h:454: error: 'cpu_has_64bits' undeclared (first use in this function)
include/asm/io.h: In function 'readl':
include/asm/io.h:454: error: 'cpu_has_64bits' undeclared (first use in this function)
include/asm/io.h: In function '__mem_writel':
include/asm/io.h:454: error: 'cpu_has_64bits' undeclared (first use in this function)
include/asm/io.h: In function '__mem_readl':
include/asm/io.h:454: error: 'cpu_has_64bits' undeclared (first use in this function)
include/asm/io.h: In function '__raw_writeq':
include/asm/io.h:455: error: 'cpu_has_64bits' undeclared (first use in this function)
include/asm/io.h: In function '__raw_readq':
include/asm/io.h:455: error: 'cpu_has_64bits' undeclared (first use in this function)
include/asm/io.h: In function 'writeq':
include/asm/io.h:455: error: 'cpu_has_64bits' undeclared (first use in this function)
include/asm/io.h: In function 'readq':
include/asm/io.h:455: error: 'cpu_has_64bits' undeclared (first use in this function)
include/asm/io.h: In function '__mem_writeq':
include/asm/io.h:455: error: 'cpu_has_64bits' undeclared (first use in this function)
include/asm/io.h: In function '__mem_readq':
include/asm/io.h:455: error: 'cpu_has_64bits' undeclared (first use in this function)
include/asm/io.h: In function '____raw_writeq':
include/asm/io.h:476: error: 'cpu_has_64bits' undeclared (first use in this function)
include/asm/io.h: In function '____raw_readq':
include/asm/io.h:476: error: 'cpu_has_64bits' undeclared (first use in this function)
In file included from include/linux/mm.h:38,
from arch/mips/kernel/asm-offsets.c:15:
include/asm/pgtable.h: At top level:
include/asm/pgtable.h:169: error: 'PTRS_PER_PGD' undeclared here (not in a function)
In file included from include/asm/pgtable.h:388,
from include/linux/mm.h:38,
from arch/mips/kernel/asm-offsets.c:15:
include/asm-generic/pgtable.h:207: error: expected ')' before '*' token
include/asm-generic/pgtable.h:208: error: expected ')' before '*' token
include/asm-generic/pgtable.h: In function 'pgd_none_or_clear_bad':
include/asm-generic/pgtable.h:212: warning: implicit declaration of function 'pgd_none'
include/asm-generic/pgtable.h:214: warning: implicit declaration of function 'pgd_bad'
include/asm-generic/pgtable.h: At top level:
include/asm-generic/pgtable.h:221: error: expected ')' before '*' token
include/asm-generic/pgtable.h:232: error: expected ')' before '*' token
In file included from arch/mips/kernel/asm-offsets.c:15:
include/linux/mm.h: In function 'lowmem_page_address':
include/linux/mm.h:516: error: 'PAGE_OFFSET' undeclared (first use in this function)
include/linux/mm.h: At top level:
include/linux/mm.h:793: error: expected declaration specifiers or '...' before 'pud_t'
include/linux/mm.h:794: error: expected declaration specifiers or '...' before 'pmd_t'
include/linux/mm.h:795: error: expected ')' before '*' token
include/linux/mm.h:802: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
include/linux/mm.h:808: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
arch/mips/kernel/asm-offsets.c: In function 'output_mm_defines':
arch/mips/kernel/asm-offsets.c:224: error: 'pmd_t' undeclared (first use in this function)
arch/mips/kernel/asm-offsets.c:231: error: 'PMD_SHIFT' undeclared (first use in this function)
arch/mips/kernel/asm-offsets.c:232: error: 'PGDIR_SHIFT' undeclared (first use in this function)
arch/mips/kernel/asm-offsets.c:234: error: 'PGD_ORDER' undeclared (first use in this function)
arch/mips/kernel/asm-offsets.c:235: error: 'PMD_ORDER' undeclared (first use in this function)
arch/mips/kernel/asm-offsets.c:236: error: 'PTE_ORDER' undeclared (first use in this function)
arch/mips/kernel/asm-offsets.c:239: error: 'PTRS_PER_PMD' undeclared (first use in this function)
arch/mips/kernel/asm-offsets.c:240: error: 'PTRS_PER_PTE' undeclared (first use in this function)
make[1]: *** [arch/mips/kernel/asm-offsets.s] Error 1
make: *** [prepare0] Error 2
pclucas linux-2.6.16.13-20060320 #
|
|
|
Back to top |
|
|
Redhatter Retired Dev
Joined: 20 Sep 2003 Posts: 548 Location: Brisbane, QLD, Australia
|
Posted: Wed May 24, 2006 12:06 am Post subject: |
|
|
There's your bitrot... The Linux/MIPS community would be your best bet there... I think someone was working on VR41xx support, but I can't recall who. _________________ Stuart Longland (a.k.a Redhatter, VK4MSL)
I haven't lost my mind - it's backed up on a tape somewhere...
Gentoo/MIPS Cobalt developer, Mozilla herd member. |
|
Back to top |
|
|
96140 Retired Dev
Joined: 23 Jan 2005 Posts: 1324
|
Posted: Wed May 24, 2006 12:52 am Post subject: |
|
|
You might try an older mips-sources kernel, but as Redhatter said, if it ain't supported . . . |
|
Back to top |
|
|
Redhatter Retired Dev
Joined: 20 Sep 2003 Posts: 548 Location: Brisbane, QLD, Australia
|
Posted: Wed May 24, 2006 1:12 am Post subject: |
|
|
nightmorph wrote: | You might try an older mips-sources kernel, but as Redhatter said, if it ain't supported . . . |
No, the problem here is someone did a port of Linux/MIPS for the VR41xx waayy back in early 2.4 and 2.2 days... and hasn't touched it since.
The rest of the kernel has moved ahead, and this piece of code hasn't been updated to work with the new changes. Thus, it breaks... which is what we see here. _________________ Stuart Longland (a.k.a Redhatter, VK4MSL)
I haven't lost my mind - it's backed up on a tape somewhere...
Gentoo/MIPS Cobalt developer, Mozilla herd member. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|