Dr. Dobb's is part of the Informa Tech Division of Informa PLC

This site is operated by a business or businesses owned by Informa PLC and all copyright resides with them. Informa PLC's registered office is 5 Howick Place, London SW1P 1WG. Registered in England and Wales. Number 8860726.

Channels ▼

Embedded Systems

Virtualization: Up Against the Wall

Tuning the Target

A DPF must start the image viewer automatically, run with a read-only filesystem, and automatically copy images from a USB stick. Auto-starting a program is trivial, but the other changes make the system unusable for further development. I simply copied develop.hd to create pixie.hd and modified that drive image. The modified files are in the cfg-pixie.fd floppy image.

I tweaked the rc.S startup script to remount the root filesystem read-only; copy /tmp, /var, /dev, and /etc to four tempfs filesystems in RAM; then mount those copies as read/write filesystems atop the read-only originals. Programs can thus write data normally, but that data vanishes when the power goes away. If the system has enough RAM, this works like a champ.

Listing Four (available electronically) shows the usb-storage hotplug script that reads images from the USB stick. This task was complicated by the need to remount the root filesystem in read/write mode. I indulged the luxury of just rebooting at the end of the script to get everything running again.

The find command fetches images from all directories on the USB stick, as its root directory can hold only 100-odd files. The script lowercases the filenames so the image viewer can simply display *jpg files; fbi can actually handle many other image formats, but I didn't need them.

After verifying that on the ThinkPad, I removed Slackware's kernel source and development packages, shrank its partition to 400 MB, and expanded the third partition to fill the remainder. While 400 MB isn't a particularly svelte system and you can do much better, I resized 500 camera images to 800×600 and found they occupy only 41 MB. There's room for 18,000 more pictures in 1.5 GB.

Copy the final disk image to the CF card and fire it up. The 560Z's LCD isn't as good as contemporary panels, but for 20 bucks it's unbeatable. Give it a try and learn something while you do!

Last Tab

Use ImageMagick's mogrify utility to resize entire directories of images. It's no good for a single image, but it makes short work of (a copy of) your entire collection.

I wedged the 560Z's power switch in the ON position so it starts up when it's plugged in. APM reduces the power dissipation to 500mA at 16.5 V, about 10 W including losses in the wall wart. That's slightly more than a single incandescent night light and, in fact, half the power goes to the LCD backlight.

After this success, convert a PDA into a DPF belt buckle (egokast.com).

Yup, Jefferson Airplane, Volunteers, "We Can Be Together," 1969.


Another eBay experience (www.truetex.com/ebayfraud.htm).

QEMU home (www.qemu.com).

FreeDOS project (www.freedos.org).

Slackware (www.slackware.com).

ThinkPad DOS config (www-307.ibm.com/pc/support/site.wss/RMIE-3AXE3E.html).

ThinkPad tpctl (tpctl.sourceforge.net).

fbi picture viewer (linux.bytesex.org/ fbida).

zgv picture viewer (svgalib.org/rus/zgv).

Linux on Laptops (www.linux-laptop.net).

Eviscerating a ThinkPad 560Z (virtig01.net/personal/works/PictureFrame-HowTo.php).

ThinkPad info (www.thinkwiki.org).

Master Boot Record (en.wikipedia.org/wiki/Master_boot_record).

GRUB (www.pixelbeat.org/docs/disk).

Disk image creation (darkdust.net/marc/diskimagehowto.php).

Slackware boot sequence (openskills.info/infobox.php?IDbox=1042).

Linux remote serial consoles (tldp.org/ HOWTO/Remote-Serial-Console-HOWTO).

Automatic login (linuxgazette.net/issue72/chung.html).

Hotplug (linux-hotplug.sourceforge.net).

Writing udev rules (www.reactivated.net/writing_udev_rules.html).

ImageMagick image manipulation (www.imagemagick.org).

Related Reading

More Insights

Currently we allow the following HTML tags in comments:

Single tags

These tags can be used alone and don't need an ending tag.

<br> Defines a single line break

<hr> Defines a horizontal line

Matching tags

These require an ending tag - e.g. <i>italic text</i>

<a> Defines an anchor

<b> Defines bold text

<big> Defines big text

<blockquote> Defines a long quotation

<caption> Defines a table caption

<cite> Defines a citation

<code> Defines computer code text

<em> Defines emphasized text

<fieldset> Defines a border around elements in a form

<h1> This is heading 1

<h2> This is heading 2

<h3> This is heading 3

<h4> This is heading 4

<h5> This is heading 5

<h6> This is heading 6

<i> Defines italic text

<p> Defines a paragraph

<pre> Defines preformatted text

<q> Defines a short quotation

<samp> Defines sample computer code text

<small> Defines small text

<span> Defines a section in a document

<s> Defines strikethrough text

<strike> Defines strikethrough text

<strong> Defines strong text

<sub> Defines subscripted text

<sup> Defines superscripted text

<u> Defines underlined text

Dr. Dobb's encourages readers to engage in spirited, healthy debate, including taking us to task. However, Dr. Dobb's moderates all comments posted to our site, and reserves the right to modify or remove any content that it determines to be derogatory, offensive, inflammatory, vulgar, irrelevant/off-topic, racist or obvious marketing or spam. Dr. Dobb's further reserves the right to disable the profile of any commenter participating in said activities.

Disqus Tips To upload an avatar photo, first complete your Disqus profile. | View the list of supported HTML tags you can use to style comments. | Please read our commenting policy.