The Beaglebone Black, as shipped, runs an armel Linux package with a v3.8 Kernel. This page describes how to download the Debian 2015-03-01 armhf distribution and how to format a micro SD Card so that the Beaglebone Black will boot from it.
This page is part of a series of web pages which describe how to install C# and Mono on the Beaglebone Black and also how to setup a useful remote compilation and debugging toolchain for it. This page is a pre-requisite for a following page which describes the procedure for installing Mono on the Beaglebone Black and the contents of this page are oriented towards that end result. A previous page in this series describes the hardware setup.
For ARM CPU's, such as the one used on the Beaglebone Black, there are two methods of handling floating point operations (armel and armhf) and both are officially supported by Debian. Armel handles floating point operations in a software compatibility mode and low level software is thought to be much more easily ported in from other architectures. The armhf architecture handles floating point operations in hardware (the "hf" means Hard Float) and is reputedly much faster. It would appear that Debian's position is that the armel architecture will eventually be obsoleted.
Previously, the only real option was to use the armhf 3.14 Ubuntu distribution available from the armhf.com website. It should be noted that Mono has been observed to install on this release and so, once you get it installed on the SD card, the subsequent pages in this series should be applicable with no changes. However, none of the Beaglebone Black specific Cape Manager and Device Tree Overlay code is supported in v3.14 yet so you will not have access to that functionality and will have to edit the Device Tree the old fashioned way (i.e. manually) in order to enable and disable various Beaglebone Black I/O systems.
Things are progressing quite rapidly in the Beaglebone Black world and there is now a standard v3.08 armhf build which is available as an upgrade. You can download it from the Beaglebone Black Latest Images page. The latest version available (as of the time this page was written) is Debian (BeagleBone, BeagleBone Black - 4GB SD) 2015-03-01 and the discussion below is solely related to this armhf Debian distribution.
Well mostly you don't - unless you want to install and run C# and hence Mono. I could never get C# Mono compiler to install on an armel package of any flavor. Maybe it is possible but I could not get it to work and I sure tried. However, on an armhf based operating system, the C# Mono compiler installs very easily.
A full discussion of the installation procedure is given on the Beagleboard main site. A summary is as follows:
Downloading is simple and the Beaglebone Black latest images web page contains the download links and a lot of other information. To download go to the download page and download the Debian (BeagleBone, BeagleBone Black - 4GB SD) 2015-03-01 file - or later version (if available). Previously it was not recommended to download a version with a kernel earlier than 3.14 since it would not be possible to use remote debugging due to a bug in MonoDevelop. However, the newly updated Mono installation page available on this site now details a method of directing the v3.08 version to download the latest Mono release and this issue is no longer present. This, in effect, enables you to have both Cape Manager and Device Tree Overlay support as well as the ability to remotely debug C# code running on the Beaglebone Black.
The armhf distribution will be installed on a micro SD card. This will enable the Beaglebone Black to boot off of it. One might wonder, why not just download and install it right into the EMMC memory? Well that is certainly possible - however the instructions on the Beaglebone Black website are all focused on installing to the SD card and, initially, I decided not to take the time to figure out how to get it installed in the EMMC memory. This turned out to be quite a fortunate decision for a couple of reasons. While experimenting I made, on several occasions, changes to the Device Tree file which effectively prevented the Beaglebone Black from booting. Prevented, as in bricked. Since the entire O/S was on an SD card I just popped out the card, placed it in a Ubuntu Linux Laptop and used a text editor to revert the changes. I could never have done that if the Beaglebone Black was booting out of EMMC memory - in that case a full re-installation would be required. The other reason I will probably never move my armhf installation into EMMC memory is that if the EMMC memory is not used, I can disable it to get more GPIO pins. Booting off the micro SD card is just as fast and a lot more functional and I strongly feel there is no point in copying the O/S into the EMMC memory. Using the EMMC memory has very little upside and quite a bit of downside.
NOTE: The installation instructions on the Beaglebone Black upgrade page are pretty clear and I will not reproduce them here. They only require the use of open source software and the installation can be performed from most Windows, Linux or Max O/S boxes. I strongly recommend setting up a Linux PC to do this though as subsequent pages on this website will detail how to set up a tool chain with a nice IDE and the ability remote debug of your C# code on the Beaglebone Black. Those instructions are not functional from a Windows box. If all you have is a Windows O/S you may wish to investigate setting it up to dual boot Linux. Installing Ubuntu on the PC automatically configures this functionality for you and installing it is really quite painless.
You should use an SD Card of 8 Gb in size or greater. A 4 Gb card will probably work but it is a bit small for all of the Mono and C# files which will be required later.
The installation instructions are on the Beaglebone Black website. Follow them exactly and you will have no trouble. Take care to read every line and do exactly what it says.
At this point you should have copied the installation image to the SD card. This SD card will now be bootable and now is the time to give it a trial run. Turn off the Beaglebone Black and insert the SD card in the micro SD card slot. It is by the P8 header on the end of the Beaglebone Black which is opposite to the ethernet RJ45 jack. If you just insert the SD card and turn the power back on you will find that the SD card is ignored and you boot right back into the default armel O/S. To force the Beaglebone Black to boot off the SD card you need to press the tiny little black button located by the SD card slot while you turn on the power and continue to hold it down for a short while afterwards. This tells the Beaglebone Black to boot from the SD Card. You only need to do this once - it will remember this for subsequent boots until you once again boot it without the SD card inserted. In that event, you will boot right back to the default armel O/S you had before. The previous O/S remains in the EMMC memory and if you boot from the SD card it will just be ignored and will remain untouched. In that respect booting off the SD card is pretty failsafe. If it all goes wrong just remove the SD card and reboot and a short while later you are back to your factory configuration.
If you have set up your system as described on the previous Hardware Setup page in this series you will see a graphical display on your monitor and you will be able to use the via the USB Keyboard/Mouse/HDMI Monitor to interact with the Beaglebone Black. The first thing you will need to do is start a shell prompt window. If you are not familiar with this - you should probably read the useful digression below.
Note: it may take up to two minutes for the boot process to complete if you do not have the ethernet connected or if you do have it connected and there is no DHCP server on your network. Basically the Beaglebone Black is configured to automatically acquire an IP address (from the DHCP server) and it will take some time for that to time out. During the boot process you should see a lot of text scrolling by on the monitor before it eventually opens up a GUI display (described below).
Once your Beaglebone Black has fully booted, you will see a window display similar to the one at left and your mouse and keyboard should work as well
(click on image to see a larger version). This display is presented to you by the LXDE window manager which is automatically started when the Beaglebone Black boots.
Essentially you have created a window with a shell prompt using the Beaglebone Black's own LXDE GUI.
Also, it should be noted that it is not necessarily a given that all Beaglebone Black Linux distributions will have a GUI interface (the Debian 2015-03-01 distribution we are discussing here does though). It may never have been configured with a windows manager (called running headless) or the HDMI video may have been disabled because the I/O lines it uses were required for other things. To be honest, the developers of the Beaglebone Black start up a Window Manager by default purely for your benefit (just like the USB filesystem and the webserver) and they all consume resources. If you were using the Beaglebone Black as part of a control system you would probably disable all of these. In that case your monitor will present a text based shell prompt and you can login from there. This is identical in usage to logging in via an SSH remote telnet connection - this is discussed on the Networking Configuration page.
You may find that when using the keyboard/monitor connection you are not prompted for a password. However, on some systems, when connecting locally
you may be asked for one and certainly you always will be asked for a password when you are connecting remotely. In the
Debian 2015-03-01 distribution, the
default password for the root account is root and the default password for the debian account is temppwd. The reason why there
are two accounts is that almost no modern Linux system will permit a direct login as root. You would have to login as debian
sudo to gain root privileges. Usually these default accounts and passwords are listed on the web page from which you downloaded the distribution.
You should change these default passwords at the earliest possible opportunity (i.e. right now)! If you do not know how to do this look up the
If you were not prompted to login you should probably enter the command
whoami at the terminal prompt in order to figure out which account you are logged in as. As discussed above, it will probably not
root – you can change over to the root account by issuing a
sudo -s command. If you are unfamiliar with
sudo command, what it does and why you need to do it then you should probably look that up now.
Now that we have a shell prompt on the system we can set about discovering the IP address the Beaglebone Black has been given (if any) by the DHCP server.
To find out the IP address issue the command
ip addr show in the shell window. This
will, in the
eth0 section, tell you what the IP address is. You could then connect via ssh using that IP address. Note that you cannot connect
via standard telnet - this is disabled due to all the security holes. You will probably find the IP address changes each time the Beaglebone Black reboots
because the DHCP server will give it an IP address from whatever range it thinks it has free. To resolve this you need to give it a fixed IP address and
this procedure is discussed on the Networking Configuration page.
At this point the Beaglebone Black has booted. You are now ready to setup the networking properly and complete the installation by upgrading the recently installed armhf package. The network setup procedure is described on the next page in this series.
The contents of this web page are provided "as is" without any warranty of any kind and without any claim to accuracy. Please be aware that the information provided may be out-of-date, incomplete, erroneous or simply unsuitable for your purposes. Any use you make of the information is entirely at your discretion and any consequences of that use are entirely your responsibility. All source code is provided under the terms of the MIT License.
The Beagleboard website and the pages written by the anonymous maintainers were essential to getting this working. Thank you Beagle Developers - your work is much appreciated..