summaryrefslogtreecommitdiff
path: root/meta-raspberrypi/recipes-bsp
diff options
context:
space:
mode:
Diffstat (limited to 'meta-raspberrypi/recipes-bsp')
-rw-r--r--meta-raspberrypi/recipes-bsp/rpi-u-boot-scr/files/boot.cmd.in1
-rw-r--r--meta-raspberrypi/recipes-bsp/u-boot/files/fw_env.config1
-rw-r--r--meta-raspberrypi/recipes-bsp/u-boot/libubootenv_%.bbappend12
3 files changed, 14 insertions, 0 deletions
diff --git a/meta-raspberrypi/recipes-bsp/rpi-u-boot-scr/files/boot.cmd.in b/meta-raspberrypi/recipes-bsp/rpi-u-boot-scr/files/boot.cmd.in
index ad54cd067..627d18156 100644
--- a/meta-raspberrypi/recipes-bsp/rpi-u-boot-scr/files/boot.cmd.in
+++ b/meta-raspberrypi/recipes-bsp/rpi-u-boot-scr/files/boot.cmd.in
@@ -1,3 +1,4 @@
fdt addr ${fdt_addr} && fdt get value bootargs /chosen bootargs
fatload mmc 0:1 ${kernel_addr_r} @@KERNEL_IMAGETYPE@@
+if test ! -e mmc 0:1 uboot.env; then saveenv; fi;
@@KERNEL_BOOTCMD@@ ${kernel_addr_r} - ${fdt_addr}
diff --git a/meta-raspberrypi/recipes-bsp/u-boot/files/fw_env.config b/meta-raspberrypi/recipes-bsp/u-boot/files/fw_env.config
new file mode 100644
index 000000000..d00df0cb3
--- /dev/null
+++ b/meta-raspberrypi/recipes-bsp/u-boot/files/fw_env.config
@@ -0,0 +1 @@
+/boot/uboot.env 0x0000 0x4000
diff --git a/meta-raspberrypi/recipes-bsp/u-boot/libubootenv_%.bbappend b/meta-raspberrypi/recipes-bsp/u-boot/libubootenv_%.bbappend
new file mode 100644
index 000000000..22d1bdc4a
--- /dev/null
+++ b/meta-raspberrypi/recipes-bsp/u-boot/libubootenv_%.bbappend
@@ -0,0 +1,12 @@
+FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
+
+SRC_URI_append_rpi = " \
+ file://fw_env.config \
+"
+
+DEPENDS_append_rpi = " rpi-u-boot-scr"
+
+do_install_append_rpi () {
+ install -d ${D}${sysconfdir}
+ install -m 0644 ${WORKDIR}/fw_env.config ${D}${sysconfdir}/fw_env.config
+}