Skip to content

Instantly share code, notes, and snippets.

@janhieber
Last active August 16, 2017 12:22
Show Gist options
  • Save janhieber/560bf34b460810f26ce63a7b31dd90fb to your computer and use it in GitHub Desktop.
Save janhieber/560bf34b460810f26ce63a7b31dd90fb to your computer and use it in GitHub Desktop.
U-Boot FAT update over TFTP
# Enter this in u-boot.
# Downloads SPL and u-boot into RAM and then writes it to sdcard
# network configuration
setenv ipaddr 192.168.0.2
setenv serverip 192.168.0.1
# update commands
setenv tftp_to_fat "tftp ${loadaddr} '${file}'; fatwrite mmc 0:1 ${loadaddr} '${file}' '${filesize}'"
setenv u "for file in MLO u-boot.img; do run tftp_to_fat; done; reset"
saveenv
# to update run
run u
# or on host machine
make && cp {MLO,u-boot.img} /srv/tftp && sync && echo "run u" > /dev/ttyUSB0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment