BeagleBone Black

Notes on getting started with the BeagleBone Black (BBB) 4G  REV C, CORTEX A8 from Farnell.

These instructions are based on using a Mac running OS X El Capitan Version 10.11.4. the instructions describe upgrading to the latest Debian release, Jessie at time of writing, and testing the Cloud 9 IDE with the simple blink application. As usual remember to read ALL steps.

Updating the OS on the 4G on board  eMMC

Download the latest image and uncompress it. On a Mac you will need to use a third party App such as The Unarchiver as the native Mac app doesn’t support .xz formats with arbitrary files inside (it does however support .tar.xz files).

Insert an SD card with capacity 4G or greater into your card reader and use Disk Utility to format the SD card. Note the device name, in the image shown below “disk2”. Use Erase to format the disk using the options shown below.

Screen Shot 2016-03-30 at 10.51.08

You can also use

df -h

to find the disk mount name on my system it is “/dev/disk2s1”. Unmount the disk

sudo diskutil unmount /dev/disk2s1

Copy the image to the SD card editing the path and file name to match the  “rdisk2” to match your disk number found above. Note make sure you have the correct drive number as you DO NOT want to overwrite your local system.

sudo dd bs=1m if=~/Downloads/bone-debian-8.3-lxqt-4gb-armhf-2016-01-24-4gb.img of=/dev/rdisk2

To boot from the SD card, place it in the BeagleBone Black and hold down the boot button whilst connecting the power.

Flash SD image to update eMMC image.

First you need to edit /boot/uEnv.txt file on the SD card. This is easiest to do on a linux machine. I use Ubuntu running on Parallels, you can also use VirtualBox which is free.  To write the edited file back to the SD card  launch gedit as the root user from the Ubuntu Terminal by entering:

sudo gedit

To turn these images into eMMC flasher images, edit the /boot/uEnv.txt file on the Linux partition on the microSD card and remove the ‘#’ on the line with ‘cmdline=init=/opt/scripts/tools/eMMC/init-eMMC-flasher-v3.sh’. Enabling this will cause booting the microSD card to flash the eMMC. Save the edited file.

  1. Put the microSD card back in the BeagleBone Black
  2. Hold down the boot button (it’s located on the same side of the BeagleBone Black as the microSD card slot, and is the only button in that area).
  3. Apply the power.
  4. Keep holding down the button until you see the bank of 4 LED’s light up for a few seconds.
  5. You can now release the button.

Whilst writing the image to the eMMC the user LEDs will flash back and forward. When finished all LEDs will light. This might take some time. Note if left on for a while when finished the board will power off. Remove the power and microSD card and then apply power to reboot from the eMMC.

Interactive access via browser interface

You can access the browser based interface by entering the IP address of the BeagleBone Black into your Browser Chrome, Safari  and Firefox will work.

If the BBB is tethered to your machine via USB

http://192.168.7.2

Or if the BBB is connected to your router and both your local machine and BBB are on the same local network. Note replace the IP Address with the correct address for your board. You should be able to obtain this from the control panel of your router.

http://192.168.1.99

Try out the Cloud9 IDE tutorial from this page. It shows you how to create a simple blink application.

Note: In order for this program to run with the latest version of Debian Jessie you will need to update the Kernel to the latest stable version. To do this you will need to SSH into the BBB and then Update the Kernel as described below.

When running the code from the Cloud9 IDE it takes a while before the code starts to run on the BBB.

Remote Access via SSH

Use the terminal in Mac OS or Putty in Windows to SSH into the BBB

If the BBB is tethered to your machine via USB

ssh 192.168.7.2 -l root

Or if the BBB is connected to your router and both your local machine and BBB are on the same local network. Note replace the IP Address with the correct address for your board. You should be able to obtain this from the control panel of your router.

ssh 192.168.1.99 -l root

Update Kernel

To ensure that your version of bonescript is compatible with the Cloud9 Web IDE

cd /opt/scripts/tools/
git pull
sudo ./update_kernel.sh --bone-channel --stable

To use the changes you now need to reboot the BBB.

Shut down and Reboot

To shutdown
sudo shutdown -h now

To reboot, type this:

sudo reboot

Installing the BB View Cape

  1. Download Debian Image for the BB View

It contains the following files:

  • am335x-boneblack-lcd4.dtb
  • am335x-boneblack-lcd7.dtb
  • am335x-boneblack.dtb
  • kernel_modules.tar.gz
  • org.conf
  • zImage
  1. Unzip the files and copy all the image files to a USB flash drive.
  2. Connect the flash drive to the BeagleBone Black and power it ON.
  3. Execute the following instructions in a terminal program (such as PuTTY) to mount the flash drive:
mkdir /media/udisk
mount /dev/sda1 /media/udisk
  1. Execute the following instructions to install the image and then restart the system
cp -f /media/udisk/uImage /boot/
cp -f /media/udisk/*.dtb /boot/
tar -xvf /media/udisk/kernel_modules.tar.gz -C /
sync

The following instructions are executed in PuTTY for use of 7” LCD module;

cd /boot
cp am335x-boneblack-lcd7.dtb am335x-boneblack.dtb
sync

Now restart the board to finish the setup for 7” LCD module.

Copy the files from 2 to BBB ( i copied it to /home/debian ) and execute following commands :

$ cp -f /home/debian/zImage /boot/uboot

$ cp -f /home/debian/*.dtb /boot/uboot/dtbs

$ tar -xvf /home/debian/kernel_modules.tar.gz -C /

$ cp -f /home/debian/xorg.conf /etc/X11/

$ sudo nano /boot/uboot/uEnv.txt                ( Edit uEnv.txt and insert the following two lines )

——-

capedisable=capemgr.disable_partno=BB-BONELT-HDMI,BB-BONELT-HDMIN

cape_enable=capemgr.enable_partno=BB-VIEW-LCD7-01

——–

( Save and Exit )

$ sync

 

5.) Shutodown BBB, attach BB-VIEW and reboot, that’s it