diff options
-rw-r--r-- | classes/sota_raspberrypi.bbclass | 34 | ||||
-rw-r--r-- | conf/include/bblayers/sota_raspberrypi4-64.inc | 3 | ||||
-rw-r--r-- | conf/include/bblayers/sota_raspberrypi4.inc | 3 |
3 files changed, 38 insertions, 2 deletions
diff --git a/classes/sota_raspberrypi.bbclass b/classes/sota_raspberrypi.bbclass index 69f09fd..c901a70 100644 --- a/classes/sota_raspberrypi.bbclass +++ b/classes/sota_raspberrypi.bbclass | |||
@@ -16,25 +16,55 @@ DEV_MATCH_DIRECTIVE_pn-networkd-dhcp-conf = "Driver=smsc95xx lan78xx" | |||
16 | IMAGE_INSTALL_append_sota = " virtual/network-configuration " | 16 | IMAGE_INSTALL_append_sota = " virtual/network-configuration " |
17 | 17 | ||
18 | PREFERRED_PROVIDER_virtual/bootloader_sota ?= "u-boot" | 18 | PREFERRED_PROVIDER_virtual/bootloader_sota ?= "u-boot" |
19 | UBOOT_ENTRYPOINT_sota ?= "0x00008000" | 19 | UBOOT_ENTRYPOINT_sota ?= "0x00080000" |
20 | 20 | ||
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 " |
diff --git a/conf/include/bblayers/sota_raspberrypi4-64.inc b/conf/include/bblayers/sota_raspberrypi4-64.inc new file mode 100644 index 0000000..7e320af --- /dev/null +++ b/conf/include/bblayers/sota_raspberrypi4-64.inc | |||
@@ -0,0 +1,3 @@ | |||
1 | BBLAYERS += "${METADIR}/meta-updater-raspberrypi" | ||
2 | BBLAYERS += "${METADIR}/meta-raspberrypi" | ||
3 | BBLAYERS += "${METADIR}/meta-openembedded/meta-networking" | ||
diff --git a/conf/include/bblayers/sota_raspberrypi4.inc b/conf/include/bblayers/sota_raspberrypi4.inc new file mode 100644 index 0000000..7e320af --- /dev/null +++ b/conf/include/bblayers/sota_raspberrypi4.inc | |||
@@ -0,0 +1,3 @@ | |||
1 | BBLAYERS += "${METADIR}/meta-updater-raspberrypi" | ||
2 | BBLAYERS += "${METADIR}/meta-raspberrypi" | ||
3 | BBLAYERS += "${METADIR}/meta-openembedded/meta-networking" | ||