Headless Hard-float BeagleBone Black - Part 1: Installing Hard-float Ubuntu

Hi everyone! This time, I want to show you how to get a headless hard-float BBB running. These steps are the actual steps that I did to get my BBB working. As usual, if you have any question and/or suggestion, please let me know.

In this post, I will refer your Windows powered desktop/laptop as "Host", and BBB as "Kit". Of course you could use a Linux powered host, but my steps here are for Windows.

What is headless and why? Headless means you run your kit without a monitor, even without mouse and keyboard. Why do we want to do this? The first benefit is that we don't need another monitor, another mouse, and another keyboard. And the most important benefit is that we can use our current mouse and keyboard, to control the kit via a window on out host (as a regular program), which helps multitasking easier.

What is hard-float? Our kit have powerful floating-point capability. In order to fully utilize that power, you need to compile your programs with "float-abi=hard" flag. The Angstrom distribution that comes with the kit DOES support hard-float, but you have to change some settings, see this thread for more details. The easier way to fully utilize hard-float is using armhf-ubuntu. Those images are prepackaged with hardware floating point enabled and are easy to install. One more important benefit of armhf-ubuntu is that libjpeg-turbo is the default libjpeg. You could find more information about libjpeg-turbo and why we want it.

OK, let's get started.

Get an image from here. I used Ubuntu 12.04 LTS image, and you should also use this if you want to install LXDE (more on this on Part 2). You should read the instruction on armhf page too, but I will also give detailed step-by-step to install Ubuntu 12.04 LTS on your kit's eMMC. If you follow armhf's instruction to install to eMMC, you will use your host to install ubuntu to your uSD card, then while running on uSD card, install ubuntu to your eMMC

And now, my steps to directly install ubuntu to your eMMC. You need 7-zip, and SDFormatter.

  • Download "ubuntu-precise-12.04.3-armhf-3.8.13-bone30.img.xz" (~65MB) from armhf
  • Use 7-zip to extract it, you will get "ubuntu-precise-12.04.3-armhf-3.8.13-bone30.img" (~1.78GB)
  • Use SDFormatter to format your uSD card, default settings are good
  • Visit http://elinux.org/BeagleBone_Black_Extracting_eMMC_contents, read it, get the zip, do as instructed there. But change the autorun.sh to:

1
2
3
4
5
#!/bin/sh
echo timer > /sys/class/leds/beaglebone\:green\:usr0/trigger
dd if=/mnt/ubuntu-precise-12.04.3-armhf-3.8.13-bone30.img of=/dev/mmcblk1 bs=10M
sync
echo default-on > /sys/class/leds/beaglebone\:green\:usr0/trigger

  • Copy the extracted image ("ubuntu-precise-12.04.3-armhf-3.8.13-bone30.img") to the root of uSD card
  • Insert uSD card to kit and boot kit up, the script will install ubuntu to your eMMC
  • Once it's done, poweroff the kit (disconnect power), remove uSD card and reconnect power to boot it up
Now you have fresh ubuntu 12.04 installed on your kit. Use PuTTy, connect to your kit, username & password is "ubuntu" (without quotes, of course). The first thing you want to do is setting a root password:

1
sudo passwd

Then update your installation:

1
2
3
sudo apt-get update
sudo apt-get upgrade
sudo apt-get clean

The last command, "sudo apt-get clean" is to delete download cache, to regain precious disk space on your kit.

1 comment:

Nguyen Trung Tin said...

xin chào,
hiện tại mình đang sử dụng beaglebone black chạy angstrom + webcam loghitech c525 và mình có viết một chương trình nhỏ (console) sử dụng opencv để capture frame từ webcam. mình đang gặp một lỗi là khi capture frame (VideoCapture >> frame) thì xuất hiện lỗi "select timeout" và chương trình bị treo luôn, mình đã thử một số hướng dẫn trên mạng nhưng vẫn không thành công, không biết bạn có gặp phải trường hợp như trên và khắc phục được không, xin chia sẻ với mình với.xin cám ơn
----------------
Nguyen Trung Tin
mail: tinnguyen26@gmail.com