summaryrefslogtreecommitdiffstats
path: root/meta/recipes-bsp/u-boot
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-bsp/u-boot')
-rw-r--r--meta/recipes-bsp/u-boot/libubootenv_0.3.5.bb (renamed from meta/recipes-bsp/u-boot/libubootenv_0.3.1.bb)18
-rw-r--r--meta/recipes-bsp/u-boot/u-boot-common.inc14
-rw-r--r--meta/recipes-bsp/u-boot/u-boot-configure.inc40
-rw-r--r--meta/recipes-bsp/u-boot/u-boot-tools.inc55
-rw-r--r--meta/recipes-bsp/u-boot/u-boot-tools_2024.04.bb (renamed from meta/recipes-bsp/u-boot/u-boot-tools_2021.01.bb)1
-rw-r--r--meta/recipes-bsp/u-boot/u-boot.inc150
-rw-r--r--meta/recipes-bsp/u-boot/u-boot_2021.01.bb4
-rw-r--r--meta/recipes-bsp/u-boot/u-boot_2024.04.bb5
8 files changed, 141 insertions, 146 deletions
diff --git a/meta/recipes-bsp/u-boot/libubootenv_0.3.1.bb b/meta/recipes-bsp/u-boot/libubootenv_0.3.5.bb
index 613e3161fb..b68bbb430a 100644
--- a/meta/recipes-bsp/u-boot/libubootenv_0.3.1.bb
+++ b/meta/recipes-bsp/u-boot/libubootenv_0.3.5.bb
@@ -6,25 +6,21 @@ It provides a hardware-independent replacement for fw_printenv/setenv utilities
6provided by U-Boot" 6provided by U-Boot"
7 7
8HOMEPAGE = "https://github.com/sbabic/libubootenv" 8HOMEPAGE = "https://github.com/sbabic/libubootenv"
9LICENSE = "LGPL-2.1" 9LICENSE = "LGPL-2.1-or-later"
10LIC_FILES_CHKSUM = "file://Licenses/lgpl-2.1.txt;md5=4fbd65380cdd255951079008b364516c" 10LIC_FILES_CHKSUM = "file://LICENSES/LGPL-2.1-or-later.txt;md5=4fbd65380cdd255951079008b364516c"
11SECTION = "libs" 11SECTION = "libs"
12 12
13SRC_URI = "git://github.com/sbabic/libubootenv;protocol=https" 13SRC_URI = "git://github.com/sbabic/libubootenv;protocol=https;branch=master"
14SRCREV = "824551ac77bab1d0f7ae34d7a7c77b155240e754" 14SRCREV = "3f4d15e36ceb58085b08dd13f3f2788e9299877b"
15 15
16S = "${WORKDIR}/git" 16S = "${WORKDIR}/git"
17 17
18inherit uboot-config cmake lib_package 18inherit cmake lib_package
19 19
20EXTRA_OECMAKE = "-DCMAKE_BUILD_TYPE=Release" 20EXTRA_OECMAKE = "-DCMAKE_BUILD_TYPE=Release"
21 21
22DEPENDS = "zlib" 22DEPENDS = "zlib libyaml"
23PROVIDES += "u-boot-fw-utils" 23PROVIDES += "u-boot-fw-utils"
24RPROVIDES_${PN}-bin += "u-boot-fw-utils" 24RPROVIDES:${PN}-bin += "u-boot-fw-utils"
25
26PACKAGE_ARCH = "${MACHINE_ARCH}"
27
28RRECOMMENDS_${PN}-bin_append_class-target = " u-boot-default-env"
29 25
30BBCLASSEXTEND = "native" 26BBCLASSEXTEND = "native"
diff --git a/meta/recipes-bsp/u-boot/u-boot-common.inc b/meta/recipes-bsp/u-boot/u-boot-common.inc
index 5a8035f432..ca5357392a 100644
--- a/meta/recipes-bsp/u-boot/u-boot-common.inc
+++ b/meta/recipes-bsp/u-boot/u-boot-common.inc
@@ -4,19 +4,21 @@ ARM, MIPS and several other processors, which can be installed in a boot \
4ROM and used to initialize and test the hardware or to download and run \ 4ROM and used to initialize and test the hardware or to download and run \
5application code." 5application code."
6SECTION = "bootloaders" 6SECTION = "bootloaders"
7DEPENDS += "flex-native bison-native" 7DEPENDS += "flex-native bison-native python3-setuptools-native"
8 8
9LICENSE = "GPLv2+" 9LICENSE = "GPL-2.0-or-later"
10LIC_FILES_CHKSUM = "file://Licenses/README;md5=5a7450c57ffe5ae63fd732446b988025" 10LIC_FILES_CHKSUM = "file://Licenses/README;md5=2ca5f2c35c8cc335f0a19756634782f1"
11PE = "1" 11PE = "1"
12 12
13# We use the revision in order to avoid having to fetch it from the 13# We use the revision in order to avoid having to fetch it from the
14# repo during parse 14# repo during parse
15SRCREV = "c4fddedc48f336eabc4ce3f74940e6aa372de18c" 15SRCREV = "25049ad560826f7dc1c4740883b0016014a59789"
16 16
17SRC_URI = "git://git.denx.de/u-boot.git \ 17SRC_URI = "git://source.denx.de/u-boot/u-boot.git;protocol=https;branch=master"
18 "
19 18
20S = "${WORKDIR}/git" 19S = "${WORKDIR}/git"
21B = "${WORKDIR}/build" 20B = "${WORKDIR}/build"
21
22inherit pkgconfig
23
22do_configure[cleandirs] = "${B}" 24do_configure[cleandirs] = "${B}"
diff --git a/meta/recipes-bsp/u-boot/u-boot-configure.inc b/meta/recipes-bsp/u-boot/u-boot-configure.inc
new file mode 100644
index 0000000000..378d675364
--- /dev/null
+++ b/meta/recipes-bsp/u-boot/u-boot-configure.inc
@@ -0,0 +1,40 @@
1# This provides the logic for creating the desired u-boot config,
2# accounting for any *.cfg files added to SRC_URI. It's separated
3# from u-boot.inc for use by recipes that need u-boot properly
4# configured but aren't doing a full build of u-boot itself (such as
5# its companion tools).
6
7inherit uboot-config cml1
8
9DEPENDS += "kern-tools-native"
10
11CONFIGURE_FILES = "${@d.getVar('UBOOT_MACHINE') or '.config'}"
12
13do_configure () {
14 if [ -n "${UBOOT_CONFIG}" ]; then
15 unset i j
16 for config in ${UBOOT_MACHINE}; do
17 i=$(expr $i + 1);
18 for type in ${UBOOT_CONFIG}; do
19 j=$(expr $j + 1);
20 if [ $j -eq $i ]; then
21 oe_runmake -C ${S} O=${B}/${config} ${config}
22 if [ -n "${@' '.join(find_cfgs(d))}" ]; then
23 merge_config.sh -m -O ${B}/${config} ${B}/${config}/.config ${@" ".join(find_cfgs(d))}
24 oe_runmake -C ${S} O=${B}/${config} oldconfig
25 fi
26 fi
27 done
28 unset j
29 done
30 unset i
31 else
32 if [ -n "${UBOOT_MACHINE}" ]; then
33 oe_runmake -C ${S} O=${B} ${UBOOT_MACHINE}
34 else
35 oe_runmake -C ${S} O=${B} oldconfig
36 fi
37 merge_config.sh -m .config ${@" ".join(find_cfgs(d))}
38 cml1_do_configure
39 fi
40}
diff --git a/meta/recipes-bsp/u-boot/u-boot-tools.inc b/meta/recipes-bsp/u-boot/u-boot-tools.inc
index 4ed936a70d..f3010763c0 100644
--- a/meta/recipes-bsp/u-boot/u-boot-tools.inc
+++ b/meta/recipes-bsp/u-boot/u-boot-tools.inc
@@ -1,26 +1,30 @@
1SUMMARY = "U-Boot bootloader tools" 1SUMMARY = "U-Boot bootloader tools"
2DEPENDS += "openssl" 2DEPENDS += "gnutls openssl util-linux swig-native"
3 3
4PROVIDES = "${MLPREFIX}u-boot-mkimage ${MLPREFIX}u-boot-mkenvimage" 4inherit python3native
5PROVIDES_class-native = "u-boot-mkimage-native u-boot-mkenvimage-native" 5export STAGING_INCDIR="${STAGING_INCDIR_NATIVE}"
6 6
7PACKAGES += "${PN}-mkimage ${PN}-mkenvimage" 7PROVIDES = "${MLPREFIX}u-boot-mkimage ${MLPREFIX}u-boot-mkenvimage ${MLPREFIX}u-boot-mkeficapsule"
8PROVIDES:class-native = "u-boot-mkimage-native u-boot-mkenvimage-native u-boot-mkeficapsule-native"
9
10PACKAGES += "${PN}-mkimage ${PN}-mkenvimage ${PN}-mkeficapsule"
8 11
9# Required for backward compatibility with "u-boot-mkimage-xxx.bb" 12# Required for backward compatibility with "u-boot-mkimage-xxx.bb"
10RPROVIDES_${PN}-mkimage = "u-boot-mkimage" 13RPROVIDES:${PN}-mkimage = "u-boot-mkimage"
11RREPLACES_${PN}-mkimage = "u-boot-mkimage" 14RREPLACES:${PN}-mkimage = "u-boot-mkimage"
12RCONFLICTS_${PN}-mkimage = "u-boot-mkimage" 15RCONFLICTS:${PN}-mkimage = "u-boot-mkimage"
13 16
14EXTRA_OEMAKE_class-target = 'CROSS_COMPILE="${TARGET_PREFIX}" CC="${CC} ${CFLAGS} ${LDFLAGS}" HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}" STRIP=true V=1' 17EXTRA_OEMAKE:class-target = 'CROSS_COMPILE="${TARGET_PREFIX}" CC="${CC} ${CFLAGS} ${LDFLAGS}" HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}" STRIP=true V=1'
15EXTRA_OEMAKE_class-native = 'CC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}" HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}" STRIP=true V=1' 18EXTRA_OEMAKE:class-native = 'CC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}" HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}" STRIP=true V=1'
16EXTRA_OEMAKE_class-nativesdk = 'CROSS_COMPILE="${HOST_PREFIX}" CC="${CC} ${CFLAGS} ${LDFLAGS}" HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}" STRIP=true V=1' 19EXTRA_OEMAKE:class-nativesdk = 'CROSS_COMPILE="${HOST_PREFIX}" CC="${CC} ${CFLAGS} ${LDFLAGS}" HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}" STRIP=true V=1'
17 20
18SED_CONFIG_EFI = '-e "s/CONFIG_EFI_LOADER=.*/# CONFIG_EFI_LOADER is not set/"' 21SED_CONFIG_EFI = '-e "s/CONFIG_EFI_LOADER=.*/# CONFIG_EFI_LOADER is not set/"'
19SED_CONFIG_EFI_x86 = '' 22SED_CONFIG_EFI:x86 = ''
20SED_CONFIG_EFI_x86-64 = '' 23SED_CONFIG_EFI:x86-64 = ''
21SED_CONFIG_EFI_arm = '' 24SED_CONFIG_EFI:arm = ''
22SED_CONFIG_EFI_armeb = '' 25SED_CONFIG_EFI:armeb = ''
23SED_CONFIG_EFI_aarch64 = '' 26SED_CONFIG_EFI:aarch64 = ''
27SED_CONFIG_EFI:loongarch64 = ''
24 28
25do_compile () { 29do_compile () {
26 # Yes, this is crazy. If you build on a system with git < 2.14 from scratch, the tree will 30 # Yes, this is crazy. If you build on a system with git < 2.14 from scratch, the tree will
@@ -38,7 +42,7 @@ do_compile () {
38 # (i.e. creating a hardlink dirties the index) 42 # (i.e. creating a hardlink dirties the index)
39 cd ${S}; git diff; cd ${B} 43 cd ${S}; git diff; cd ${B}
40 44
41 oe_runmake -C ${S} sandbox_defconfig O=${B} 45 oe_runmake -C ${S} tools-only_defconfig O=${B}
42 46
43 # Disable CONFIG_CMD_LICENSE, license.h is not used by tools and 47 # Disable CONFIG_CMD_LICENSE, license.h is not used by tools and
44 # generating it requires bin2header tool, which for target build 48 # generating it requires bin2header tool, which for target build
@@ -66,16 +70,21 @@ do_install () {
66 # fit_check_sign 70 # fit_check_sign
67 install -m 0755 tools/fit_check_sign ${D}${bindir}/uboot-fit_check_sign 71 install -m 0755 tools/fit_check_sign ${D}${bindir}/uboot-fit_check_sign
68 ln -sf uboot-fit_check_sign ${D}${bindir}/fit_check_sign 72 ln -sf uboot-fit_check_sign ${D}${bindir}/fit_check_sign
73
74 # mkeficapsule
75 install -m 0755 tools/mkeficapsule ${D}${bindir}/uboot-mkeficapsule
76 ln -sf uboot-mkeficapsule ${D}${bindir}/mkeficapsule
69} 77}
70 78
71ALLOW_EMPTY_${PN} = "1" 79ALLOW_EMPTY:${PN} = "1"
72FILES_${PN} = "" 80FILES:${PN} = ""
73FILES_${PN}-mkimage = "${bindir}/uboot-mkimage ${bindir}/mkimage ${bindir}/uboot-dumpimage ${bindir}/dumpimage ${bindir}/uboot-fit_check_sign ${bindir}/fit_check_sign" 81FILES:${PN}-mkimage = "${bindir}/uboot-mkimage ${bindir}/mkimage ${bindir}/uboot-dumpimage ${bindir}/dumpimage ${bindir}/uboot-fit_check_sign ${bindir}/fit_check_sign"
74FILES_${PN}-mkenvimage = "${bindir}/uboot-mkenvimage ${bindir}/mkenvimage" 82FILES:${PN}-mkenvimage = "${bindir}/uboot-mkenvimage ${bindir}/mkenvimage"
83FILES:${PN}-mkeficapsule = "${bindir}/uboot-mkeficapsule ${bindir}/mkeficapsule"
75 84
76RDEPENDS_${PN}-mkimage += "dtc" 85RDEPENDS:${PN}-mkimage += "dtc"
77RDEPENDS_${PN} += "${PN}-mkimage ${PN}-mkenvimage" 86RDEPENDS:${PN} += "${PN}-mkimage ${PN}-mkenvimage ${PN}-mkeficapsule"
78RDEPENDS_${PN}_class-native = "" 87RDEPENDS:${PN}:class-native = ""
79 88
80BBCLASSEXTEND = "native nativesdk" 89BBCLASSEXTEND = "native nativesdk"
81 90
diff --git a/meta/recipes-bsp/u-boot/u-boot-tools_2021.01.bb b/meta/recipes-bsp/u-boot/u-boot-tools_2024.04.bb
index ef386f76e6..7eaf721ca8 100644
--- a/meta/recipes-bsp/u-boot/u-boot-tools_2021.01.bb
+++ b/meta/recipes-bsp/u-boot/u-boot-tools_2024.04.bb
@@ -1,3 +1,2 @@
1require u-boot-common.inc 1require u-boot-common.inc
2require u-boot-tools.inc 2require u-boot-tools.inc
3
diff --git a/meta/recipes-bsp/u-boot/u-boot.inc b/meta/recipes-bsp/u-boot/u-boot.inc
index 251178db33..f5b43f6e36 100644
--- a/meta/recipes-bsp/u-boot/u-boot.inc
+++ b/meta/recipes-bsp/u-boot/u-boot.inc
@@ -3,13 +3,13 @@ PROVIDES = "virtual/bootloader"
3 3
4PACKAGE_ARCH = "${MACHINE_ARCH}" 4PACKAGE_ARCH = "${MACHINE_ARCH}"
5 5
6DEPENDS += "kern-tools-native" 6DEPENDS += "${@bb.utils.contains('UBOOT_ENV_SUFFIX', 'scr', 'u-boot-mkimage-native', '', d)}"
7 7
8inherit uboot-config uboot-extlinux-config uboot-sign deploy cml1 python3native 8inherit uboot-config uboot-extlinux-config uboot-sign deploy python3native kernel-arch
9 9
10DEPENDS += "swig-native" 10DEPENDS += "swig-native"
11 11
12EXTRA_OEMAKE = 'CROSS_COMPILE=${TARGET_PREFIX} CC="${TARGET_PREFIX}gcc ${TOOLCHAIN_OPTIONS}" V=1' 12EXTRA_OEMAKE = 'CROSS_COMPILE=${TARGET_PREFIX} CC="${TARGET_PREFIX}gcc ${TOOLCHAIN_OPTIONS} ${DEBUG_PREFIX_MAP}" V=1'
13EXTRA_OEMAKE += 'HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}"' 13EXTRA_OEMAKE += 'HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}"'
14EXTRA_OEMAKE += 'STAGING_INCDIR=${STAGING_INCDIR_NATIVE} STAGING_LIBDIR=${STAGING_LIBDIR_NATIVE}' 14EXTRA_OEMAKE += 'STAGING_INCDIR=${STAGING_INCDIR_NATIVE} STAGING_LIBDIR=${STAGING_LIBDIR_NATIVE}'
15 15
@@ -24,82 +24,19 @@ PACKAGECONFIG[openssl] = ",,openssl-native"
24# file already exists it will not be overwritten. 24# file already exists it will not be overwritten.
25UBOOT_LOCALVERSION ?= "" 25UBOOT_LOCALVERSION ?= ""
26 26
27# Some versions of u-boot use .bin and others use .img. By default use .bin
28# but enable individual recipes to change this value.
29UBOOT_SUFFIX ??= "bin"
30UBOOT_IMAGE ?= "u-boot-${MACHINE}-${PV}-${PR}.${UBOOT_SUFFIX}"
31UBOOT_SYMLINK ?= "u-boot-${MACHINE}.${UBOOT_SUFFIX}"
32UBOOT_MAKE_TARGET ?= "all"
33
34# Output the ELF generated. Some platforms can use the ELF file and directly
35# load it (JTAG booting, QEMU) additionally the ELF can be used for debugging
36# purposes.
37UBOOT_ELF ?= ""
38UBOOT_ELF_SUFFIX ?= "elf"
39UBOOT_ELF_IMAGE ?= "u-boot-${MACHINE}-${PV}-${PR}.${UBOOT_ELF_SUFFIX}"
40UBOOT_ELF_BINARY ?= "u-boot.${UBOOT_ELF_SUFFIX}"
41UBOOT_ELF_SYMLINK ?= "u-boot-${MACHINE}.${UBOOT_ELF_SUFFIX}"
42
43# Some versions of u-boot build an SPL (Second Program Loader) image that
44# should be packaged along with the u-boot binary as well as placed in the
45# deploy directory. For those versions they can set the following variables
46# to allow packaging the SPL.
47SPL_BINARY ?= ""
48SPL_BINARYNAME ?= "${@os.path.basename(d.getVar("SPL_BINARY"))}"
49SPL_IMAGE ?= "${SPL_BINARYNAME}-${MACHINE}-${PV}-${PR}"
50SPL_SYMLINK ?= "${SPL_BINARYNAME}-${MACHINE}"
51
52# Additional environment variables or a script can be installed alongside
53# u-boot to be used automatically on boot. This file, typically 'uEnv.txt'
54# or 'boot.scr', should be packaged along with u-boot as well as placed in the
55# deploy directory. Machine configurations needing one of these files should
56# include it in the SRC_URI and set the UBOOT_ENV parameter.
57UBOOT_ENV_SUFFIX ?= "txt"
58UBOOT_ENV ?= ""
59UBOOT_ENV_BINARY ?= "${UBOOT_ENV}.${UBOOT_ENV_SUFFIX}"
60UBOOT_ENV_IMAGE ?= "${UBOOT_ENV}-${MACHINE}-${PV}-${PR}.${UBOOT_ENV_SUFFIX}"
61UBOOT_ENV_SYMLINK ?= "${UBOOT_ENV}-${MACHINE}.${UBOOT_ENV_SUFFIX}"
62
63# Default name of u-boot initial env, but enable individual recipes to change 27# Default name of u-boot initial env, but enable individual recipes to change
64# this value. 28# this value.
65UBOOT_INITIAL_ENV ?= "${PN}-initial-env" 29UBOOT_INITIAL_ENV ?= "${PN}-initial-env"
66 30
67# U-Boot EXTLINUX variables. U-Boot searches for /boot/extlinux/extlinux.conf 31require u-boot-configure.inc
68# to find EXTLINUX conf file.
69UBOOT_EXTLINUX_INSTALL_DIR ?= "/boot/extlinux"
70UBOOT_EXTLINUX_CONF_NAME ?= "extlinux.conf"
71UBOOT_EXTLINUX_SYMLINK ?= "${UBOOT_EXTLINUX_CONF_NAME}-${MACHINE}-${PR}"
72 32
73do_configure () { 33do_savedefconfig() {
74 if [ -n "${UBOOT_CONFIG}" ]; then 34 bbplain "Saving defconfig to:\n${B}/defconfig"
75 unset i j 35 oe_runmake -C ${B} savedefconfig
76 for config in ${UBOOT_MACHINE}; do
77 i=$(expr $i + 1);
78 for type in ${UBOOT_CONFIG}; do
79 j=$(expr $j + 1);
80 if [ $j -eq $i ]; then
81 oe_runmake -C ${S} O=${B}/${config} ${config}
82 if [ -n "${@' '.join(find_cfgs(d))}" ]; then
83 merge_config.sh -m -O ${B}/${config} ${B}/${config}/.config ${@" ".join(find_cfgs(d))}
84 oe_runmake -C ${S} O=${B}/${config} oldconfig
85 fi
86 fi
87 done
88 unset j
89 done
90 unset i
91 DEVTOOL_DISABLE_MENUCONFIG=true
92 else
93 if [ -n "${UBOOT_MACHINE}" ]; then
94 oe_runmake -C ${S} O=${B} ${UBOOT_MACHINE}
95 else
96 oe_runmake -C ${S} O=${B} oldconfig
97 fi
98 merge_config.sh -m .config ${@" ".join(find_cfgs(d))}
99 cml1_do_configure
100 fi
101} 36}
102 37do_savedefconfig[nostamp] = "1"
38addtask savedefconfig after do_configure
39UBOOT_ARCH_DIR = "${@'arm' if d.getVar('UBOOT_ARCH').startswith('arm') else d.getVar('UBOOT_ARCH')}"
103do_compile () { 40do_compile () {
104 if [ "${@bb.utils.filter('DISTRO_FEATURES', 'ld-is-gold', d)}" ]; then 41 if [ "${@bb.utils.filter('DISTRO_FEATURES', 'ld-is-gold', d)}" ]; then
105 sed -i 's/$(CROSS_COMPILE)ld$/$(CROSS_COMPILE)ld.bfd/g' ${S}/config.mk 42 sed -i 's/$(CROSS_COMPILE)ld$/$(CROSS_COMPILE)ld.bfd/g' ${S}/config.mk
@@ -128,7 +65,7 @@ do_compile () {
128 for binary in ${UBOOT_BINARIES}; do 65 for binary in ${UBOOT_BINARIES}; do
129 k=$(expr $k + 1); 66 k=$(expr $k + 1);
130 if [ $k -eq $i ]; then 67 if [ $k -eq $i ]; then
131 cp ${B}/${config}/${binary} ${B}/${config}/u-boot-${type}.${UBOOT_SUFFIX} 68 cp ${B}/${config}/${binary} ${B}/${config}/${UBOOT_BINARYNAME}-${type}.${UBOOT_SUFFIX}
132 fi 69 fi
133 done 70 done
134 71
@@ -152,6 +89,11 @@ do_compile () {
152 oe_runmake -C ${S} O=${B} u-boot-initial-env 89 oe_runmake -C ${S} O=${B} u-boot-initial-env
153 fi 90 fi
154 fi 91 fi
92
93 if [ -n "${UBOOT_ENV}" ] && [ "${UBOOT_ENV_SUFFIX}" = "scr" ]
94 then
95 ${UBOOT_MKIMAGE} -C none -A ${UBOOT_ARCH} -T script -d ${WORKDIR}/${UBOOT_ENV_SRC} ${WORKDIR}/${UBOOT_ENV_BINARY}
96 fi
155} 97}
156 98
157do_install () { 99do_install () {
@@ -163,9 +105,9 @@ do_install () {
163 j=$(expr $j + 1); 105 j=$(expr $j + 1);
164 if [ $j -eq $i ] 106 if [ $j -eq $i ]
165 then 107 then
166 install -D -m 644 ${B}/${config}/u-boot-${type}.${UBOOT_SUFFIX} ${D}/boot/u-boot-${type}-${PV}-${PR}.${UBOOT_SUFFIX} 108 install -D -m 644 ${B}/${config}/${UBOOT_BINARYNAME}-${type}.${UBOOT_SUFFIX} ${D}/boot/${UBOOT_BINARYNAME}-${type}-${PV}-${PR}.${UBOOT_SUFFIX}
167 ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_SUFFIX} ${D}/boot/${UBOOT_BINARY}-${type} 109 ln -sf ${UBOOT_BINARYNAME}-${type}-${PV}-${PR}.${UBOOT_SUFFIX} ${D}/boot/${UBOOT_BINARY}-${type}
168 ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_SUFFIX} ${D}/boot/${UBOOT_BINARY} 110 ln -sf ${UBOOT_BINARYNAME}-${type}-${PV}-${PR}.${UBOOT_SUFFIX} ${D}/boot/${UBOOT_BINARY}
169 111
170 # Install the uboot-initial-env 112 # Install the uboot-initial-env
171 if [ -n "${UBOOT_INITIAL_ENV}" ]; then 113 if [ -n "${UBOOT_INITIAL_ENV}" ]; then
@@ -230,9 +172,9 @@ do_install () {
230 j=$(expr $j + 1); 172 j=$(expr $j + 1);
231 if [ $j -eq $i ] 173 if [ $j -eq $i ]
232 then 174 then
233 install -m 644 ${B}/${config}/${SPL_BINARY} ${D}/boot/${SPL_IMAGE}-${type}-${PV}-${PR} 175 install -m 644 ${B}/${config}/${SPL_BINARY} ${D}/boot/${SPL_BINARYNAME}-${type}-${PV}-${PR}${SPL_DELIMITER}${SPL_SUFFIX}
234 ln -sf ${SPL_IMAGE}-${type}-${PV}-${PR} ${D}/boot/${SPL_BINARYNAME}-${type} 176 ln -sf ${SPL_BINARYNAME}-${type}-${PV}-${PR}${SPL_DELIMITER}${SPL_SUFFIX} ${D}/boot/${SPL_BINARYFILE}-${type}
235 ln -sf ${SPL_IMAGE}-${type}-${PV}-${PR} ${D}/boot/${SPL_BINARYNAME} 177 ln -sf ${SPL_BINARYNAME}-${type}-${PV}-${PR}${SPL_DELIMITER}${SPL_SUFFIX} ${D}/boot/${SPL_BINARYFILE}
236 fi 178 fi
237 done 179 done
238 unset j 180 unset j
@@ -240,7 +182,7 @@ do_install () {
240 unset i 182 unset i
241 else 183 else
242 install -m 644 ${B}/${SPL_BINARY} ${D}/boot/${SPL_IMAGE} 184 install -m 644 ${B}/${SPL_BINARY} ${D}/boot/${SPL_IMAGE}
243 ln -sf ${SPL_IMAGE} ${D}/boot/${SPL_BINARYNAME} 185 ln -sf ${SPL_IMAGE} ${D}/boot/${SPL_BINARYFILE}
244 fi 186 fi
245 fi 187 fi
246 188
@@ -256,17 +198,21 @@ do_install () {
256 fi 198 fi
257} 199}
258 200
259PACKAGE_BEFORE_PN += "${PN}-env" 201PACKAGE_BEFORE_PN += "${PN}-env ${PN}-extlinux"
260 202
261RPROVIDES_${PN}-env += "u-boot-default-env" 203RPROVIDES:${PN}-env += "u-boot-default-env"
262ALLOW_EMPTY_${PN}-env = "1" 204ALLOW_EMPTY:${PN}-env = "1"
263FILES_${PN}-env = " \ 205FILES:${PN}-env = " \
264 ${@ '${sysconfdir}/${UBOOT_INITIAL_ENV}*' if d.getVar('UBOOT_INITIAL_ENV') else ''} \ 206 ${@ '${sysconfdir}/${UBOOT_INITIAL_ENV}*' if d.getVar('UBOOT_INITIAL_ENV') else ''} \
265 ${sysconfdir}/fw_env.config \ 207 ${sysconfdir}/fw_env.config \
266" 208"
267 209
268FILES_${PN} = "/boot ${datadir}" 210FILES:${PN}-extlinux = "${UBOOT_EXTLINUX_INSTALL_DIR}/${UBOOT_EXTLINUX_CONF_NAME}"
269RDEPENDS_${PN} += "${PN}-env" 211RDEPENDS:${PN} += "${@bb.utils.contains('UBOOT_EXTLINUX', '1', '${PN}-extlinux', '', d)}"
212
213SYSROOT_DIRS += "/boot"
214FILES:${PN} = "/boot ${datadir}"
215RDEPENDS:${PN} += "${PN}-env"
270 216
271do_deploy () { 217do_deploy () {
272 if [ -n "${UBOOT_CONFIG}" ] 218 if [ -n "${UBOOT_CONFIG}" ]
@@ -277,12 +223,12 @@ do_deploy () {
277 j=$(expr $j + 1); 223 j=$(expr $j + 1);
278 if [ $j -eq $i ] 224 if [ $j -eq $i ]
279 then 225 then
280 install -D -m 644 ${B}/${config}/u-boot-${type}.${UBOOT_SUFFIX} ${DEPLOYDIR}/u-boot-${type}-${PV}-${PR}.${UBOOT_SUFFIX} 226 install -D -m 644 ${B}/${config}/${UBOOT_BINARYNAME}-${type}.${UBOOT_SUFFIX} ${DEPLOYDIR}/${UBOOT_BINARYNAME}-${type}-${PV}-${PR}.${UBOOT_SUFFIX}
281 cd ${DEPLOYDIR} 227 cd ${DEPLOYDIR}
282 ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_SUFFIX} ${UBOOT_SYMLINK}-${type} 228 ln -sf ${UBOOT_BINARYNAME}-${type}-${PV}-${PR}.${UBOOT_SUFFIX} ${UBOOT_SYMLINK}-${type}
283 ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_SUFFIX} ${UBOOT_SYMLINK} 229 ln -sf ${UBOOT_BINARYNAME}-${type}-${PV}-${PR}.${UBOOT_SUFFIX} ${UBOOT_SYMLINK}
284 ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_SUFFIX} ${UBOOT_BINARY}-${type} 230 ln -sf ${UBOOT_BINARYNAME}-${type}-${PV}-${PR}.${UBOOT_SUFFIX} ${UBOOT_BINARY}-${type}
285 ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_SUFFIX} ${UBOOT_BINARY} 231 ln -sf ${UBOOT_BINARYNAME}-${type}-${PV}-${PR}.${UBOOT_SUFFIX} ${UBOOT_BINARY}
286 232
287 # Deploy the uboot-initial-env 233 # Deploy the uboot-initial-env
288 if [ -n "${UBOOT_INITIAL_ENV}" ]; then 234 if [ -n "${UBOOT_INITIAL_ENV}" ]; then
@@ -358,12 +304,12 @@ do_deploy () {
358 j=$(expr $j + 1); 304 j=$(expr $j + 1);
359 if [ $j -eq $i ] 305 if [ $j -eq $i ]
360 then 306 then
361 install -m 644 ${B}/${config}/${SPL_BINARY} ${DEPLOYDIR}/${SPL_IMAGE}-${type}-${PV}-${PR} 307 install -m 644 ${B}/${config}/${SPL_BINARY} ${DEPLOYDIR}/${SPL_BINARYNAME}-${type}-${PV}-${PR}${SPL_DELIMITER}${SPL_SUFFIX}
362 rm -f ${DEPLOYDIR}/${SPL_BINARYNAME} ${DEPLOYDIR}/${SPL_SYMLINK}-${type} 308 rm -f ${DEPLOYDIR}/${SPL_BINARYFILE} ${DEPLOYDIR}/${SPL_SYMLINK}
363 ln -sf ${SPL_IMAGE}-${type}-${PV}-${PR} ${DEPLOYDIR}/${SPL_BINARYNAME}-${type} 309 ln -sf ${SPL_BINARYNAME}-${type}-${PV}-${PR}${SPL_DELIMITER}${SPL_SUFFIX} ${DEPLOYDIR}/${SPL_BINARYFILE}-${type}
364 ln -sf ${SPL_IMAGE}-${type}-${PV}-${PR} ${DEPLOYDIR}/${SPL_BINARYNAME} 310 ln -sf ${SPL_BINARYNAME}-${type}-${PV}-${PR}${SPL_DELIMITER}${SPL_SUFFIX} ${DEPLOYDIR}/${SPL_BINARYFILE}
365 ln -sf ${SPL_IMAGE}-${type}-${PV}-${PR} ${DEPLOYDIR}/${SPL_SYMLINK}-${type} 311 ln -sf ${SPL_BINARYNAME}-${type}-${PV}-${PR}${SPL_DELIMITER}${SPL_SUFFIX} ${DEPLOYDIR}/${SPL_SYMLINK}-${type}
366 ln -sf ${SPL_IMAGE}-${type}-${PV}-${PR} ${DEPLOYDIR}/${SPL_SYMLINK} 312 ln -sf ${SPL_BINARYNAME}-${type}-${PV}-${PR}${SPL_DELIMITER}${SPL_SUFFIX} ${DEPLOYDIR}/${SPL_SYMLINK}
367 fi 313 fi
368 done 314 done
369 unset j 315 unset j
@@ -371,17 +317,14 @@ do_deploy () {
371 unset i 317 unset i
372 else 318 else
373 install -m 644 ${B}/${SPL_BINARY} ${DEPLOYDIR}/${SPL_IMAGE} 319 install -m 644 ${B}/${SPL_BINARY} ${DEPLOYDIR}/${SPL_IMAGE}
374 rm -f ${DEPLOYDIR}/${SPL_BINARYNAME} ${DEPLOYDIR}/${SPL_SYMLINK}
375 ln -sf ${SPL_IMAGE} ${DEPLOYDIR}/${SPL_BINARYNAME} 320 ln -sf ${SPL_IMAGE} ${DEPLOYDIR}/${SPL_BINARYNAME}
376 ln -sf ${SPL_IMAGE} ${DEPLOYDIR}/${SPL_SYMLINK} 321 ln -sf ${SPL_IMAGE} ${DEPLOYDIR}/${SPL_SYMLINK}
377 fi 322 fi
378 fi 323 fi
379 324
380
381 if [ -n "${UBOOT_ENV}" ] 325 if [ -n "${UBOOT_ENV}" ]
382 then 326 then
383 install -m 644 ${WORKDIR}/${UBOOT_ENV_BINARY} ${DEPLOYDIR}/${UBOOT_ENV_IMAGE} 327 install -m 644 ${WORKDIR}/${UBOOT_ENV_BINARY} ${DEPLOYDIR}/${UBOOT_ENV_IMAGE}
384 rm -f ${DEPLOYDIR}/${UBOOT_ENV_BINARY} ${DEPLOYDIR}/${UBOOT_ENV_SYMLINK}
385 ln -sf ${UBOOT_ENV_IMAGE} ${DEPLOYDIR}/${UBOOT_ENV_BINARY} 328 ln -sf ${UBOOT_ENV_IMAGE} ${DEPLOYDIR}/${UBOOT_ENV_BINARY}
386 ln -sf ${UBOOT_ENV_IMAGE} ${DEPLOYDIR}/${UBOOT_ENV_SYMLINK} 329 ln -sf ${UBOOT_ENV_IMAGE} ${DEPLOYDIR}/${UBOOT_ENV_SYMLINK}
387 fi 330 fi
@@ -392,6 +335,11 @@ do_deploy () {
392 ln -sf ${UBOOT_EXTLINUX_SYMLINK} ${DEPLOYDIR}/${UBOOT_EXTLINUX_CONF_NAME}-${MACHINE} 335 ln -sf ${UBOOT_EXTLINUX_SYMLINK} ${DEPLOYDIR}/${UBOOT_EXTLINUX_CONF_NAME}-${MACHINE}
393 ln -sf ${UBOOT_EXTLINUX_SYMLINK} ${DEPLOYDIR}/${UBOOT_EXTLINUX_CONF_NAME} 336 ln -sf ${UBOOT_EXTLINUX_SYMLINK} ${DEPLOYDIR}/${UBOOT_EXTLINUX_CONF_NAME}
394 fi 337 fi
338
339 if [ -n "${UBOOT_DTB}" ]
340 then
341 install -m 644 ${B}/arch/${UBOOT_ARCH_DIR}/dts/${UBOOT_DTB_BINARY} ${DEPLOYDIR}/
342 fi
395} 343}
396 344
397addtask deploy before do_build after do_compile 345addtask deploy before do_build after do_compile
diff --git a/meta/recipes-bsp/u-boot/u-boot_2021.01.bb b/meta/recipes-bsp/u-boot/u-boot_2021.01.bb
deleted file mode 100644
index 2eef1e900e..0000000000
--- a/meta/recipes-bsp/u-boot/u-boot_2021.01.bb
+++ /dev/null
@@ -1,4 +0,0 @@
1require u-boot-common.inc
2require u-boot.inc
3
4DEPENDS += "bc-native dtc-native python3-setuptools-native"
diff --git a/meta/recipes-bsp/u-boot/u-boot_2024.04.bb b/meta/recipes-bsp/u-boot/u-boot_2024.04.bb
new file mode 100644
index 0000000000..b15bcaa818
--- /dev/null
+++ b/meta/recipes-bsp/u-boot/u-boot_2024.04.bb
@@ -0,0 +1,5 @@
1require u-boot-common.inc
2require u-boot.inc
3
4DEPENDS += "bc-native dtc-native python3-pyelftools-native"
5