Entering fastboot mode without pressing VOL_N button at startup


#1

Hi,

I’ve been configuring, building, and testing both rootfs and boot images on my board. My build/test setup is somewhat remote and it has been inconvenient to have to press VOL_N at startup every time I want to test a new image. On Android, one can simply enter the command “adb reboot-bootloader” and the system will reboot into fastboot mode. I’m mostly interested in whether something like this has been implemented for embedded linux distros. Is there a USB gadget driver that enables something similar to adb interface on Android?

Is there an easier way to enter fastboot mode or ultimately flash rootfs and boot images without having to press VOL_N?

Thanks!


#2

Try deliberately corrupting the boot partition (fill it with zeros). This causes the board to automatically enter fastboot after a reset/power cycle. From fastboot you can then fastboot flash the rootfs and fastboot boot the boot image (i.e. boot directly from RAM, don’t actually write it to the boot partition).

With this addition of a relay on the power supply this makes a great development environment. You can reprogram and reboot the board from a script running on your workstation.


#3

Hi Daniel,

Worked like a charm! Just posting what I did for reference:

# sudo dd if=/dev/zero of=/dev/mmcblk0p8

dd: writing to ‘/dev/mmcblk0p8’: No space left on device
131073+0 records in
131072+0 records out
67108864 bytes (67 MB, 64 MiB) copied, 6.5566 s, 10.2 MB/s

# reboot
. . . .
. . . .
. . . .
[0] [0] BUILD_VERSION=
[0] [0] BUILD_DATE=15:11:10 - Oct 5 2017
[0] [0] welcome to lk

[10] [10] platform_init()
[10] [10] target_init()
[40] [40] SDHC Running in HS200 mode
[60] [60] Done initialization of the card
[70] [70] pm8x41_get_is_cold_boot: cold boot
[70] [70] Neither ‘config’ nor ‘frp’ partition found
[70] [70] Not able to search the panel:
[80] [80] Display not enabled for 24 HW type
[80] [80] Target panel init not found!
[90] [90] pm8x41_get_is_cold_boot: cold boot
[90] [90] partition misc doesn’t exist
[90] [90] error in emmc_recovery_init
[100] [100] Unable to locate /bootselect partition
[100] [100] No ‘misc’ partition found
[100] [100] Error reading MISC partition
[110] [110] failed to get ffbm cookie[110] [110] ERROR: Invalid boot image header
[120] [120] ERROR: Could not do normal boot. Reverting to fastboot mode.
[120] [120] Invalid partition index
[130] [130] Invalid partition index
[130] [130] Invalid partition index
[140] [140] fastboot_init()
[140] [140] Error: ssd partition not found
[250] [250] USB init ept @ 0x8f697000
[270] [270] udc_start()
[15970] [15970] – reset –
[15970] [15970] – portchange –
[16070] [16070] – reset –
[16070] [16070] – portchange –
[16200] [16200] fastboot: processing commands

Thanks!