micro adventures

February 28, 2010

PCM-4823L Single board computer Linux embedding

Filed under: SBC — Tags: , , , — Piotr @ 8:13 pm

A year ago I got a half-sized biscuit single board computer PCM-4823L from http://www.advantech.com. Now I finally found some time to tackle with embedding a Linux distribution into this PC.

I decided to go for DSL.

Installation to a Compact Flash (as root)

1. Got an empty CF, and create 3 partitions ext2/3: 100MB (> 50MB), 100MB, and swap 64-128MB

2. Install grub boot loader

2.1 Mount first partition

2.2 Change to the mounted CF  (eg: cd /mnt/cf)

2.3 Install grub:

grub-install  --no-floppy  --root-directory=.   /dev/<rootdevice>

Replace <rootdevice> with the corresponding file which represents your USB storage – my (/dev/sde ) do not use any number it should be MBR

3. Copy the DSL image content to CF

mount [/path_to/]current.iso /mnt/loop/ -o loop
cp -vR /mnt/loop/* /mnt/cf/

4. Create in ./boot/grub/menu.lst new file: menu.lst with following content:

timeout 10
default 0
title           DSL
root            (hd0,0)
kernel          /boot/isolinux/linux24 root=/dev/hda1 3 vga=normal noacpi noapm noscsi nopcmcia nousb noapm nomce noddc nofirewire frugal 2 dma lang=de restore=hda2 home=hda2 opt=hda2 host=DSL  dsl mydsl=hda2
initrd          /boot/isolinux/minirt24.gz

title           DSL-test
root            (hd0,0)
kernel          /boot/isolinux/linux24 root=/dev/hda1 ro lang=de frugal
initrd          /boot/isolinux/minirt24.gz

boot

5. Check the file /mnt/cf/boot/grub/device.map and update drive mapping acordingly e.g.

(hd0)    /dev/hda
(hd1)    /dev/hdb
(hd2)    /dev/hdc
(hd3)    /dev/hde

6. Remaster  DSL:

6.1 Extract KNOPPIX image from cd iso image

6.2 Extract the KNOPPIX file system (cloop rpm will be needed):

$ extract_compressed_fs /media/cdrom/KNOPPIX/KNOPPIX - > uncompressed-image
$ mkdir mnt1
$ sudo mount -o loop uncompressed-image mnt1
$ cp -a mnt1 extracted
$ rmdir extracted/.rr_moved
$ sudo umount mnt1
$ cd extracted

6.3 Customize DSL …

6.4 Compress file system back to the KNOPPIX

$ cd ..
$ mkisofs -hide-rr-moved -allow-leading-dots -R -l -V "KNOPPIX ISO9660" -v -allow-multidot $SAND_BOX | create_compressed_fs - 65536 > KNOPPIX2

Useful links:

  1. Frugal DSL Installation
  2. Hacking DSL

Powered by WordPress