Building image for Raspberry Pi: up to date version

Update 1: Add -DDB_FROM_SRC to install targets Update 2: Add user “pi” with password “raspberry” Update 3: Added host system requirements suggested in comments Update 4: Rename bcm2835-rpi-b.dtb to rpi.dtb It’s been a while since I posted original build instruction and a lot has change. Here is new version of it with some explanations: First make sure your host system is configured properly: WITHOUT_FORTH= must NOT be set in src.conf msdos support must be available in the kernel geom_md support must be available in the kernel All code has been moved to HEAD. freebsd-pi repository on github serves only historical purpose and I guess will be removed at some point in future. So in order to build image you need sources for -head ...

February 1, 2013 · 4 min · 657 words · Oleksandr Tymoshenko

VCHIQ drivers work again

I synced both vchiq-freebsd and userland to latest and greatest. As I mentioned earlier - OS compatibility shim was removed from upstream sources so I had to create Linux KPI implementation layer which turned out not that awful task because I managed to reuse a lot of code from Max Khon’s DAHDI port. I had to implement (in somewhat hackish fashion) kthread API, re-implement semaphores support using condvar and mutex in order to get _interruptible part of API working properly and create dumb implementation of rather small subset of Linux list.h API. ...

January 13, 2013 · 1 min · 212 words · Oleksandr Tymoshenko

Packages(*) for Rasberry Pi(**)

I finally got around to setting up experimental pkgng repo for ARM in order to share packages with other ARM developers and users who feel adventurous. And man, was it simple. I have pandaboard that is super-fast comparing to Raspberri Pi so I use it for building ports. There were several installed so I just had to generate packages for them using pkg create -a command. Then I uploaded all newly generated files to the server, grabbed packages built and shared by Stephen Hurd, removed duplicates with older versions and generated repo.txz by issuing ...

January 11, 2013 · 1 min · 206 words · Oleksandr Tymoshenko

VCHI driver, part 2

Some time ago I announced port of VCHI driver to FreeBSD. Since then it was re-licensed as BSD/GPL and I had high hopes for bringing it into the tree as a part of sys/contrib. This weekend I finally got around to it but turned out things had changed for worse. VCHI driver used to have this neat OS-abstraction wrapper, so overall porting process was quite simple: implement synch primitives, physical pages management, driver-specific initialization and you’re done. But… The layer was lost with driver update in October. The reason for it - OS compatibility shims are banned from Linux mainline kernel. ...

January 8, 2013 · 1 min · 189 words · Oleksandr Tymoshenko

FreeBSD/armv6: what's new and exciting?

It’s been a while since last update on the project status so it might seem as there was no progress in this area. The reality is: there is a bunch of activities happening with various levels of success. So I decided to give kind of end-of-the-year round-up of ongoing projects, plans and obstacles ARM hackers face. First of all we tried switching default cache type from write-through to write-back type. It should have increased performance but instead opened a can of worms. Memory corruption debugging led to L2 cache driver on Pandaboard, EHCI driver code and subsequently to busdma code. Whole process took quite a few days full of hair-pulling and nagging various people and ended up in committing USB fixes and Ian Lepore’s busdma patches. PL310 (L2 cache controller) driver is being tested at this very moment. Original issue (WB caches) still stands and postponed till next year. ...

December 30, 2012 · 4 min · 750 words · Oleksandr Tymoshenko

Broadcom switches vchiq to dual license

vchiq, kernel driver for interfacing ARM with VideoCore is now dual-licensed (BSD/GPL). References: https://github.com/raspberrypi/firmware/issues/40 https://github.com/raspberrypi/linux/commit/d21d26ebd773ab87888351220739b43a9733233a

December 17, 2012 · 1 min · 15 words · Oleksandr Tymoshenko

FreeBSD/armv6 in QEMU

[QEMU 1.5 users see this update] First take at getting FreeBSD/armv6 running in simulators. Simulators are great for tracking down nasty bugs and building packages. So here is support for Versatile Platform Board machine supported by QEMU. Most likely this code will not run on real VersatilePB because I do not have this hardware and timing code (or lack of it) on CLCD driver and Keyboard/Mouse interface (PL050) is pure guesswork. ...

December 5, 2012 · 2 min · 271 words · Oleksandr Tymoshenko

Cross-compilation hiccups

Good news and bad news. Let’s start with good ones. Daisuke Aoyama tracked down what causes “Unrecognized filesystem type” error with some SD cards. It is U-Boot using High Speed mode. Root cause is still unknown but as a workaround I just disabled HS mode for SD card in u-boot and updated freebsd-uboot-20121129.tar.gz. Or alternatively you can get uboot-nohs.img and use it to replace uboot.img on your SD card. Bad news are: installworld for cross-compiled FreeBSD is broken unless you’re doing it on the latest HEAD. The reason is utility called mtree(8). It is used to ensure that target filesystem permissions and owners/groups are correct. Owners and groups are described as usernames and group names, not as numeric UIDs/GUIDs and mtree uses getpwXXX family of routines to convert names to numeric values. See the problem already? If new system user is added to latest HEAD and you use old trusty FreeBSD 9.0, there is no way mtree would know about this user. NetBSD solved this problem by introducing -N command-line option that lets you point mtree to the target system’s master.passwd and groups. So we need to port this feature to FreeBSD in order to get proper cross-compilation environment. And that’s my plan for next few days. ...

December 1, 2012 · 2 min · 244 words · Oleksandr Tymoshenko

FreeBSD on Pi: more stuff

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. ...

November 29, 2012 · 2 min · 422 words · Oleksandr Tymoshenko

U-Boot env variables iterator

Ran into it recently and decided to post here just in case someone will have this problem too. Do not define both CONFIG_LOADADDR and loadaddr in CONFIG_EXTRA_ENV_SETTINGS. Otherwise environment variables enumeration API(API_ENV_ENUM) will loop forever.

November 26, 2012 · 1 min · 35 words · Oleksandr Tymoshenko