summaryrefslogtreecommitdiffstats
path: root/recipes-bsp/rpi-u-boot-scr
diff options
context:
space:
mode:
authorJonathan Liu <net147@gmail.com>2016-11-30 21:02:39 +0000
committerAndrei Gherzan <andrei@gherzan.ro>2016-12-06 19:16:11 +0100
commit064aa0a3884d4ef2cd7e9fdfebec19167b52b2e7 (patch)
treea5458d96f91b14e5f81b1467504d3eac7455c934 /recipes-bsp/rpi-u-boot-scr
parent0e66d6953cee13a56428d5511838f898dc9da3b7 (diff)
downloadmeta-raspberrypi-064aa0a3884d4ef2cd7e9fdfebec19167b52b2e7.tar.gz
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>
Diffstat (limited to 'recipes-bsp/rpi-u-boot-scr')
-rw-r--r--recipes-bsp/rpi-u-boot-scr/files/boot.cmd3
-rw-r--r--recipes-bsp/rpi-u-boot-scr/files/raspberrypi/boot.cmd6
-rw-r--r--recipes-bsp/rpi-u-boot-scr/files/raspberrypi0/boot.cmd6
-rw-r--r--recipes-bsp/rpi-u-boot-scr/files/raspberrypi2/boot.cmd6
-rw-r--r--recipes-bsp/rpi-u-boot-scr/files/raspberrypi3/boot.cmd6
5 files changed, 3 insertions, 24 deletions
diff --git a/recipes-bsp/rpi-u-boot-scr/files/boot.cmd b/recipes-bsp/rpi-u-boot-scr/files/boot.cmd
new file mode 100644
index 0000000..2e8452e
--- /dev/null
+++ b/recipes-bsp/rpi-u-boot-scr/files/boot.cmd
@@ -0,0 +1,3 @@
1fdt addr ${fdt_addr} && fdt get value bootargs /chosen bootargs
2fatload mmc 0:1 ${kernel_addr_r} uImage
3bootm ${kernel_addr_r} - ${fdt_addr}
diff --git a/recipes-bsp/rpi-u-boot-scr/files/raspberrypi/boot.cmd b/recipes-bsp/rpi-u-boot-scr/files/raspberrypi/boot.cmd
deleted file mode 100644
index c86c758..0000000
--- a/recipes-bsp/rpi-u-boot-scr/files/raspberrypi/boot.cmd
+++ /dev/null
@@ -1,6 +0,0 @@
1setenv fdtfile bcm2708-rpi-b.dtb
2setenv bootargs 'earlyprintk console=tty0 console=ttyAMA0 root=/dev/mmcblk0p2 rootfstype=ext4 rootwait noinitrd'
3mmc dev 0
4fatload mmc 0:1 ${kernel_addr_r} uImage
5fatload mmc 0:1 ${fdt_addr_r} ${fdtfile}
6bootm ${kernel_addr_r} - ${fdt_addr_r}
diff --git a/recipes-bsp/rpi-u-boot-scr/files/raspberrypi0/boot.cmd b/recipes-bsp/rpi-u-boot-scr/files/raspberrypi0/boot.cmd
deleted file mode 100644
index c86c758..0000000
--- a/recipes-bsp/rpi-u-boot-scr/files/raspberrypi0/boot.cmd
+++ /dev/null
@@ -1,6 +0,0 @@
1setenv fdtfile bcm2708-rpi-b.dtb
2setenv bootargs 'earlyprintk console=tty0 console=ttyAMA0 root=/dev/mmcblk0p2 rootfstype=ext4 rootwait noinitrd'
3mmc dev 0
4fatload mmc 0:1 ${kernel_addr_r} uImage
5fatload mmc 0:1 ${fdt_addr_r} ${fdtfile}
6bootm ${kernel_addr_r} - ${fdt_addr_r}
diff --git a/recipes-bsp/rpi-u-boot-scr/files/raspberrypi2/boot.cmd b/recipes-bsp/rpi-u-boot-scr/files/raspberrypi2/boot.cmd
deleted file mode 100644
index aa4ea64..0000000
--- a/recipes-bsp/rpi-u-boot-scr/files/raspberrypi2/boot.cmd
+++ /dev/null
@@ -1,6 +0,0 @@
1setenv fdtfile bcm2709-rpi-2-b.dtb
2setenv bootargs 'earlyprintk console=tty0 console=ttyAMA0 root=/dev/mmcblk0p2 rootfstype=ext4 rootwait noinitrd'
3mmc dev 0
4fatload mmc 0:1 ${kernel_addr_r} uImage
5fatload mmc 0:1 ${fdt_addr_r} ${fdtfile}
6bootm ${kernel_addr_r} - ${fdt_addr_r}
diff --git a/recipes-bsp/rpi-u-boot-scr/files/raspberrypi3/boot.cmd b/recipes-bsp/rpi-u-boot-scr/files/raspberrypi3/boot.cmd
deleted file mode 100644
index 2950856..0000000
--- a/recipes-bsp/rpi-u-boot-scr/files/raspberrypi3/boot.cmd
+++ /dev/null
@@ -1,6 +0,0 @@
1setenv fdtfile bcm2710-rpi-3-b.dtb
2setenv bootargs 'earlyprintk console=tty0 console=ttyAMA0 root=/dev/mmcblk0p2 rootfstype=ext4 rootwait noinitrd'
3mmc dev 0
4fatload mmc 0:1 ${kernel_addr_r} uImage
5fatload mmc 0:1 ${fdt_addr_r} ${fdtfile}
6bootm ${kernel_addr_r} - ${fdt_addr_r}