U Boot - notro/rpi-build GitHub Wiki

U-Boot is used to load the vanilla kernel from linux.org.

Power on boot messages for the :linux release using the :uboot package

U-Boot 2014.07-rc1 (May 31 2014 - 14:23:36)

DRAM:  448 MiB
WARNING: Caches not enabled
MMC:   bcm2835_sdhci: 0
Using default environment

In:    serial
Out:   lcd
Err:   lcd
Warning: Your board does not use generic board. Please read
doc/README.generic-board and take action. Boards not
upgraded by the late 2014 may break or be removed.
reading /uEnv.txt
524 bytes read in 16 ms (31.3 KiB/s)
Hit any key to stop autoboot:  0
mmc0 is current device
Scanning mmc 0...
Found /boot.scr.uimg
reading /boot.scr.uimg
882 bytes read in 17 ms (49.8 KiB/s)
## Executing script at 00000000
Using default bootargs
Turn on USB controller power...
00001000: 00000020 00000000 00028001 00000008     ...............
00001010: 00000008 00000003 00000003 00000000    ................
2000b880: 00001008                               ....
00001000: 00000020 80000000 00028001 00000008     ...............
00001010: 80000008 00000003 00000001 00000000    ................
reading /zImage
3744608 bytes read in 591 ms (6 MiB/s)
reading /bcm2835-rpi-b.dtb
4333 bytes read in 14 ms (301.8 KiB/s)
Kernel image @ 0x1000000 [ 0x000000 - 0x392360 ]
## Flattened Device Tree blob at 02000000
   Booting using the fdt blob at 0x2000000
   Loading Device Tree to 1bb83000, end 1bb870ec ... OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
[    0.000000] Booting Linux on physical CPU 0x0

Print evironment variables

Hit any key to stop autoboot:  0
U-Boot> env print

Key environment variables formatted for easy reading:

preboot=
  if load mmc 0:1 ${loadaddr} /uEnv.txt; then
    env import -t ${loadaddr} ${filesize};
  fi

bootdelay=2

boot_targets=mmc0

bootcmd=
  for target in ${boot_targets}; do
    run bootcmd_${target};
  done

bootcmd_mmc0=
  setenv devnum 0;
  run mmc_boot;

mmc_boot=
  setenv devtype mmc;
  if mmc dev ${devnum}; then
    run scan_boot;
  fi

boot_prefixes=/

scan_boot=
  echo Scanning ${devtype} ${devnum}...;
  for prefix in ${boot_prefixes}; do
    run sysboot_boot;
    run script_boot;
  done

rootpart=1
sysboot_boot=
  if test -e ${devtype} ${devnum}:${rootpart} ${prefix}extlinux/extlinux.conf; then
    echo Found ${prefix}extlinux/extlinux.conf;
    run do_sysboot_boot;
    echo SCRIPT FAILED: continuing...;
  fi

boot_scripts=boot.scr.uimg

script_boot=
  for script in ${boot_scripts}; do
    if test -e ${devtype} ${devnum}:${rootpart} ${prefix}${script}; then
      echo Found ${prefix}${script};
      run do_script_boot;
      echo SCRIPT FAILED: continuing...;
    fi;
  done

do_script_boot=
  load ${devtype} ${devnum}:${rootpart} ${scriptaddr} ${prefix}${script}; 
  source ${scriptaddr}

fdtfile=bcm2835-rpi-b.dtb

The default variables are set at compile time in include/configs/rpi_b.h.

The preboot variable is run first of all, before the prompt appears:

preboot
This variable can be used to run specific code before the normal startup
(i.e. CONFIG_BOOTDELAY loop, autostart or interactive mode) begins.
This is especially useful when its contents are generated automatically, i.e. by checking for keypresses, etc.

After the bootdelay, bootcmd is run. By default, execution falls through to boot.scr.uimg

It is possible to add and change the variables in uEnv.txt, even bootcmd.

Links:

uEnv.txt

# UEnv.txt is imported during the preboot variable execution.

# Override the default bootargs adding some debug output:
#bootargs='earlyprintk loglevel=8 console=ttyAMA0 verbose rootwait root=/dev/mmcblk0p2 rw debug dyndbg=\\\"module pinctrl_bcm2835 +p; file drivers/gpio/gpiolib.c +p; file drivers/of/platform.c +p; file kernel/irq/irqdomain.c +p; file kernel/irq/manage.c +p; file kernel/resource.c +p;\\\"'

# Override bootcmd
#bootcmd=echo Overriding bootcmd...; for target in ${boot_targets}; do run bootcmd_${target}; done