summaryrefslogtreecommitdiffstats
path: root/recipes-bsp/u-boot/u-boot-qoriq_2025.04.bb
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-bsp/u-boot/u-boot-qoriq_2025.04.bb')
-rw-r--r--recipes-bsp/u-boot/u-boot-qoriq_2025.04.bb139
1 files changed, 139 insertions, 0 deletions
diff --git a/recipes-bsp/u-boot/u-boot-qoriq_2025.04.bb b/recipes-bsp/u-boot/u-boot-qoriq_2025.04.bb
new file mode 100644
index 000000000..7fb10ad3b
--- /dev/null
+++ b/recipes-bsp/u-boot/u-boot-qoriq_2025.04.bb
@@ -0,0 +1,139 @@
1require recipes-bsp/u-boot/u-boot.inc
2
3DESCRIPTION = "U-Boot provided by Freescale with focus on QorIQ boards"
4PROVIDES += "u-boot"
5
6inherit fsl-u-boot-localversion
7
8LICENSE = "GPL-2.0-only & BSD-3-Clause & BSD-2-Clause & LGPL-2.0-only & LGPL-2.1-only"
9LIC_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=4cf66a4984120007c9881cc871cf49db \
14 file://Licenses/lgpl-2.1.txt;md5=4fbd65380cdd255951079008b364516c \
15"
16
17PV:append = "+${SRCPV}"
18
19UBOOT_BRANCH ?= "lf_v2025.04"
20UBOOT_SRC ?= "git://github.com/nxp-qoriq/u-boot.git;protocol=https"
21SRC_URI = "${UBOOT_SRC};branch=${UBOOT_BRANCH}"
22SRCREV = "9383f8387dc76524524da69992db96c22195a57c"
23
24B = "${UNPACKDIR}/build"
25PV:append = "+fslgit"
26LOCALVERSION = "+fsl"
27
28INHIBIT_DEFAULT_DEPS = "1"
29DEPENDS = "libgcc virtual/cross-cc bison-native bc-native gnutls-native swig-native python3-native"
30DEPENDS:append:qoriq-arm64 = " dtc-native"
31DEPENDS:append:qoriq-arm = " dtc-native"
32DEPENDS:append:qoriq-ppc = " boot-format-native"
33
34python () {
35 if d.getVar("TCMODE") == "external-fsl":
36 return
37
38 ml = d.getVar("MULTILIB_VARIANTS")
39 arch = d.getVar("OVERRIDES")
40
41 if "e5500-64b:" in arch or "e6500-64b:" in arch:
42 if not "lib32" in ml:
43 raise bb.parse.SkipPackage("Building the u-boot for this arch requires multilib to be enabled")
44 sys_multilib = d.getVar('TARGET_VENDOR') + 'mllib32-linux'
45 sys_original = d.getVar('TARGET_VENDOR') + '-' + d.getVar('TARGET_OS')
46 workdir = d.getVar('UNPACKDIR')
47 d.setVar('DEPENDS:append', ' lib32-gcc-cross-powerpc lib32-libgcc')
48 d.setVar('PATH:append', ':' + d.getVar('STAGING_BINDIR_NATIVE') + '/powerpc' + sys_multilib)
49 d.setVar('TOOLCHAIN_OPTIONS', '--sysroot=' + workdir + '/lib32-recipe-sysroot')
50 d.setVar("WRAP_TARGET_PREFIX", 'powerpc' + sys_multilib + '-')
51 elif "fsl-lsch2-32b:" in arch:
52 if not "lib64" in ml:
53 raise bb.parse.SkipRecipe("Building the u-boot for this arch requires multilib to be enabled")
54 sys_multilib = d.getVar('TARGET_VENDOR') + 'mllib64-linux'
55 sys_original = d.getVar('TARGET_VENDOR') + '-' + d.getVar('TARGET_OS')
56 workdir = d.getVar('UNPACKDIR')
57 d.setVar('DEPENDS:append', ' lib64-gcc-cross-aarch64 lib64-libgcc')
58 d.setVar('PATH:append', ':' + d.getVar('STAGING_BINDIR_NATIVE') + '/aarch64' + sys_multilib)
59 d.setVar('TOOLCHAIN_OPTIONS', '--sysroot=' + workdir + '/lib64-recipe-sysroot')
60 d.setVar("WRAP_TARGET_PREFIX", 'aarch64' + sys_multilib + '-')
61}
62
63LE_UBOOT_FOR_ARMBE_TARGET ?= "0"
64ENDIANNESS_GCC = "${@bb.utils.contains("LE_UBOOT_FOR_ARMBE_TARGET", "1", "-mlittle-endian", "", d)}"
65ENDIANNESS_LD = "${@bb.utils.contains("LE_UBOOT_FOR_ARMBE_TARGET", "1", "-EL", "", d)}"
66
67WRAP_TARGET_PREFIX ?= "${TARGET_PREFIX}"
68EXTRA_OEMAKE = 'CROSS_COMPILE=${WRAP_TARGET_PREFIX} CC="${WRAP_TARGET_PREFIX}gcc ${TOOLCHAIN_OPTIONS} ${ENDIANNESS_GCC}" LD="${WRAP_TARGET_PREFIX}ld ${ENDIANNESS_LD}" V=1'
69EXTRA_OEMAKE += 'HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}"'
70EXTRA_OEMAKE += 'STAGING_INCDIR=${STAGING_INCDIR_NATIVE} STAGING_LIBDIR=${STAGING_LIBDIR_NATIVE}'
71
72do_compile:append:qoriq() {
73 unset i j k
74 for config in ${UBOOT_MACHINE}; do
75 i=`expr $i + 1`;
76 for type in ${UBOOT_CONFIG}; do
77 j=`expr $j + 1`;
78 for binary in ${UBOOT_BINARIES}; do
79 k=`expr $k + 1`
80 if [ $j -eq $i ] && [ $k -eq $i ]; then
81 if [ -n "${BOOTFORMAT_CONFIG}" ] && echo "${type}" |grep -q spi;then
82 # regenerate spi binary if BOOTFORMAT_CONFIG is set
83 boot_format ${STAGING_DATADIR_NATIVE}/boot_format/${BOOTFORMAT_CONFIG} \
84 ${config}/u-boot-${type}.${UBOOT_SUFFIX} -spi ${config}/u-boot.format.bin
85 cp ${config}/u-boot.format.bin ${config}/u-boot-${type}.${UBOOT_SUFFIX}
86 fi
87 fi
88 done
89 unset k
90 done
91 unset j
92 done
93 unset i
94}
95
96do_deploy:append:lx2162a () {
97 if [ -n "${UBOOT_CONFIG}" ]
98 then
99 for config in ${UBOOT_MACHINE}; do
100 i=$(expr $i + 1);
101 for type in ${UBOOT_CONFIG}; do
102 j=$(expr $j + 1);
103 if [ $j -eq $i ]
104 then
105 if [ "tfa-verified-boot" = "${type}" ];then
106 install -m 644 ${B}/${config}/u-boot.dtb ${DEPLOYDIR}/u-boot.dtb
107 fi
108 fi
109 done
110 unset j
111 done
112 unset i
113 fi
114}
115
116do_deploy:append:ls102xa () {
117 if [ -n "${UBOOT_CONFIG}" ]
118 then
119 for config in ${UBOOT_MACHINE}; do
120 i=$(expr $i + 1);
121 for type in ${UBOOT_CONFIG}; do
122 j=$(expr $j + 1);
123 if [ $j -eq $i ]
124 then
125 if expr "$type" : sdcard;then
126 install -m 644 ${B}/${config}/u-boot-dtb.bin ${DEPLOYDIR}/u-boot-dtb.${UBOOT_SUFFIX}-${type}
127 install -m 644 ${B}/${config}/spl/u-boot-spl.bin ${DEPLOYDIR}/u-boot-spl.${UBOOT_SUFFIX}-${type}
128 fi
129 fi
130 done
131 unset j
132 done
133 unset i
134 fi
135}
136
137PACKAGES += "${PN}-images"
138FILES:${PN}-images += "/boot"
139COMPATIBLE_MACHINE = "(qoriq)"