Skip to main content

5 posts tagged with "rpi"

View All Tags

Autobooted to FreeBSD's loader

· 2 min read

The GPS addon I use with for my RaspberryPi starts sending information to the RPi through the GPIO the second it tuns on. The RPi reads this as input to the serial console and this interrupts UBoot's autoboot process.

In order to fix this you had to use set autoboot to only stop when a certain string is typed in during the autoboot countdown. The following changes are made to UBoot/include/configs/rpi.h.

First we enable autoboot by adding #define CONFIG_BOOT_DELAY N, where N is a number of seconds. Then we enable the advanced autoboot controls by adding #define CONFIG_AUTOBOOT_KEYED.

Next we need to print out a prompt to the user to let them know that we are waiting for autoboot. To do this we define #define CONFIG_AUTOBOOT_PROMPT str,bootdelay, where "str" is a string that takes the format of a call to printf() and allows variable input. I set my str to "autoboot in %d seconds\ntype 'stop' to get to UBoot\n",bootdelay.

Finally we define the string that must be typed in after the prompt appears in order to get into UBoot. This is achieved by adding #define CONFIG_AUTOBOOT_STOP_STR str, where str is the string that needs to be typed in.

Now when I turn on my RaspberryPi I still have serial access if I need it. Now I have to configure loader.conf to not listen to the serial port.

Build Process Automated

· One min read

I finished automating the build process for Crochet Using the newest U-Boot.

Clone my Crochet Fork and then inside that clone my UBoot Fork. Set up your Crochet config file and run sh crochet.sh -c <config_file> and enjoy a bootable FreeBSD image for your RaspberryPi.

Please read <u-boot-top>/doc/README.clang since is a little bit of set up to do. Don't worry about the gmake stuff that's already taken care of =)

U-Boot Update

· 2 min read

I've set up a way to build the project without having Crochet involved in building U-Boot. Unfortunately, I'm running into an issue. U-Boot drops me directly into the U-Boot shell but I'm unable to use my USB keyboard.

First things first, I disabled net booting. Removing *func(PXE, pxe, na) * and func(DHCP, dhcp, na) from uboot/include/configs/rpi.h disables net booting. I removed this since I'm only booting from the SD card in the RPI.

The README in uboot/ shows that USB Keyboards can be used inside the U-Boot environment. However, there's not a list of devices supporting USB Keyboards so I assumed that they worked on all devices. That was not the case.

U-Boot USB Keyboard support for the Raspberry Pi is currently under development by Stephen Warren. According to a recent commit he is having trouble getting U-Boot's drivers to work with USB Keyboards.

Since the GPS device uses the Raspberry Pi's GPIO slot, I'm going to disable serial input and output in uboot/include/configs/rpi.h by removing "serial," from *"stdin=serial,lcd\0" * *"stdout=serial,lcd\0" * "stderr=serial,lcd\0". The GPS's communication will not get interpreted as commands for the U-Boot prompt.

Since I'm removing the ability to interact with the U-Boot prompt, I'm going to use Oleksandr Tymoshenko's approach. This involves setting up environment variables and using CONFIG_BOOTCOMMAND. Since the memory layout is the same as Oleksadr Tymosheko's, I'm going to see if his boot commands will work.

Stratum-1 Pi

· One min read

This winter I asked one of my professors for a project to work on. We pitched a couple of ideas back and forth before settling on a Stratum-1 time server.

I decided to use a Raspberry PI and FreeBSD 10.1. Since this will be a Stratum-1 time server a GPS device was required. I chose the Raspberry PI GPS Add-on by iteadstudio.

I chose Crochet-FreeBSD as my build tool. Crochet uses an older version of Das U-Boot. I forked Crochet and am working on making it compatible with the newest version of U-Boot.