summaryrefslogtreecommitdiffstats
path: root/classes/sota_raspberrypi.bbclass
diff options
context:
space:
mode:
authorLaurent Bonnans <laurent.bonnans@here.com>2019-09-05 16:59:18 +0200
committerLaurent Bonnans <laurent.bonnans@here.com>2019-09-17 15:55:33 +0200
commit5296877819e156e5006946cc6f626908057172d1 (patch)
tree9c7e523750544d25178279f0b9d079437b804da3 /classes/sota_raspberrypi.bbclass
parent5bfdcc20f2babfc833101b8ce6478eaec86d9b61 (diff)
downloadmeta-updater-5296877819e156e5006946cc6f626908057172d1.tar.gz
Raspberrypi4 initial support
Signed-off-by: Laurent Bonnans <laurent.bonnans@here.com>
Diffstat (limited to 'classes/sota_raspberrypi.bbclass')
-rw-r--r--classes/sota_raspberrypi.bbclass32
1 files changed, 31 insertions, 1 deletions
diff --git a/classes/sota_raspberrypi.bbclass b/classes/sota_raspberrypi.bbclass
index 69f09fd..a7402ae 100644
--- a/classes/sota_raspberrypi.bbclass
+++ b/classes/sota_raspberrypi.bbclass
@@ -21,20 +21,50 @@ UBOOT_ENTRYPOINT_sota ?= "0x00008000"
21IMAGE_FSTYPES_remove_sota = "rpi-sdimg" 21IMAGE_FSTYPES_remove_sota = "rpi-sdimg"
22OSTREE_BOOTLOADER ?= "u-boot" 22OSTREE_BOOTLOADER ?= "u-boot"
23 23
24def make_dtb_boot_files(d):
25 # Generate IMAGE_BOOT_FILES entries for device tree files listed in
26 # KERNEL_DEVICETREE.
27 #
28 # This function was taken from conf/machine/include/rpi-base.inc in
29 # meta-raspberrypi
30 alldtbs = d.getVar('KERNEL_DEVICETREE')
31 imgtyp = d.getVar('KERNEL_IMAGETYPE')
32
33 def transform(dtb):
34 base = os.path.basename(dtb)
35 if dtb.endswith('dtb'):
36 return base
37 elif dtb.endswith('dtbo'):
38 return '{};{}'.format(base, dtb)
39
40 return ' '.join([transform(dtb) for dtb in alldtbs.split(' ') if dtb])
41
42IMAGE_BOOT_FILES_sota = "bcm2835-bootfiles/* \
43 u-boot.bin;${SDIMG_KERNELIMAGE} \
44 "
45
24# OSTree puts its own boot.scr to bcm2835-bootfiles 46# OSTree puts its own boot.scr to bcm2835-bootfiles
25IMAGE_BOOT_FILES_sota = "bcm2835-bootfiles/* u-boot.bin;${SDIMG_KERNELIMAGE}" 47# raspberrypi4 needs dtb in /boot partition so that they can be read by the
48# firmware
49IMAGE_BOOT_FILES_append_sota_raspberrypi4 = "${@make_dtb_boot_files(d)}"
26 50
27# Just the overlays that will be used should be listed 51# Just the overlays that will be used should be listed
28KERNEL_DEVICETREE_raspberrypi2_sota ?= " bcm2709-rpi-2-b.dtb " 52KERNEL_DEVICETREE_raspberrypi2_sota ?= " bcm2709-rpi-2-b.dtb "
29KERNEL_DEVICETREE_raspberrypi3_sota ?= " bcm2710-rpi-3-b.dtb overlays/vc4-kms-v3d.dtbo overlays/rpi-ft5406.dtbo" 53KERNEL_DEVICETREE_raspberrypi3_sota ?= " bcm2710-rpi-3-b.dtb overlays/vc4-kms-v3d.dtbo overlays/rpi-ft5406.dtbo"
30KERNEL_DEVICETREE_raspberrypi3-64_sota ?= " broadcom/bcm2710-rpi-3-b.dtb overlays/vc4-kms-v3d.dtbo overlays/vc4-fkms-v3d.dtbo overlays/rpi-ft5406.dtbo" 54KERNEL_DEVICETREE_raspberrypi3-64_sota ?= " broadcom/bcm2710-rpi-3-b.dtb overlays/vc4-kms-v3d.dtbo overlays/vc4-fkms-v3d.dtbo overlays/rpi-ft5406.dtbo"
55KERNEL_DEVICETREE_raspberrypi4_sota ?= " bcm2711-rpi-4-b.dtb overlays/vc4-fkms-v3d.dtbo overlays/uart0-rpi4.dtbo"
56KERNEL_DEVICETREE_raspberrypi4-64_sota ?= " broadcom/bcm2711-rpi-4-b.dtb overlays/vc4-fkms-v3d.dtbo overlays/uart0-rpi4.dtbo"
31 57
32SOTA_MAIN_DTB_raspberrypi2 ?= "bcm2709-rpi-2-b.dtb" 58SOTA_MAIN_DTB_raspberrypi2 ?= "bcm2709-rpi-2-b.dtb"
33SOTA_MAIN_DTB_raspberrypi3 ?= "bcm2710-rpi-3-b.dtb" 59SOTA_MAIN_DTB_raspberrypi3 ?= "bcm2710-rpi-3-b.dtb"
34SOTA_MAIN_DTB_raspberrypi3-64 ?= "broadcom_bcm2710-rpi-3-b.dtb" 60SOTA_MAIN_DTB_raspberrypi3-64 ?= "broadcom_bcm2710-rpi-3-b.dtb"
61SOTA_MAIN_DTB_raspberrypi4_sota ?= "bcm2711-rpi-4-b.dtb"
62SOTA_MAIN_DTB_raspberrypi4-64_sota ?= "broadcom_bcm2711-rpi-4-b.dtb"
35 63
36SOTA_DT_OVERLAYS_raspberrypi3 ?= "vc4-kms-v3d.dtbo rpi-ft5406.dtbo" 64SOTA_DT_OVERLAYS_raspberrypi3 ?= "vc4-kms-v3d.dtbo rpi-ft5406.dtbo"
37SOTA_DT_OVERLAYS_raspberrypi3-64 ?= "vc4-kms-v3d.dtbo vc4-fkms-v3d.dtbo rpi-ft5406.dtbo" 65SOTA_DT_OVERLAYS_raspberrypi3-64 ?= "vc4-kms-v3d.dtbo vc4-fkms-v3d.dtbo rpi-ft5406.dtbo"
66SOTA_DT_OVERLAYS_raspberrypi4 ?= "vc4-fkms-v3d.dtbo uart0-rpi4.dtbo"
67SOTA_DT_OVERLAYS_raspberrypi4-64 ?= "vc4-fkms-v3d.dtbo uart0-rpi4.dtbo"
38 68
39# Kernel args normally provided by RPi's internal bootloader. Non-updateable 69# Kernel args normally provided by RPi's internal bootloader. Non-updateable
40OSTREE_KERNEL_ARGS_sota ?= " 8250.nr_uarts=1 bcm2708_fb.fbwidth=656 bcm2708_fb.fbheight=614 bcm2708_fb.fbswap=1 vc_mem.mem_base=0x3ec00000 vc_mem.mem_size=0x40000000 dwc_otg.lpm_enable=0 console=ttyS0,115200 usbhid.mousepoll=0 " 70OSTREE_KERNEL_ARGS_sota ?= " 8250.nr_uarts=1 bcm2708_fb.fbwidth=656 bcm2708_fb.fbheight=614 bcm2708_fb.fbswap=1 vc_mem.mem_base=0x3ec00000 vc_mem.mem_size=0x40000000 dwc_otg.lpm_enable=0 console=ttyS0,115200 usbhid.mousepoll=0 "