Contents |
There are various serial terminal utilities you can try to connect to your WRAP hardware, from cu, kermit, and minicom on Linux to Hyper Terminal and Tera Term (also works in Wine), here is the boot screen for PC Engines WRAP hardware. The default connections are 38,400 baud 8-N-1.
$ cu -l /dev/ttyUSB0 -s 38400
WRAP.1 v1.11 Wisp-Router.com Your Full Time Professionals 640 KB Base Memory 130048 KB Extended Memory 01F0 - no drive found ! No boot device available, press Enter to continue.
Pressing 's' during the BIOS startup screen brings you to the setup menu. CHS/LBA determines the disk access method, LBA is required for media > 504 MB. The default serial baud is 38,400, it is recommended to change to 9,600 baud to make it compatible to default PC access.
(9) 9600 baud *3* 38400 baud (5) 57600 baud *C* CHS mode (L) LBA mode (E) Etherboot enable (U) USB enable (D) Conservative DRAM timing *R* Serial console enable (X) Xmodem upload (Q) Quit
Now connect with the following instead:
$ cu -l /dev/ttyUSB0 -s 9600
Pop over to etherboot.org and build a etherboot rom with the following options.
ASK_BOOT: -1 BOOT_FIRST: BOOT_NIC BOOT_SECOND: BOOT_NOTHING BOOT_THIRD: BOOT_NOTHING BOOT_INDEX: 0 ELF_IMAGE PXE_IMAGE IMAGE_FREEBSD FREEBSD_KERNEL_ENV DOWNLOAD_PROTO_TFTP PXE_EXPORT CONFIG_PCI CONFIG_ISA PCBIOS IBM_L40 ZPXE_SUFFIX_STRIP
This will allow booting of Voyage Linux but not FreeBSD.
The compromise for WRAP development is to install an image on compact flash that boots a FreeBSD kernel and have the kernel configure an IP address from DHCP, and mount NFS root from the root-path. For this to happen an /etc/fstab file must exist but without a root file system mount point, e.g.
proc /proc procfs rw 0 0
procfs is deprecated on FreeBSD in preference of sysctl, however it is currently required by Samba 4.
WRAP hardware has no keyboard controller and no VGA adapter, this means all communication has to occur over the serial port. Therefore a getty should not be run on the video adapter, /etc/ttys needs to look like follows.
# # name getty type status comments # console none unknown off secure ttyd0 "/usr/libexec/getty al.9600" vt100 on secure # Pseudo terminals ttyp0 none network ttyp1 none network ttyp2 none network ttyp3 none network ttyp4 none network ttyp5 none network ttyp6 none network ttyp7 none network ttyp8 none network
Specifying al.9600 instead of std.9600 has the serial console automagically log in. For 38,400 baud rate a new entry in /etc/gettytab needs to be made for auto-login, or for a prompt use std.38400.
The WRAP hardware has limited support for the parameters of compact flash based operating systems. When you start the device with a card inserted it will show the expected Cylinder-head-sector format:
01F0 Master 045A KTC CF Phys C/H/S 1007/16/63 Log C/H/S 1007/16/63
This says 63 sectors per track, 16 heads, and 1007 cylinders. Normally for small cards, less than 128MB only 32 sectors per track are used. In order to create a flash image that makes available more disk space for TFTP you will need to modify the disk parameters in configure_freesbie2.sh.
# calculate sector size for image # 64MB card disksize="65536" rootsize="20480" confsize="16384" # 512MB card disksize="507528" confsize="486400"
The rootsize does not need to be changed, the disksize is used for sanity checking, the confsize parameter should be increased for larger storage. Calculate the disksize from the output of fdisk with the card inserted and divide by 1024, subtract by the rootsize for a guestimate of the desired size.
At the end of the file you will need to insert the sectors per track, slightly messy configuration unfortunately:
# total number of sectors SECTS="$sectsize" # sectors per track SECTT="63" # heads #HEADS=16 PART1="$rootsize"
Then re-run the script and rebuild a new image:
# ./configure-freesbie2.sh embedded # ./img_freesbie2.sh
Now mount the image and find the actual confsize as calculated by bsdlabel:
# ./mount_img # bsdlabel /dev/md0s1 # /dev/md0s1: 8 partitions: # size offset fstype [fsize bsize bps/cpg] a: 40960 16 4.2BSD 512 4096 10248 b: 974017 40976 4.2BSD 2048 16384 60880 c: 1014993 0 unused 0 0 # "raw" part, don't edit
Take the size of the b: partition and round down to the nearest fsize, here 2048. This is required for the UFS label to work correctly. Update the freesbie2/scripts/img.sh file with the new details:
echo "a: ${PART1} 16 4.2BSD 512 4096 16" > ${TMPFILE}
# echo "b: * * 4.2BSD" >> ${TMPFILE}
echo "b: 972800 * 4.2BSD" >> ${TMPFILE}
echo "c: * * unused" >> ${TMPFILE}
And re-create the image.
# ./img_freesbie2.sh
Ideally a minimal size could be set and on first boot the system could resize the image to the full size however FreeBSD's UFS apparently has no support for resizing.
© 2009 Novell, Inc. All Rights Reserved.