Updating Espressobin U-boot via tftp.

To update u-boot via tftp, install a tftp software and copy its binaries to the directory where tftp has its data. The text in bold is the text you type in. This is intended for armbian use. They require the latest u-boot version.

Boot up the espressobin and:

Marvell>> setenv serverip 10.0.0.187
Marvell>> setenv ipaddr 10.0.0.202
Marvell>> ping $serverip
Using neta@30000 device
host 10.0.0.187 is alive
Marvell>> bubt flash-2018-04-02.bin
Burning U-BOOT image "flash-2018-04-02.bin" from "tftp" to "spi"
Using neta@30000 device
TFTP from server 10.0.0.187; our IP address is 10.0.0.201
Filename 'flash-2018-04-02.bin'.
Load address: 0x5000000
Loading: #################################################################
#################################################################
################################
6.7 MiB/s
done
Bytes transferred = 827712 (ca140 hex)
Image checksum...OK!
643392 bytes written, 184320 bytes skipped in 12.191s, speed 69519 B/s
Done!
Marvell>> env default -a
## Resetting to default environment
Marvell>> env save
Saving Environment to SPI Flash...
Erasing SPI flash...Writing to SPI flash...done
Marvell>>
Saving Environment to SPI Flash...
Erasing SPI flash...Writing to SPI flash...done
Marvell>> reset

Interrupt the boot up and edit its settings:

Marvell>> setenv initrd_addr 0x1100000
Marvell>> setenv image_name boot/Image
Marvell>> setenv load_script 'if test -e mmc 0:1 boot/boot.scr; then echo \"... booting from SD\";setenv boot_interface mmc;else echo \"... booting from USB/SATA\";usb start;setenv boot_interface usb;fi;if test -e \$boot_interface 0:1 boot/boot.scr;then ext4load \$boot_interface 0:1 0x00800000 boot/boot.scr; source; fi'
Marvell>> setenv bootcmd 'run get_images; run set_bootargs; run load_script;booti \$kernel_addr \$ramfs_addr \$fdt_addr'
Marvell>> saveenv
Saving Environment to SPI Flash...
SF: Detected w25q32dw with page size 256 Bytes, erase size 4 KiB, total 4 MiB
Erasing SPI flash...Writing to SPI flash...done

Update is now finished! I have built my own u-boot binary file, which i will post a howto guide later on.

Commands (copy and paste)

# setenv serverip 10.0.0.187
# setenv ipaddr 10.0.0.202
# ping $serverip
# bubt flash-2018-04-02.bin
# env default -a
# env save
# reset
---wait for reset---
# setenv initrd_addr 0x1100000
# setenv image_name boot/Image
# setenv load_script 'if test -e mmc 0:1 boot/boot.scr; then echo \"... booting from SD\";setenv boot_interface mmc;else echo \"... booting from USB/SATA\";usb start;setenv boot_interface usb;fi;if test -e \$boot_interface 0:1 boot/boot.scr;then ext4load \$boot_interface 0:1 0x00800000 boot/boot.scr; source; fi'
# setenv bootcmd 'run get_images; run set_bootargs; run load_script;booti \$kernel_addr \$ramfs_addr \$fdt_addr'
# saveenv
# reset

Sources:

https://www.armbian.com/espressobin/
http://wiki.espressobin.net/tiki-index.php?page=Update+the+Bootloader

Leave a Reply

Your email address will not be published. Required fields are marked *