Enabling extra apt-get software/apps on Beaglebone

By default, the Beaglebone Black with Debian as of this writing doesn’t have packages like python-scipy in the repositories. This is simple to fix by enabling the “backports” repo as follows.


sudo nano /etc/apt/sources.list

and uncomment the line

deb http://ftp.debian.org/debian wheezy-backports main contrib non-free

then type

sudo apt-get update

Note: Some of the Python packages might be of versions older than you’d like (e.g. Scipy 0.10). You can try the pip install method in those particular cases.

Fixing Beaglebone Black Rev. C error on apt-get

I experienced an error upon any use of apt-get with a new Rev. C Beaglebone with the factory Debian install.

The error was like:

insserv: Starting led_aging.sh depends on rc.local and therefore on system facility ` $all’ which can not be true!
Here was the fix by replacing /etc/init.d/led_aging.sh with:

#!/bin/sh -e
### BEGIN INIT INFO
# Provides: led_aging.sh
# Required-Start: $local_fs
# Required-Stop: $local_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start LED aging
# Description: Starts LED aging (whatever that is)
### END INIT INFO

x=$(/bin/ps -ef | /bin/grep “[l]ed_acc”)
if [ ! -n “$x” -a -x /usr/bin/led_acc ]; then
/usr/bin/led_acc &
fi

Armchair commentary on Raspberry Pi 2 release

I applaud the Raspberry Pi 2 with ARMv7 quad-core CPU and LPDDR2 RAM release. My opinion on the original Raspberry Pi (non +, model B 256MB and 512MB RAM) boards was fairly sour due to the anemic ARMv6 single core CPU. Generally speaking, the Beaglebone Black and Intel Edison have been substantially better choices for the maker and professional embedded systems designer.

The Beaglebone Black has been a much better choice than the Raspberry Pi due in part to the PRU, DDR3L RAM (faster), and ARMv7 CPU.

The Intel Edison has been a much better choice than the Raspberry Pi and in some applications better than the Beaglebone Black due to the Edison’s dual-core x86 CPU, fast RAM, and extremely favorable energy efficiency. Depending on your application, the Edison may run 10x as long or more on battery than the Raspberry Pi (1 or 2) and Beaglebone Black.

I am awaiting side-by-side comparisions of the new Raspberry Pi 2 on benchmarks with the Phoronix Test Suite next to the Beaglebone Black and Edison to say more. I don’t plan to purchase a Raspberry Pi 2 at this time to do OpenCV benchmarking, but would be glad to hear if someone else does this benchmarking.

Disable Beaglebone Black flashing heartbeat LED

To disable the annoying heartbeat LED:

sudo -s
echo none > /sys/class/leds/beaglebone\:green\:usr0/trigger
exit

Note, this might reset at reboot.

You can search the web for how to make this permanent via the device tree (requires extraction and recompilation).

Might also be able to do something with rc.local — didn’t try this.

Reference: http://www.perturb.org/display/1127_BeagleBone_Black__USR_Leds.html

Install Debian 7 to eMMC (internal flash drive) of Beaglebone Black

Note there’s now a semi-automated script to do this.

1) on your laptop PC, goto http://www.armhf.com/index.php/boards/beaglebone-black/#wheezy
and download the Debian 7 image (e.g. debian-wheezy-7.0.0-armhf-3.8.13-bone20.img.xz )
2) [optional] check that md5 sum is correct by typing in Terminal:
md5sum ~/Downloads/debian-wheezy-7.0.0-armhf-3.8.13-bone20.img.xz
this should match the md5 given at the download page
3) type lsblk, note which drives are listed, then insert the SD card into your laptop and type lsblk again–the new item is your SD card. Let’s say it was /dev/mmcblk0 (check on your PC!!)
4) type in Terminal:
sudo su
xz -cd debian-wheezy-7.0.0-armhf-3.8.13-bone20.img.xz > /dev/mmcblk0
exit

5) This operation takes about 1-3 minutes — you’re writing data to the SD card at say 2MB/sec if using a Class 4 SD card, and say 6MB/sec if using a Class 10 SD card, and you’re writing uncompressed about 350 MB to the SD card. For fun, you can open another Terminal window and type sudo iotop or indicator-multiload to monitor the data writing.
6) insert this SD card into the (non-powered) BeagleBone Black and then apply the power.
7) Note, you might be one of those whose microHDMI adapter/monitor combo doesn’t work with the BBB. Well, it’s OK, since there is an SSH server running by default. You do need to know the IP address of the BBB on your LAN (plug the BBB into your Ethernet). Then, on your laptop Terminal, (assuming your IP addresses are like 192.168.xxx.xxx) type:
nmap -v -sP 192.168.0.0/24 | grep -B1 up
the BBB may show up as “debian-armhf”. Let’s say it’s 192.168.0.5
8) in Terminal on your laptop, type:
ssh 192.168.0.5
login: debian
password: debian

Change this password now by typing passwd at the
debian@debian-armhf:~$
prompt

9) at the debian@debian-armhf:~$ prompt, type:
lsblk
the line that looks like:
mmcblk1 179:8 0 1.8G 0 disk should be the internal BBB eMMC drive.
10) on your LAPTOP, type in Terminal:
scp ~/Downloads/debian-wheezy-7.0.0-armhf-3.8.13-bone20.img.xz debian@192.168.0.5:
11) At the BBB debian@debian-armhf:~$ prompt, type:
xz -cd debian-wheezy-7.0.0-armhf-3.8.13-bone20.img.xz > /dev/mmcblk1
12) after 3-5 minutes it will be done, type sudo poweroff and then remove SD card
13) power on after removing SD card and you’re on the internal eMMC

note, there are other ways to do this too.

Setting up Beagleboard Black (BBB) with Ubuntu

This procedure assumes you are running on a PC running Ubuntu itself.

Do not power up the BBB until instructed.

1) Take a blank micro SD card 2GB or bigger and plug it into your laptop/desktop PC. I use Gparted to remove any existing partitions on this microSD card. Be sure you know which /dev/mmcblk0 or /dev/sd* is your micro SD card! For this procedure I will assume the SD card is at /dev/mmcblk0.
2) Download the *.img.xz file of your choice
As of this writing, Ubuntu 12.04, 14.04 and Debian 7.5 are available.
3) cd ~/Downloads
sudo su
xz -cd ubuntu-*armhf*-bone*.img.xz > /dev/mmcblk0

This will take 5-10 minutes with a card writing at 5MB/sec.
4) type exit to drop out of su mode (prompt is a $ instead of the su #).
5) sudo partprobe /dev/mmcblk0
ls -al /dev/mmcblk0
6) sudo parted -l
you should see two partitions under /dev/mmcblk0 — the first partition, flagged “boot” will be about 1 megabyte in size. The second partition will be about 2 gigabytes in size with the ext4 file system.
7) type sync to confirm that writing to SD card is complete. Then since you have not mounted the SD card (if you did, unmount it) pull the SD card out of your PC. Note that the micro SD card goes into the Beaglebone Black “upside down” with the contacts facing away from the PCB.
——————————-
Booting up the BBB:
* You will need a microHDMI to HDMI (or DVI, VGA, etc.) adapter to plug into your existing monitor–or, you can choose to run entirely remotely over SSH.

* BE SURE TO PLUG AN ETHERNET CABLE into your network before booting.

* Now with the Ubuntu microSD card inserted into the BBB, hold down the user/boot switch (the one closest to the microSD card on the opposite side of the PCB) and keep holding after plugging in mini-USB and 5.5mm power until the third LED from the Ethernet jack starts flashing (indicating the microSD is being accessed).

* WAIT about 1 minute with a black screen (not suspended, but just black) screen while Ubuntu start. THen you’ll see “ubuntu-armhf login” with username: ubuntu
password: ubuntu

You now have a basic Ubuntu setup. Using df -h reveals that <0.5GB is being used, which gives you the option of copying from SD to internal eMMC.

* don’t forget to change your password by typing passwd

* install the useful parse-edid program by typing:
sudo apt-get install read-edid

After this first Ubuntu boot, you do NOT have to hold down user/boot switch on future bootups to use the SD card. Subsequent boots take me 12 seconds to get to login prompt (with Class 4 SD card (a slow crummy card)).

Commentary:

http://robotic-controls.com/learn/beaglebone/beaglebone-black-ubuntu

based off of: http://www.armhf.com/index.php/getting-started-with-ubuntu-img-file/