Running Debian Stretch images on BeagleBone
This tutorial shows how to setup your BeagleBone Black board to run the Debian Stretch distro. Unlike the previous SD card images, the Stretch image does not work out-of-the-box and requires a minor adjustment and this tutorial explains the necessary steps in detail.
- Download the latest image from the Beaglebone Image Catalog.
- Download and unpack WinFLASHTool that will be used to write the SD Card images.
- Insert your SD card into an SD card reader, run WinFLASH Tool and select the image to program:
- Wait for the SD card to be programmed. This may take 5-15 minutes:
- WinFLASHTool will also automatically resize the Ext3FS filesystem on the image to fit the entire SD Card (if the corresponding option was enabled):
- If you try inserting the SD card into your Beaglebone and starting it, the 3 user LEDs near the USB connector will turn on and the board won’t boot:
Unlike Raspberry Pi that always shows the debug console via HDMI, the Beaglebone’s HDMI output will remain blank. We will now show how to read the diagnostic output from the on-board UART port.
- Locate the schematics for your Beaglebone and find out the port used for the serial console (RX and TX). On BeagleBone Black the TX signal can be found on pin #5 on J1. We will now use a logic analyzer to view the output from the board. You can use any logic analyzer (or a 3V USB-to-UART adapter), however in this tutorial we will show how to use Analyzer2Go that runs on top of popular development boards. Download and install Analyzer2Go, connect a supported board over USB and start it:
- Locate the inputs that can be used to capture signals and enable one of them:
- Connect the GND signal on the Beaglebone to the GND signal on your board and the TX signal on Beaglebone to the input used for capturing:
- Go to the Protocol Analyzers tab, add a UART protocol analyzer and connect it to the captured port:
- Press the “Record” button and restart your Beaglebone:
You should normally see the following output:
1234567891011musb-hdrc: ConfigData=0xde (UTMI-8, dyn FIFOs, HB-ISO Rx, HB-ISO Tx, SoftConn)musb-hdrc: MHDRC RTL version 2.0musb-hdrc: setup fifo_mode 4musb-hdrc: 28/31 max ep, 16384/16384 memoryUSB Peripheral mode controller at 47401000 using PIO, IRQ 0musb-hdrc: ConfigData=0xde (UTMI-8, dyn FIFOs, HB-ISO Rx, HB-ISO Tx, SoftConn)musb-hdrc: MHDRC RTL version 2.0musb-hdrc: setup fifo_mode 4musb-hdrc: 28/31 max ep, 16384/16384 memoryUSB Host mode controller at 47401800 using PIO, IRQ 0OMAP SD/MMC: 0 - The output comes from the U-Boot bootloader programmed into the Beaglebone’s internal FLASH memory. It tries accessing the SD card, but ultimately fails to read any configuration from it. To fix this, you need to rename/copy the bbb-uEnv.txt file on the SD card to uEnv.txt. You can do this by plugging the card into any Linux machine (e.g. boot Beaglebone from the internal memory and then insert the SD card), mounting the SD card and running the “cp” command:
- Now you can boot Beaglebone with the new SD card image and it will start successfully:
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283musb-hdrc: ConfigData=0xde (UTMI-8, dyn FIFOs, HB-ISO Rx, HB-ISO Tx, SoftConn)musb-hdrc: MHDRC RTL version 2.0musb-hdrc: setup fifo_mode 4musb-hdrc: 28/31 max ep, 16384/16384 memoryUSB Peripheral mode controller at 47401000 using PIO, IRQ 0musb-hdrc: ConfigData=0xde (UTMI-8, dyn FIFOs, HB-ISO Rx, HB-ISO Tx, SoftConn)musb-hdrc: MHDRC RTL version 2.0musb-hdrc: setup fifo_mode 4musb-hdrc: 28/31 max ep, 16384/16384 memoryUSB Host mode controller at 47401800 using PIO, IRQ 0OMAP SD/MMC: 0mmc_send_cmd : timeout: No status updatereading u-boot.imgreading u-boot.imgU-Boot 2013.04-dirty (Jun 19 2013 - 09:57:14)I2C: readyDRAM: 512 MiBWARNING: Caches not enabledNAND: No NAND device found!!!0 MiBMMC: OMAP SD/MMC: 0, OMAP SD/MMC: 1*** Warning - readenv() failed, using default environmentmusb-hdrc: ConfigData=0xde (UTMI-8, dyn FIFOs, HB-ISO Rx, HB-ISO Tx, SoftConn)musb-hdrc: MHDRC RTL version 2.0musb-hdrc: setup fifo_mode 4musb-hdrc: 28/31 max ep, 16384/16384 memoryUSB Peripheral mode controller at 47401000 using PIO, IRQ 0musb-hdrc: ConfigData=0xde (UTMI-8, dyn FIFOs, HB-ISO Rx, HB-ISO Tx, SoftConn)musb-hdrc: MHDRC RTL version 2.0musb-hdrc: setup fifo_mode 4musb-hdrc: 28/31 max ep, 16384/16384 memoryUSB Host mode controller at 47401800 using PIO, IRQ 0Net: <ethaddr> not set. Validating first E-fuse MACcpsw, usb_etherHit any key to stop autoboot: 1 0gpio: pin 53 (gpio 53) value is 1mmc0 is current devicemicro SD card foundmmc0 is current devicegpio: pin 54 (gpio 54) value is 1SD/MMC found on device 01359 bytes read in 55 ms (23.4 KiB/s)Loaded environment from uEnv.txtImporting environment from mmc ...Running uenvcmd ...2044 bytes read in 72 ms (27.3 KiB/s)debug: [/boot/vmlinuz-4.9.45-ti-r57] ...9464664 bytes read in 1621 ms (5.6 MiB/s)debug: [/boot/initrd.img-4.9.45-ti-r57] ...5908180 bytes read in 1044 ms (5.4 MiB/s)debug: [/boot/dtbs/4.9.45-ti-r57/am335x-boneblack.dtb] ...58161 bytes read in 177 ms (320.3 KiB/s)debug: [console=tty0 console=ttyO0,115200n8 root=/dev/mmcblk0p1 rootfstype=ext4 rootwait coherent_pool=1M net.ifnames=0 quiet] ...debug: [bootz 0x82000000 0x88080000:5a26d4 0x88000000] ...## Flattened Device Tree blob at 88000000Booting using the fdt blob at 0x88000000Using Device Tree in place at 88000000, end 88011330Starting kernel ...[ 0.001485] clocksource_probe: no matching clocksources found[ 2.892496] wkup_m3_ipc 44e11324.wkup_m3_ipc: could not get rproc handle[ 3.154209] omap_voltage_late_init: Voltage driver support not added[ 3.164577] PM: Cannot get wkup_m3_ipc handle[ 3.490534] bone_capemgr bone_capemgr: slot #0: No cape found[ 3.522632] bone_capemgr bone_capemgr: slot #1: No cape found[ 3.554609] bone_capemgr bone_capemgr: slot #2: No cape found[ 3.586646] bone_capemgr bone_capemgr: slot #3: No cape foundDebian GNU/Linux 9 beaglebone ttyS0BeagleBoard.org Debian Image 2017-08-31Support/FAQ: http://elinux.org/Beagleboard:BeagleBoneBlack_Debiandefault username:password is [debian:temppwd]beaglebone login: - Now you can connect the Ethernet cable to your Beaglebone and ping it to check the connection:
- Once the connection is successful, you can use SmarTTY or any other SSH client to connect to your Beaglebone via SSH. The default username/password are shown below:
Username debian Password temppwd
Once your connection to Beaglebone works, you can follow this tutorial to create a basic project from Visual Studio.