Tags:
create new tag
, view all tags

Embedded VLSR

Overview

The DRAGON VLSR software requires only minimal resources in terms of CPU and memory. Running the VLSR code in an embedded environment is a practical alternative to dedicating an expensive server. The embedded platform does not require any moving parts, uses much less space and power, and can be managed like any ordinary server.

Soekris Engineering offers a PC-based embedded computer system designed around the Geode LX processor. They are designed to run Linux and BSD variants, require very little power and space, and are quite affordable.

We have developed the procedure below to make it quite simple for anybody to run the DRAGON VLSR software in an embedded x86 environment without going through the entire bootstrapping process.

Required Hardware

  • Soekris net5501 & power supply
  • CompactFlash card (512MB or larger) — we used the SanDisk SDCFJ series cards
  • CompactFlash USB card reader
  • Linux server with USB ports

We would also recommend that you have a way to establish a serial connection to the Soekris board. We typically use kermit or minicom via a USB-to-RS232 cable from a laptop or a direct serial connection to a server.

Soekris net5501 boxes (2), power supply and USB card reader  (Click to enlarge)

Imaging Procedure

  • connect CompactFlash USB card reader to the Linux server and insert CompactFlash card

  • use the output of dmesg to determine which device Linux has assigned to the card — in our case, it was /dev/sdb:
root@hydra:~# dmesg
...
  Vendor: Generic   Model: Flash HS-CF       Rev: 3.95
  Type:   Direct-Access                      ANSI SCSI revision: 00
SCSI device sdb: 4001760 512-byte hdwr sectors (2049 MB)
...

  • run fdisk /dev/sdb to partition the CompactFlash card — most come pre-formatted with a FAT16 partition, remove this, create a Linux partition, set it to bootable, and write your changes:
root@hydra:~# fdisk /dev/sdb

Command (m for help): p

Disk /dev/sdb: 2048 MB, 2048901120 bytes
64 heads, 63 sectors/track, 992 cylinders
Units = cylinders of 4032 * 512 = 2064384 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *           1         992     1999840+   6  FAT16

Command (m for help): d
Selected partition 1

Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-992, default 1): [enter]
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-992, default 992): [enter]
Using default value 992

Command (m for help): a
Partition number (1-4): 1

Command (m for help): p

Disk /dev/sdb: 2048 MB, 2048901120 bytes
64 heads, 63 sectors/track, 992 cylinders
Units = cylinders of 4032 * 512 = 2064384 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *           1         992     1999840+  83  Linux

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.

  • using mkfs.ext3, create an ext3 filesystem on the CompactFlash card:

root@hydra:~# mkfs.ext3 -j /dev/sdb1
mke2fs 1.40-WIP (14-Nov-2006)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
250368 inodes, 499960 blocks
24998 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=515899392
16 block groups
32768 blocks per group, 32768 fragments per group
15648 inodes per group
Superblock backups stored on blocks:
        32768, 98304, 163840, 229376, 294912

Writing inode tables: done
Creating journal (8192 blocks): done
Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 29 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.

  • download the root filesystem image located here (163MB)
root@hydra:~# wget http://dragon.maxgigapop.net/twiki/pub/DRAGON/EmbeddedVLSR/dragon-soekris-cf-image-2008Sep9.tgz
--17:37:28--  http://dragon.maxgigapop.net/twiki/pub/DRAGON/EmbeddedVLSR/dragon-soekris-cf-image-2008Sep9.tgz
           => `dragon-soekris-cf-image-2008Sep9.tgz'
Resolving dragon.maxgigapop.net... 206.196.176.42
Connecting to dragon.maxgigapop.net|206.196.176.42|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 163,051,703 (155M) [application/x-tar]

100%[=================================================================================================>] 163,051,703   70.24M/s             

17:37:30 (70.20 MB/s) - `dragon-soekris-cf-image-2008Sep9.tgz' saved [163051703/163051703]

  • mount the CompactFlash card, extract the .tgz file:
root@hydra:~# mount /dev/sdb1 /mnt
root@hydra:~# tar xfpz dragon-soekris-cf-image-2008Sep9.tgz -C /mnt

  • NOTE: If any of the remaining commands appear to "hang", please be patient. Our experience has shown that the tar command completes and returns you to the shell, but running vmstat 1 shows data is still being written to the flash card. It may take quite awhile for the commands to finish. You may want to keep vmstat 1 running in another window. Watch the columns labelled bo (blocks out) and b (blocked processes) to stay at zero for an extended period of time. If you host is particularly busy and writing to the disk a lot, you may want to run vmstat -p /dev/sdb1 1.

