TIL - U-Boot support for HTTP
TIL, Today I Learned, is more of a "I just figured this out: here are my notes, you may find them useful too" rather than a full blog post
Until now, U-Boot did only support UDP and were limited to protocols that are based on that. In practice it meant that you were only able to use TFTP and NFS for network file transfer.
I do currenty test TCP/HTTP by using it on my i.MX8 eval kit and it works pretty well.
If you just want to test the functionality, you can do it virtually with qemu. It requires that you have both qemu and a cross toolchain for aarch64 installed on your host system.
Clone the repository:
Use qemu_arm64_defconfig as base:
Enable the following configurations in order to support TCP and HTTP:
qemu-system-aarch64 -machine virt -cpu cortex-a57 -bios u-boot.bin
Assuming that you already have a HTTP server up and running on your host, you can now fetch the image with wget:
wget $loadaddr 192.168.1.84:/uImage
Or by using serverip:
setenv serverip 192.168.1.84 wget $loadaddr /uImage
This is a great step in the right direction!
Only HTTP is supported for now, which makes it unsuitable for any public website, but HTTPS integreated with UEFI will follows and then we have a standardised way to download boot images!