diff options
author | Joshua Watt <Joshua.Watt@garmin.com> | 2020-03-25 09:09:06 -0500 |
---|---|---|
committer | Otavio Salvador <otavio@ossystems.com.br> | 2020-03-30 11:26:32 -0300 |
commit | dad59d2dd0bb42ca5a8c3c1c697c3576b76d334c (patch) | |
tree | 14a2ba079ca7ff23f5e01a24d797f152ab6e909e /recipes-bsp | |
parent | f75ec4ec1e25afc2f415e6cf25b96d2caf8f3936 (diff) | |
download | meta-freescale-dad59d2dd0bb42ca5a8c3c1c697c3576b76d334c.tar.gz |
u-boot: Split out u-boot tools
Splits out the IMX u-boot tools build to it's own recipe. This is
required because these are native tools and thus need to be in a -native
recipe to be properly relocated (instead of being built as part of the
target u-boot-imx recipe). If the tools aren't built in a -native
recipe, then the mkimage tool will contain a hard coded path to the
uninative program loader from the sandbox where it was first built and
this will not get corrected when restored from sstate. The result is
that the mkimage_uboot executable can't run because it's looking for a
hard coded program loader that does not exist, resulting in strange
build errors like:
./mkimage_uboot: Command not found
even though the executable is obviously in the correct location.
Signed-off-by: Joshua Watt <Joshua.Watt@garmin.com>
Diffstat (limited to 'recipes-bsp')
-rw-r--r-- | recipes-bsp/imx-mkimage/imx-boot_0.2.bb | 3 | ||||
-rw-r--r-- | recipes-bsp/u-boot/u-boot-imx-common.inc | 20 | ||||
-rw-r--r-- | recipes-bsp/u-boot/u-boot-imx-tools_2019.04.bb | 9 | ||||
-rw-r--r-- | recipes-bsp/u-boot/u-boot-imx_2019.04.bb | 19 |
4 files changed, 32 insertions, 19 deletions
diff --git a/recipes-bsp/imx-mkimage/imx-boot_0.2.bb b/recipes-bsp/imx-mkimage/imx-boot_0.2.bb index 00427d9f..0604cec8 100644 --- a/recipes-bsp/imx-mkimage/imx-boot_0.2.bb +++ b/recipes-bsp/imx-mkimage/imx-boot_0.2.bb | |||
@@ -15,6 +15,7 @@ DEPENDS += " \ | |||
15 | ${IMX_EXTRA_FIRMWARE} \ | 15 | ${IMX_EXTRA_FIRMWARE} \ |
16 | imx-atf \ | 16 | imx-atf \ |
17 | ${@bb.utils.contains('MACHINE_FEATURES', 'optee', 'optee-os', '', d)} \ | 17 | ${@bb.utils.contains('MACHINE_FEATURES', 'optee', 'optee-os', '', d)} \ |
18 | u-boot-mkimage-native \ | ||
18 | " | 19 | " |
19 | DEPENDS_append_mx8m = " dtc-native" | 20 | DEPENDS_append_mx8m = " dtc-native" |
20 | BOOT_NAME = "imx-boot" | 21 | BOOT_NAME = "imx-boot" |
@@ -85,7 +86,7 @@ compile_mx8m() { | |||
85 | cp ${DEPLOY_DIR_IMAGE}/${BOOT_TOOLS}/${UBOOT_DTB_NAME} ${BOOT_STAGING} | 86 | cp ${DEPLOY_DIR_IMAGE}/${BOOT_TOOLS}/${UBOOT_DTB_NAME} ${BOOT_STAGING} |
86 | cp ${DEPLOY_DIR_IMAGE}/${BOOT_TOOLS}/u-boot-nodtb.bin-${MACHINE}-${UBOOT_CONFIG} \ | 87 | cp ${DEPLOY_DIR_IMAGE}/${BOOT_TOOLS}/u-boot-nodtb.bin-${MACHINE}-${UBOOT_CONFIG} \ |
87 | ${BOOT_STAGING}/u-boot-nodtb.bin | 88 | ${BOOT_STAGING}/u-boot-nodtb.bin |
88 | cp ${DEPLOY_DIR_IMAGE}/${BOOT_TOOLS}/mkimage_uboot ${BOOT_STAGING} | 89 | cp ${STAGING_DIR_NATIVE}/${bindir}/mkimage ${BOOT_STAGING}/mkimage_uboot |
89 | cp ${DEPLOY_DIR_IMAGE}/${BOOT_TOOLS}/${ATF_MACHINE_NAME} ${BOOT_STAGING}/bl31.bin | 90 | cp ${DEPLOY_DIR_IMAGE}/${BOOT_TOOLS}/${ATF_MACHINE_NAME} ${BOOT_STAGING}/bl31.bin |
90 | cp ${DEPLOY_DIR_IMAGE}/${UBOOT_NAME} ${BOOT_STAGING}/u-boot.bin | 91 | cp ${DEPLOY_DIR_IMAGE}/${UBOOT_NAME} ${BOOT_STAGING}/u-boot.bin |
91 | } | 92 | } |
diff --git a/recipes-bsp/u-boot/u-boot-imx-common.inc b/recipes-bsp/u-boot/u-boot-imx-common.inc new file mode 100644 index 00000000..2d5105ee --- /dev/null +++ b/recipes-bsp/u-boot/u-boot-imx-common.inc | |||
@@ -0,0 +1,20 @@ | |||
1 | DESCRIPTION = "i.MX U-Boot suppporting i.MX reference boards." | ||
2 | |||
3 | LICENSE = "GPLv2+" | ||
4 | LIC_FILES_CHKSUM = "file://Licenses/gpl-2.0.txt;md5=b234ee4d69f5fce4486a80fdaf4a4263" | ||
5 | |||
6 | SRCBRANCH = "imx_v2019.04_4.19.35_1.1.0" | ||
7 | SRC_URI = "git://source.codeaurora.org/external/imx/uboot-imx.git;protocol=https;branch=${SRCBRANCH}" | ||
8 | SRCREV = "4d377539a1190e838eae5d8b8a794dde0696d572" | ||
9 | |||
10 | DEPENDS += "flex-native bison-native bc-native dtc-native" | ||
11 | |||
12 | S = "${WORKDIR}/git" | ||
13 | B = "${WORKDIR}/build" | ||
14 | |||
15 | inherit fsl-u-boot-localversion | ||
16 | |||
17 | LOCALVERSION ?= "-${SRCBRANCH}" | ||
18 | |||
19 | BOOT_TOOLS = "imx-boot-tools" | ||
20 | |||
diff --git a/recipes-bsp/u-boot/u-boot-imx-tools_2019.04.bb b/recipes-bsp/u-boot/u-boot-imx-tools_2019.04.bb new file mode 100644 index 00000000..56d0a7f0 --- /dev/null +++ b/recipes-bsp/u-boot/u-boot-imx-tools_2019.04.bb | |||
@@ -0,0 +1,9 @@ | |||
1 | require recipes-bsp/u-boot/u-boot-tools.inc | ||
2 | require u-boot-imx-common.inc | ||
3 | |||
4 | PROVIDES_append_class-target = " ${MLPREFIX}u-boot-tools" | ||
5 | PROVIDES_append_class-native = " u-boot-tools-native" | ||
6 | PROVIDES_append_class-nativesdk = " nativesdk-u-boot-tools" | ||
7 | |||
8 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||
9 | COMPATIBLE_MACHINE_class-target = "(mx6|mx7|mx8)" | ||
diff --git a/recipes-bsp/u-boot/u-boot-imx_2019.04.bb b/recipes-bsp/u-boot/u-boot-imx_2019.04.bb index 9b12482d..4cfcb471 100644 --- a/recipes-bsp/u-boot/u-boot-imx_2019.04.bb +++ b/recipes-bsp/u-boot/u-boot-imx_2019.04.bb | |||
@@ -2,28 +2,11 @@ | |||
2 | # Copyright 2018 (C) O.S. Systems Software LTDA. | 2 | # Copyright 2018 (C) O.S. Systems Software LTDA. |
3 | # Copyright 2017-2019 NXP | 3 | # Copyright 2017-2019 NXP |
4 | 4 | ||
5 | DESCRIPTION = "i.MX U-Boot suppporting i.MX reference boards." | ||
6 | require recipes-bsp/u-boot/u-boot.inc | 5 | require recipes-bsp/u-boot/u-boot.inc |
6 | require u-boot-imx-common.inc | ||
7 | 7 | ||
8 | PROVIDES += "u-boot" | 8 | PROVIDES += "u-boot" |
9 | 9 | ||
10 | LICENSE = "GPLv2+" | ||
11 | LIC_FILES_CHKSUM = "file://Licenses/gpl-2.0.txt;md5=b234ee4d69f5fce4486a80fdaf4a4263" | ||
12 | |||
13 | SRCBRANCH = "imx_v2019.04_4.19.35_1.1.0" | ||
14 | SRC_URI = "git://source.codeaurora.org/external/imx/uboot-imx.git;protocol=https;branch=${SRCBRANCH}" | ||
15 | SRCREV = "4d377539a1190e838eae5d8b8a794dde0696d572" | ||
16 | |||
17 | DEPENDS += "flex-native bison-native bc-native dtc-native" | ||
18 | |||
19 | S = "${WORKDIR}/git" | ||
20 | |||
21 | inherit fsl-u-boot-localversion | ||
22 | |||
23 | LOCALVERSION ?= "-${SRCBRANCH}" | ||
24 | |||
25 | BOOT_TOOLS = "imx-boot-tools" | ||
26 | |||
27 | do_deploy_append_mx8m() { | 10 | do_deploy_append_mx8m() { |
28 | # Deploy the mkimage, u-boot-nodtb.bin and fsl-imx8m*-XX.dtb for mkimage to generate boot binary | 11 | # Deploy the mkimage, u-boot-nodtb.bin and fsl-imx8m*-XX.dtb for mkimage to generate boot binary |
29 | if [ -n "${UBOOT_CONFIG}" ] | 12 | if [ -n "${UBOOT_CONFIG}" ] |