-
Notifications
You must be signed in to change notification settings - Fork 6
Flashing SD card for BeagleBone
This guide will take you through the steps required to flash the Debian OS onto a micro SD card for use within a BeagleBone
- SD card (make sure there is nothing important on it before flashing)
- Computer with a SD card slot or a dongle with and SD card slot
- BeagleBone
- MicroUSB type B cable
- Etcher
- SSH client
- PuTTy is a great client for windows if you don't want to use WSL
- WSL has an SSH client built in so you can just use that
- If you are running Linux or macOS the terminal within those also has a SSH client built in
-
Download the Debian image with this link
-
Connect the SD card to your computer
-
Open up Etcher and flash the Debian image to the SD card
- Click on where it says "Flash from file", then navigate to your downloads folder and select the debian image you just downloaded
- From there it should auto fill the target as the SD card, however you should double check to make sure you are flashing to the SD card in the middle target section
- Just click "Flash!" and let it do its thing, this should take a couple of minutes
-
Eject the SD card from your computer and insert it to the BeagleBone
-
Plug in the BeagleBone to your computer and wait for it to boot up
- The USR0 LED is called the "heartbeat LED", so look for this LED to be beating at a steady pace to know when the BeagleBone is fully booted up
-
Ensure you are connected to the BeagleBone using your SSH client of choice
- IP should be
192.168.7.1
, user should bedebian
, and password should betemppwd
- IP should be
-
On the BeagleBone Enable UARTS
-
$ ls /dev/ttyO*
- If more than 1 UARTs are listed, UARTs are already enabled, go to step 9 of main guide, else follow the rest of this subsection
- Open
/boot/uEnv.txt
in your editor of choice- Check for
enable_uboot_cape_universal=1
- If this line is commented out, uncomment it
- Reboot BeagleBone and check if UARTs are enabled (rebooting the BeagleBone will mean you have to redo any Internet connection steps done on the BeagleBone)
- If this line does not exist, add it
- Reboot BeagleBone and check if UARTs are enabled (rebooting the BeagleBone will mean you have to redo any Internet connection steps done on the BeagleBone)
- Check for
- If UARTs are still not enabled, open
/boot/uEnv.txt
in your editor of choice- Add the line
cape_enable=capemgr.enable_partno=BB-UART1,BB-UART2,BB-UART4,BB-UART5
- Reboot BeagleBone and check if UARTs are enabled (rebooting the BeagleBone will mean you have to redo any Internet connection steps done on the BeagleBone)
- Add the line
- If UARTs are still not enabled, Connect the BeagleBone to the internet
$ sudo apt update
$ sudo apt dist-upgrade
- Reboot BeagleBone and check if UARTs are enabled (rebooting the BeagleBone will mean you have to redo any Internet connection steps done on the BeagleBone)
- Recover uEnv.txt
$ sudo mv /boot/uEnv.txt.backup /boot/uEnv.txt
- Attempt steps 2 and 3 of this subsection again
- Reboot BeagleBone and check if UARTs are enabled (rebooting the BeagleBone will mean you have to redo any Internet connection steps done on the BeagleBone)
-
-
Now setup the BeagleBone to connect to the internet (note - we currently don't know a way of connecting the BeagleBone to the internet over USB on macOS)
-
Ensure you are connect to the BeagleBone and that it is connected to the internet
-
On the BeagleBone, install basic software
$ sudo apt update
$ sudo apt install python3 python3-pip picocom git cmake python3-venv -y
$ sudo apt-get upgrade
-
Clone
mrover-workspace
onto the BeagleBone in the home directory$ cd
$ git clone https://github.com/umrover/mrover-workspace.git
-
One the BeagleBone, to resize the microSD partition:
$ sudo fdisk /dev/mmcblk0
- enter
p
to print- Remember the number under start sector
- enter
d
to delete - enter
n
to create a new partition - skip the first 2 questions with enter
- enter the previous start sector
- enter
N
if it asks to remove anext4
signature - enter
w
to write changes - reboot the BeagleBone
$ sudo resize2fs /dev/mmblk0p1
12b. Alternatively just run $ sudo /opt/scripts/tools/grow_partition.sh
-
Run the beaglebone ansible script
- clone https://github.com/umrover/embedded-testbench/tree/beaglebone-ansible-setup
- Make sure ansible is installed
$ sudo apt install ansible
$ ansible-playbook -K -i "localhost," -c local beaglebone.yml --extra-vars "num=2"
-
On the BeagleBone, bootstrap Jarvis
$ cd ~/mrover-workspace
$ ./jarvis
-
Congrats! The BeagleBone should be all setup and ready to go