Wednesday, June 29, 2005

Bering-ulibc installed on WRAP

Phew, after hours upon hours, I finally succeed in installing Bering-uLibC on the WRAP board!!!

First off, I couldn't just install and run it as I did with WISP ... Bering-ulibc is a different animal altogether.

There's a ton of documentation at this page: LEAF for the pcengines WRAP but some of it might need to be tweaked for your needs. What I did was basically as follows (on Windows XP machine with CF card reader):
  1. Popped the CF into memory card reader.
  2. Formatted using WinXP DOS format (format d: /FS:FAT)
    Note: CF needs to be formatted as FAT12 or FAT16, otherwise it won't boot. And don't worry about having to make a DOS 6.22 boot diskette; WinXP DOS's format works just fine - just make sure to specify /FS:FAT to format it as FAT16.
  3. Download syslinux (http://syslinux.zytor.com/) and unzip the latest version on your drive.
  4. Run syslinux -s d:
  5. You should have already downloaded the latest Bering-ulibc package from the download website of the LEAF website.
  6. Unzip the image and use WinImage to open the .imz file.
    Note: I wasn't able to unzip their .imz files using any software other than WinImage.
  7. Unzip the Bering files to a local directory.
  8. (All following instructions use the same directory.)
  9. Download any additional packages and put them in the same directory
  10. Edit leaf.cfg in this directory and make following changes:
    • Change /dev/fdxx to /dev/hda
      Note: The documentation says /dev/hda1, but I spent many hours trying to get that to work ... so when I changed it to /dev/hda, it finally worked. Perhaps WRAP uses /dev/hda because there is only one CF without partitions.
    • Append the additional packages to the LRP list so that they also boot up.
  11. Edit syslinux.cfg and make the following changes:
    • Change /dev/fdxx to /dev/hda
  12. Download the kernel with patch for WRAP that does not require a keyboard controller. Delete the old "linux" file and rename the newly downloaded "linux-2.4.x-xx.tux" to "linux".
  13. Download the initrd-ide-cd file that will allow you to boot from the CF rather than a floppy. Delete the old "initrd" file and rename your "initrd-ide-cd" to "initrd".
  14. Copy all your files to the CF.
    Note: You will notice you have an ldlinux.xx on your local directory as well as the CF. Leave the one on the CF intact - it was created by syslinux and you need that to boot the CF.
Remove the CF (after unmounting it first if needed), pop it into the WRAP board, and watch WRAP boot up with Bering-ulibc and your required packages!

Edit [July 14, 2005]: One step I missed mentioning here is that you have to make the serial port the primary means of input/output for communicating with the device. Here's some information from the LEAF documentation on how to use a serial port with LEAF.

In short, you have to edit syslinux.cfg (use 9600 baud, I had some trouble at higher speeds) and /etc/inittab. The /etc/inittab is the toughie, as you have to unpack the etc.lrp package, edit the file, repackage the LRP and copy it back to your CF.

No comments: