diff options
Diffstat (limited to 'poky/meta/recipes-bsp')
-rw-r--r-- | poky/meta/recipes-bsp/grub/grub-efi_2.06.bb (renamed from poky/meta/recipes-bsp/grub/grub-efi_git.bb) | 2 | ||||
-rw-r--r-- | poky/meta/recipes-bsp/grub/grub2.inc | 19 | ||||
-rw-r--r-- | poky/meta/recipes-bsp/grub/grub_2.06.bb (renamed from poky/meta/recipes-bsp/grub/grub_git.bb) | 0 | ||||
-rw-r--r-- | poky/meta/recipes-bsp/opensbi/opensbi-payloads.inc | 15 | ||||
-rw-r--r-- | poky/meta/recipes-bsp/opensbi/opensbi_0.9.bb | 3 | ||||
-rw-r--r-- | poky/meta/recipes-bsp/u-boot/files/0001-tools-image-host-fix-wrong-return-value.patch | 41 | ||||
-rw-r--r-- | poky/meta/recipes-bsp/u-boot/u-boot-tools_2021.04.bb | 1 | ||||
-rw-r--r-- | poky/meta/recipes-bsp/u-boot/u-boot.inc | 7 |
8 files changed, 68 insertions, 20 deletions
diff --git a/poky/meta/recipes-bsp/grub/grub-efi_git.bb b/poky/meta/recipes-bsp/grub/grub-efi_2.06.bb index 240fde7db..287845c50 100644 --- a/poky/meta/recipes-bsp/grub/grub-efi_git.bb +++ b/poky/meta/recipes-bsp/grub/grub-efi_2.06.bb @@ -11,6 +11,8 @@ SRC_URI += " \ file://cfg \ " +S = "${WORKDIR}/grub-${PV}" + # Determine the target arch for the grub modules python __anonymous () { import re diff --git a/poky/meta/recipes-bsp/grub/grub2.inc b/poky/meta/recipes-bsp/grub/grub2.inc index 3c6b434c2..19294760c 100644 --- a/poky/meta/recipes-bsp/grub/grub2.inc +++ b/poky/meta/recipes-bsp/grub/grub2.inc @@ -13,7 +13,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" CVE_PRODUCT = "grub2" -SRC_URI = "https://alpha.gnu.org/gnu/grub/grub-${REALPV}.tar.xz \ +SRC_URI = "${GNU_MIRROR}/grub/grub-${PV}.tar.gz \ file://0001-Disable-mfpmath-sse-as-well-when-SSE-is-disabled.patch \ file://autogen.sh-exclude-pc.patch \ file://grub-module-explicitly-keeps-symbole-.module_license.patch \ @@ -22,26 +22,11 @@ SRC_URI = "https://alpha.gnu.org/gnu/grub/grub-${REALPV}.tar.xz \ file://0001-RISC-V-Restore-the-typcast-to-long.patch \ " -SRC_URI[sha256sum] = "2c87f1f21e2ab50043e6cd9163c08f1b6c3a6171556bf23ff9ed65b074145484" - -REALPV = "2.06~rc1" -PV = "2.04+${REALPV}" - -# Fixed in 2.06~rc1, can be removed for 2.06 final -CVE_CHECK_WHITELIST += "\ - CVE-2020-14308 CVE-2020-14309 CVE-2020-14310 CVE-2020-14311 CVE-2020-10713 \ - CVE-2020-14372 CVE-2020-15705 CVE-2020-15706 CVE-2020-15707 \ - CVE-2020-25632 CVE-2020-25647 CVE-2020-27749 CVE-2020-27779 \ - CVE-2021-3418 CVE-2021-20225 CVE-2021-20233" +SRC_URI[sha256sum] = "23b64b4c741569f9426ed2e3d0e6780796fca081bee4c99f62aa3f53ae803f5f" # Applies only to RHEL CVE_CHECK_WHITELIST += "CVE-2019-14865" -S = "${WORKDIR}/grub-${REALPV}" - -UPSTREAM_CHECK_URI = "${GNU_MIRROR}/grub" -UPSTREAM_CHECK_REGEX = "grub-(?P<pver>\d+(\.\d+)+)\.tar\.(gz|xz)" - DEPENDS = "flex-native bison-native gettext-native" COMPATIBLE_HOST = '(x86_64.*|i.86.*|arm.*|aarch64.*|riscv.*)-(linux.*|freebsd.*)' diff --git a/poky/meta/recipes-bsp/grub/grub_git.bb b/poky/meta/recipes-bsp/grub/grub_2.06.bb index d4e09faa4..d4e09faa4 100644 --- a/poky/meta/recipes-bsp/grub/grub_git.bb +++ b/poky/meta/recipes-bsp/grub/grub_2.06.bb diff --git a/poky/meta/recipes-bsp/opensbi/opensbi-payloads.inc b/poky/meta/recipes-bsp/opensbi/opensbi-payloads.inc index 2e3294324..cc31ab3b1 100644 --- a/poky/meta/recipes-bsp/opensbi/opensbi-payloads.inc +++ b/poky/meta/recipes-bsp/opensbi/opensbi-payloads.inc @@ -7,12 +7,25 @@ def riscv_get_extra_oemake_image(d): return "FW_PAYLOAD_PATH=" + deploy_dir + "/" + sbi_payload +def riscv_get_extra_oemake_fdt(d): + sbi_fdt = d.getVar('RISCV_SBI_FDT') + deploy_dir = d.getVar('DEPLOY_DIR_IMAGE') + + if sbi_fdt is None: + return "" + + return "FW_FDT_PATH=" + deploy_dir + "/" + sbi_fdt + def riscv_get_do_compile_depends(d): sbi_payload = d.getVar('RISCV_SBI_PAYLOAD') + sbi_fdt = d.getVar('RISCV_SBI_FDT') - if sbi_payload is None: + if sbi_payload is None and sbi_fdt is None: return "" + if sbi_fdt is not None and 'u-boot.bin' in sbi_payload: + return "virtual/kernel:do_deploy virtual/bootloader:do_deploy" + if 'linux' in sbi_payload or 'Image' in sbi_payload: return "virtual/kernel:do_deploy" if 'u-boot.bin' in sbi_payload: diff --git a/poky/meta/recipes-bsp/opensbi/opensbi_0.9.bb b/poky/meta/recipes-bsp/opensbi/opensbi_0.9.bb index cb1c3f2eb..5fee52136 100644 --- a/poky/meta/recipes-bsp/opensbi/opensbi_0.9.bb +++ b/poky/meta/recipes-bsp/opensbi/opensbi_0.9.bb @@ -15,9 +15,10 @@ SRC_URI = "git://github.com/riscv/opensbi.git;branch=master \ S = "${WORKDIR}/git" -EXTRA_OEMAKE += "PLATFORM=${RISCV_SBI_PLAT} I=${D}" +EXTRA_OEMAKE += "PLATFORM=${RISCV_SBI_PLAT} I=${D} FW_PIC=n" # If RISCV_SBI_PAYLOAD is set then include it as a payload EXTRA_OEMAKE_append = " ${@riscv_get_extra_oemake_image(d)}" +EXTRA_OEMAKE_append = " ${@riscv_get_extra_oemake_fdt(d)}" # Required if specifying a custom payload do_compile[depends] += "${@riscv_get_do_compile_depends(d)}" diff --git a/poky/meta/recipes-bsp/u-boot/files/0001-tools-image-host-fix-wrong-return-value.patch b/poky/meta/recipes-bsp/u-boot/files/0001-tools-image-host-fix-wrong-return-value.patch new file mode 100644 index 000000000..81687203e --- /dev/null +++ b/poky/meta/recipes-bsp/u-boot/files/0001-tools-image-host-fix-wrong-return-value.patch @@ -0,0 +1,41 @@ +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/poky/meta/recipes-bsp/u-boot/u-boot-tools_2021.04.bb b/poky/meta/recipes-bsp/u-boot/u-boot-tools_2021.04.bb index ef386f76e..4e9008191 100644 --- a/poky/meta/recipes-bsp/u-boot/u-boot-tools_2021.04.bb +++ b/poky/meta/recipes-bsp/u-boot/u-boot-tools_2021.04.bb @@ -1,3 +1,4 @@ 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/poky/meta/recipes-bsp/u-boot/u-boot.inc b/poky/meta/recipes-bsp/u-boot/u-boot.inc index 5398c2e62..8ccc532f7 100644 --- a/poky/meta/recipes-bsp/u-boot/u-boot.inc +++ b/poky/meta/recipes-bsp/u-boot/u-boot.inc @@ -5,7 +5,7 @@ PACKAGE_ARCH = "${MACHINE_ARCH}" DEPENDS += "kern-tools-native" -inherit uboot-config uboot-extlinux-config uboot-sign deploy cml1 python3native +inherit uboot-config uboot-extlinux-config uboot-sign deploy cml1 python3native kernel-arch DEPENDS += "swig-native" @@ -346,6 +346,11 @@ do_deploy () { ln -sf ${UBOOT_EXTLINUX_SYMLINK} ${DEPLOYDIR}/${UBOOT_EXTLINUX_CONF_NAME}-${MACHINE} ln -sf ${UBOOT_EXTLINUX_SYMLINK} ${DEPLOYDIR}/${UBOOT_EXTLINUX_CONF_NAME} fi + + if [ -n "${UBOOT_DTB}" ] + then + install -m 644 ${B}/arch/${UBOOT_ARCH}/dts/${UBOOT_DTB_BINARY} ${DEPLOYDIR}/ + fi } addtask deploy before do_build after do_compile |