Skip to contentSkip to conversation

uClibc kernel headers problem

Buildroot Roman Chertov 3 participants 9 messages Oct 20, 2009 – Oct 21, 2009

lore
Share & tools
lore
#0 lore raw

Hello,

I am using the latest build root release and I am trying to build a tool chain for CS-e9302 board which has an ARM chip. I want to use the 2.6.24.7 Linux kernel (I patched it to support click modular router). I patched that kernel and u-boot 1.3.3 with patches from
http://dev.ivanov.eu/projects/cs-e9302/ to enable the board support. I then renamed the tar.bz2 files into file names that buildroot supports in the menuconfig (linux-2.6.24.tar.bz2 kernel and u-boot-2009.06.tar.bz2) and placed the files into the dl directory.

My current trouble is with uClibc 0.9.30.1. In the buildroot menuconfig I specified that I want to build the entire Linux kernel, so as far as I understand there is no need to use the precompiled headers option. When I build the tool chain, it all works up to uClibc. I get the following error "cc1: error: unrecognized command line option "-mbig-endian"". I have included the output log down below. I would appreciate any help with this.

Thanks,

Roman

Checking build system dependencies:

BUILDROOT_DL_DIR clean:                         Ok
CC clean:                                       Ok
CXX clean:                                      Ok
CPP clean:                                      Ok
CFLAGS clean:                                   Ok
INCLUDES clean:                                 Ok
CXXFLAGS clean:                                 Ok
which installed:                                Ok
sed works:                                      Ok (/bin/sed)

GNU make version '3.81': Ok
C compiler '/usr/lib/ccache/gcc'
C compiler version '4.4.1': Ok
C++ compiler '/usr/lib/ccache/g++'

C++ compiler version '4.4.1':                   Ok
awk installed:                                  Ok
bash installed:                                 Ok
bison installed:                                Ok
flex installed:                                 Ok
gettext installed:                              Ok
makeinfo installed:                             Ok
Build system dependencies:                      Ok

rm -rf /proj/tools/buildroot-2009.08/project_build_arm/uclibc/buildroot-config mkdir -p /proj/tools/buildroot-2009.08/project_build_arm/uclibc cp -dpRf package/config/buildroot-config /proj/tools/buildroot-2009.08/project_build_arm/uclibc/buildroot-config /usr/bin/make -j1 -C

/proj/tools/buildroot-2009.08/toolchain_build_arm/uClibc-0.9.30.1 \
                PREFIX= \
                DEVEL_PREFIX=/ \
                RUNTIME_PREFIX=/ \
                HOSTCC="/usr/lib/ccache/gcc" \
                all

make[1]: Entering directory `/proj/tools/buildroot-2009.08/toolchain_build_arm/uClibc-0.9.30.1'
GEN include/bits/sysnum.h
cc1: error: unrecognized command line option "-mbig-endian"
cc1: error: unrecognized command line option "-mbig-endian"
ERROR: Could not generate syscalls.
Make sure that you have proper kernel headers.
Your .config in KERNEL_HEADERS="" was set to:
/usr/include/
make[1]: *** [include/bits/sysnum.h] Error 1
make[1]: Leaving directory `/proj/tools/buildroot-2009.08/toolchain_build_arm/uClibc-0.9.30.1'
make: *** [/proj/tools/buildroot-2009.08/toolchain_build_arm/uClibc-0.9.30.1/lib/libc.a] Error 2

#1 lore raw

[Buildroot] precompiled kernel headers

Hello,

I have the following question regarding buildroot-2009.08. If a kernel is selected why does the script download the 2.6.30.5 precompiled headers anyway?

Thanks,

Roman

#5 lore raw
In reply to Roman Chertov

I have untared a fresh copy of build root 2009.8. When I run make for the first time, there is an error regarding the absence of toolchain_build_arm/uClibc.config.arm and the process stops (see error log below). If I do 'touch toolchain_build_arm/uClibc.config.arm' then run make again, there is a series of questions which pertain to which configs should be used.

I am using my own target/device. But that mainly defines the U-BOOT config variable (cs-e9302), and I don't have any uClibc configuration files in that directory. I am just curious if this is a bug or if I am doing something wrong.

Roman

Applying uClibc-0.9.30.1-unifdef-getline.patch using plaintext:
patching file extra/scripts/unifdef.c
touch /proj/tools/buildroot-2009.08/toolchain_build_arm/uClibc-0.9.30.1/.patched cp -f /proj/tools/buildroot-2009.08/toolchain_build_arm/uClibc.config.arm /proj/tools/buildroot-2009.08/toolchain_build_arm/uClibc-0.9.30.1/.oldconfig

