View Issue Details

IDProjectCategoryView StatusLast Update
0000719BuildRootCross-Toolchainpublic2014-01-28 11:30
ReporterKeller Assigned To 
PrioritynormalSeveritymajorReproducibilityalways
Status resolvedResolutionfixed 
Target VersionarmStoneA8-V1.2Fixed in VersionarmStoneA8-V1.2 
Summary0000719: BuildRoot compiled with F&S Toolchain fails to boot, error "FATAL: kernel too old"
DescriptionIf BuildRoot is compiled with the cross toolchain provided with PicomMOD6 release V1.1, the system fails to boot with boot message "FATAL: kernel too old". However compiling U-Boot or the Linux kernel does work.
Steps To ReproduceConfigure BuildRoot to use this toolchain. Run make. Download output/images/rootfs.jffs2 to the board as TargetFS and say "run bootlocal; boot" on the board. Or share output/images/rootfs.ext2 via NFS and say "run bootnfs; boot" on the board. In both cases does the kernel start, but after mounting the root filesystem, the above error message occurs.
Forum Link

Activities

Keller

2011-07-29 09:49

manager   ~0000482

The toolchain was compiled with header files from kernel 2.6.33. By default this is also used as minimum kernel version required in glibc. However we have kernel 2.6.28 on PicoMOD6.

A new version using headers from 2.6.27 does not show this error. But there is still a problem with the glibc code that prevents the system to boot. We are currently investigating this issue.

Keller

2011-08-11 10:05

manager   ~0000503

The toolchain is compiled using the crosstool-ng program. This adds a patch that activates _FORTIFY_SOURCE in the compiler by default. In crosstool-ng-1.9.0 (that was used for this toolchain) there was a bug so that glibc was also compiled with this flag activated. This is wrong and results in an endless loop when trying to call fprintf() for example. It is essential that the glibc itself is compiled without _FORTIFY_SOURCE. This can be achieved by giving -U_FORTIFY_SOURCE in the CFLAGS to the glibc compilation. Newer versions of crosstool-ng already have this case builtin, avoiding this bug.

However as we don't need _FORTIFY_SOURCE automatically activated in our compiler at all, I simply removed the affected patch. Now the toolchain works again as expected. If a user wants to compile fortified code, he can add -D_FORTIFY_SOURCE=2 to the compilation run on his own.

The new toolchain was uploaded immediately to the website, independently from a new Linux release. So we're still in Linux release V1.1.

By the way, I have written a small text documentation of how to compile cross-toolchains for F&S ARM boards. It can be found under Q:\LinuxPackages\Toolchain\LIESMICH_F+S.txt.