diff options
| author | Andrey Zhizhikin <andrey.z@gmail.com> | 2020-12-10 14:26:54 +0000 |
|---|---|---|
| committer | Otavio Salvador <otavio@ossystems.com.br> | 2020-12-11 19:37:54 -0300 |
| commit | 3ccc0a5055dd30b3e3fd263c166efd0ab7390bdc (patch) | |
| tree | cd044717bb9ad080351ef9abd7e9166cc3b0b175 | |
| parent | 5264a3a3d2f04f15fab13fa086a0149493636401 (diff) | |
| download | meta-freescale-3ccc0a5055dd30b3e3fd263c166efd0ab7390bdc.tar.gz | |
u-boot-fslc: deploy dtb files for mx8m machines
U-Boot DTB files need to be additionally deployed in order to be picked
up later by imx-boot component to produce boot container.
As the boot container is required to be provided as a boot binary file
for mx8m derivatives, deploy DTB files to a known location within
deployment folder in addition to u-boot binary files.
Signed-off-by: Andrey Zhizhikin <andrey.z@gmail.com>
| -rw-r--r-- | recipes-bsp/u-boot/u-boot-fslc_2020.10.bb | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/recipes-bsp/u-boot/u-boot-fslc_2020.10.bb b/recipes-bsp/u-boot/u-boot-fslc_2020.10.bb index 64588efcf..522bbbdae 100644 --- a/recipes-bsp/u-boot/u-boot-fslc_2020.10.bb +++ b/recipes-bsp/u-boot/u-boot-fslc_2020.10.bb | |||
| @@ -8,6 +8,12 @@ version, or because it is not applicable for upstreaming." | |||
| 8 | 8 | ||
| 9 | DEPENDS_append = " bc-native dtc-native lzop-native" | 9 | DEPENDS_append = " bc-native dtc-native lzop-native" |
| 10 | 10 | ||
| 11 | # Location known to imx-boot component, where U-Boot artifacts | ||
| 12 | # should be additionally deployed. | ||
| 13 | # See below note above do_deploy_append_mx8m for the purpose of | ||
| 14 | # this delopyment location | ||
| 15 | BOOT_TOOLS = "imx-boot-tools" | ||
| 16 | |||
| 11 | PROVIDES += "u-boot" | 17 | PROVIDES += "u-boot" |
| 12 | 18 | ||
| 13 | B = "${WORKDIR}/build" | 19 | B = "${WORKDIR}/build" |
| @@ -19,5 +25,39 @@ EXTRA_OEMAKE += 'HOSTCC="${BUILD_CC} ${BUILD_CPPFLAGS}" \ | |||
| 19 | HOSTLDFLAGS="${BUILD_LDFLAGS}" \ | 25 | HOSTLDFLAGS="${BUILD_LDFLAGS}" \ |
| 20 | HOSTSTRIP=true' | 26 | HOSTSTRIP=true' |
| 21 | 27 | ||
| 28 | # | ||
| 29 | # imx8m machines require additional deployment tasks to be | ||
| 30 | # carried out due to the fact that final boot image is constructed | ||
| 31 | # using imx-boot recipe. It produces a boot binary image, which is | ||
| 32 | # constructed from various binary components (u-boot with separate | ||
| 33 | # dtb, atf, DDR firmware and optional op-tee) into a single image | ||
| 34 | # using FIT format. This image is then parsed and loaded either via | ||
| 35 | # SPL directly (imx8mm), or using bootrom code (imx8mn and imx8mp). | ||
| 36 | # | ||
| 37 | # In order for imx-boot to construct the final binary boot image, | ||
| 38 | # it is required that the U-Boot dtb files are to be deployed into | ||
| 39 | # a location known by imx-boot so they could be picked up and | ||
| 40 | # inserted into the boot container. | ||
| 41 | do_deploy_append_mx8m() { | ||
| 42 | # Deploy the mkimage, u-boot-nodtb.bin and fsl-imx8m*-XX.dtb for mkimage to generate boot binary | ||
| 43 | if [ -n "${UBOOT_CONFIG}" ]; then | ||
| 44 | for config in ${UBOOT_MACHINE}; do | ||
| 45 | i=$(expr $i + 1); | ||
| 46 | for type in ${UBOOT_CONFIG}; do | ||
| 47 | j=$(expr $j + 1); | ||
| 48 | if [ $j -eq $i ] | ||
| 49 | then | ||
| 50 | install -d ${DEPLOYDIR}/${BOOT_TOOLS} | ||
| 51 | install -m 0777 ${B}/${config}/arch/arm/dts/${UBOOT_DTB_NAME} ${DEPLOYDIR}/${BOOT_TOOLS} | ||
| 52 | install -m 0777 ${B}/${config}/u-boot-nodtb.bin ${DEPLOYDIR}/${BOOT_TOOLS}/u-boot-nodtb.bin-${MACHINE}-${UBOOT_CONFIG} | ||
| 53 | fi | ||
| 54 | done | ||
| 55 | unset j | ||
| 56 | done | ||
| 57 | unset i | ||
| 58 | fi | ||
| 59 | } | ||
| 60 | |||
| 61 | |||
| 22 | PACKAGE_ARCH = "${MACHINE_ARCH}" | 62 | PACKAGE_ARCH = "${MACHINE_ARCH}" |
| 23 | COMPATIBLE_MACHINE = "(mxs|mx5|mx6|mx7|vf|use-mainline-bsp)" | 63 | COMPATIBLE_MACHINE = "(mxs|mx5|mx6|mx7|vf|use-mainline-bsp)" |
