Setting Up tinybsd on Advantech PCM-5823 Embedded System
I was able to get an Advantech PCM-5823 embedded PC board, discarded at my workplace. It needed some soldering to bring it to live, but otherwise it was nicely working mini-PC.
I used a tinybsd port from the FreeBSD ports collection to turn it into a tiny embedded system.
One note: I had challenges building the port because the PC I'm running this is an AMD64 architecture, and embedded PCM-5823 PC board is an i386 platform. So I used another, older, i386 box to make a tinybsd build. Later I read that you could make an i386 build on other (AMD64) architecture in FreeBSD, but I couldn't get it to work, so for now when I make tinybsd build I match the target platform.
If interested, config files used to build tinybsd available.
Here is a script I used to make a bootable tinybsd image for the PCM-5823 embedded PC:
# ********************************************************************** # tinybsd setup on Advantech PCM-5823 embedded system # ********************************************************************** # 12/27/2007 # -- Media Preparation: # -- Using USB2Flah adapter # -- Ensure a correct USB disk is on /dev/da1s1 ! # -- otherwise change da1s1 to proper disk. fdisk -BI da1 bsdlabel -w /dev/da1s1 auto bsdlabel -B /dev/da1s1 #-- Build an image # Using Sandisk 128mb flash geometry (confirmed on target OS): /usr/src/tools/tools/tinybsd/tinybsd 249808 8 32 pcm pcm000.bin >pcm.out # -- Copy image to media dd if=/usr/src/tools/tools/tinybsd/tinybsd.bin of=/dev/da1s1 # -- Optional tasks after image is built: # -- If need to modify files on image #-- attach & mount created image as disk on /mnt mdconfig -a -t vnode -f /usr/src/tools/tools/tinybsd/tinybsd.bin -u 0 mount /dev/md0a /mnt #-- copy/edit files, etc. diskinfo adduser #-- unmount & detach image disk umount /mnt mdconfig -d -u 0
Initializing first boot:
- boot (
ro
- mounted filesystem). - edit (ne)
/etc/fstab
to mount filesystem asrw
- reboot - generates ssh keys, etc.
- set root password, create accounts, etc.
- edit
fstab
back to mout filesystem asro
, reboot
mount -u -o rw /do your stuff, and then change it back to read-only mode:
mount -u -o ro /