On T, 2020-05-26 at 15:21 -0700, Matt Krenik wrote:
> Is there a way that I can overwrite or corrupt the bootloader
> partition from the adb shell or with a fastboot command so that it
> will fail on the next reboot and enter FEL mode?

You could simply zero out the Initial SPL Loader

dd if=/dev/zero of=/dev/mmcblk0 bs=1024 count=40

Or you could write the special fel-boot sd card image into the internal
storage https://linux-sunxi.org/FEL#Through_a_special_SD_card_image

Mainline U-Boot defines a nice partition table[1] that allows you to
write the fel-sdboot image file[2] quite easily by running following
commands

        fastboot oem format
        fastboot flash loader1 fel-sdboot.sunxi
        fastboot reboot

And after that boot with a clean U-Boot via FEL[3]

Nicer options would be to add a custom boot-to-fel oem command to u-
boot fastboot implementation[4]


But I think the best way would be to figure out a way to trigger FEL
via the FEL/UBOOT pin because it will be more reliable those hackish
methods.


[1]: 
https://gitlab.denx.de/u-boot/u-boot/-/blob/v2020.04/include/configs/sunxi-common.h#L467
[2]: 
https://github.com/linux-sunxi/sunxi-tools/blob/master/bin/fel-sdboot.sunxi
[3]: https://plaes.org/technotes/embedded-systems/sunxi-notes/
[4]: 
https://gitlab.denx.de/u-boot/u-boot/-/blob/v2020.04/drivers/fastboot/fb_command.c

-- 
You received this message because you are subscribed to the Google Groups 
"linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
To view this discussion on the web, visit 
https://groups.google.com/d/msgid/linux-sunxi/a91316cf023da1a29770a65bfa5c8ce48b551532.camel%40gmail.com.

Reply via email to