diff options
Diffstat (limited to 'recipes-bsp/u-boot/u-boot-qoriq_2021.04.bb')
| -rw-r--r-- | recipes-bsp/u-boot/u-boot-qoriq_2021.04.bb | 98 |
1 files changed, 98 insertions, 0 deletions
diff --git a/recipes-bsp/u-boot/u-boot-qoriq_2021.04.bb b/recipes-bsp/u-boot/u-boot-qoriq_2021.04.bb new file mode 100644 index 000000000..db93710db --- /dev/null +++ b/recipes-bsp/u-boot/u-boot-qoriq_2021.04.bb | |||
| @@ -0,0 +1,98 @@ | |||
| 1 | require recipes-bsp/u-boot/u-boot.inc | ||
| 2 | |||
| 3 | DESCRIPTION = "U-Boot provided by Freescale with focus on QorIQ boards" | ||
| 4 | PROVIDES += "u-boot" | ||
| 5 | |||
| 6 | inherit fsl-u-boot-localversion | ||
| 7 | |||
| 8 | LICENSE = "GPLv2 & BSD-3-Clause & BSD-2-Clause & LGPL-2.0 & LGPL-2.1" | ||
| 9 | LIC_FILES_CHKSUM = " \ | ||
| 10 | file://Licenses/gpl-2.0.txt;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ | ||
| 11 | file://Licenses/bsd-2-clause.txt;md5=6a31f076f5773aabd8ff86191ad6fdd5 \ | ||
| 12 | file://Licenses/bsd-3-clause.txt;md5=4a1190eac56a9db675d58ebe86eaf50c \ | ||
| 13 | file://Licenses/lgpl-2.0.txt;md5=5f30f0716dfdd0d91eb439ebec522ec2 \ | ||
| 14 | file://Licenses/lgpl-2.1.txt;md5=4fbd65380cdd255951079008b364516c \ | ||
| 15 | " | ||
| 16 | |||
| 17 | SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-components/u-boot;nobranch=1" | ||
| 18 | SRCREV= "1c0116f3da250c5a52858c53efb8b38c0963f477" | ||
| 19 | |||
| 20 | S = "${WORKDIR}/git" | ||
| 21 | B = "${WORKDIR}/build" | ||
| 22 | PV:append = "+fslgit" | ||
| 23 | LOCALVERSION = "+fsl" | ||
| 24 | |||
| 25 | INHIBIT_DEFAULT_DEPS = "1" | ||
| 26 | DEPENDS = "libgcc virtual/${TARGET_PREFIX}gcc bison-native bc-native swig-native python3-native" | ||
| 27 | DEPENDS:append:qoriq-arm64 = " dtc-native" | ||
| 28 | DEPENDS:append:qoriq-arm = " dtc-native" | ||
| 29 | DEPENDS:append:qoriq-ppc = " boot-format-native" | ||
| 30 | |||
| 31 | python () { | ||
| 32 | if d.getVar("TCMODE") == "external-fsl": | ||
| 33 | return | ||
| 34 | |||
| 35 | ml = d.getVar("MULTILIB_VARIANTS") | ||
| 36 | arch = d.getVar("OVERRIDES") | ||
| 37 | |||
| 38 | if "e5500-64b:" in arch or "e6500-64b:" in arch: | ||
| 39 | if not "lib32" in ml: | ||
| 40 | raise bb.parse.SkipPackage("Building the u-boot for this arch requires multilib to be enabled") | ||
| 41 | sys_multilib = d.getVar('TARGET_VENDOR') + 'mllib32-linux' | ||
| 42 | sys_original = d.getVar('TARGET_VENDOR') + '-' + d.getVar('TARGET_OS') | ||
| 43 | workdir = d.getVar('WORKDIR') | ||
| 44 | d.setVar('DEPENDS:append', ' lib32-gcc-cross-powerpc lib32-libgcc') | ||
| 45 | d.setVar('PATH:append', ':' + d.getVar('STAGING_BINDIR_NATIVE') + '/powerpc' + sys_multilib) | ||
| 46 | d.setVar('TOOLCHAIN_OPTIONS', '--sysroot=' + workdir + '/lib32-recipe-sysroot') | ||
| 47 | d.setVar("WRAP_TARGET_PREFIX", 'powerpc' + sys_multilib + '-') | ||
| 48 | elif "fsl-lsch2-32b:" in arch: | ||
| 49 | if not "lib64" in ml: | ||
| 50 | raise bb.parse.SkipRecipe("Building the u-boot for this arch requires multilib to be enabled") | ||
| 51 | sys_multilib = d.getVar('TARGET_VENDOR') + 'mllib64-linux' | ||
| 52 | sys_original = d.getVar('TARGET_VENDOR') + '-' + d.getVar('TARGET_OS') | ||
| 53 | workdir = d.getVar('WORKDIR') | ||
| 54 | d.setVar('DEPENDS:append', ' lib64-gcc-cross-aarch64 lib64-libgcc') | ||
| 55 | d.setVar('PATH:append', ':' + d.getVar('STAGING_BINDIR_NATIVE') + '/aarch64' + sys_multilib) | ||
| 56 | d.setVar('TOOLCHAIN_OPTIONS', '--sysroot=' + workdir + '/lib64-recipe-sysroot') | ||
| 57 | d.setVar("WRAP_TARGET_PREFIX", 'aarch64' + sys_multilib + '-') | ||
| 58 | } | ||
| 59 | |||
| 60 | LE_UBOOT_FOR_ARMBE_TARGET ?= "0" | ||
| 61 | ENDIANNESS_GCC = "${@bb.utils.contains("LE_UBOOT_FOR_ARMBE_TARGET", "1", "-mlittle-endian", "", d)}" | ||
| 62 | ENDIANNESS_LD = "${@bb.utils.contains("LE_UBOOT_FOR_ARMBE_TARGET", "1", "-EL", "", d)}" | ||
| 63 | |||
| 64 | WRAP_TARGET_PREFIX ?= "${TARGET_PREFIX}" | ||
| 65 | EXTRA_OEMAKE = 'CROSS_COMPILE=${WRAP_TARGET_PREFIX} CC="${WRAP_TARGET_PREFIX}gcc ${TOOLCHAIN_OPTIONS} ${ENDIANNESS_GCC}" LD="${WRAP_TARGET_PREFIX}ld ${ENDIANNESS_LD}" V=1' | ||
| 66 | EXTRA_OEMAKE += 'HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}"' | ||
| 67 | EXTRA_OEMAKE += 'STAGING_INCDIR=${STAGING_INCDIR_NATIVE} STAGING_LIBDIR=${STAGING_LIBDIR_NATIVE}' | ||
| 68 | |||
| 69 | do_compile:append:qoriq() { | ||
| 70 | unset i j k | ||
| 71 | for config in ${UBOOT_MACHINE}; do | ||
| 72 | i=`expr $i + 1`; | ||
| 73 | for type in ${UBOOT_CONFIG}; do | ||
| 74 | j=`expr $j + 1`; | ||
| 75 | for binary in ${UBOOT_BINARIES}; do | ||
| 76 | k=`expr $k + 1` | ||
| 77 | if [ $j -eq $i ] && [ $k -eq $i ]; then | ||
| 78 | if [ -n "${BOOTFORMAT_CONFIG}" ] && echo "${type}" |grep -q spi;then | ||
| 79 | # regenerate spi binary if BOOTFORMAT_CONFIG is set | ||
| 80 | boot_format ${STAGING_DATADIR_NATIVE}/boot_format/${BOOTFORMAT_CONFIG} \ | ||
| 81 | ${config}/u-boot-${type}.${UBOOT_SUFFIX} -spi ${config}/u-boot.format.bin | ||
| 82 | cp ${config}/u-boot.format.bin ${config}/u-boot-${type}.${UBOOT_SUFFIX} | ||
| 83 | elif [ "qspi" = "${type}" ];then | ||
| 84 | cp ${config}/${binary} ${config}/u-boot-${type}-${PV}-${PR}.${UBOOT_SUFFIX} | ||
| 85 | fi | ||
| 86 | fi | ||
| 87 | done | ||
| 88 | unset k | ||
| 89 | done | ||
| 90 | unset j | ||
| 91 | done | ||
| 92 | unset i | ||
| 93 | } | ||
| 94 | |||
| 95 | |||
| 96 | PACKAGES += "${PN}-images" | ||
| 97 | FILES:${PN}-images += "/boot" | ||
| 98 | COMPATIBLE_MACHINE = "(qoriq)" | ||
