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.

  1. Download the latest image from the Beaglebone Image Catalog.
  2. Download and unpack WinFLASHTool that will be used to write the SD Card images.
  3. Insert your SD card into an SD card reader, run WinFLASH Tool and select the image to program:01-flash
  4. Wait for the SD card to be programmed. This may take 5-15 minutes:02-program
  5. WinFLASHTool will also automatically resize the Ext3FS filesystem on the image to fit the entire SD Card (if the corresponding option was enabled):03-resize
  6. 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:boardUnlike 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.
  7. 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:04-a2go
  8. Locate the inputs that can be used to capture signals and enable one of them:05-port
  9. 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:2boards
  10. Go to the Protocol Analyzers tab, add a UART protocol analyzer and connect it to the captured port: 06-proto
  11. Press the “Record” button and restart your Beaglebone:07-sdmmcYou should normally see the following output:
    musb-hdrc: ConfigData=0xde (UTMI-8, dyn FIFOs, HB-ISO Rx, HB-ISO Tx, SoftConn)
    musb-hdrc: MHDRC RTL version 2.0 
    musb-hdrc: setup fifo_mode 4
    musb-hdrc: 28/31 max ep, 16384/16384 memory
    USB Peripheral mode controller at 47401000 using PIO, IRQ 0
    musb-hdrc: ConfigData=0xde (UTMI-8, dyn FIFOs, HB-ISO Rx, HB-ISO Tx, SoftConn)
    musb-hdrc: MHDRC RTL version 2.0 
    musb-hdrc: setup fifo_mode 4
    musb-hdrc: 28/31 max ep, 16384/16384 memory
    USB Host mode controller at 47401800 using PIO, IRQ 0
    OMAP SD/MMC: 0
  12. 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:rename
  13. Now you can boot Beaglebone with the new SD card image and it will start successfully:09-log2
    musb-hdrc: ConfigData=0xde (UTMI-8, dyn FIFOs, HB-ISO Rx, HB-ISO Tx, SoftConn)
    musb-hdrc: MHDRC RTL version 2.0 
    musb-hdrc: setup fifo_mode 4
    musb-hdrc: 28/31 max ep, 16384/16384 memory
    USB Peripheral mode controller at 47401000 using PIO, IRQ 0
    musb-hdrc: ConfigData=0xde (UTMI-8, dyn FIFOs, HB-ISO Rx, HB-ISO Tx, SoftConn)
    musb-hdrc: MHDRC RTL version 2.0 
    musb-hdrc: setup fifo_mode 4
    musb-hdrc: 28/31 max ep, 16384/16384 memory
    USB Host mode controller at 47401800 using PIO, IRQ 0
    OMAP SD/MMC: 0
    mmc_send_cmd : timeout: No status update
    reading u-boot.img
    reading u-boot.img
     
     
    U-Boot 2013.04-dirty (Jun 19 2013 - 09:57:14)
     
    I2C:   ready
    DRAM:  512 MiB
    WARNING: Caches not enabled
    NAND:  No NAND device found!!!
    0 MiB
    MMC:   OMAP SD/MMC: 0, OMAP SD/MMC: 1
    *** Warning - readenv() failed, using default environment
     
    musb-hdrc: ConfigData=0xde (UTMI-8, dyn FIFOs, HB-ISO Rx, HB-ISO Tx, SoftConn)
    musb-hdrc: MHDRC RTL version 2.0 
    musb-hdrc: setup fifo_mode 4
    musb-hdrc: 28/31 max ep, 16384/16384 memory
    USB Peripheral mode controller at 47401000 using PIO, IRQ 0
    musb-hdrc: ConfigData=0xde (UTMI-8, dyn FIFOs, HB-ISO Rx, HB-ISO Tx, SoftConn)
    musb-hdrc: MHDRC RTL version 2.0 
    musb-hdrc: setup fifo_mode 4
    musb-hdrc: 28/31 max ep, 16384/16384 memory
    USB Host mode controller at 47401800 using PIO, IRQ 0
    Net:   <ethaddr> not set. Validating first E-fuse MAC
    cpsw, usb_ether
    Hit any key to stop autoboot:  1  0 
    gpio: pin 53 (gpio 53) value is 1
    mmc0 is current device
    micro SD card found
    mmc0 is current device
    gpio: pin 54 (gpio 54) value is 1
    SD/MMC found on device 0
    1359 bytes read in 55 ms (23.4 KiB/s)
    Loaded environment from uEnv.txt
    Importing 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 88000000
       Booting using the fdt blob at 0x88000000
       Using Device Tree in place at 88000000, end 88011330
     
    Starting 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 found
     
     
    Debian GNU/Linux 9 beaglebone ttyS0
     
    BeagleBoard.org Debian Image 2017-08-31
     
    Support/FAQ: http://elinux.org/Beagleboard:BeagleBoneBlack_Debian
     
    default username:password is [debian:temppwd]
     
    beaglebone login:
  14. Now you can connect the Ethernet cable to your Beaglebone and ping it to check the connection:10-beaglebone
  15. 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.