On Tue, May 26, 2020 at 03:21:45PM -0700, Matt Krenik wrote:
> I'm trying to write a script that can entirely flash an image onto my 
> device (A64) using the USB and without needing press any buttons or a 
> serial port. I have read through the FEL page several times and it seems 
> like the only option to do this is if all of the other boot options fail.  
> 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?

What kind of storage does your device use and how is it mapped (aka if it's
eMMC then on which pins it is mapped).

This is how I am doing it for eMMC-based device

0. (In case bootloader is already flashed) - Insert the fel-sdboot formatted
sdcard (search from wiki) that puts device in FEL mode.

1. Connect USB and load uboot via FEL to put device into fastboot mode

$ cat my.env
#=uEnv
bootcmd=fastboot usb 0

$ sunxi-fel uboot u-boot-sunxi-with-spl.bin write 0x43100000 my.env

2. Now device should end up in fastboot mode

$ fastboot oem format

3. Reboot the device (should end up in FEL mode because fel-sdboot sdcard)

$ fastboot reboot

4. Another boot into fastboot mode

$ sunxi-fel uboot u-boot-sunxi-with-spl.bin write 0x43100000 my.env

5. Do the flashing

$ fastboot flash loader1 sunxi-spl.bin
$ fastboot flash loader2 u-boot.img
$ fastboot flash esp esp.img
$ fastboot flash system system.img


> -- 
> 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/d602bb08-e8c6-49c3-a4fd-3425e262621c%40googlegroups.com.

-- 
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/20200619062928.GC18663%40plaes.org.

Reply via email to