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