2012-07-28 12:18:43 UTC
This is the patch to make bootstrap linux to cross compile successfully to
This patch is based on pikhq's commit a0a06ab5329cbcfbb088fbe490c4363043a1216a
(the latest as of today).
I've successfully created a working rootfs and native toolchain from x86-64
host with this. My host gcc is 4.6.2 if it matters.
The changes are minimal and intended only to get the cross working, I
didn't try to optimise anything.
What was fixed:
- change linux-musl to linux-musleabi for arm target
- add host_configargs="LIBS=-lc" and --with-stage1-libs=-lc for native
gcc/binutils compile so that they don't pull in *printf from libiberty
- add linux-arm.config
Some known issues:
a) musl version as configured is at 0.9.2 but with arm it won't boot with
0.9.2 (busybox segfaults), you need to get the latest git master, make a
tarball out of it and rename it to musl-0.9.2.tar.gz in the "src"
b) kernel compile is commented out - it doesn't work out of the box. It
kind of works but stops near then end with missing symbols. If one then
re-do the process (issue another make in the kernel directory) it then
continues to completion. The produced kernel/modules works fine.
c) the kernel config for arm is configured based on versatible emulation
(because that's what I use for qemu at the moment).
Got a lot of help from John and Isaac to get this going, so thanks to both
This is my first post to the mailing list, so you feel this kind of stuff
is out of topic, my apology and lesson learnt.