Since there's fewer and fewer linux distro that has 32bits support, and also we rarely use it. But there's one situation for me to use 32bits linux: use wine to run 32bits win apps (64bits wine need multilib(lfs don't have) to run 32bits win apps). Because 32bits kernel has many limitations, use 64bits kernel and 32bits userspace is a better way. By coping 64bits system's /boot/* and /lib/modules/ to a 32bits system, I got a hybrid system, and it works very well for me.
Then when I build lfs on this hybrid system(64bits kernel + 32bits userspace), I got a pure 64bits system, and finally I find out the reason: 'uname -m' outputs x86_64 on this hybrid system. This's very interesting. And by hacking uname (in coreutils) I can build pure 32bits system on this hybrid system. I think everytihngs can be controlled by uname when building lfs with a IA32_EMULATION enabled 64bits kernel host. So here is the step to build 32bits lfs on pure 64bits host. 1. hack host's uname. cd coreutils-... patch -Np1 -i coreutils-uname_m.patch ./configure && make -j$(nproc --all) cp src/uname $(which uname) #no big deal to overwrite host's uname. 2. patch jhalfs and run jhalfs like below: _UNAME_M=i686 ./jhalfs run Then you will get a 32bits lfs. I also skip the build of 32bit kernel, since it has no use for me.
coreutils-uname_m.patch
Description: Binary data
jhalfs-uname_m.patch
Description: Binary data
-- http://lists.linuxfromscratch.org/listinfo/lfs-dev FAQ: http://www.linuxfromscratch.org/faq/ Unsubscribe: See the above information page
