| Instructions and Notes working with a KuroBox | |||
|---|---|---|---|
| <<< Previous | Chapter 3. Filling, Configuring, and Pruning the Base File Image | Next >>> | Blog |
If we look in the directory ${IMAGE} (${BASE}/target/powerpc-603e-linux-gnu/powerpc-603e-linux-gnu) we'll see that we have the beginnings of our target filesystem. But what we're missing are things like: an init system, a shell, and all the dozens of little utilities that make UNIX life easier.
When the Linux kernel is done booting it will look in a number of locations for the init program and run it. If it can't find the init program it will panic. The init system is generally responsible for running a bunch of user-space scripts that help to initialise the system (e.g. configure networking, starting daemons, etc). Sometimes init systems incorporate the idea of "run-levels" which a user can select from to determine the type of system and range of services to start or terminate. A shell is useful not just as a program to run after you logon, but is also often used by scripts, especially those which are part of the init process. A system will often run a number of daemons such as getty processes or sshd.
There are two ways to go about getting these things, we can either search in dozens of places downloading all the sources to the individual programs themselves or we can use something like Busybox. Busybox was designed for this purpose with embedded systems in mind. As such it provides many of the things we are now looking for in one convenient package. Since it was developed with code size considerations in mind, many of the utilities aren't quite as full-featured as the commands we might be accustomed to, but it's still a good place to start.
Unfortunately Busybox doesn't support building in a different directory, so you'll want different Busybox directories for each platform you want to support. To build Busybox go into the directory containing its sources and type:
$ make menuconfig
|
You will then be presented with a curses-based screen that will present you with various categories. Inside those categories are items you can select or unselect for inclusion into your system. Offering specific advice here is difficult because it depends on what you're looking for and what you want out of your system. However, some pieces of advice I can offer are:
enable "General Configuration -> Use the devpts filesystem for Unix98 PTYs"
disable "General Configuration -> Support for devfs"
disable "Build Options -> Build BusyBox as a static binary (no shared libs)"
enable "Build Options -> Do you want to build BusyBox with a Cross Compiler?" and fill in the next dialog box with the fully-qualified path value of "${BASE}/toolchain/powerpc-603e-linux-gnu/bin/powerpc-603e-linux-gnu-" (no extra CFLAGS are necessary)
select "Installation Options -> Don't use /usr" and input a fully-qualified path name for the "BusyBox installation prefix"
enable "Networking Utilities -> telnetd" but don't enable the subsequent "Support call from inetd only" option
be sure to add in "Init Utilities -> halt, poweroff, and reboot"
add in more, rather than less, things; you've got a HDD, space probably isn't an issue
Once you're done the regular "make dep", "make", and "make install" should be all you need.
| <<< Previous | Home | Next >>> |
| Filling, Configuring, and Pruning the Base File Image | Up | Additional Files |