Uboot Files for Raspberry Pi 1/B+ and 2

Pavel Pisa ppisa4lists at pikron.com
Wed Jul 13 17:32:22 UTC 2016

Hello Deval Shah and others,

because I could not declare exact source versions
of files I have on SD card, I have rebuild RPi1 and RPi2
U-boot binaries from actual today mainline sources.
I have test them on RPi1 and RPi2 and they look OK.

U-Boot 2016.07-00067-gb8e5997 (Jul 13 2016 - 18:59:18 +0200)

There is content of my RPi1 boot partition


It boots through default extlinux/extlinux.conf file which allows
to select U-boot image extlinux/ticker.img or if left unattended
it fails and continues by search through other media and then TFTP
where it locates pxelinux.cfg file through option in my local DHCP

RPi2 image is simpler


There is directly hardcoded boot in uboot.env which is generated
from uboot-env.txt by U-boot tool build during U-boot compilation

  mkenvimage -s 16384 -o uboot.env uboot-env.txt

environment content in readable form is in uboot-env.txt file

bootcmd=mw.l 0x3f200000 0x04a020; mw.l 0x3f200008 0x65b6c0; usb start ; dhcp ; tftp ${kernel_addr_r} ${imgsrvip}:/rpi/rtems/app.img ; bootm 

Environment can be changed from u-boot prompt, I am not sure is saveenv works on RPi

It is possible to boot RTEMS application from binary form by U-boot directly
but I have not checked that too much, I use U-boot mkimage (u-boot-tools Debian
package) to generate U-boot image files from RTEMS ELF executables.





${OBJCOPY} -R -S --strip-debug -O binary "$EXE_NAME" "$EXE_NAME.bin" || exit 1
cat "$EXE_NAME.bin" | gzip -9 >"$EXE_NAME.gz"
mkimage \
  -A arm -O rtems -T kernel -a $START_ADDR -e $START_ADDR -n "RTEMS" \
  -d "$EXE_NAME.gz" "$EXE_NAME.img"

In the archives, there are included ticker.{img,bin,exe} files.
They are build from my actual RTEMS mainline pull with some
VideCore and other random boot debugging prints changes left
in the sources.

Generally, you can take only u-boot.bin from archives and put
it on your SDcard. You need then to put
to config.txt file on the SDcard. This file is read by VideoCore
base firmware loader which loads u-boot.bin at 0x00008000 and starts
ARM CPU from there.

Best wishes,


More information about the devel mailing list