u-boot: Simplify boot script

A patch is backported to check if the firmware loaded a device tree blob
into memory and set the fdt_addr variable if it is found. The U-Boot
script will then read the command line arguments generated by the
firmware from the device tree and boot the kernel with the command
line arguments and the loaded device tree.

This allows things like MAC address, board revision and serial number
to be correctly configured and options in config.txt to be used.

An additional patch is backported and further changes are made to support
this.

Signed-off-by: Jonathan Liu <net147@gmail.com>
Signed-off-by: Paul Barker <paul@paulbarker.me.uk>
This commit is contained in:
Jonathan Liu
2016-11-30 21:02:39 +00:00
committed by Andrei Gherzan
parent 0e66d6953c
commit 064aa0a388
9 changed files with 246 additions and 24 deletions

View File

@@ -0,0 +1,3 @@
fdt addr ${fdt_addr} && fdt get value bootargs /chosen bootargs
fatload mmc 0:1 ${kernel_addr_r} uImage
bootm ${kernel_addr_r} - ${fdt_addr}

View File

@@ -1,6 +0,0 @@
setenv fdtfile bcm2708-rpi-b.dtb
setenv bootargs 'earlyprintk console=tty0 console=ttyAMA0 root=/dev/mmcblk0p2 rootfstype=ext4 rootwait noinitrd'
mmc dev 0
fatload mmc 0:1 ${kernel_addr_r} uImage
fatload mmc 0:1 ${fdt_addr_r} ${fdtfile}
bootm ${kernel_addr_r} - ${fdt_addr_r}

View File

@@ -1,6 +0,0 @@
setenv fdtfile bcm2708-rpi-b.dtb
setenv bootargs 'earlyprintk console=tty0 console=ttyAMA0 root=/dev/mmcblk0p2 rootfstype=ext4 rootwait noinitrd'
mmc dev 0
fatload mmc 0:1 ${kernel_addr_r} uImage
fatload mmc 0:1 ${fdt_addr_r} ${fdtfile}
bootm ${kernel_addr_r} - ${fdt_addr_r}

View File

@@ -1,6 +0,0 @@
setenv fdtfile bcm2709-rpi-2-b.dtb
setenv bootargs 'earlyprintk console=tty0 console=ttyAMA0 root=/dev/mmcblk0p2 rootfstype=ext4 rootwait noinitrd'
mmc dev 0
fatload mmc 0:1 ${kernel_addr_r} uImage
fatload mmc 0:1 ${fdt_addr_r} ${fdtfile}
bootm ${kernel_addr_r} - ${fdt_addr_r}

View File

@@ -1,6 +0,0 @@
setenv fdtfile bcm2710-rpi-3-b.dtb
setenv bootargs 'earlyprintk console=tty0 console=ttyAMA0 root=/dev/mmcblk0p2 rootfstype=ext4 rootwait noinitrd'
mmc dev 0
fatload mmc 0:1 ${kernel_addr_r} uImage
fatload mmc 0:1 ${fdt_addr_r} ${fdtfile}
bootm ${kernel_addr_r} - ${fdt_addr_r}