Periodically, we'll release software updates or a new version of Mendel Linux for the Dev Board. This pagedescribes how to install these updates on your board.
Insert your flash drive into the previously found port. If it doesn't slide into the port, then turn it around 180 degrees and try again. If it still doesn't fit, then your flash drive has a design flaw or (more likely) the USB port you found isn't a USB port. If your remote happens to have the Help button on it, you can press it and it will take you to the same menu. From here, go to System software update. You should be able to see whether the Automatically check for update / Automatic software download option is turned on.
Update your Dev Board with apt-get
To update all software packages such as the Edge TPU runtime and API library, connect tothe board's shell and run the following commands(first, make sure your board is online).
Note: This only upgrades packages in your current version of Mendel. To upgrade your Mendel version, you must flash the system image.
It might take a couple minutes to update all packages, but that's it.Your software packages are now up to date.
Notice: Due to a known issue in Mendel, if your Dev Board is currently running Mendel 2.0 or lower, some packages do not properly upgrade when using
apt-get
. Check your version by running cat /etc/mendel_version
; if it's 2.0 or lower, we recommend that you flash the system image.Flash a new system image
Flashing is supported using Linux or Mac.
Caution:This deletes all system and local data. That is, unless your board is already running Mendel 5.0 or higher, which provides a separate partition for the
/home
directory. So if your board is running Mendel 4.0 or lower, back up any personal data before you proceed. For example, you can create a TAR of your /home
directory and use mdt pull
to copy the TAR from the board. Then use mdt push
to move it back.Note: These instructions assume you already have a system image on the board.If you don't, instead follow the Get Started guide.
Before you begin the flashing procedure, verify thatthe boot mode switches are set to eMMC mode as follows.(If they're not set this way, power off the board before you change them.)
Boot mode | Switch 1 | Switch 2 | Switch 3 | Switch 4 |
---|---|---|---|---|
eMMC | ON | OFF | OFF | OFF |
Now flash the board as follows:
- Add the udev rule. (Linux only)If you haven't used your current Linux computer to connect to your Dev Board, run thefollowing commands so it can recognize the board over USB:
- Connect to the USB data port.Attach a USB cable from your host computer to the USB port on the Dev Boardlabeled 'OTG' (see figure 2).
- Power on the board.If it's not already booted, plug in the board and wait for it to power on.Verify the board is connected to your computer by running this command fromyour computer (requires MDT):You should see output such as this:
- Reboot the board into fastboot mode.Caution:You might be about to delete personal data on the board. Now is the time to back it up.Run the following command from your computer:After a moment, you can verify the board started in fastboot mode with this command(requires
fastboot
):You should see a line printed like this:Help!Iffastboot devices
prints nothing, wait a few more seconds for the device toreboot into fastboot, then try again.If it still prints nothing, verify the Dev Board is connected to your computer via USB asshown in figure 2 and you rebooted the board with the commandsudo reboot-bootloader
.If so, try installing a more recent version offastboot
fromAndroidSDK Platform-tools and try again. (Be sure to add the new fastboot toyourPATH
environment variable.) - Download the system image.Run the following commands on your host computer:
- Flash the board.If your board is currently running Mendel 4.0 or lower, this step wipes all the board data,including the
/home
directory. If it's running Mendel 5.0 or higher, then the/home
directory is preserved by default (you can intentionally wipe it by addingthe-H
flag to the following command).This starts the flashing process and you'll see various output.It takes about 5 minutes to complete. When flashing is complete, your board reboots. - Log in.You can log in to the board's shell using MDT:Mac users: If you're on macOS Catalina (10.15) or higher, this won'twork (even if you preserved the board's
/home
directory and previously installed anSSH key, because flashing the board reset its known networks—you might simply need to get theboard back your Wi-Fi using the serial console). See the steps to connect MDT onmacOS.If MDT is unable to find your device, it's probably because the system is still setting upMendel. This initial setup takes 2-3 minutes after you flash it (subsequent boot times are muchfaster). Instead of manually retrying, you can runmdt wait-for-device && mdt shell
and itwill connect when the device is ready.Then restore any data you backed up and reconnect to the internet, if necessary.
Note:Your board's hostname is randomly generated the first time it boots from a new flashing. We do thisto ensure that each device within a local fleet is likely to have a unique name. Of course, you canchange this name using standard Linux hostname tooling (such as
hostname
).If you attempt to connect with the serial console,the login and password are reset to the defaults:login is
mendel
; password is mendel
.Flash from U-Boot on an SD card
If you get unlucky and you can't even boot your board into U-Boot, then you can recover the systemby booting into U-Boot from an image on the SD card and then reflash the board from yourLinux or Mac computer as follows.
- Enable boot from SD card.Unplug the Dev Board and change the boot mode switches to boot from SD card:
Boot mode Switch 1 Switch 2 Switch 3 Switch 4 SD Card ON OFF ON ON - Flash an SD card with the recovery image.On your host computer, download and unpack the latest system image:Inside the package, find the
recovery.img
file.Then use a program such as balenaEtcher to flash therecovery.img
file to your microSD card.Help!If the flash program displays a warning such as, 'The image does not appear to contain apartition table,' that's okay—it's true that there is no partition table in this image, butthis is working as intended so you can continue. - Connect to the serial console.Use a USB-microB cable to connect your host computer to the serial console port on the board(see figure 4). The orange and green LEDs on the board will illuminate.Follow these instructions to open the serial console. When you complete those steps, the prompt should disappear and your terminal shouldbecome completely blank (because the board is not powered on yet).
- Insert the SD card and then power on the board.The SD card slot is on the bottom of the Dev Board.Plug in your 2 - 3A power cable to the USB-C port labeled 'PWR' (see figure 5).Caution: Do not attempt to power the board by connecting it to your computer.
- Start fastboot.At the
u-boot
prompt that appears in yourscreen
session (from step 3), start fastboot mode:The cursor moves to the next line but there is no output. That's as expected. - Connect to the USB data port.Use a USB-C cable to connect your host computer (Linux or Mac) to the USB-C data port on theDev Board labeled 'OTG' (see figure 6). (This is the connection used by fastboot.)After a moment, you can verify that the board started in fastboot mode by running thefollowing command from your connected host computer (requires
fastboot
):You should see a line printed like this: - Flash the image.On your host computer, navigate into the unpacked system image directory (from step 2)and execute the flash script:
When flashing is complete, your board will reboot. However, because you set the boot mode to SD card,that's what it will do so you'll again see the
u-boot
prompt. So unplug the power and reset the bootswitches to eMMC mode:Boot mode | Switch 1 | Switch 2 | Switch 3 | Switch 4 |
---|---|---|---|---|
eMMC | ON | OFF | OFF | OFF |
Then boot the board again. When it's done booting, the console prompts you to login.
Mac Downloader
Tip: You can instead open a shell using MDT.
Mac Os X Snow Leopard For Vista
Once logged in, be sure to download other software updates with the following commands(be sure your board is online first):
Is this content helpful?