Building a Beaglebone FreeBSD Kernel
Building a FreeBSD kernel for Beaglebone is not terribly difficult. Firstly, you need the FreeBSD-Current sources: svn co http://svn0.us-east.freebsd.org/base/head /src/FreeBSD/ Next, build the cross-development tools for FreeBSD: cd /src/FreeBSD/head make XDEV=arm XDEV_ARCH=armv6 xdev Then get Crochet-FreeBSD. This is by far the easiest way to build a FreeBSD kernel for Beaglebone git clone git://github.com/kientzle/crochet-freebsd.git Once you have Crochet, you’ll need u-boot. You can get the latest sources here. You’ll need to drop them into your crochet directory. Crochet needs the “auditdistd” user, so if you’re not on FreeBSD-10, or CURRENT, you’ll need to add that user: pw useradd auditdistd -s /usr/sbin/nologin -g wheel Finally, once you’ve editted “config.sh” to set up the source directory for FreeBSD and to select the Beaglebone build, you can run it: sh crochet.sh -c config.sh Once crochet has finished, it will have produced an image file into the /work/ subdirectory of crochet-freebsd. Write that image file to a sd card. dd if=FreeBSD-armv6-BEAGLEBONE.img of=/dev/rdisk1 bs=1m You’ll likely want to set up a serial console. In order to do that, you need one of these, a PL2303 serial cable. You can get one here. The pin connections are as described at circuitco. Function Beagleboard Wire Ground Pin1 Black Receive Pin4 Green Transmit Pin5 White On OS X, you’ll need PL2303 serial drivers. You can get those here. You should then have this device on OS X /dev/tty.PL2303-000013FA Once the Beagleboard is plugged in, you can get a serial console like this: screen /dev/tty.PL2303-000013FA 115200 To boot the SD card, follow the instructions here. For simplicity sake, I have included the instructions: Disconnect the power to the Beagleboard Connect the serial cable to both the Beagleboard and the computer Insert the micro-SD card Hold the Boot switch. This is the switch at the opposite end of the board from the LEDs, adjacent to the SD card slot Connect the power to the Beagleboard Release the Boot switch In my case, I had connected the serial cable and brought up screen previously; that way I could see the boot-up messages. If you want to try it for yourself, the .img file is here.