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/files/0001-riscv-fix-build-with-binutils-2.38.patch40
-rw-r--r--meta/recipes-bsp/u-boot/files/0001-riscv32-Use-double-float-ABI-for-rv32.patch16
-rw-r--r--meta/recipes-bsp/u-boot/files/0001-tools-image-host-fix-wrong-return-value.patch41
-rw-r--r--meta/recipes-bsp/u-boot/libubootenv_0.3.2.bb10
-rw-r--r--meta/recipes-bsp/u-boot/u-boot-common.inc6
-rw-r--r--meta/recipes-bsp/u-boot/u-boot-configure.inc39
-rw-r--r--meta/recipes-bsp/u-boot/u-boot-tools.inc38
-rw-r--r--meta/recipes-bsp/u-boot/u-boot-tools_2021.07.bb4
-rw-r--r--meta/recipes-bsp/u-boot/u-boot-tools_2022.01.bb2
-rw-r--r--meta/recipes-bsp/u-boot/u-boot.inc90
-rw-r--r--meta/recipes-bsp/u-boot/u-boot_2021.07.bb6
-rw-r--r--meta/recipes-bsp/u-boot/u-boot_2022.01.bb9
12 files changed, 159 insertions, 142 deletions
diff --git a/meta/recipes-bsp/u-boot/files/0001-riscv-fix-build-with-binutils-2.38.patch b/meta/recipes-bsp/u-boot/files/0001-riscv-fix-build-with-binutils-2.38.patch
new file mode 100644
index 0000000000..3598329b99
--- /dev/null
+++ b/meta/recipes-bsp/u-boot/files/0001-riscv-fix-build-with-binutils-2.38.patch
@@ -0,0 +1,40 @@
+From 26a7f6b1e4c5f715c03e59a623f0d620498b92cf Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sun, 13 Feb 2022 21:11:31 -0800
+Subject: [PATCH] riscv: fix build with binutils 2.38
+
+From version 2.38, binutils default to ISA spec version 20191213. This
+means that the csr read/write (csrr*/csrw*) instructions and fence.i
+instruction has separated from the `I` extension, become two standalone
+extensions: Zicsr and Zifencei.
+
+The fix is to specify those extensions explicitely in -march. However as
+older binutils version do not support this, we first need to detect
+that.
+
+Fixes
+arch/riscv/lib/cache.c: Assembler messages:
+arch/riscv/lib/cache.c:12: Error: unrecognized opcode `fence.i'
+
+Upstream-Status: Submitted []
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ arch/riscv/Makefile | 7 ++++++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
+
+--- a/arch/riscv/Makefile
++++ b/arch/riscv/Makefile
+@@ -28,7 +28,12 @@ ifeq ($(CONFIG_CMODEL_MEDANY),y)
+ CMODEL = medany
+ endif
+
+-ARCH_FLAGS = -march=$(ARCH_BASE)$(ARCH_A)$(ARCH_F)$(ARCH_D)$(ARCH_C) -mabi=$(ABI) \
++# Newer binutils versions default to ISA spec version 20191213 which moves some
++# instructions from the I extension to the Zicsr and Zifencei extensions.
++toolchain-need-zicsr-zifencei := $(call cc-option-yn, -march=$(ARCH_BASE)$(ARCH_A)$(ARCH_F)$(ARCH_D)$(ARCH_C)_zicsr_zifencei)
++zicsr_zifencei-$(toolchain-need-zicsr-zifencei) := _zicsr_zifencei
++
++ARCH_FLAGS = -march=$(ARCH_BASE)$(ARCH_A)$(ARCH_F)$(ARCH_D)$(ARCH_C)$(zicsr_zifencei-y) -mabi=$(ABI) \
+ -mcmodel=$(CMODEL)
+
+ PLATFORM_CPPFLAGS += $(ARCH_FLAGS)
diff --git a/meta/recipes-bsp/u-boot/files/0001-riscv32-Use-double-float-ABI-for-rv32.patch b/meta/recipes-bsp/u-boot/files/0001-riscv32-Use-double-float-ABI-for-rv32.patch
index 0ed3de4914..0bf1bef2c9 100644
--- a/meta/recipes-bsp/u-boot/files/0001-riscv32-Use-double-float-ABI-for-rv32.patch
+++ b/meta/recipes-bsp/u-boot/files/0001-riscv32-Use-double-float-ABI-for-rv32.patch
@@ -13,11 +13,16 @@ Upstream-Status: Inappropriate [embedded specific]
arch/riscv/Makefile | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
-diff --git a/arch/riscv/Makefile b/arch/riscv/Makefile
-index 0b80eb8d86..7324946f48 100644
--- a/arch/riscv/Makefile
+++ b/arch/riscv/Makefile
-@@ -9,7 +9,9 @@ ifeq ($(CONFIG_ARCH_RV64I),y)
+@@ -5,11 +5,15 @@
+
+ ifeq ($(CONFIG_ARCH_RV64I),y)
+ ARCH_BASE = rv64im
+- ABI = lp64
++ ABI = lp64d
++ ARCH_D = d
++ ARCH_F = f
endif
ifeq ($(CONFIG_ARCH_RV32I),y)
ARCH_BASE = rv32im
@@ -28,7 +33,7 @@ index 0b80eb8d86..7324946f48 100644
endif
ifeq ($(CONFIG_RISCV_ISA_A),y)
ARCH_A = a
-@@ -24,7 +26,7 @@ ifeq ($(CONFIG_CMODEL_MEDANY),y)
+@@ -24,7 +28,7 @@ ifeq ($(CONFIG_CMODEL_MEDANY),y)
CMODEL = medany
endif
@@ -37,6 +42,3 @@ index 0b80eb8d86..7324946f48 100644
-mcmodel=$(CMODEL)
PLATFORM_CPPFLAGS += $(ARCH_FLAGS)
---
-2.30.0
-
diff --git a/meta/recipes-bsp/u-boot/files/0001-tools-image-host-fix-wrong-return-value.patch b/meta/recipes-bsp/u-boot/files/0001-tools-image-host-fix-wrong-return-value.patch
deleted file mode 100644
index 81687203e4..0000000000
--- a/meta/recipes-bsp/u-boot/files/0001-tools-image-host-fix-wrong-return-value.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-From 77fe3ad2ab2953ccdf6e9417cbecc060b45d3e55 Mon Sep 17 00:00:00 2001
-From: Ming Liu <liu.ming50@gmail.com>
-Date: Sun, 30 May 2021 10:32:08 +0200
-Subject: [PATCH] tools: image-host: fix wrong return value
-
-The return value '-ENOSPC' of fit_set_timestamp function does not match
-the caller fit_image_write_sig's expection which is '-FDT_ERR_NOSPACE'.
-
-Fix it by not calling fit_set_timestamp, but call fdt_setprop instead.
-
-This fixes a following mkimage error:
-| Can't write signature for 'signature@1' signature node in
-| 'conf@imx6ull-colibri-wifi-eval-v3.dtb' conf node: <unknown error>
-| mkimage Can't add hashes to FIT blob: -1
-
-Upstream-Status: Submitted [ https://patchwork.ozlabs.org/project/uboot/patch/20210531070451.6561-1-liu.ming50@gmail.com ]
-
-Signed-off-by: Ming Liu <liu.ming50@gmail.com>
----
- tools/image-host.c | 4 +++-
- 1 file changed, 3 insertions(+), 1 deletion(-)
-
-diff --git a/tools/image-host.c b/tools/image-host.c
-index 270d36fe45..73095461a7 100644
---- a/tools/image-host.c
-+++ b/tools/image-host.c
-@@ -132,8 +132,10 @@ static int fit_image_write_sig(void *fit, int noffset, uint8_t *value,
- if (!ret) {
- time_t timestamp = imagetool_get_source_date(cmdname,
- time(NULL));
-+ uint32_t t = cpu_to_uimage(timestamp);
-
-- ret = fit_set_timestamp(fit, noffset, timestamp);
-+ ret = fdt_setprop(fit, noffset, FIT_TIMESTAMP_PROP, &t,
-+ sizeof(uint32_t));
- }
- if (region_prop && !ret) {
- uint32_t strdata[2];
---
-2.29.0
-
diff --git a/meta/recipes-bsp/u-boot/libubootenv_0.3.2.bb b/meta/recipes-bsp/u-boot/libubootenv_0.3.2.bb
index 306296922c..e8f58941cf 100644
--- a/meta/recipes-bsp/u-boot/libubootenv_0.3.2.bb
+++ b/meta/recipes-bsp/u-boot/libubootenv_0.3.2.bb
@@ -6,11 +6,11 @@ It provides a hardware-independent replacement for fw_printenv/setenv utilities
provided by U-Boot"
HOMEPAGE = "https://github.com/sbabic/libubootenv"
-LICENSE = "LGPL-2.1"
+LICENSE = "LGPL-2.1-only"
LIC_FILES_CHKSUM = "file://Licenses/lgpl-2.1.txt;md5=4fbd65380cdd255951079008b364516c"
SECTION = "libs"
-SRC_URI = "git://github.com/sbabic/libubootenv;protocol=https"
+SRC_URI = "git://github.com/sbabic/libubootenv;protocol=https;branch=master"
SRCREV = "ba7564f5006d09bec51058cf4f5ac90d4dc18b3c"
S = "${WORKDIR}/git"
@@ -21,10 +21,6 @@ EXTRA_OECMAKE = "-DCMAKE_BUILD_TYPE=Release"
DEPENDS = "zlib"
PROVIDES += "u-boot-fw-utils"
-RPROVIDES_${PN}-bin += "u-boot-fw-utils"
-
-PACKAGE_ARCH = "${MACHINE_ARCH}"
-
-RRECOMMENDS_${PN}-bin_append_class-target = " u-boot-default-env"
+RPROVIDES:${PN}-bin += "u-boot-fw-utils"
BBCLASSEXTEND = "native"
diff --git a/meta/recipes-bsp/u-boot/u-boot-common.inc b/meta/recipes-bsp/u-boot/u-boot-common.inc
index 6b9253806f..8e78ea4a75 100644
--- a/meta/recipes-bsp/u-boot/u-boot-common.inc
+++ b/meta/recipes-bsp/u-boot/u-boot-common.inc
@@ -6,15 +6,15 @@ application code."
SECTION = "bootloaders"
DEPENDS += "flex-native bison-native"
-LICENSE = "GPLv2+"
+LICENSE = "GPL-2.0-or-later"
LIC_FILES_CHKSUM = "file://Licenses/README;md5=5a7450c57ffe5ae63fd732446b988025"
PE = "1"
# We use the revision in order to avoid having to fetch it from the
# repo during parse
-SRCREV = "840658b093976390e9537724f802281c9c8439f5"
+SRCREV = "d637294e264adfeb29f390dfc393106fd4d41b17"
-SRC_URI = "git://git.denx.de/u-boot.git \
+SRC_URI = "git://git.denx.de/u-boot.git;branch=master \
"
S = "${WORKDIR}/git"
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..04e0894752
--- /dev/null
+++ b/meta/recipes-bsp/u-boot/u-boot-configure.inc
@@ -0,0 +1,39 @@
+# This provides the logic for creating the desired u-boot config,
+# accounting for any *.cfg files added to SRC_URI. It's separated
+# from u-boot.inc for use by recipes that need u-boot properly
+# configured but aren't doing a full build of u-boot itself (such as
+# its companion tools).
+
+inherit uboot-config cml1
+
+DEPENDS += "kern-tools-native"
+
+do_configure () {
+ if [ -n "${UBOOT_CONFIG}" ]; then
+ unset i j
+ for config in ${UBOOT_MACHINE}; do
+ i=$(expr $i + 1);
+ for type in ${UBOOT_CONFIG}; do
+ j=$(expr $j + 1);
+ if [ $j -eq $i ]; then
+ oe_runmake -C ${S} O=${B}/${config} ${config}
+ if [ -n "${@' '.join(find_cfgs(d))}" ]; then
+ merge_config.sh -m -O ${B}/${config} ${B}/${config}/.config ${@" ".join(find_cfgs(d))}
+ oe_runmake -C ${S} O=${B}/${config} oldconfig
+ fi
+ fi
+ done
+ unset j
+ done
+ unset i
+ DEVTOOL_DISABLE_MENUCONFIG=true
+ else
+ if [ -n "${UBOOT_MACHINE}" ]; then
+ oe_runmake -C ${S} O=${B} ${UBOOT_MACHINE}
+ else
+ oe_runmake -C ${S} O=${B} oldconfig
+ fi
+ merge_config.sh -m .config ${@" ".join(find_cfgs(d))}
+ cml1_do_configure
+ fi
+}
diff --git a/meta/recipes-bsp/u-boot/u-boot-tools.inc b/meta/recipes-bsp/u-boot/u-boot-tools.inc
index 4ed936a70d..7eda6a0897 100644
--- a/meta/recipes-bsp/u-boot/u-boot-tools.inc
+++ b/meta/recipes-bsp/u-boot/u-boot-tools.inc
@@ -2,25 +2,25 @@ SUMMARY = "U-Boot bootloader tools"
DEPENDS += "openssl"
PROVIDES = "${MLPREFIX}u-boot-mkimage ${MLPREFIX}u-boot-mkenvimage"
-PROVIDES_class-native = "u-boot-mkimage-native u-boot-mkenvimage-native"
+PROVIDES:class-native = "u-boot-mkimage-native u-boot-mkenvimage-native"
PACKAGES += "${PN}-mkimage ${PN}-mkenvimage"
# Required for backward compatibility with "u-boot-mkimage-xxx.bb"
-RPROVIDES_${PN}-mkimage = "u-boot-mkimage"
-RREPLACES_${PN}-mkimage = "u-boot-mkimage"
-RCONFLICTS_${PN}-mkimage = "u-boot-mkimage"
+RPROVIDES:${PN}-mkimage = "u-boot-mkimage"
+RREPLACES:${PN}-mkimage = "u-boot-mkimage"
+RCONFLICTS:${PN}-mkimage = "u-boot-mkimage"
-EXTRA_OEMAKE_class-target = 'CROSS_COMPILE="${TARGET_PREFIX}" CC="${CC} ${CFLAGS} ${LDFLAGS}" HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}" STRIP=true V=1'
-EXTRA_OEMAKE_class-native = 'CC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}" HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}" STRIP=true V=1'
-EXTRA_OEMAKE_class-nativesdk = 'CROSS_COMPILE="${HOST_PREFIX}" CC="${CC} ${CFLAGS} ${LDFLAGS}" HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}" STRIP=true V=1'
+EXTRA_OEMAKE:class-target = 'CROSS_COMPILE="${TARGET_PREFIX}" CC="${CC} ${CFLAGS} ${LDFLAGS}" HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}" STRIP=true V=1'
+EXTRA_OEMAKE:class-native = 'CC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}" HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}" STRIP=true V=1'
+EXTRA_OEMAKE:class-nativesdk = 'CROSS_COMPILE="${HOST_PREFIX}" CC="${CC} ${CFLAGS} ${LDFLAGS}" HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}" STRIP=true V=1'
SED_CONFIG_EFI = '-e "s/CONFIG_EFI_LOADER=.*/# CONFIG_EFI_LOADER is not set/"'
-SED_CONFIG_EFI_x86 = ''
-SED_CONFIG_EFI_x86-64 = ''
-SED_CONFIG_EFI_arm = ''
-SED_CONFIG_EFI_armeb = ''
-SED_CONFIG_EFI_aarch64 = ''
+SED_CONFIG_EFI:x86 = ''
+SED_CONFIG_EFI:x86-64 = ''
+SED_CONFIG_EFI:arm = ''
+SED_CONFIG_EFI:armeb = ''
+SED_CONFIG_EFI:aarch64 = ''
do_compile () {
# Yes, this is crazy. If you build on a system with git < 2.14 from scratch, the tree will
@@ -68,14 +68,14 @@ do_install () {
ln -sf uboot-fit_check_sign ${D}${bindir}/fit_check_sign
}
-ALLOW_EMPTY_${PN} = "1"
-FILES_${PN} = ""
-FILES_${PN}-mkimage = "${bindir}/uboot-mkimage ${bindir}/mkimage ${bindir}/uboot-dumpimage ${bindir}/dumpimage ${bindir}/uboot-fit_check_sign ${bindir}/fit_check_sign"
-FILES_${PN}-mkenvimage = "${bindir}/uboot-mkenvimage ${bindir}/mkenvimage"
+ALLOW_EMPTY:${PN} = "1"
+FILES:${PN} = ""
+FILES:${PN}-mkimage = "${bindir}/uboot-mkimage ${bindir}/mkimage ${bindir}/uboot-dumpimage ${bindir}/dumpimage ${bindir}/uboot-fit_check_sign ${bindir}/fit_check_sign"
+FILES:${PN}-mkenvimage = "${bindir}/uboot-mkenvimage ${bindir}/mkenvimage"
-RDEPENDS_${PN}-mkimage += "dtc"
-RDEPENDS_${PN} += "${PN}-mkimage ${PN}-mkenvimage"
-RDEPENDS_${PN}_class-native = ""
+RDEPENDS:${PN}-mkimage += "dtc"
+RDEPENDS:${PN} += "${PN}-mkimage ${PN}-mkenvimage"
+RDEPENDS:${PN}:class-native = ""
BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-bsp/u-boot/u-boot-tools_2021.07.bb b/meta/recipes-bsp/u-boot/u-boot-tools_2021.07.bb
deleted file mode 100644
index 4e90081911..0000000000
--- a/meta/recipes-bsp/u-boot/u-boot-tools_2021.07.bb
+++ /dev/null
@@ -1,4 +0,0 @@
-require u-boot-common.inc
-require u-boot-tools.inc
-
-SRC_URI_append = " file://0001-tools-image-host-fix-wrong-return-value.patch"
diff --git a/meta/recipes-bsp/u-boot/u-boot-tools_2022.01.bb b/meta/recipes-bsp/u-boot/u-boot-tools_2022.01.bb
new file mode 100644
index 0000000000..7eaf721ca8
--- /dev/null
+++ b/meta/recipes-bsp/u-boot/u-boot-tools_2022.01.bb
@@ -0,0 +1,2 @@
+require u-boot-common.inc
+require u-boot-tools.inc
diff --git a/meta/recipes-bsp/u-boot/u-boot.inc b/meta/recipes-bsp/u-boot/u-boot.inc
index 8ccc532f7e..f022aed732 100644
--- a/meta/recipes-bsp/u-boot/u-boot.inc
+++ b/meta/recipes-bsp/u-boot/u-boot.inc
@@ -3,7 +3,7 @@ PROVIDES = "virtual/bootloader"
PACKAGE_ARCH = "${MACHINE_ARCH}"
-DEPENDS += "kern-tools-native"
+DEPENDS += "${@bb.utils.contains('UBOOT_ENV_SUFFIX', 'scr', 'u-boot-mkimage-native', '', d)}"
inherit uboot-config uboot-extlinux-config uboot-sign deploy cml1 python3native kernel-arch
@@ -24,35 +24,7 @@ PACKAGECONFIG[openssl] = ",,openssl-native"
# file already exists it will not be overwritten.
UBOOT_LOCALVERSION ?= ""
-do_configure () {
- if [ -n "${UBOOT_CONFIG}" ]; then
- unset i j
- for config in ${UBOOT_MACHINE}; do
- i=$(expr $i + 1);
- for type in ${UBOOT_CONFIG}; do
- j=$(expr $j + 1);
- if [ $j -eq $i ]; then
- oe_runmake -C ${S} O=${B}/${config} ${config}
- if [ -n "${@' '.join(find_cfgs(d))}" ]; then
- merge_config.sh -m -O ${B}/${config} ${B}/${config}/.config ${@" ".join(find_cfgs(d))}
- oe_runmake -C ${S} O=${B}/${config} oldconfig
- fi
- fi
- done
- unset j
- done
- unset i
- DEVTOOL_DISABLE_MENUCONFIG=true
- else
- if [ -n "${UBOOT_MACHINE}" ]; then
- oe_runmake -C ${S} O=${B} ${UBOOT_MACHINE}
- else
- oe_runmake -C ${S} O=${B} oldconfig
- fi
- merge_config.sh -m .config ${@" ".join(find_cfgs(d))}
- cml1_do_configure
- fi
-}
+require u-boot-configure.inc
do_compile () {
if [ "${@bb.utils.filter('DISTRO_FEATURES', 'ld-is-gold', d)}" ]; then
@@ -82,7 +54,7 @@ do_compile () {
for binary in ${UBOOT_BINARIES}; do
k=$(expr $k + 1);
if [ $k -eq $i ]; then
- cp ${B}/${config}/${binary} ${B}/${config}/u-boot-${type}.${UBOOT_SUFFIX}
+ cp ${B}/${config}/${binary} ${B}/${config}/${UBOOT_BINARYNAME}-${type}.${UBOOT_SUFFIX}
fi
done
@@ -106,6 +78,11 @@ do_compile () {
oe_runmake -C ${S} O=${B} u-boot-initial-env
fi
fi
+
+ if [ -n "${UBOOT_ENV}" ] && [ "${UBOOT_ENV_SUFFIX}" = "scr" ]
+ then
+ ${UBOOT_MKIMAGE} -C none -A ${UBOOT_ARCH} -T script -d ${WORKDIR}/${UBOOT_ENV_SRC} ${WORKDIR}/${UBOOT_ENV_BINARY}
+ fi
}
do_install () {
@@ -117,9 +94,9 @@ do_install () {
j=$(expr $j + 1);
if [ $j -eq $i ]
then
- install -D -m 644 ${B}/${config}/u-boot-${type}.${UBOOT_SUFFIX} ${D}/boot/u-boot-${type}-${PV}-${PR}.${UBOOT_SUFFIX}
- ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_SUFFIX} ${D}/boot/${UBOOT_BINARY}-${type}
- ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_SUFFIX} ${D}/boot/${UBOOT_BINARY}
+ install -D -m 644 ${B}/${config}/${UBOOT_BINARYNAME}-${type}.${UBOOT_SUFFIX} ${D}/boot/${UBOOT_BINARYNAME}-${type}-${PV}-${PR}.${UBOOT_SUFFIX}
+ ln -sf ${UBOOT_BINARYNAME}-${type}-${PV}-${PR}.${UBOOT_SUFFIX} ${D}/boot/${UBOOT_BINARY}-${type}
+ ln -sf ${UBOOT_BINARYNAME}-${type}-${PV}-${PR}.${UBOOT_SUFFIX} ${D}/boot/${UBOOT_BINARY}
# Install the uboot-initial-env
if [ -n "${UBOOT_INITIAL_ENV}" ]; then
@@ -184,9 +161,9 @@ do_install () {
j=$(expr $j + 1);
if [ $j -eq $i ]
then
- install -m 644 ${B}/${config}/${SPL_BINARY} ${D}/boot/${SPL_IMAGE}-${type}-${PV}-${PR}
- ln -sf ${SPL_IMAGE}-${type}-${PV}-${PR} ${D}/boot/${SPL_BINARYNAME}-${type}
- ln -sf ${SPL_IMAGE}-${type}-${PV}-${PR} ${D}/boot/${SPL_BINARYNAME}
+ install -m 644 ${B}/${config}/${SPL_BINARY} ${D}/boot/${SPL_BINARYNAME}-${type}-${PV}-${PR}${SPL_DELIMITER}${SPL_SUFFIX}
+ ln -sf ${SPL_BINARYNAME}-${type}-${PV}-${PR}${SPL_DELIMITER}${SPL_SUFFIX} ${D}/boot/${SPL_BINARYFILE}-${type}
+ ln -sf ${SPL_BINARYNAME}-${type}-${PV}-${PR}${SPL_DELIMITER}${SPL_SUFFIX} ${D}/boot/${SPL_BINARYFILE}
fi
done
unset j
@@ -194,7 +171,7 @@ do_install () {
unset i
else
install -m 644 ${B}/${SPL_BINARY} ${D}/boot/${SPL_IMAGE}
- ln -sf ${SPL_IMAGE} ${D}/boot/${SPL_BINARYNAME}
+ ln -sf ${SPL_IMAGE} ${D}/boot/${SPL_BINARYFILE}
fi
fi
@@ -210,17 +187,20 @@ do_install () {
fi
}
-PACKAGE_BEFORE_PN += "${PN}-env"
+PACKAGE_BEFORE_PN += "${PN}-env ${PN}-extlinux"
-RPROVIDES_${PN}-env += "u-boot-default-env"
-ALLOW_EMPTY_${PN}-env = "1"
-FILES_${PN}-env = " \
+RPROVIDES:${PN}-env += "u-boot-default-env"
+ALLOW_EMPTY:${PN}-env = "1"
+FILES:${PN}-env = " \
${@ '${sysconfdir}/${UBOOT_INITIAL_ENV}*' if d.getVar('UBOOT_INITIAL_ENV') else ''} \
${sysconfdir}/fw_env.config \
"
-FILES_${PN} = "/boot ${datadir}"
-RDEPENDS_${PN} += "${PN}-env"
+FILES:${PN}-extlinux = "${UBOOT_EXTLINUX_INSTALL_DIR}/${UBOOT_EXTLINUX_CONF_NAME}"
+RDEPENDS:${PN} += "${@bb.utils.contains('UBOOT_EXTLINUX', '1', '${PN}-extlinux', '', d)}"
+
+FILES:${PN} = "/boot ${datadir}"
+RDEPENDS:${PN} += "${PN}-env"
do_deploy () {
if [ -n "${UBOOT_CONFIG}" ]
@@ -231,12 +211,12 @@ do_deploy () {
j=$(expr $j + 1);
if [ $j -eq $i ]
then
- install -D -m 644 ${B}/${config}/u-boot-${type}.${UBOOT_SUFFIX} ${DEPLOYDIR}/u-boot-${type}-${PV}-${PR}.${UBOOT_SUFFIX}
+ install -D -m 644 ${B}/${config}/${UBOOT_BINARYNAME}-${type}.${UBOOT_SUFFIX} ${DEPLOYDIR}/${UBOOT_BINARYNAME}-${type}-${PV}-${PR}.${UBOOT_SUFFIX}
cd ${DEPLOYDIR}
- ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_SUFFIX} ${UBOOT_SYMLINK}-${type}
- ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_SUFFIX} ${UBOOT_SYMLINK}
- ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_SUFFIX} ${UBOOT_BINARY}-${type}
- ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_SUFFIX} ${UBOOT_BINARY}
+ ln -sf ${UBOOT_BINARYNAME}-${type}-${PV}-${PR}.${UBOOT_SUFFIX} ${UBOOT_SYMLINK}-${type}
+ ln -sf ${UBOOT_BINARYNAME}-${type}-${PV}-${PR}.${UBOOT_SUFFIX} ${UBOOT_SYMLINK}
+ ln -sf ${UBOOT_BINARYNAME}-${type}-${PV}-${PR}.${UBOOT_SUFFIX} ${UBOOT_BINARY}-${type}
+ ln -sf ${UBOOT_BINARYNAME}-${type}-${PV}-${PR}.${UBOOT_SUFFIX} ${UBOOT_BINARY}
# Deploy the uboot-initial-env
if [ -n "${UBOOT_INITIAL_ENV}" ]; then
@@ -312,12 +292,12 @@ do_deploy () {
j=$(expr $j + 1);
if [ $j -eq $i ]
then
- install -m 644 ${B}/${config}/${SPL_BINARY} ${DEPLOYDIR}/${SPL_IMAGE}-${type}-${PV}-${PR}
- rm -f ${DEPLOYDIR}/${SPL_BINARYNAME} ${DEPLOYDIR}/${SPL_SYMLINK}-${type}
- ln -sf ${SPL_IMAGE}-${type}-${PV}-${PR} ${DEPLOYDIR}/${SPL_BINARYNAME}-${type}
- ln -sf ${SPL_IMAGE}-${type}-${PV}-${PR} ${DEPLOYDIR}/${SPL_BINARYNAME}
- ln -sf ${SPL_IMAGE}-${type}-${PV}-${PR} ${DEPLOYDIR}/${SPL_SYMLINK}-${type}
- ln -sf ${SPL_IMAGE}-${type}-${PV}-${PR} ${DEPLOYDIR}/${SPL_SYMLINK}
+ install -m 644 ${B}/${config}/${SPL_BINARY} ${DEPLOYDIR}/${SPL_BINARYNAME}-${type}-${PV}-${PR}${SPL_DELIMITER}${SPL_SUFFIX}
+ rm -f ${DEPLOYDIR}/${SPL_BINARYFILE} ${DEPLOYDIR}/${SPL_SYMLINK}
+ ln -sf ${SPL_BINARYNAME}-${type}-${PV}-${PR}${SPL_DELIMITER}${SPL_SUFFIX} ${DEPLOYDIR}/${SPL_BINARYFILE}-${type}
+ ln -sf ${SPL_BINARYNAME}-${type}-${PV}-${PR}${SPL_DELIMITER}${SPL_SUFFIX} ${DEPLOYDIR}/${SPL_BINARYFILE}
+ ln -sf ${SPL_BINARYNAME}-${type}-${PV}-${PR}${SPL_DELIMITER}${SPL_SUFFIX} ${DEPLOYDIR}/${SPL_SYMLINK}-${type}
+ ln -sf ${SPL_BINARYNAME}-${type}-${PV}-${PR}${SPL_DELIMITER}${SPL_SUFFIX} ${DEPLOYDIR}/${SPL_SYMLINK}
fi
done
unset j
diff --git a/meta/recipes-bsp/u-boot/u-boot_2021.07.bb b/meta/recipes-bsp/u-boot/u-boot_2021.07.bb
deleted file mode 100644
index bbbc99bf8d..0000000000
--- a/meta/recipes-bsp/u-boot/u-boot_2021.07.bb
+++ /dev/null
@@ -1,6 +0,0 @@
-require u-boot-common.inc
-require u-boot.inc
-
-SRC_URI_append = " file://0001-riscv32-Use-double-float-ABI-for-rv32.patch"
-
-DEPENDS += "bc-native dtc-native python3-setuptools-native"
diff --git a/meta/recipes-bsp/u-boot/u-boot_2022.01.bb b/meta/recipes-bsp/u-boot/u-boot_2022.01.bb
new file mode 100644
index 0000000000..0d2464d74b
--- /dev/null
+++ b/meta/recipes-bsp/u-boot/u-boot_2022.01.bb
@@ -0,0 +1,9 @@
+require u-boot-common.inc
+require u-boot.inc
+
+SRC_URI:append = " file://0001-riscv32-Use-double-float-ABI-for-rv32.patch \
+ file://0001-riscv-fix-build-with-binutils-2.38.patch \
+ "
+
+DEPENDS += "bc-native dtc-native python3-setuptools-native"
+