diff options
author | Laurent Bonnans <laurent.bonnans@here.com> | 2019-09-05 16:59:18 +0200 |
---|---|---|
committer | Laurent Bonnans <laurent.bonnans@here.com> | 2019-09-17 15:55:33 +0200 |
commit | 5296877819e156e5006946cc6f626908057172d1 (patch) | |
tree | 9c7e523750544d25178279f0b9d079437b804da3 /classes/sota_raspberrypi.bbclass | |
parent | 5bfdcc20f2babfc833101b8ce6478eaec86d9b61 (diff) | |
download | meta-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.bbclass | 32 |
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" | |||
21 | IMAGE_FSTYPES_remove_sota = "rpi-sdimg" | 21 | IMAGE_FSTYPES_remove_sota = "rpi-sdimg" |
22 | OSTREE_BOOTLOADER ?= "u-boot" | 22 | OSTREE_BOOTLOADER ?= "u-boot" |
23 | 23 | ||
24 | def 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 | |||
42 | IMAGE_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 |
25 | IMAGE_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 | ||
49 | IMAGE_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 |
28 | KERNEL_DEVICETREE_raspberrypi2_sota ?= " bcm2709-rpi-2-b.dtb " | 52 | KERNEL_DEVICETREE_raspberrypi2_sota ?= " bcm2709-rpi-2-b.dtb " |
29 | KERNEL_DEVICETREE_raspberrypi3_sota ?= " bcm2710-rpi-3-b.dtb overlays/vc4-kms-v3d.dtbo overlays/rpi-ft5406.dtbo" | 53 | KERNEL_DEVICETREE_raspberrypi3_sota ?= " bcm2710-rpi-3-b.dtb overlays/vc4-kms-v3d.dtbo overlays/rpi-ft5406.dtbo" |
30 | KERNEL_DEVICETREE_raspberrypi3-64_sota ?= " broadcom/bcm2710-rpi-3-b.dtb overlays/vc4-kms-v3d.dtbo overlays/vc4-fkms-v3d.dtbo overlays/rpi-ft5406.dtbo" | 54 | KERNEL_DEVICETREE_raspberrypi3-64_sota ?= " broadcom/bcm2710-rpi-3-b.dtb overlays/vc4-kms-v3d.dtbo overlays/vc4-fkms-v3d.dtbo overlays/rpi-ft5406.dtbo" |
55 | KERNEL_DEVICETREE_raspberrypi4_sota ?= " bcm2711-rpi-4-b.dtb overlays/vc4-fkms-v3d.dtbo overlays/uart0-rpi4.dtbo" | ||
56 | KERNEL_DEVICETREE_raspberrypi4-64_sota ?= " broadcom/bcm2711-rpi-4-b.dtb overlays/vc4-fkms-v3d.dtbo overlays/uart0-rpi4.dtbo" | ||
31 | 57 | ||
32 | SOTA_MAIN_DTB_raspberrypi2 ?= "bcm2709-rpi-2-b.dtb" | 58 | SOTA_MAIN_DTB_raspberrypi2 ?= "bcm2709-rpi-2-b.dtb" |
33 | SOTA_MAIN_DTB_raspberrypi3 ?= "bcm2710-rpi-3-b.dtb" | 59 | SOTA_MAIN_DTB_raspberrypi3 ?= "bcm2710-rpi-3-b.dtb" |
34 | SOTA_MAIN_DTB_raspberrypi3-64 ?= "broadcom_bcm2710-rpi-3-b.dtb" | 60 | SOTA_MAIN_DTB_raspberrypi3-64 ?= "broadcom_bcm2710-rpi-3-b.dtb" |
61 | SOTA_MAIN_DTB_raspberrypi4_sota ?= "bcm2711-rpi-4-b.dtb" | ||
62 | SOTA_MAIN_DTB_raspberrypi4-64_sota ?= "broadcom_bcm2711-rpi-4-b.dtb" | ||
35 | 63 | ||
36 | SOTA_DT_OVERLAYS_raspberrypi3 ?= "vc4-kms-v3d.dtbo rpi-ft5406.dtbo" | 64 | SOTA_DT_OVERLAYS_raspberrypi3 ?= "vc4-kms-v3d.dtbo rpi-ft5406.dtbo" |
37 | SOTA_DT_OVERLAYS_raspberrypi3-64 ?= "vc4-kms-v3d.dtbo vc4-fkms-v3d.dtbo rpi-ft5406.dtbo" | 65 | SOTA_DT_OVERLAYS_raspberrypi3-64 ?= "vc4-kms-v3d.dtbo vc4-fkms-v3d.dtbo rpi-ft5406.dtbo" |
66 | SOTA_DT_OVERLAYS_raspberrypi4 ?= "vc4-fkms-v3d.dtbo uart0-rpi4.dtbo" | ||
67 | SOTA_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 |
40 | OSTREE_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 " | 70 | OSTREE_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 " |