News Archive (1999-2012) | 2013-current at LinuxGizmos | Current Tech News Portal |    About   

A developer’s review of LynuxWorks’ BlueCat Linux (Part 3)

Dec 10, 1997 — by LinuxDevices Staff — from the LinuxDevices Archive — views

Development Process

The development process is essentially that of Linux, with the addition of some useful utilities.

Kernel 2.2.12 is used, with some patches applied. LynuxWorks reports that substituting a later kernel should be straightforward; though they don't support it, and curiously seem to discourage it, emphasizing the “version-stabilized” kernel they provide. The x86, PowerPC, ARM/StongARM/XScale, MIPS, and SuperH architectures are supported. Building the kernel or developing custom applications is nearly identical to the same processes for native Linux development after setting up the environment with SETUP.sh — the normal tools are there, they just refer to the cross development tools rather than those for the native environment. The process is documented well enough for all but the very newest Linux developer; novices would do well to start with a beginner's book on native Linux development.

BlueCat provides some utilities to assist in the cross development process. 'mkkernel' is a simple script to build a kernel based on a specified .config file and a location to place the resulting kernel image. Thus multiple kernel profiles are easily managed, a task that is often important when developing embedded systems.

'mkrootfs' is a powerful and flexible utility for, as its name suggests, building root file system images. You provide it a specification file defining a root file system on the target, and it builds a file system image. It can optionally scan the executables to determine which shared libraries to include, then automatically include them. mkrootfs even runs ldconfig to set up the necessary links for the libraries. mkrootfs operates from a configuration file that is similar to a shell script file. Like a shell script, the config file can invoke some Unix-like commands such as cp, rm, and mkdir to construct the target image; but the only way to control execution flow in the script is an if-else-endif construct.

BlueCat provides complete and well-designed support for target system deployment, centering around the flexible and robust utility 'mkboot'. The boot options are somewhat x86-oriented, focusing on booting in a system which has a BIOS.

To create a bootable floppy for your target, insert the floppy into the drive on your development host. Then simply run 'mkboot' with the proper flags to set up the boot sector, install the kernel, indicate where the root file system resides, and (optionally) to install the root file system on the floppy if that's where you want it. The root file system can also be on any other appropriate device on the system.

Deploying to a hard drive is similar if the disk can be temporarily mounted on the development host. In this case you simply format the disk, transfer your root file system to it, and use 'mkboot' to install the kernel and make the disk bootable. Then just move the disk to the target and boot. There's nothing fancy about this process; all of this could be done with freely available tools. But BlueCat provides helpful tools and clear documentation to help the user.

Using BlueCat OS Loader and BlueCat OS Loader Shell

One of the more useful tools provided by BlueCat is the BlueCat OS Loader, essentially a stripped-down Linux used as a bootloader. Typically you would install it on a floppy and boot it, which puts you into the BlueCat Loader Shell (BLOSH), a limited shell oriented toward installing and booting an OS over a network. From BLOSH you can specify from where to get the kernel and root file system, then boot them. A typical BLOSH sequence (taken from my test setup) might look like this:

> set IP 192.168.123.200
> set HOST 192.168.123.178
> set IF eth0
> set KERNEL nfs /disk2/BlueCat demo.x86/osloader/zImage.adastra
> set RFS nfs /disk2/BlueCat demo.x86/modular/modular.rfs
> boot

These are pretty obvious: you set your own IP address and that of the host from which you intend to get the kernel and root file system, indicate which interface to use, specify which files to get and which protocol to use in getting them; then boot the system. Besides NFS, you can use TFTP, a parallel port, or a local file system to get the kernel and root file system. You can also set kernel command-line arguments from BLOSH — useful for using an NFS-based root file system, among other things. BLOSH commands can also be put into the file /etc/blosh.rc to be executed automatically on bootup, eliminating the necessity of typing in all information every time.

Most users will welcome the simplicity and clear documentation of the BlueCat OS Loader and of BLOSH. The fact that the OS Loader is itself based on Linux also has fortunate side-effects. Configuring the OS Loader for your system is just a matter of configuring the Linux kernel for your hardware; usually you'll then be able to use the same kernel for your target system.

This is exactly what I did in the above example. I configured the OS Loader for the Jumptec-Adastra VNS-786L SBC, one of the three SBCs I'm using for this series, leaving the kernel in zImage.adastra. I then wrote a boot floppy using this kernel and the osloader root file system and booted it on the VNS-786L.

BlueCat provides a good variety of sample systems, one of which (the “modular” sample) I then loaded via BLOSH along with the previously built kernel. This process worked equally well for the other two SBCs I'm using, the WinSystems EBC-TXPlus and the Ampro Little Board/P5x.

The BlueCat OS Loader consists of the Linux kernel and BLOSH, which is run as the init process invoked by the kernel. Full source is provided for BLOSH, which is released under the GPL. BLOSH is extensible; you can add commands to it by following a simple and well-documented procedure.

Continued



Story navigation . . .

 
This article was originally published on LinuxDevices.com and has been donated to the open source community by QuinStreet Inc. Please visit LinuxToday.com for up-to-date news and articles about Linux and open source.



Comments are closed.