diff options
Diffstat (limited to 'recipes-bsp/u-boot/u-boot-qoriq_2016.01.bb')
-rw-r--r-- | recipes-bsp/u-boot/u-boot-qoriq_2016.01.bb | 111 |
1 files changed, 111 insertions, 0 deletions
diff --git a/recipes-bsp/u-boot/u-boot-qoriq_2016.01.bb b/recipes-bsp/u-boot/u-boot-qoriq_2016.01.bb new file mode 100644 index 0000000..55e5700 --- /dev/null +++ b/recipes-bsp/u-boot/u-boot-qoriq_2016.01.bb | |||
@@ -0,0 +1,111 @@ | |||
1 | require recipes-bsp/u-boot/u-boot.inc | ||
2 | inherit fsl-u-boot-localversion | ||
3 | |||
4 | DESCRIPTION = "U-boot provided by Freescale with focus on QorIQ boards" | ||
5 | HOMEPAGE = "http://u-boot.sf.net" | ||
6 | SECTION = "bootloaders" | ||
7 | PROVIDES = "virtual/bootloader u-boot" | ||
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 | PV_append = "+fslgit" | ||
18 | INHIBIT_DEFAULT_DEPS = "1" | ||
19 | DEPENDS = "libgcc virtual/${TARGET_PREFIX}gcc" | ||
20 | DEPENDS_append_qoriq-ppc = " boot-format-native" | ||
21 | |||
22 | inherit deploy | ||
23 | |||
24 | SRC_URI = "git://git.freescale.com/ppc/sdk/u-boot.git;branch=sdk-v2.0.x \ | ||
25 | file://fix-build-error-under-gcc6.patch \ | ||
26 | " | ||
27 | SRCREV = "a9b437f50e2051f8d42ec9e1a6df52de4bc00e1e" | ||
28 | |||
29 | python () { | ||
30 | if d.getVar("TCMODE", True) == "external-fsl": | ||
31 | return | ||
32 | |||
33 | ml = d.getVar("MULTILIB_VARIANTS", True) | ||
34 | arch = d.getVar("OVERRIDES", True) | ||
35 | |||
36 | if "e5500-64b:" in arch or "e6500-64b:" in arch: | ||
37 | if not "lib32" in ml: | ||
38 | raise bb.parse.SkipPackage("Building the u-boot for this arch requires multilib to be enabled") | ||
39 | sys_multilib = 'powerpc' + d.getVar('TARGET_VENDOR', False) + 'mllib32-' + d.getVar('HOST_OS', False) | ||
40 | d.setVar('DEPENDS_append', ' lib32-gcc-cross-powerpc lib32-libgcc') | ||
41 | d.setVar('PATH_append', ':' + d.getVar('STAGING_BINDIR_NATIVE', False) + '/' + sys_multilib) | ||
42 | d.setVar('TOOLCHAIN_OPTIONS_append', '/../lib32-' + d.getVar("MACHINE", False)) | ||
43 | d.setVar("WRAP_TARGET_PREFIX", sys_multilib + '-') | ||
44 | } | ||
45 | |||
46 | WRAP_TARGET_PREFIX ?= "${TARGET_PREFIX}" | ||
47 | |||
48 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||
49 | |||
50 | USRC ?= "" | ||
51 | S = '${@base_conditional("USRC", "", "${WORKDIR}/git", "${USRC}", d)}' | ||
52 | |||
53 | LOCALVERSION = "+fsl" | ||
54 | |||
55 | EXTRA_OEMAKE = 'CROSS_COMPILE=${WRAP_TARGET_PREFIX} CC="${WRAP_TARGET_PREFIX}gcc ${TOOLCHAIN_OPTIONS}"' | ||
56 | |||
57 | do_compile_append_qoriq-ppc () { | ||
58 | # some board's final nand/spi/sdcard binary was not named as u-boot.bin | ||
59 | unset i j | ||
60 | if [ "x${UBOOT_CONFIG}" != "x" ]; then | ||
61 | for config in ${UBOOT_MACHINE}; do | ||
62 | i=`expr $i + 1`; | ||
63 | UBOOT_SOURCE=${UBOOT_BINARY} | ||
64 | if echo ${config} |egrep -v "SECBOOT|SECURE" |egrep -qi "SDCARD|SPIFLASH|NAND"; then | ||
65 | if echo ${config} |egrep -qi "NAND";then | ||
66 | if echo ${config} |egrep -qi "^(BSC|C29|P10|P2020RDB)";then | ||
67 | UBOOT_SOURCE=u-boot-with-spl.bin | ||
68 | elif echo ${config} |egrep -qi "^(B4|T1|T2|T4)";then | ||
69 | UBOOT_SOURCE=u-boot-with-spl-pbl.bin | ||
70 | elif echo ${config} |egrep -qi "^(P2041|P3|P4|P5)";then | ||
71 | UBOOT_SOURCE=u-boot.pbl | ||
72 | fi | ||
73 | elif echo ${config} |egrep -qi "SPIFLASH";then | ||
74 | if echo ${config} |egrep -qi "^(P10|P2020RDB)";then | ||
75 | UBOOT_SOURCE=u-boot-with-spl.bin | ||
76 | elif echo ${config} |egrep -qi "^(T1|T2)";then | ||
77 | UBOOT_SOURCE=u-boot-with-spl-pbl.bin | ||
78 | elif echo ${config} |egrep -qi "^(B4|P2041|P3|P4|P5|T4)";then | ||
79 | UBOOT_SOURCE=u-boot.pbl | ||
80 | fi | ||
81 | elif echo ${config} |egrep -qi "SDCARD";then | ||
82 | if echo ${config} |egrep -qi "^(P10|P2020RDB)";then | ||
83 | UBOOT_SOURCE=u-boot-with-spl.bin | ||
84 | elif echo ${config} |egrep -qi "^(B4|T1|T2|T4)";then | ||
85 | UBOOT_SOURCE=u-boot-with-spl-pbl.bin | ||
86 | elif echo ${config} |egrep -qi "^(P2041|P3|P4|P5)";then | ||
87 | UBOOT_SOURCE=u-boot.pbl | ||
88 | fi | ||
89 | fi | ||
90 | for type in ${UBOOT_CONFIG}; do | ||
91 | j=`expr $j + 1`; | ||
92 | if [ $j -eq $i ]; then | ||
93 | cp ${S}/${config}/${UBOOT_SOURCE} ${S}/${config}/u-boot-${type}.${UBOOT_SUFFIX} | ||
94 | # use boot-format to regenerate spi image if BOOTFORMAT_CONFIG is not empty | ||
95 | if echo ${config} |egrep -qi "SPIFLASH" && [ -n "${BOOTFORMAT_CONFIG}" ];then | ||
96 | ${STAGING_BINDIR_NATIVE}/boot_format \ | ||
97 | ${STAGING_DATADIR_NATIVE}/boot_format/${BOOTFORMAT_CONFIG} \ | ||
98 | ${S}/${config}/${UBOOT_SOURCE} -spi ${S}/${config}/u-boot-${type}.${UBOOT_SUFFIX} | ||
99 | fi | ||
100 | fi | ||
101 | done | ||
102 | unset j | ||
103 | fi | ||
104 | done | ||
105 | unset i | ||
106 | fi | ||
107 | } | ||
108 | |||
109 | PACKAGES += "${PN}-images" | ||
110 | FILES_${PN}-images += "/boot" | ||
111 | COMPATIBLE_MACHINE = "(qoriq)" | ||