i was thinking about building a linux system from scratch over the weekend,
basically as a learning exercise. all going well i would use the machine
for day-to-day stuff, and maybe try the same thing with netbsd or something.
i was hoping some of the gurus on the list could clarify some points for me.
from reading gcc docs, i reckon i am going to need to build gcc for the
target machine on a host machine. however, i'm not sure whether this will
be sufficient. will the toolchain (binutils and stuff) be built for the host
machine or the target machine? do i need to build a cross-compiler for the
target system on the spare system, and then build a native compiler on the
cross-compiler (on the spare system)? this is getting complicated.
as it stands, the plan is to proceed like this:
1. boot a prepared ramdisk linux system on the target machine, and use it
to prepare filesystems on the hard drives of the target machine.
2. build just what i need to build a linux kernel on a spare system,
and stick it in the `right' place on the filesystem of the target
system. right now i reckon this includes binutils, gcc, glibc
and gdb (maybe). i want to do as much of this as possible on the
target machine, relying on the spare system as little as possible.
3. get the kernel source tree on to the target system (using the ramdisk
system) and build it.
4. get the system to boot a kernel using lilo or grub or whatever.
5. start building init, bash and whatever else the kernel needs to get a
system on it's feet.
i realise this is ambiguous (when should i create /dev and it's contents
among other things), but i've got to start somewhere.
if anybody has done this before, i'd appreciate if they would share whatever
insights they feel are relevant.
Maintained by the ILUG website team. The aim of Linux.ie is to
support and help commercial and private users of Linux in Ireland. You can
display ILUG news in your own webpages, read backend
information to find out how. Networking services kindly provided by HEAnet, server kindly donated by
Dell. Linux is a trademark of Linus Torvalds,
used with permission. No penguins were harmed in the production or maintenance
of this highly praised website. Looking for the
Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!