Sunday, April 28, 2013

ArchLinux on BeagleBone and Linux 3.8

I've discovered the joys of embedded programming with the new Linux kernel 3.8. It is bleeding edge and not for the faint of heart. The way that I/O works has been totally changed, so anything that relied on the /sys/kernel/debug/omap_mux/ folder is broken.

This has to do with switching over to Device Tree Overlays for processor configurations. The README.md file at https://github.com/jadonk/validation-scripts/tree/master/test-capemgr has a good explanation, but that doesn't make it any easier to get it up and running.

I've cloned the validation-scripts repository from https://github.com/jadonk/validation-scripts.git. I tried to run do_pinctrl_test.sh from test-capemgr folder, but it needs dtc. No problem, right, we'll just install it....wrong! The current version of dtc in ALARM is not patched to support the -@ option (see https://patchwork.kernel.org/patch/1934471/), so you get a "dtc: invalid option -- '@'" error message.

I'm not as hardcore as the guys at http://hipstercircuits.com/adding-beaglebone-cape-support-to-a-kernel-with-device-tree-in-ubuntu/ so I am calling it a night. I will look into how to get a patched version of dtc, but if it involves too much, I can see myself jumping ship and reverting to an older kernel.

FYI: Here are a couple of issues that I ran into, when trying to install ArchLinux, and how to fix them:

I followed the instructions at http://archlinuxarm.org/platforms/armv7/beaglebone for configuring and setting up the SD card. When I followed the links provided though, I ran into 2 issues:

  1. I could get a u-boot command prompt, but it could not load the kernel image from the SD card. This was solved by copying /boot/uImage to the DOS partition.
  2. After looking for upgrades ('pacman -Syu'), the kernel update gave a warning that my u-boot was probably out of date. After a reboot, sure enough the "image is wrong type" error message appeared in u-boot. I corrected this by downloading and installing http://os.archlinuxarm.org/os/omap/BeagleBone-bootloader.tar.gz 

2 comments:

  1. Any luck getting a patched version of dtc up and running on ArchLinuxArm? Looks like the current version in ALARM still doesn't support the "@" option.

    ReplyDelete
  2. Solution: http://protofusion.org/wordpress/2013/06/beaglebone-black-and-dtc/

    ReplyDelete