diff options
author | Otavio Salvador <otavio@ossystems.com.br> | 2022-04-28 15:33:11 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-28 15:33:11 -0300 |
commit | 82a05904e4763efc1d10c8fe6fe26e0ea62dbd1a (patch) | |
tree | 923ac70b6be886d55fa3760948afc08acae81de0 | |
parent | 164b7360ff1f29dcdd66d8246d4562bac3f1b87f (diff) | |
parent | 2065d8697a99d52f528a61af180ce3747a397d87 (diff) | |
download | meta-freescale-82a05904e4763efc1d10c8fe6fe26e0ea62dbd1a.tar.gz |
Merge pull request #1059 from MaxKrummenacher/master
simplify the use of imx-boot-containers
-rw-r--r-- | classes/imx-boot-container.bbclass | 1 | ||||
-rw-r--r-- | classes/use-imx-security-controller-firmware.bbclass | 2 | ||||
-rw-r--r-- | conf/machine/include/imx-base.inc | 10 | ||||
-rw-r--r-- | recipes-bsp/imx-mkimage/imx-boot_1.0.bb | 22 | ||||
-rw-r--r-- | wic/imx-boot-container-bootpart.wks.in | 26 |
5 files changed, 13 insertions, 48 deletions
diff --git a/classes/imx-boot-container.bbclass b/classes/imx-boot-container.bbclass index a3496e8b..71c2809d 100644 --- a/classes/imx-boot-container.bbclass +++ b/classes/imx-boot-container.bbclass | |||
@@ -87,6 +87,7 @@ do_deploy:append() { | |||
87 | # artifacts handled by oe-core's u-boot.inc are | 87 | # artifacts handled by oe-core's u-boot.inc are |
88 | # treated. | 88 | # treated. |
89 | ln -sf flash.bin-${MACHINE}-${type} flash.bin | 89 | ln -sf flash.bin-${MACHINE}-${type} flash.bin |
90 | ln -sf flash.bin-${MACHINE}-${type} imx-boot | ||
90 | fi | 91 | fi |
91 | done | 92 | done |
92 | unset j | 93 | unset j |
diff --git a/classes/use-imx-security-controller-firmware.bbclass b/classes/use-imx-security-controller-firmware.bbclass index dfd708e4..eb88fb99 100644 --- a/classes/use-imx-security-controller-firmware.bbclass +++ b/classes/use-imx-security-controller-firmware.bbclass | |||
@@ -25,7 +25,7 @@ SECO_FIRMWARE_NAME:mx8dx-nxp-bsp = "mx8qxc0-ahab-container.img" | |||
25 | SECO_FIRMWARE_NAME:mx8dxl-nxp-bsp = "mx8dxla1-ahab-container.img" | 25 | SECO_FIRMWARE_NAME:mx8dxl-nxp-bsp = "mx8dxla1-ahab-container.img" |
26 | 26 | ||
27 | python () { | 27 | python () { |
28 | if "mx8m-nxp-bsp" in d.getVar('MACHINEOVERRIDES').split(":"): | 28 | if "mx8m-generic-bsp" in d.getVar('MACHINEOVERRIDES').split(":"): |
29 | return # We need to allow the recipes to be parsed for this case | 29 | return # We need to allow the recipes to be parsed for this case |
30 | 30 | ||
31 | seco_firmware = d.getVar('SECO_FIRMWARE_NAME') | 31 | seco_firmware = d.getVar('SECO_FIRMWARE_NAME') |
diff --git a/conf/machine/include/imx-base.inc b/conf/machine/include/imx-base.inc index d9c16811..d108552d 100644 --- a/conf/machine/include/imx-base.inc +++ b/conf/machine/include/imx-base.inc | |||
@@ -505,16 +505,6 @@ SOC_DEFAULT_WKS_FILE:mx8m-nxp-bsp ?= "imx-imx-boot-bootpart.wks.in" | |||
505 | SOC_DEFAULT_WKS_FILE:mx8-nxp-bsp ?= "imx-imx-boot-bootpart.wks.in" | 505 | SOC_DEFAULT_WKS_FILE:mx8-nxp-bsp ?= "imx-imx-boot-bootpart.wks.in" |
506 | SOC_DEFAULT_WKS_FILE:mxs-generic-bsp ?= "imx-uboot-mxs-bootpart.wks.in" | 506 | SOC_DEFAULT_WKS_FILE:mxs-generic-bsp ?= "imx-uboot-mxs-bootpart.wks.in" |
507 | 507 | ||
508 | # Boot container built as a part of mainline U-Boot uses different WKS | ||
509 | # file as the entire mx8m series, as U-Boot versions later than 2021.04 are | ||
510 | # providing two separate binaries, namely flash.bin and u-boot.itb. Those | ||
511 | # files are packed into the boot partition. | ||
512 | # Binaries produced by U-Boot build itself are serving as a direct | ||
513 | # replacement of imx-boot from NXP. | ||
514 | # Creation of those binary files is controlled by UBOOT_PROVIDES_BOOT_CONTAINER | ||
515 | # variable defined above. | ||
516 | SOC_DEFAULT_WKS_FILE:imx-boot-container ?= "imx-boot-container-bootpart.wks.in" | ||
517 | |||
518 | WKS_FILE ?= "${SOC_DEFAULT_WKS_FILE}" | 508 | WKS_FILE ?= "${SOC_DEFAULT_WKS_FILE}" |
519 | 509 | ||
520 | SERIAL_CONSOLES = "115200;ttymxc0" | 510 | SERIAL_CONSOLES = "115200;ttymxc0" |
diff --git a/recipes-bsp/imx-mkimage/imx-boot_1.0.bb b/recipes-bsp/imx-mkimage/imx-boot_1.0.bb index 88689ead..4e1b860a 100644 --- a/recipes-bsp/imx-mkimage/imx-boot_1.0.bb +++ b/recipes-bsp/imx-mkimage/imx-boot_1.0.bb | |||
@@ -10,8 +10,8 @@ SECTION = "BSP" | |||
10 | inherit use-imx-security-controller-firmware | 10 | inherit use-imx-security-controller-firmware |
11 | 11 | ||
12 | IMX_EXTRA_FIRMWARE = "firmware-imx-8 imx-sc-firmware imx-seco" | 12 | IMX_EXTRA_FIRMWARE = "firmware-imx-8 imx-sc-firmware imx-seco" |
13 | IMX_EXTRA_FIRMWARE:mx8m-nxp-bsp = "firmware-imx-8m" | 13 | IMX_EXTRA_FIRMWARE:mx8m-generic-bsp = "firmware-imx-8m" |
14 | IMX_EXTRA_FIRMWARE:mx8x-nxp-bsp = "imx-sc-firmware imx-seco" | 14 | IMX_EXTRA_FIRMWARE:mx8x-generic-bsp = "imx-sc-firmware imx-seco" |
15 | DEPENDS += " \ | 15 | DEPENDS += " \ |
16 | u-boot \ | 16 | u-boot \ |
17 | ${IMX_EXTRA_FIRMWARE} \ | 17 | ${IMX_EXTRA_FIRMWARE} \ |
@@ -20,7 +20,7 @@ DEPENDS += " \ | |||
20 | " | 20 | " |
21 | # xxd is a dependency of fspi_packer.sh | 21 | # xxd is a dependency of fspi_packer.sh |
22 | DEPENDS += "xxd-native" | 22 | DEPENDS += "xxd-native" |
23 | DEPENDS:append:mx8m-nxp-bsp = " u-boot-mkimage-native dtc-native" | 23 | DEPENDS:append:mx8m-generic-bsp = " u-boot-mkimage-native dtc-native" |
24 | BOOT_NAME = "imx-boot" | 24 | BOOT_NAME = "imx-boot" |
25 | PROVIDES = "${BOOT_NAME}" | 25 | PROVIDES = "${BOOT_NAME}" |
26 | 26 | ||
@@ -61,19 +61,19 @@ IMXBOOT_TARGETS ?= \ | |||
61 | 'flash_multi_cores flash_dcd', d), d)}" | 61 | 'flash_multi_cores flash_dcd', d), d)}" |
62 | 62 | ||
63 | BOOT_STAGING = "${S}/${IMX_BOOT_SOC_TARGET}" | 63 | BOOT_STAGING = "${S}/${IMX_BOOT_SOC_TARGET}" |
64 | BOOT_STAGING:mx8m-nxp-bsp = "${S}/iMX8M" | 64 | BOOT_STAGING:mx8m-generic-bsp = "${S}/iMX8M" |
65 | BOOT_STAGING:mx8dx-nxp-bsp = "${S}/iMX8QX" | 65 | BOOT_STAGING:mx8dx-generic-bsp = "${S}/iMX8QX" |
66 | 66 | ||
67 | SOC_FAMILY = "INVALID" | 67 | SOC_FAMILY = "INVALID" |
68 | SOC_FAMILY:mx8-nxp-bsp = "mx8" | 68 | SOC_FAMILY:mx8-generic-bsp = "mx8" |
69 | SOC_FAMILY:mx8m-nxp-bsp = "mx8m" | 69 | SOC_FAMILY:mx8m-generic-bsp = "mx8m" |
70 | SOC_FAMILY:mx8x-nxp-bsp = "mx8x" | 70 | SOC_FAMILY:mx8x-generic-bsp = "mx8x" |
71 | 71 | ||
72 | REV_OPTION ?= "" | 72 | REV_OPTION ?= "" |
73 | REV_OPTION:mx8qxp-nxp-bsp = \ | 73 | REV_OPTION:mx8qxp-generic-bsp = \ |
74 | "${@bb.utils.contains('MACHINE_FEATURES', 'soc-revb0', '', \ | 74 | "${@bb.utils.contains('MACHINE_FEATURES', 'soc-revb0', '', \ |
75 | 'REV=C0', d)}" | 75 | 'REV=C0', d)}" |
76 | REV_OPTION:mx8dx-nxp-bsp = "REV=C0" | 76 | REV_OPTION:mx8dx-generic-bsp = "REV=C0" |
77 | 77 | ||
78 | compile_mx8m() { | 78 | compile_mx8m() { |
79 | bbnote 8MQ/8MM/8MN/8MP boot binary build | 79 | bbnote 8MQ/8MM/8MN/8MP boot binary build |
@@ -202,4 +202,4 @@ addtask deploy before do_build after do_compile | |||
202 | PACKAGE_ARCH = "${MACHINE_ARCH}" | 202 | PACKAGE_ARCH = "${MACHINE_ARCH}" |
203 | FILES:${PN} = "/boot" | 203 | FILES:${PN} = "/boot" |
204 | 204 | ||
205 | COMPATIBLE_MACHINE = "(mx8-nxp-bsp)" | 205 | COMPATIBLE_MACHINE = "(mx8-generic-bsp)" |
diff --git a/wic/imx-boot-container-bootpart.wks.in b/wic/imx-boot-container-bootpart.wks.in deleted file mode 100644 index 321ee46b..00000000 --- a/wic/imx-boot-container-bootpart.wks.in +++ /dev/null | |||
@@ -1,26 +0,0 @@ | |||
1 | # short-description: Create SD card image with a boot partition for i.MX8M | ||
2 | # long-description: | ||
3 | # Create an image that can be written onto a SD card using dd for use | ||
4 | # with i.MX8M SoC family | ||
5 | # It uses binary boot container called flash.bin provided directly by | ||
6 | # the U-Boot recipe, and U-Boot ITB files which is created by binman utility | ||
7 | # of U-Boot. | ||
8 | # Those files are added it into the boot partition, which is populated as a | ||
9 | # raw copy into the image. | ||
10 | # Boot container prepared by U-Boot already container SPL, U-Boot itself, | ||
11 | # U-Boot DTB file, ATF, and optional OP-TEE components. | ||
12 | # | ||
13 | # The disk layout used is: | ||
14 | # - ----------- -------------- ------------- | ||
15 | # | | flash.bin | boot | rootfs | | ||
16 | # - ----------- -------------- ------------- | ||
17 | # ^ ^ ^ ^ ^ | ||
18 | # | | | | | | ||
19 | # 0 | 8MiB 72MiB 72MiB + rootfs + IMAGE_EXTRA_SPACE (default 10MiB) | ||
20 | # ${IMX_BOOT_SEEK} 32 or 33kiB, see reference manual | ||
21 | # | ||
22 | part u-boot --source rawcopy --sourceparams="file=flash.bin" --ondisk mmcblk --no-table --align ${IMX_BOOT_SEEK} | ||
23 | part /boot --source bootimg-partition --ondisk mmcblk --fstype=vfat --label boot --active --align 8192 --size 64 | ||
24 | part / --source rootfs --ondisk mmcblk --fstype=ext4 --label root --align 8192 | ||
25 | |||
26 | bootloader --ptable msdos | ||