cp: cannot stat `/proj/tools/buildroot-2009.08/toolchain_build_arm/uClibc.config.arm':
No such file or directory

make: *** [/proj/tools/buildroot-2009.08/toolchain_build_arm/uClibc-0.9.30.1/.oldconfig] Error 1

Quoted 79 lines · Roman Chertov

Hello,

I am using the latest build root release and I am trying to build a tool chain for CS-e9302 board which has an ARM chip. I want to use the 2.6.24.7 Linux kernel (I patched it to support click modular router). I patched that kernel and u-boot 1.3.3 with patches from
http://dev.ivanov.eu/projects/cs-e9302/ to enable the board support. I then renamed the tar.bz2 files into file names that buildroot supports in the menuconfig (linux-2.6.24.tar.bz2 kernel and u-boot-2009.06.tar.bz2) and placed the files into the dl directory.

My current trouble is with uClibc 0.9.30.1. In the buildroot menuconfig I specified that I want to build the entire Linux kernel, so as far as I understand there is no need to use the precompiled headers option. When I build the tool chain, it all works up to uClibc. I get the following error "cc1: error: unrecognized command line option "-mbig-endian"". I have included the output log down below. I would appreciate any help with this.

Thanks,

Roman

Checking build system dependencies:

BUILDROOT_DL_DIR clean:                         Ok
CC clean:                                       Ok
CXX clean:                                      Ok
CPP clean:                                      Ok
CFLAGS clean:                                   Ok
INCLUDES clean:                                 Ok
CXXFLAGS clean:                                 Ok
which installed:                                Ok
sed works:                                      Ok (/bin/sed)

GNU make version '3.81': Ok
C compiler '/usr/lib/ccache/gcc'
C compiler version '4.4.1': Ok
C++ compiler '/usr/lib/ccache/g++'

C++ compiler version '4.4.1':                   Ok
awk installed:                                  Ok
bash installed:                                 Ok
bison installed:                                Ok
flex installed:                                 Ok
gettext installed:                              Ok
makeinfo installed:                             Ok
Build system dependencies:                      Ok

rm -rf /proj/tools/buildroot-2009.08/project_build_arm/uclibc/buildroot-config mkdir -p /proj/tools/buildroot-2009.08/project_build_arm/uclibc cp -dpRf package/config/buildroot-config /proj/tools/buildroot-2009.08/project_build_arm/uclibc/buildroot-config /usr/bin/make -j1 -C

/proj/tools/buildroot-2009.08/toolchain_build_arm/uClibc-0.9.30.1 \
                PREFIX= \
                DEVEL_PREFIX=/ \
                RUNTIME_PREFIX=/ \
                HOSTCC="/usr/lib/ccache/gcc" \
                all

make[1]: Entering directory `/proj/tools/buildroot-2009.08/toolchain_build_arm/uClibc-0.9.30.1'
GEN include/bits/sysnum.h
cc1: error: unrecognized command line option "-mbig-endian"
cc1: error: unrecognized command line option "-mbig-endian"
ERROR: Could not generate syscalls.
Make sure that you have proper kernel headers.
Your .config in KERNEL_HEADERS="" was set to:
/usr/include/
make[1]: *** [include/bits/sysnum.h] Error 1
make[1]: Leaving directory `/proj/tools/buildroot-2009.08/toolchain_build_arm/uClibc-0.9.30.1'
make: *** [/proj/tools/buildroot-2009.08/toolchain_build_arm/uClibc-0.9.30.1/lib/libc.a] Error 2

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

#6 lore raw

I am starting to suspect that for whatever reason uClibc is not using the cross compiler and is instead using the host compiler. I am just curious on the typical debugging procedure for this. Thanks.

Quoted 117 lines · Roman Chertov

I have untared a fresh copy of build root 2009.8. When I run make for the first time, there is an error regarding the absence of toolchain_build_arm/uClibc.config.arm and the process stops (see error log below). If I do 'touch toolchain_build_arm/uClibc.config.arm' then run make again, there is a series of questions which pertain to which configs should be used.

I am using my own target/device. But that mainly defines the U-BOOT config variable (cs-e9302), and I don't have any uClibc configuration files in that directory. I am just curious if this is a bug or if I am doing something wrong.

Roman

Applying uClibc-0.9.30.1-unifdef-getline.patch using plaintext:
patching file extra/scripts/unifdef.c
touch /proj/tools/buildroot-2009.08/toolchain_build_arm/uClibc-0.9.30.1/.patched cp -f /proj/tools/buildroot-2009.08/toolchain_build_arm/uClibc.config.arm /proj/tools/buildroot-2009.08/toolchain_build_arm/uClibc-0.9.30.1/.oldconfig

cp: cannot stat `/proj/tools/buildroot-2009.08/toolchain_build_arm/uClibc.config.arm':
No such file or directory

