Building the kernel
Download Technologic's Linux source and TS-7800 configuration files and unzip them in a suitable location.
A complete discussion of kernel configuration is beyond the scope of
this tutorial. In this case, the
ts7800_defconfig target gave me a default
usable configuration for the 7800, with one small hiccup: the
CONFIG_DMA_ENGINE setting ended up off when
it should have been on.
It is usually best to edit the kernel using
menuconfig, which offers a
semi-graphical interface to kernel configuration. This interface is
navigated using arrow keys to move the cursor, the Tab key to select
options from the bottom of the screen, and the space or Enter keys to
select options. For instance, to exit without changing anything, press
Tab until the <Exit> at the bottom of the screen is
highlighted, then press Enter. Running
menuconfig again reopens the
The TS-7800 normally boots silently, because the default kernel
configuration specifies a null console device to keep the display
quiet. To change this, use the arrow keys to navigate down to "Boot
options," and press Enter. The third line shows the default kernel
options, which select the ramdisk, the startup script, and the
console. Use the arrow keys to navigate down to this line, press
Enter, and change
console none to
console ttyS0,115200. Then, press Tab to
move the cursor to the <Ok> at the bottom of the panel,
and press Enter. Now press Tab to select <Exit> and
press Enter, bringing you back to the main menu.
For the goal of booting as fast as possible, the console device isn't useful, and indeed, even at a high baud rate, sending kernel messages can take a noticeable fraction of the time the system takes to boot. For debugging and playing around, though, you want the console.
Navigate down to "Device drivers" and press Enter. This list is longer than the usual display, so you will have to scroll down to the very end to reach the option for "DMA Engines." Navigate to that with the arrow keys, and press Enter. There are two options at the top of this page that have square brackets indicating a boolean option. The second, "Support for DMA engines," was not enabled by default in the download I started with. Navigate to it with the arrow keys, and press space to toggle its state. Now use Tab and Enter to select <Exit> from each screen to navigate out to the top level of the program, and then <Exit> one more time to leave the program. When asked whether you wish to save your new kernel configuration, tab to <Yes> and press Enter.
make. Yes, it really is that simple.
This builds a kernel, as well as a collection of modules. Once again,
multi-core users might want multiple jobs; try
-j 5. For the purposes of this
project, I'm going to ignore kernel modules, and favor compiling-in
any needed features. The bootstrap ramdisk technique used to get
needed drivers into the kernel early seems excessive, and building a
root file system is already complicated enough. This, of course,
brings up the question of how to get a kernel booting, the subject of
the next section.