Booting Linux from EPROM
The process of programming (“burning”) the EPROMs starts out by archiving the small disk drive with tar, then extracting the files onto a clean (zeroed out) file system. By putting the file system onto a clean disk, all unused sectors are zeroed out, and the disk compression works (Listing 1).
To tar the disk image, the “full ”Linux partition was booted, and the 6MB partition mounted. By doing this, the proc file system is not included in the tar. The following commands can be used:
mount -t ext2 /dev/hda2 /mnt cd /mnt tar -cpf /tmp/eprom.tar *
To create the (uncompressed) disk image, I used a different machine with a 6MB RAM disk and the following commands:
dd if=/dev/zero of=/dev/ram count=12288 mke2fs /dev/ram 6144 mount -t ext2 /dev/ram /mnt cd /mnt tar -xpf ~/eprom.tar . dd if=/dev/ram of=~/eprom.dsk count=12288
This creates a file (eprom.dsk) which is a sector-by-sector image of the disk. The data to be programmed into the EPROMs is the compressed image. This is done with a program (med.c) which reads the disk image (eprom.dsk), runs the disk compression, and outputs a binary file (eprom.img) which will be programmed into the EPROMs.
med ~/eprom.dsk ~/eprom.img
The EPROM image is then moved to an EPROM programmer and the images are burned.
Fortunately the SBC came with SSD utilities to help build the disk image. The DOS SSD disk has a bare minimum of files in it: the DOS boot files, command.com, autoexec.bat, the keyboard loading program, loadlin and zImage.
The development of what goes on the disk is a large part of the job, and methods need to be developed to minimize this effort. Using the EPROM disk is working well in our application.
Dave Bennett “works with computers” at Boeing in the commercial Flight Test group. When not at work, he enjoys the company of his significant other, two cats, a bunch of fish and millions of yeasties. Dave enjoys building things, a few of which are featured on the web page www.halcyon.com/bennett. Dave can be reached at firstname.lastname@example.org or email@example.com.
|Raspi-Sump||Dec 16, 2014|
|diff -u: What's New in Kernel Development||Dec 12, 2014|
|Non-Linux FOSS: Don't Type All Those Words!||Dec 10, 2014|
|Computing without a Computer||Dec 08, 2014|
|Autokey: Shorthand for Typists||Dec 04, 2014|
|How Can We Get Business to Care about Freedom, Openness and Interoperability?||Dec 03, 2014|
- Cooking with Linux - Serious Cool, Sysadmin Style!
- diff -u: What's New in Kernel Development
- How Can We Get Business to Care about Freedom, Openness and Interoperability?
- Readers' Choice Awards 2014
- Days Between Dates?
- Synchronize Your Life with ownCloud
- New Products
- Non-Linux FOSS: Don't Type All Those Words!
- Computing without a Computer