summaryrefslogtreecommitdiffstats
path: root/external/meta-updater-raspberrypi/recipes-bsp/u-boot/u-boot_%.bbappend
blob: 5032e2172a4b883f0b4af560f12fa924b4244788 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
FILESEXTRAPATHS_prepend := "${THISDIR}/files:"

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
}