compilation problem with kernel 2.6.15
I tried to cross compile kernel 2.6.15 for BCM1480. Please tell me what the following error indicates:
Using /home/ssf/bdcom/linux-mips-kernels/linux-2.6.15 as source for kernel
GEN /home/ssf/bdcom/linux-mips-kernels/linux-mips-kernel-2.6.15/Makefile
CHK include/linux/version.h
UPD include/linux/version.h
SYMLINK include/asm -> include/asm-mips
HOSTCC scripts/basic/fixdep HOSTCC scripts/basic/split-include HOSTCC scripts/basic/docproc GEN /home/ssf/bdcom/linux-mips-kernels/linux-mips-kernel-2.6.15/Makefile HOSTCC scripts/kconfig/conf.o HOSTCC scripts/kconfig/kxgettext.o HOSTCC scripts/kconfig/mconf.o
SHIPPED scripts/kconfig/zconf.tab.c
SHIPPED scripts/kconfig/lex.zconf.c
SHIPPED scripts/kconfig/zconf.hash.c
HOSTCC scripts/kconfig/zconf.tab.o
HOSTLD scripts/kconfig/confscripts/kconfig/conf -s arch/mips/Kconfig
#
# using defaults found in .config
#
SPLIT include/linux/autoconf.h -> include/config/*
CC arch/mips/kernel/asm-offsets.s
GEN include/asm-mips/asm-offsets.h
HOSTCC scripts/genksyms/genksyms.o
SHIPPED scripts/genksyms/lex.c
SHIPPED scripts/genksyms/parse.h
SHIPPED scripts/genksyms/keywords.c
HOSTCC scripts/genksyms/lex.o
SHIPPED scripts/genksyms/parse.c
HOSTCC scripts/genksyms/parse.o
HOSTLD scripts/genksyms/genksyms
CC scripts/mod/empty.o
HOSTCC scripts/mod/mk_elfconfig
MKELF scripts/mod/elfconfig.h
HOSTCC scripts/mod/file2alias.o
HOSTCC scripts/mod/modpost.o
HOSTCC scripts/mod/sumversion.o
HOSTLD scripts/mod/modpost
HOSTCC scripts/kallsyms
HOSTCC scripts/pnmtologo
HOSTCC scripts/conmakehash
HOSTCC scripts/bin2c
CC init/main.o
CHK include/linux/compile.h
UPD include/linux/compile.h
CC init/version.o
CC init/do_mounts.o
In file included from /home/ssf/bdcom/linux-mips-kernels/linux-2.6.15/include/li
nux/nfs_fs.h:15,
from /home/ssf/bdcom/linux-mips-kernels/linux-2.6.15/init/do_mo
unts.c:12:
/home/ssf/bdcom/linux-mips-kernels/linux-2.6.15/include/linux/pagemap.h: In func
tion ΓÇÿfault_in_pages_readableΓÇÖ:
/home/ssf/bdcom/linux-mips-kernels/linux-2.6.15/include/linux/pagemap.h:237: err
or: read-only variable ΓÇÿ__gu_valΓÇÖ used as ΓÇÿasmΓÇÖ output
/home/ssf/bdcom/linux-mips-kernels/linux-2.6.15/include/linux/pagemap.h:237: err
or: read-only variable ΓÇÿ__gu_valΓÇÖ used as ΓÇÿasmΓÇÖ output
/home/ssf/bdcom/linux-mips-kernels/linux-2.6.15/include/linux/pagemap.h:237: err
or: read-only variable ΓÇÿ__gu_valΓÇÖ used as ΓÇÿasmΓÇÖ output
/home/ssf/bdcom/linux-mips-kernels/linux-2.6.15/include/linux/pagemap.h:237: err
or: read-only variable ΓÇÿ__gu_valΓÇÖ used as ΓÇÿasmΓÇÖ output
/home/ssf/bdcom/linux-mips-kernels/linux-2.6.15/include/linux/pagemap.h:243: err
or: read-only variable ΓÇÿ__gu_valΓÇÖ used as ΓÇÿasmΓÇÖ output
/home/ssf/bdcom/linux-mips-kernels/linux-2.6.15/include/linux/pagemap.h:243: err
or: read-only variable ΓÇÿ__gu_valΓÇÖ used as ΓÇÿasmΓÇÖ output
/home/ssf/bdcom/linux-mips-kernels/linux-2.6.15/include/linux/pagemap.h:243: err
or: read-only variable ΓÇÿ__gu_valΓÇÖ used as ΓÇÿasmΓÇÖ output
/home/ssf/bdcom/linux-mips-kernels/linux-2.6.15/include/linux/pagemap.h:243: err
or: read-only variable ΓÇÿ__gu_valΓÇÖ used as ΓÇÿasmΓÇÖ output
make[2]: *** [init/do_mounts.o] Error 1
make[1]: *** [init] Error 2
make: *** [_all] Error 2 Thanks and Regards,
Krishna
---------------------------------
Yahoo! Messenger with Voice. Make PC-to-Phone Calls to the US (and 30+ countries) for 2¢/min or less.
Quoted 2 lines · Krishna
err
or: read-only variable ΓÇÿ__gu_valΓÇÖ used as ΓÇÿasmΓÇÖ output
This means a new error check in gcc has found a latent kernel bug.
It is also sometimes the case that a new linux kernel finds a latent gcc bug.
Note, in general, key parts of linux such as the kernel, glibc, and gcc, often have such heavy dependencies on each other that you can not pick and choose random versions. If you want to use a particular kernel version, then there are often particular glibc and gcc versions you should use with it, otherwise you are likely to run into trouble.
This link:
http://www.linux-mips.org/wiki/Toolchains#Prologue
recommends gcc-3.4. And if you follow the "recommended" link to
http://www.linux-mips.org/wiki/GCC
it specifically recommends against use of gcc-4.1 for compiling the linux kernel, as this hasn't been well tested yet.
Signature · 1 line
Jim Wilson, GNU Tools Support, http://www.specifix.com
I downloaded the exact tools and followed exact procedure suggested in http://www.linux-mips.org/wiki/Toolchains#Prologue. But while trying to cross compile the kernel 2.6.15 got the following error:
(root@Jamuna:/home/ssf/bdcom/linux-mips-kernels/linux-2.6.15)# make O=/home/ssf
/bdcom/linux-mips-kernels/linux-mips-kernel-2.6.15 ARCH=mips CROSS_COMPILE=mips
el-unknown-linux-gnu-
Using /home/ssf/bdcom/linux-mips-kernels/linux-2.6.15 as source for kernel
GEN /home/ssf/bdcom/linux-mips-kernels/linux-mips-kernel-2.6.15/Makefile
CHK include/linux/version.h
CC arch/mips/kernel/asm-offsets.s
GEN include/asm-mips/asm-offsets.h
CC scripts/mod/empty.o
MKELF scripts/mod/elfconfig.h
HOSTCC scripts/mod/file2alias.o
HOSTCC scripts/mod/modpost.o
HOSTCC scripts/mod/sumversion.o
HOSTLD scripts/mod/modpost
CC init/main.o
CHK include/linux/compile.h
SKIPPED include/linux/compile.h
CC init/version.o
CC init/do_mounts.o
CC init/do_mounts_rd.o
CC init/do_mounts_initrd.o
CC init/do_mounts_md.o
LD init/mounts.o
CC init/initramfs.o
CC init/calibrate.o
LD init/built-in.o
CHK usr/initramfs_list
/home/ssf/bdcom/linux-mips-kernels/linux-2.6.15/scripts/gen_initramfs_list.sh:
Cannot open 'y'
make[2]: *** [usr/initramfs_list] Error 1
make[1]: *** [usr] Error 2
make: *** [_all] Error 2can anyone suggest me what is the problem here?
Thanks in advance,
Krishna
James E Wilson <[email protected]> wrote:
Quoted 2 lines · Krishna
err
or: read-only variable ΓÇÿ__gu_valΓÇÖ used as ΓÇÿasmΓÇÖ output
This means a new error check in gcc has found a latent kernel bug.
It is also sometimes the case that a new linux kernel finds a latent gcc bug.
Note, in general, key parts of linux such as the kernel, glibc, and gcc, often have such heavy dependencies on each other that you can not pick and choose random versions. If you want to use a particular kernel version, then there are often particular glibc and gcc versions you should use with it, otherwise you are likely to run into trouble.
This link:
http://www.linux-mips.org/wiki/Toolchains#Prologue
recommends gcc-3.4. And if you follow the "recommended" link to
http://www.linux-mips.org/wiki/GCC
it specifically recommends against use of gcc-4.1 for compiling the linux kernel, as this hasn't been well tested yet.
Signature · 9 lines
Jim Wilson, GNU Tools Support, http://www.specifix.com *Krishna* --------------------------------- New Yahoo! Messenger with Voice. Call regular phones from your PC and save big.
Quoted 4 lines · Krishna
CHK
usr/initramfs_list
/home/ssf/bdcom/linux-mips-kernels/linux-2.6.15/scripts/gen_initramfs_list.sh:
Cannot open 'y'
Use the command
make V=1
to get slightly more useful make output.
If this doesn't show anything wrong, then try running the script manually with shell tracing turned on.
cd scripts
sh -x gen_initramfs_list.sh
This doesn't look like a compiler issue. It looks more like an issue with your system, or with the kernel sources that you have extracted. The only thing happening here is that a shell script is being run from make. I don't see how this could have happened unless something is wrong with your system.
What OS name and version are you using? What shell program and version? What make program and version?
Signature · 1 line
Jim Wilson, GNU Tools Support, http://www.specifix.com
Quoted 8 lines · Krishna
Date: Tue, 28 Mar 2006 06:37:08 -0800 (PST)
From: Krishna <[email protected]>
Reply-To: [email protected]
To: [email protected]
Subject: compilation problem with kernel 2.6.15I tried to cross compile kernel 2.6.15 for BCM1480. Please tell me what the following error indicates:
...
Hi !
You are trying to use gcc 4.2, aren't you ?
`fault_in_pages_readable' is defined as follows:
fault_in_pages_readable(const char __user *uaddr, int size)
{
volatile char c;
int ret;
ret = __get_user(c, uaddr);
...
}this invokes the __get_user_nocheck(c,uaddr,sizeof(*uaddr)) macro:
#define __get_user_nocheck(x,ptr,size) \
({ \
__typeof(*(ptr)) __gu_val = (__typeof(*(ptr))) 0; \
... \
})defining __gu_val' of type const char', which gcc 4.2 (don't know about 4.1) no longer accepts as asm-output (lvalue). At least until this macro will be changed, you should switch back to gcc 4.0.
kind regards
pf
Quoted 4 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line · peter fuerst
defining
__gu_val' of typeconst char', which gcc 4.2 (don't know about 4.1) no longer accepts as asm-output (lvalue). At least until this macro will be changed, you should switch back to gcc 4.0.
This is same as gcc 4.1 and the macro in kernel 2.6.16 has been fixed already. This issue was discussed several times in linux-mips ML.
---
Atsushi Nemoto