Long overdue update on how the things are going with FreeBSD on Raspberry Pi. We’ve made some good progress so far:
- Hans Petter Selasky fixed low-speed interrupt endpoints problem which means we have working USB keyboard now
- GPIO driver by Luiz Otavio O Souza. So now you can blink OK LED (gpioctl -f /dev/gpioc0 -t 16). Not the most productive activity though.
- Kernel now obtains information about display resolution, memory layout, MAC address from firmware
- Framebuffer/syscons support added
- Some stability fixes for SDHCI/li>
- Initial port of VCHIQ interface (vchiq-freebsd)
- Port of userland libraries (userland)
Overall stability and performance is still a problem, but it’s what we’re going to work on next.
And if you missed previous post: freebsd-pi is no more, use HEAD from FreeBSD subversion repository.
Boot process has been changed and now it looks like: firmware → uboot → ubldr → kernel. So old script for building image is no longer relevant. Here is new one. Tim Kientzle’s scripts collection for building images for BeagleBone, Pandaboard and RPi uses more systematic approach but RPi part hasn’t caught up to latest boot chain changes yet. Once it is up to date I suggest using Tim’s scripts.
Building FreeBSD does not require any additional tools but if you want VideoCore bits you’ll need following packages installed:
- devel/cmake
- devel/git
- devel/gmake
If you don’t need VideoCore binaries, just comment build_videocore and install_videocore calls. This script will also install OpenGL ES hello_triangle demo to /root folder. To run it run perform following steps:
# cd /root
# kldload vchiq
# ./hello_triangle.bin
I tried to build Qt5 with OpenGL ES support, but build choked on compile-time assert triggered by FreeBSD using OABI. Good news though: EABI work is almost done, so there is a fat chance we’ll see Qt5 with eglfs backend running on FreeBSD in near future.
You can try pre-built image (124Mb, MD5 sums). Login is “root”, no password. Use dd to write it to SD card. U-Boot seems to be somewhat finicky about SD cards, so if you get “** Unrecognized filesystem type **” message try another card. First boot might take some time because sshd will generate keys. U-Boot output goes to serial port and monitor, FreeBSD console messages go only to monitor, but by the end of boot sequence you should get login prompt on serial.
This image is a snapshot of work in progress and by no means a production system.
UPDATE
** Unrecognized filesystem type ** U-Boot issue seems to be more widespread then I thought. I’m working on it.
Great!!! Thanks a lot, but how to build R-PI without videocore. I want to use it for web-server with SSH only
Just remove build_videocore and install_videocore lines
Great work thx 🙂
Good job!
Thank you!
U-Boot 2013.01-rc1-g6709570-dirty (Nov 27 2012 – 19:41:07)
DRAM: 384 MiB
WARNING: Caches not enabled
MMC: bcm2835_sdhci: 0
Using default environment
In: serial
Out: lcd
Err: lcd
mbox: Timeout waiting for response
bcm2835: Could not set USB power state
Net: Net Initialization Skipped
No ethernet found.
Hit any key to stop autoboot: 0
** Unrecognized filesystem type **
** Unrecognized filesystem type **
U-Boot>
Can’t boot to FreeBSD.
Some SD cards seems to have this problem. I’m still trying to track down this one but don’t have such card to reproduce it on my setup.
If you have another SD cards – try them. Also you can try adding init_emmc_clock=50000000 to config.txt
i had try Kingston 4G(class4) and 16G(class10).
added init_emmc_clock=50000000 to config.txt, not any help.
Please replace boot.img on card with this file: http://people.freebsd.org/~gonzo/arm/rpi/uboot-trace.img and send me debug output to gonzo@freebsd.org
Thanks
I use SanDisk 2GB class 2 with pre-built image. It works fine.
I was getting problems with u-boot.bin before (see elsewhere on kernelnomicon) not being able to even read the boot.scr file. The Nov 27 version in the tar ball in the new build scripts has fixed the issue I was having before.
Also the: init_emmc_clock=50000000 to config.txt has fixed the Bad CRC errors on the MMC device and I’ve finally been able to boot the SD card (albeit with a Nov 2nd kernel – I am now building an up to date one). (SanDisk Branded 2GB and 8GB SD cards).
Looking very good from here now – will build an up-to-date kernel and image with the new build scripts and report if there are any problems…
After a bit of jiggery pokery I go your freebsd-pi-r243694.img to book on my 256 model B. Awesome work.
WARNING: Caches not enabled
MMC: bcm2835_sdhci: 0
Using default environment
In: serial
Out: lcd
Err: lcd
mbox: Timeout waiting for response
bcm2835: Could not set USB power state
Net: Net Initialization Skipped
No ethernet found.
Hit any key to stop autoboot: 0
** Unrecognized filesystem type **
** Unrecognized filesystem type **
U-Boot>
Can’t boot to FreeBSD. +1. sd card 16gb Transcend. Raspberry 512mb, model B.
When you plan to fix?
If you have a problem such as “Unrecognized filesystem type”, please try this version:
http://www.peach.ne.jp/archives/rpi/test/uboot-20121201.img
SHA256 (uboot-20121201.img) = 9218f3ce3a09b012eb250c044df9ed835929c207f3c3f89b21bfe249ef639a0f
Rename it to uboot.img, then copy it to the SD you created.
Thank you,
model B 512Mb this uboot work fine 🙂
What is different about this image? I was attempting to compile u-boot for myself, but was getting the “Unrecognized filesystem type”. This image works, but I would like to be able to modify the default kernel parameters.
pls, write root password, this not blank 🙁
Sorry, it looks like because of uboot Daisuke Aoyama 🙂
# uname -a
FreeBSD raspberry-pi.local 10.0-CURRENT FreeBSD 10.0-CURRENT #0 r243703: Fri Nov 30 22:14:10 JST 2012 aoyama@fbs.local:/usr/obj-rpi/arm.armv6/usr/src/sys/RPI-B-test3 arm
It’s posted at ML but try with:
User: pi
Password: raspberry
Password(root): raspberry