summaryrefslogtreecommitdiffstats
path: root/external/meta-updater-raspberrypi/recipes-bsp/u-boot/u-boot_%.bbappend
diff options
context:
space:
mode:
Diffstat (limited to 'external/meta-updater-raspberrypi/recipes-bsp/u-boot/u-boot_%.bbappend')
-rw-r--r--external/meta-updater-raspberrypi/recipes-bsp/u-boot/u-boot_%.bbappend35
1 files changed, 30 insertions, 5 deletions
diff --git a/external/meta-updater-raspberrypi/recipes-bsp/u-boot/u-boot_%.bbappend b/external/meta-updater-raspberrypi/recipes-bsp/u-boot/u-boot_%.bbappend
index 32812600..5032e217 100644
--- a/external/meta-updater-raspberrypi/recipes-bsp/u-boot/u-boot_%.bbappend
+++ b/external/meta-updater-raspberrypi/recipes-bsp/u-boot/u-boot_%.bbappend
@@ -1,7 +1,32 @@
FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
-SRC_URI_append = " \
- file://0001-Enable-FIT-and-bootcount-on-RPi3.patch \
- file://0001-board-raspberrypi-add-serial-and-revision-to-the-dev.patch \
- file://0001-Increase-rpi-BOOTM_LEN.patch \
- "
+SRC_URI_append_rpi = " \
+ file://0001-Increase-rpi-BOOTM_LEN.patch \
+ file://0001-board-raspberrypi-add-serial-and-revision-to-the-dev.patch \
+ file://fit.cfg \
+ file://bootcount.cfg \
+ "
+
+SRC_URI_append_raspberrypi4 = " \
+ file://rpi4-fixup-mem.cfg \
+ "
+
+# build u-boot image suitable for use with qemu
+# we need to masquerade a kernel uImage, due to qemu limitations
+# (see https://lists.nongnu.org/archive/html/qemu-devel/2019-08/msg05094.html)
+# thus, we cannot use u-boot default rule for u-boot.img which sets a correct
+# "u-boot" as image type
+
+DEPENDS_append_rpi = " u-boot-mkimage-native"
+
+UBOOT_LOAD_ADDR = "0x8000"
+UBOOT_LOAD_ADDR_raspberrypi3-64 = "0x80000"
+UBOOT_LOAD_ADDR_raspberrypi4-64 = "0x80000"
+
+do_compile_append_rpi() {
+ uboot-mkimage -A arm -T kernel -C none -O linux -a ${UBOOT_LOAD_ADDR} -e ${UBOOT_LOAD_ADDR} -d ${B}/u-boot.bin ${B}/u-boot-qemu.img
+}
+
+do_deploy_append_rpi() {
+ install -m 644 ${B}/u-boot-qemu.img ${DEPLOYDIR}/u-boot-qemu.img
+}