summaryrefslogtreecommitdiffstats
path: root/recipes-bsp
diff options
context:
space:
mode:
authorJoshua Watt <Joshua.Watt@garmin.com>2020-03-25 09:09:06 -0500
committerOtavio Salvador <otavio@ossystems.com.br>2020-03-30 11:26:32 -0300
commitdad59d2dd0bb42ca5a8c3c1c697c3576b76d334c (patch)
tree14a2ba079ca7ff23f5e01a24d797f152ab6e909e /recipes-bsp
parentf75ec4ec1e25afc2f415e6cf25b96d2caf8f3936 (diff)
downloadmeta-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.bb3
-rw-r--r--recipes-bsp/u-boot/u-boot-imx-common.inc20
-rw-r--r--recipes-bsp/u-boot/u-boot-imx-tools_2019.04.bb9
-rw-r--r--recipes-bsp/u-boot/u-boot-imx_2019.04.bb19
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"
19DEPENDS_append_mx8m = " dtc-native" 20DEPENDS_append_mx8m = " dtc-native"
20BOOT_NAME = "imx-boot" 21BOOT_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 @@
1DESCRIPTION = "i.MX U-Boot suppporting i.MX reference boards."
2
3LICENSE = "GPLv2+"
4LIC_FILES_CHKSUM = "file://Licenses/gpl-2.0.txt;md5=b234ee4d69f5fce4486a80fdaf4a4263"
5
6SRCBRANCH = "imx_v2019.04_4.19.35_1.1.0"
7SRC_URI = "git://source.codeaurora.org/external/imx/uboot-imx.git;protocol=https;branch=${SRCBRANCH}"
8SRCREV = "4d377539a1190e838eae5d8b8a794dde0696d572"
9
10DEPENDS += "flex-native bison-native bc-native dtc-native"
11
12S = "${WORKDIR}/git"
13B = "${WORKDIR}/build"
14
15inherit fsl-u-boot-localversion
16
17LOCALVERSION ?= "-${SRCBRANCH}"
18
19BOOT_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 @@
1require recipes-bsp/u-boot/u-boot-tools.inc
2require u-boot-imx-common.inc
3
4PROVIDES_append_class-target = " ${MLPREFIX}u-boot-tools"
5PROVIDES_append_class-native = " u-boot-tools-native"
6PROVIDES_append_class-nativesdk = " nativesdk-u-boot-tools"
7
8PACKAGE_ARCH = "${MACHINE_ARCH}"
9COMPATIBLE_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
5DESCRIPTION = "i.MX U-Boot suppporting i.MX reference boards."
6require recipes-bsp/u-boot/u-boot.inc 5require recipes-bsp/u-boot/u-boot.inc
6require u-boot-imx-common.inc
7 7
8PROVIDES += "u-boot" 8PROVIDES += "u-boot"
9 9
10LICENSE = "GPLv2+"
11LIC_FILES_CHKSUM = "file://Licenses/gpl-2.0.txt;md5=b234ee4d69f5fce4486a80fdaf4a4263"
12
13SRCBRANCH = "imx_v2019.04_4.19.35_1.1.0"
14SRC_URI = "git://source.codeaurora.org/external/imx/uboot-imx.git;protocol=https;branch=${SRCBRANCH}"
15SRCREV = "4d377539a1190e838eae5d8b8a794dde0696d572"
16
17DEPENDS += "flex-native bison-native bc-native dtc-native"
18
19S = "${WORKDIR}/git"
20
21inherit fsl-u-boot-localversion
22
23LOCALVERSION ?= "-${SRCBRANCH}"
24
25BOOT_TOOLS = "imx-boot-tools"
26
27do_deploy_append_mx8m() { 10do_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}" ]