make: *** [/proj/tools/buildroot-2009.08/toolchain_build_arm/uClibc-0.9.30.1/.oldconfig] Error 1

Quoted 74 lines · Roman Chertov

Hello,

I am using the latest build root release and I am trying to build a tool chain for CS-e9302 board which has an ARM chip. I want to use the 2.6.24.7 Linux kernel (I patched it to support click modular router). I patched that kernel and u-boot 1.3.3 with patches from
http://dev.ivanov.eu/projects/cs-e9302/ to enable the board support. I then renamed the tar.bz2 files into file names that buildroot supports in the menuconfig (linux-2.6.24.tar.bz2 kernel and u-boot-2009.06.tar.bz2) and placed the files into the dl directory.

My current trouble is with uClibc 0.9.30.1. In the buildroot menuconfig I specified that I want to build the entire Linux kernel, so as far as I understand there is no need to use the precompiled headers option. When I build the tool chain, it all works up to uClibc. I get the following error "cc1: error: unrecognized command line option "-mbig-endian"". I have included the output log down below. I would appreciate any help with this.

Thanks,

Roman

Checking build system dependencies:

BUILDROOT_DL_DIR clean:                         Ok
CC clean:                                       Ok
CXX clean:                                      Ok
CPP clean:                                      Ok
CFLAGS clean:                                   Ok
INCLUDES clean:                                 Ok
CXXFLAGS clean:                                 Ok
which installed:                                Ok
sed works:                                      Ok (/bin/sed)

GNU make version '3.81': Ok
C compiler '/usr/lib/ccache/gcc'
C compiler version '4.4.1': Ok
C++ compiler '/usr/lib/ccache/g++'

C++ compiler version '4.4.1':                   Ok
awk installed:                                  Ok
bash installed:                                 Ok
bison installed:                                Ok
flex installed:                                 Ok
gettext installed:                              Ok
makeinfo installed:                             Ok
Build system dependencies:                      Ok

rm -rf /proj/tools/buildroot-2009.08/project_build_arm/uclibc/buildroot-config mkdir -p /proj/tools/buildroot-2009.08/project_build_arm/uclibc cp -dpRf package/config/buildroot-config /proj/tools/buildroot-2009.08/project_build_arm/uclibc/buildroot-config /usr/bin/make -j1 -C

/proj/tools/buildroot-2009.08/toolchain_build_arm/uClibc-0.9.30.1 \
                PREFIX= \
                DEVEL_PREFIX=/ \
                RUNTIME_PREFIX=/ \
                HOSTCC="/usr/lib/ccache/gcc" \
                all

make[1]: Entering directory `/proj/tools/buildroot-2009.08/toolchain_build_arm/uClibc-0.9.30.1'
GEN include/bits/sysnum.h
cc1: error: unrecognized command line option "-mbig-endian"
cc1: error: unrecognized command line option "-mbig-endian"
ERROR: Could not generate syscalls.
Make sure that you have proper kernel headers.
Your .config in KERNEL_HEADERS="" was set to:
/usr/include/
make[1]: *** [include/bits/sysnum.h] Error 1
make[1]: Leaving directory `/proj/tools/buildroot-2009.08/toolchain_build_arm/uClibc-0.9.30.1'
make: *** [/proj/tools/buildroot-2009.08/toolchain_build_arm/uClibc-0.9.30.1/lib/libc.a] Error 2

Quoted 5 lines

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

#7 lore raw
In reply to Roman Chertov
Quoted 10 lines · Roman Chertov

Hello,

I am using the latest build root release and I am trying to build a tool chain for CS-e9302 board which has an ARM chip. I want to use the 2.6.24.7 Linux kernel (I patched it to support click modular router). I patched that kernel and u-boot 1.3.3 with patches from
http://dev.ivanov.eu/projects/cs-e9302/ to enable the board support. I then renamed the tar.bz2 files into file names that buildroot supports in the menuconfig (linux-2.6.24.tar.bz2 kernel and u-boot-2009.06.tar.bz2) and placed the files into the dl directory.

if the paths in the tarballs don't match the name of the tarball and the version in the BR config then this will not work.
I've sent a patch to the list a couple of days ago where you can set the kernel version manually to ease this particular thing, fyi. This and a handful of other patches are still not applied yet, though.

Quoted 8 lines