root@hydra:~# vmstat 1
procs -----------memory---------- ---swap-- -----io---- -system-- ----cpu----
 r  b   swpd   free   buff  cache   si   so    bi    bo   in   cs us sy id wa
 0  1     32  20852 154236 684692    0    0     0     0  309  131  0  0 50 50
 0  2     32  22712 154240 684688    0    0     0   288  322  166  0  0 45 55
 0  2     32  22712 154244 684684    0    0     0     4  319  151  0  0 50 50
 0  2     32  22712 154244 684692    0    0     0     0  326  172  0  0 50 50
 0  1     32  22524 154672 684664    0    0  1384   540  737 1096  1  0 51 48
 0  1     32  21896 155388 684748    0    0  2812   892 1194 2224  1  1 27 70
 0  0     32  22684 154492 684744    0    0     0     8  276   76  0  0 95  5
 0  0     32  22684 154492 684712    0    0     0     0  255   24  0  0 100  0
 0  0     32  22684 154492 684712    0    0     0     0  254    8  0  0 100  0
 0  0     32  22932 154492 684712    0    0     0     0  255   18  0  0 100  0
 0  0     32  22932 154492 684712    0    0     0     0  254    8  0  0 100  0

  • run grub-install:
root@hydra:/# grub-install --recheck --no-floppy --root-directory=/mnt /dev/sdb1
Probing devices to guess BIOS drives. This may take a long time.
Installation finished. No error reported.
This is the contents of the device map /mnt/boot/grub/device.map.
Check if this is correct or not. If any of the lines is incorrect,
fix it and re-run the script `grub-install'.

(hd0)   /dev/sda
(hd1)   /dev/sdb

  • sync and unmount:
root@hydra:~# sync
root@hydra:~# umount /mnt

  • remove the CompactFlash from the USB card reader, insert into the Soekris CF socket and try to boot!

  • The root filesystem is configured to use DHCP on eth0. An SSH server is running, you may login as user dragon password dragon. The root password has also been set to dragon. The SSH daemon is configured to not allow root logins. To get root access via SSH, you must login as user dragon and run sudo.

  • NOTE: Please be sure to change the password on the dragon user! We would also recommend changing the root password, however root logins are not permitted with the default SSH daemon configuration.

First Boot

  • Make sure that your terminal application is set to use 19200 bits per second, no parity, 8 data bits, and 1 stop bit. This is the default for the Soekris net5501, but can be changed in the BIOS.

  • The first screen that appears on the console when you turn on the net5501 should look like this:

    Soekris net5501 boot screen

  • If the imaging procedure above was successful, GRUB should start and prompt you to choose a kernel: (just let it choose the default)

    Soekris GRUB boot

  • The Linux kernel should begin to boot:

    Soekris Linux kernel boot

  • Eventually, you should receive a login prompt. Login with the username dragon, password dragon. The DRAGON VLSR processes should already be running, which you can see by running ps auxw | grep dragon:

    Soekris Linux login prompt and ps output

  • You can also see the status of the DRAGON processes by running dragon.sh status:

    Soekris dragon.sh status output

Configuring the DRAGON software

  • Please refer to the DCN Software Suite website for the most up-to-date information regarding software installation and configuration.

  • We also have helpful examples posted in the DCN Workshop sections of the Events page.

-- ChrisTracy - 08 Sep 2008

Topic attachments
I Attachment Action Size Date Who Comment
PNGpng soekris_boot_screen.png manage 30.3 K 2008-10-01 - 18:27 UnknownUser Soekris net5501 boot screen
PNGpng soekris_dragon.sh_output.png manage 13.1 K 2008-10-01 - 19:02 UnknownUser Soekris dragon.sh status output
PNGpng soekris_grub_boot.png manage 16.7 K 2008-10-01 - 18:30 UnknownUser Soekris GRUB boot
PNGpng soekris_linux_kernel_boot.png manage 13.5 K 2008-10-01 - 18:52 UnknownUser Soekris Linux kernel boot
PNGpng soekris_linux_login_prompt.png manage 21.8 K 2008-10-01 - 19:01 UnknownUser Soekris Linux login prompt and ps output
JPEGjpg soekris_net5501_small.jpg manage 118.0 K 2008-10-01 - 18:18 UnknownUser Soekris net5501 boxes (2), power supply and USB card reader
Topic revision: r5 - 2009-01-15 - ChrisTracy
 
This site is powered by the TWiki collaboration platform Powered by Perl Copyright 1999-2021.
The information contained in these pages is the property of the Mid-Atlantic Crossroads (MAX).
If you have questions or comments, please contact WebBottomBar">MAX Administration