1.3. Flashing Instruction¶
These instructions are for the AM62x SK EVM.
For flashing the Beagle Play, see the dedicated application note.
1.3.1. DFU Recovery¶
It’s possible to put the AM62x SK EVM in USB DFU mode, which allows
loading bootloaders over DFU. This is done via the snagboot
tool.
This is useful for initial flashing or recovering boards which have broken bootloaders.
1.3.1.1. Installation and setup¶
Install snagboot following the official instructions
Note
Snagboot requires at least Python 3.8, meaning that it can’t run on Ubuntu 18.04 releases. If Snagboot cannot be installed, it’s possible boot the initial bootloaders from an SD card.
Follow AM62x Initial Flashing on SD card if you encounter issues with Snagboot.
1.3.2. eMMC flashing¶
1.3.2.1. Flashing instructions¶
Once the build is complete, follow the steps below to flash the images to eMMC.
Change the boot mode DIP switches to DFU mode:
Boot mode DIP Switch: SW1: 11001010 SW2: 00000000
Ensure the device is plugged in with USB host and debug UART/serial debug
Open a terminal debugger to view console output from the device:
sudo picocom -b 115200 -r -l /dev/ttyUSB0
run
snagrecover
for host
# If you are using binaries built locally cd out/target/product/am62x (OR) # If you are using pre-built binaries from SDK download page cd AM62x_09.01.00_emmc # for AM62x SK EVM (GP) snagrecover -s am625 -f ./am62x-sk-evm.yaml # for AM62x SK EVM (HS-FS) snagrecover -s am625 -f ./am62x-sk-evm-hsfs.yaml # for AM62x LP SK EVM (GP) snagrecover -s am625 -f ./am62x-lp-sk-evm.yaml # for AM62x LP SK EVM (HS-FS) snagrecover -s am625 -f ./am62x-lp-sk-evm-hsfs.yamlIn the serial console, you will see:
SYSFW ABI: 3.1 (firmware rev 0x0009 '9.0.5--v09.00.05 (Kool Koala)') SPL initial stack usage: 1856 bytes Trying to boot from DFU
- Setup default U-Boot environment
Type
Ctrl-C
in the serial console to continue to U-Boot. From there, we should ensure the default U-Boot environment is configured with:=> env default -f -a; saveenv;Note
If you build with TARGET_AVB_ENABLE=true or flash user images you need to do this command in U-Boot console:
=> setenv force_avb "1"; saveenv;Note
By default, no Device-Tree Overlays are selected. Follow this link to set AM62x Device Tree Overlays
Enable fastboot mode on the device through the terminal debugger by executing below command. Before running this command make sure USB-C cable is connected from the host PC to the EVM:
=> fastboot 0
From the host PC run the
flashall.sh
script to start flashing the binaries to eMMC:
# If you are using binaries built locally cd out/target/product/am62x (OR) # If you are using pre-built binaries from SDK download page cd AM62x_09.01.00_emmc # for AM62x SK EVM (GP) sudo ./flashall.sh --board am62x-sk # for AM62x SK EVM (HS-FS) sudo ./flashall.sh --board am62x-sk --hsfs # for AM62x LP SK EVM (GP) sudo ./flashall.sh --board am62x-lp-sk # for AM62x LP SK EVM (HS-FS) sudo ./flashall.sh --board am62x-lp-sk --hsfsNote
If you get
mcopy
command not found error on Linux PC, install themtools
package:$ apt-get install mtoolsWarning
It’s possible that the in-memory partition layout is still from an older system. In that case, we can observe flashing errors similar to:
writing 'tiboot3'... FAILED (remote: invalid partition or device)When that happens:
- Reboot into the newfly flashed bootloader with
$ fastboot reboot bootloader
- Restart the flashing from step 5.
Once the flashing is complete, power off the board
Change boot mode DIP switches to boot from eMMC user partitions and power cycle the board:
Boot mode DIP Switch: SW1: 11000010 SW2: 00000000
Board should boot the Android images now.
1.3.3. Flashing the kernel¶
In order to flash a new kernel, the new boot image should be flashed:
adb reboot bootloader
< Wait for bootloader reboot >
cd <PATH/TO/BOOT/IMAGE>
fastboot flash boot boot.img
fastboot reboot
The board should boot with the new kernel build.