My current trouble is with uClibc 0.9.30.1. In the buildroot menuconfig I specified that I want to build the entire Linux kernel, so as far as I understand there is no need to use the precompiled headers option. When I build the tool chain, it all works up to uClibc. I get the following error "cc1: error: unrecognized command line option "-mbig-endian"". I have included the output log down below. I would appreciate any help with this.

How did you configure BR?

Quoted 7 lines

GEN include/bits/sysnum.h
cc1: error: unrecognized command line option "-mbig-endian"
cc1: error: unrecognized command line option "-mbig-endian"
ERROR: Could not generate syscalls.
Make sure that you have proper kernel headers. Your .config in KERNEL_HEADERS="" was set to:
/usr/include/

Even if you build on an arm box this is incorrect. I suggest you start from a fresh BR config:
you at box:buildroot $ rm -f .config ; make menuconfig

#2 lore raw

[Buildroot] precompiled kernel headers

In reply to Roman Chertov
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Roman" == Roman Chertov <[email protected]> writes:

Roman> Hello,
Roman> I have the following question regarding buildroot-2009.08. If a kernel Roman> is selected why does the script download the 2.6.30.5 precompiled Roman> headers anyway?

Because you have two selections:

1: What kernel headers to use to build uclibc/toolchain 2: What kernel (if any) to build next to rootfs

Signature · 1 line
Bye, Peter Korsgaard
#3 lore raw

[Buildroot] precompiled kernel headers

Quoted 11 lines · Peter Korsgaard
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Roman" == Roman Chertov <[email protected]> writes:

Roman> Hello,
Roman> I have the following question regarding buildroot-2009.08. If a kernel Roman> is selected why does the script download the 2.6.30.5 precompiled Roman> headers anyway?

Because you have two selections:

1: What kernel headers to use to build uclibc/toolchain 2: What kernel (if any) to build next to rootfs

So if I want uclibc/toolchain to run a 2.6.24.7 kernel on the ARM device, I will have to manually edit the Config which is used by menuconfig to allow 2.6.24.7 to be used for precompiled headers?

Thanks

Quoted 1 line
#4 lore raw

[Buildroot] precompiled kernel headers

Quoted 4 lines
Quoted 4 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Roman" == Roman Chertov <[email protected]> writes:

1: What kernel headers to use to build uclibc/toolchain 2: What kernel (if any) to build next to rootfs

Roman> So if I want uclibc/toolchain to run a 2.6.24.7 kernel on the ARM Roman> device, I will have to manually edit the Config which is used by Roman> menuconfig to allow 2.6.24.7 to be used for precompiled headers?

No, not necessarily. The kernel headers for your toolchain doesn't have to correspond to the kernel version you are using (E.G. you don't have to install a new version of libc every time you update your kernel on your PC either - Or the other way around.

Signature · 1 line
Bye, Peter Korsgaard
#8 lore raw
In reply to Bernhard Reutner-Fischer
Quoted 6 lines

if the paths in the tarballs don't match the name of the tarball and the version in the BR config then this will not work.
I've sent a patch to the list a couple of days ago where you can set the kernel version manually to ease this particular thing, fyi. This and a handful of other patches are still not applied yet, though.

I changed the path names by hand so that linux-2.6.24.7.tar.bz2 is linux-2.6.24.tar.bz2 and is extracted into a 2.6.24 directory.

Quoted 9 lines
Quoted 7 lines

My current trouble is with uClibc 0.9.30.1. In the buildroot menuconfig I specified that I want to build the entire Linux kernel, so as far as I understand there is no need to use the precompiled headers option. When I build the tool chain, it all works up to uClibc. I get the following error "cc1: error: unrecognized command line option "-mbig-endian"". I have included the output log down below. I would appreciate any help with this.

How did you configure BR?

I specified that I have an ARM processor with EABI. For libc, I used the default 0.9.30.1. For the actual device, I had to make my own entry in device. I copied the following into the Makefile.in

UCLIBC_CONFIG_FILE=$(TOOL_BUILD_DIR)/uClibc.config.$(ARCH) from one of the device directories. Once, I commented that out, the problem disappeared.

Roman

Quoted 13 lines
Quoted 8 lines

GEN include/bits/sysnum.h
cc1: error: unrecognized command line option "-mbig-endian"
cc1: error: unrecognized command line option "-mbig-endian"
ERROR: Could not generate syscalls.
Make sure that you have proper kernel headers. Your .config in KERNEL_HEADERS="" was set to:
/usr/include/

Even if you build on an arm box this is incorrect. I suggest you start from a fresh BR config:
you at box:buildroot $ rm -f .config ; make menuconfig