Success with CLFS-2.0 on ARM

Alexander E. Patrakov patrakov at
Sat Jul 22 05:40:45 PDT 2006


the CLFS-2.0 book is almost good: it produces a system bootable in qemu 
with only minimal deviations, documented below. Screenshot is attached. 
One can repeat the steps in the book and below and reproduce the 
screenshot even without actually having an ARM board.


1) When building Glibc, don't install locales. It's just impossibble now.
2) When building Shadow, don't run pwconv and grpconv, and don't set 
root password.
3) Use the attached kernel config (sorry, for old version of linux). Put 
boot/arm/zImage into /mnt/clfs/boot
4) After installing clfs bootscripts, remove 
/mnt/clfs/etc/rc.d/rcsysinit.d/S60setclock: ARM boards don't have RTC, 
and qemu just hangs if the setclock script is being run.

The result is the complete ARM system under /mnt/clfs.

How to test without a real ARM board:

1) Install X window system, SDL and nfs-utils.
2) Install gcc-3.4 and qemu from (./configure 
--cc=gcc-3.4). Alternatively, if you don't want gcc-3.4, install the 
precompiled version of qemu from the same page.
3) Remount /mnt/clfs with the "noexec" option in order to avoid creating 
a root hole in the next step.
4) Export /mnt/clfs in /etc/exports as: /mnt/clfs,no_root_squash,insecure,async)
5) Run qemu as: qemu-system-arm -kernel /mnt/clfs/boot/zImage -append 
"root=/dev/nfs nfsroot=,tcp,v3 
ip=" (the IP 
addresses are hard-coded in qemu, don't change them, they work).
6) Log in as root without password, run pwconv && grpconv && passwd 
root, generate your locale with localedef.
7) Try running other programs installed as a part of CLFS. Report bugs.

Alexander E. Patrakov
-------------- next part --------------
A non-text attachment was scrubbed...
Name: clfs-2.0.png
Type: image/png
Size: 8089 bytes
Desc: not available
URL: <>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: config.gz
Type: application/gzip
Size: 4565 bytes
Desc: not available
URL: <>

More information about the cross-lfs mailing list