Building for i486
Note: This hint was written for an upcomming version of LFScript.
The oldest 32-bit CPU that Linux supports is an i486. However, as time progresses, it is becoming increasingly more difficult to actually build an LFS system for it, as the mainstream distributions drop support for this processor.
If (for whatever reason) you cannot (or do not want to) use the LFScript Live CD as a host system for i486, the instructions on this page will help you build your system.
Preparing Ubuntu 10.04
1. Boot the system using Ubuntu 10.04 32-bit (the last version to support i486). If you have a newer CPU, use QEMU with the '
-cpu 486' option. You do not need to install Ubuntu as you can use the Live CD environment. You do need to attach a (virtual) hard drive with enough space to build and install the system though.
2. Become root:
sudo su - root
3. Adjust the package manager to look for updates in the Ubuntu 'old-releases' repositories:
sed 's@//archive@//old-releases@g' -i /etc/apt/sources.list sed 's@//security@//old-releases@g' -i /etc/apt/sources.list apt-get update
Make the system compatible with LFS
4. Install required software for LFS and adjust the
ln -svf bash /bin/sh apt-get -y install build-essential bison m4 patch texinfo xz-utils
5. Format and mount the partition on which you want to build LFS. Let's assume you mount it at
/lfs. You will later also need a partition to install the system to.
6. Fetch LFScript.
cd /lfs wget --no-check-certificate lfscript.org/latest.tar.xz tar xf *.xz
Rebuild LFScript binaries for i486 (optional)
7. If you want to replace the LFClass binaries/classes in LFScript with newly compiled versions, run:
apt-get -y install openjdk-6-jdk git-core subversion libz-dev rm -rf *.xz mv lfs* initial cd initial/make gedit ../lfc/make/generic-build.sh
(then replace the uncommented AVIAN_VERSION with the one that has been commented out and marked for use with Ubuntu 10.04, save, and continue)
bash distrib cp -v *.xz /lfs cd /lfs rm -rf initial tar xf *.xz
8. Download the sources for building an LFS system.
cd /lfs/lfs* ./lfscript -BS
9. Upgrade M4 (otherwise Bison will fail to build).
cd sources tar xf m4* cd m4* ./configure --prefix=/usr make make install cd ../ rm -rf m4* cd ../
Build the base system
10. Build a base LFS system.
This will take some time...
Installing and building beyond the base system
You might not get far if you want build beyond the base system right away. Ubuntu 10.04 uses an old version of the Linux kernel. For example,
python2 will not compile while using this old kernel. So you will need to install your system now, and continue the build after rebooting into it.
11. Install the base system to the second partition you have created earlier (see Installing your system.
12. If you want to build beyond the base system, you should download the additional source code now, as your base system might not yet have internet access.
./lfscript -BSx "<extra software>"
13. Reboot into your LFS system.
14. Continue building your system.
./lfscript -BCx "<extra software>"