I spend most my time in the "arm" world and have been slacking when it 
comes to aarch64 (arm64)
the reason for this is there is no hardware "in the wild" to support it 
but there some promising candidates
been released in Q2 + 
(http://www.anandtech.com/show/7724/it-begins-amd-announces-its-first-arm-based-server-soc-64bit8core-opteron-a1100)
so im getting back upto date.

im taking up bruce's "challenge" to do a "hint" on a "hybrid" cross 
build the idea is as follows.

1)Build "cross" binutils
2)Build "gcc/glibc"
3)implement a "sysroot"
4)create a emulation path /usr/gnemul/qemu-* mount all libdirs using 
--bind to a path in sysroot /opt/*/lib /lib /usr/lib ....
5)then copy into the sysroot the "host" toolchain and libs in a 
"multilibpath" this will allow executing the host not cross
binaries in the sysroot this allows using a cross compiler in a "native" 
enviroment
6)using qemu [static] copied to the sysroot and setting up binfmt_misc 
you can chroot to the sysroot run the hosts "bash"
and the "gcc" will be the cross compiler as with the cross binutils all 
running x86_64
7)running any "native" binaries will be run under the emulator ie uname 
-a will give appropriate results for the target.

doing it this way you are able to build as many packages "cross" as 
possible and for more tricky ones can chroot into the
sysroot and build the source as if it was native using host tools and 
libs while in the "target" chroot problem children
are python / perl and gnome bits that use introspection [python].

you need to make sure that the toolchain packages are not rebuilt and 
installed in the sysroot use of a staging area and
some form of packaging is needed cpio/tarball/rpm [this evil i speak of] 
the idea is to build a full system and be able to install
it onto a harddrive and run it on the target.

this is very different from using a "emulator" ie qemu-system-* as they 
are really slow and inefficient.

this is the method i use to build most the time its not LFS and close 
but not quite CLFS the packages from BLFS are mostly
out the box and work fine even when chrooting to the target under qemu 
the same applies. the aim is to sync with as much  as
xLFS as possible.

im working through a aarch64 build currently and will be putting this 
together as i go. i feel this falls into the "education" mandate
of LFS allowing experimentation with the other kids on the block.

qemu will need to be bumped to 1.8.0 [when it is released to support 
aarch AKA arm64]. im not sure where to put the binfmt bits 
/etc/binfmt.d/*.conf seems
to be common and is suited for bootscripts i seem to recall some support 
in systemd too.

comments / complaints are welcome.

Greg
-- 
http://linuxfromscratch.org/mailman/listinfo/blfs-dev
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Reply via email to