From 02b54b36f0be0f8dc3aa06b3a83e88feb63c1768 Mon Sep 17 00:00:00 2001 From: Mike Garrett Date: Fri, 27 Aug 2021 16:39:03 -0500 Subject: meta-hpe: Update U-Boot from 2019.07 to 2020.10 Signed-off-by: Mike Garrett Change-Id: I538f9e74fdc90d3eb1e7e778b2ff99777b0d07d7 --- .../conf/machine/include/fitimage-sign.inc | 14 +++++++ meta-hpe/meta-gxp/conf/machine/include/gxp.inc | 6 +-- meta-hpe/meta-gxp/conf/machine/include/hpe_soc.inc | 2 +- .../u-boot/u-boot-common-gxp_2019.07.inc | 16 -------- .../u-boot/u-boot-common-gxp_2020.10.inc | 16 ++++++++ .../u-boot/u-boot-fw-utils-gxp/alt_fw_env.config | 25 ++++++++++++ .../u-boot/u-boot-fw-utils-gxp/fw_env.config | 25 ++++++++++++ .../u-boot/u-boot-fw-utils-gxp_2020.10.bb | 46 ++++++++++++++++++++++ .../recipes-bsp/u-boot/u-boot-gxp_2019.07.bb | 7 ---- .../recipes-bsp/u-boot/u-boot-gxp_2020.10.bb | 8 ++++ 10 files changed, 138 insertions(+), 27 deletions(-) create mode 100644 meta-hpe/meta-gxp/conf/machine/include/fitimage-sign.inc delete mode 100644 meta-hpe/meta-gxp/recipes-bsp/u-boot/u-boot-common-gxp_2019.07.inc create mode 100644 meta-hpe/meta-gxp/recipes-bsp/u-boot/u-boot-common-gxp_2020.10.inc create mode 100644 meta-hpe/meta-gxp/recipes-bsp/u-boot/u-boot-fw-utils-gxp/alt_fw_env.config create mode 100644 meta-hpe/meta-gxp/recipes-bsp/u-boot/u-boot-fw-utils-gxp/fw_env.config create mode 100644 meta-hpe/meta-gxp/recipes-bsp/u-boot/u-boot-fw-utils-gxp_2020.10.bb delete mode 100644 meta-hpe/meta-gxp/recipes-bsp/u-boot/u-boot-gxp_2019.07.bb create mode 100644 meta-hpe/meta-gxp/recipes-bsp/u-boot/u-boot-gxp_2020.10.bb (limited to 'meta-hpe') diff --git a/meta-hpe/meta-gxp/conf/machine/include/fitimage-sign.inc b/meta-hpe/meta-gxp/conf/machine/include/fitimage-sign.inc new file mode 100644 index 000000000..80af00af2 --- /dev/null +++ b/meta-hpe/meta-gxp/conf/machine/include/fitimage-sign.inc @@ -0,0 +1,14 @@ +inherit uboot-sign + +UBOOT_SIGN_ENABLE = "0" +UBOOT_SIGN_KEYDIR = "${COREBASE}/meta-hpe/meta-gxp/recipes-bsp/u-boot/u-boot-gxp/" +UBOOT_SIGN_KEYNAME = "dev" +FIT_HASH_ALG = "sha512" +UBOOT_FIT_HASH_ALG = "sha512" + +concat_dtb_helper:append() { + if [ -e "${DEPLOYDIR}/${UBOOT_NODTB_IMAGE}" -a -e "$deployed_uboot_dtb_binary" ]; then + cd ${DEPLOYDIR} + cat ${UBOOT_NODTB_IMAGE} $deployed_uboot_dtb_binary | tee ${B}/${UBOOT_BINARY} > ${UBOOT_IMAGE} + fi +} diff --git a/meta-hpe/meta-gxp/conf/machine/include/gxp.inc b/meta-hpe/meta-gxp/conf/machine/include/gxp.inc index 8f515d99a..e31814556 100644 --- a/meta-hpe/meta-gxp/conf/machine/include/gxp.inc +++ b/meta-hpe/meta-gxp/conf/machine/include/gxp.inc @@ -15,8 +15,8 @@ MACHINEOVERRIDES .= ":gxp" DEFAULTTUNE ?= "armv6-novfp" require conf/machine/include/arm/arch-armv6.inc -UBOOT_MACHINE = "gxp_defconfig" -UBOOT_ENTRYPOINT = "0x40100000" -UBOOT_LOADADDRESS = "0x40100000" +UBOOT_MACHINE ?= "gxp_defconfig" +UBOOT_ENTRYPOINT ?= "0x40100000" +UBOOT_LOADADDRESS ?= "0x40100000" diff --git a/meta-hpe/meta-gxp/conf/machine/include/hpe_soc.inc b/meta-hpe/meta-gxp/conf/machine/include/hpe_soc.inc index 016d9c675..747e7763e 100644 --- a/meta-hpe/meta-gxp/conf/machine/include/hpe_soc.inc +++ b/meta-hpe/meta-gxp/conf/machine/include/hpe_soc.inc @@ -2,5 +2,5 @@ PREFERRED_PROVIDER_virtual/kernel ?= "linux-obmc" PREFERRED_PROVIDER_virtual/bootloader ?= "u-boot-gxp" PREFERRED_PROVIDER_u-boot ?= "u-boot-gxp" -//PREFERRED_PROVIDER_u-boot-fw-utils ?= "u-boot-fw-utils-gxp" +PREFERRED_PROVIDER_u-boot-fw-utils ?= "u-boot-fw-utils-gxp" diff --git a/meta-hpe/meta-gxp/recipes-bsp/u-boot/u-boot-common-gxp_2019.07.inc b/meta-hpe/meta-gxp/recipes-bsp/u-boot/u-boot-common-gxp_2019.07.inc deleted file mode 100644 index 13cd7b42a..000000000 --- a/meta-hpe/meta-gxp/recipes-bsp/u-boot/u-boot-common-gxp_2019.07.inc +++ /dev/null @@ -1,16 +0,0 @@ -HOMEPAGE = "https://www.github.com/HewlettPackard/gxp-uboot" -DEPENDS += "flex-native bison-native bc-native" - -LICENSE = "GPLv2+" -LIC_FILES_CHKSUM = "file://Licenses/gpl-2.0.txt;md5=b234ee4d69f5fce4486a80fdaf4a4263" -PE = "1" - -# We use the revision in order to avoid having to fetch it from the -# repo during parse -SRCREV = "e15b2ace2d7f38d470ba3b0415d47e05281c7660" -UBRANCH = "v2019.07-gxp-openbmc" -SRC_URI = "git://github.com/HewlettPackard/gxp-uboot.git;branch=${UBRANCH}" - -S = "${WORKDIR}/git" - -PV = "v2019.07+git${SRCPV}" diff --git a/meta-hpe/meta-gxp/recipes-bsp/u-boot/u-boot-common-gxp_2020.10.inc b/meta-hpe/meta-gxp/recipes-bsp/u-boot/u-boot-common-gxp_2020.10.inc new file mode 100644 index 000000000..2efeb9e09 --- /dev/null +++ b/meta-hpe/meta-gxp/recipes-bsp/u-boot/u-boot-common-gxp_2020.10.inc @@ -0,0 +1,16 @@ +HOMEPAGE = "https://github.com/HewlettPackard/gxp-uboot" +DEPENDS += "flex-native bison-native bc-native" + +LICENSE = "GPLv2+" +LIC_FILES_CHKSUM = "file://Licenses/gpl-2.0.txt;md5=b234ee4d69f5fce4486a80fdaf4a4263" +PE = "1" + +# We use the revision in order to avoid having to fetch it from the +# repo during parse +SRCREV = "b139a8a9e6e89e4115741498d454847d99239eda" +UBRANCH = "v2020.10-gxp-openbmc" +SRC_URI = "git://github.com/HewlettPackard/gxp-uboot.git;branch=${UBRANCH}" + +S = "${WORKDIR}/git" + +PV = "v2020.10+git${SRCPV}" diff --git a/meta-hpe/meta-gxp/recipes-bsp/u-boot/u-boot-fw-utils-gxp/alt_fw_env.config b/meta-hpe/meta-gxp/recipes-bsp/u-boot/u-boot-fw-utils-gxp/alt_fw_env.config new file mode 100644 index 000000000..3d85f9974 --- /dev/null +++ b/meta-hpe/meta-gxp/recipes-bsp/u-boot/u-boot-fw-utils-gxp/alt_fw_env.config @@ -0,0 +1,25 @@ +# Configuration file for fw_(printenv/setenv) utility. +# Up to two entries are valid, in this case the redundant +# environment sector is assumed present. +# Notice, that the "Number of sectors" is ignored on NOR and SPI-dataflash. +# Furthermore, if the Flash sector size is omitted, this value is assumed to +# be the same as the Environment size, which is valid for NOR and SPI-dataflash + +# NOR example +# MTD device name Device offset Env. size Flash sector size Number of sectors +#/dev/mtd1 0x0000 0x20000 0x20000 +#/dev/mtd2 0x0000 0x4000 0x4000 + +# MTD SPI-dataflash example +# MTD device name Device offset Env. size Flash sector size Number of sectors +#/dev/mtd2 0x00000 0x20000 +/dev/mtd/alt-u-boot-env 0x00000 0x10000 +/dev/mtd/alt-u-boot-env 0x10000 0x10000 +#/dev/mtd5 0x4200 0x4200 +#/dev/mtd6 0x4200 0x4200 + +# NAND example +#/dev/mtd0 0x4000 0x4000 0x20000 2 + +# Block device example +#/dev/mmcblk0 0xc0000 0x20000 diff --git a/meta-hpe/meta-gxp/recipes-bsp/u-boot/u-boot-fw-utils-gxp/fw_env.config b/meta-hpe/meta-gxp/recipes-bsp/u-boot/u-boot-fw-utils-gxp/fw_env.config new file mode 100644 index 000000000..19ace4b88 --- /dev/null +++ b/meta-hpe/meta-gxp/recipes-bsp/u-boot/u-boot-fw-utils-gxp/fw_env.config @@ -0,0 +1,25 @@ +# Configuration file for fw_(printenv/setenv) utility. +# Up to two entries are valid, in this case the redundant +# environment sector is assumed present. +# Notice, that the "Number of sectors" is ignored on NOR and SPI-dataflash. +# Furthermore, if the Flash sector size is omitted, this value is assumed to +# be the same as the Environment size, which is valid for NOR and SPI-dataflash + +# NOR example +# MTD device name Device offset Env. size Flash sector size Number of sectors +#/dev/mtd1 0x0000 0x20000 0x20000 +#/dev/mtd2 0x0000 0x4000 0x4000 + +# MTD SPI-dataflash example +# MTD device name Device offset Env. size Flash sector size Number of sectors +#/dev/mtd2 0x00000 0x20000 +/dev/mtd/u-boot-env 0x00000 0x10000 +/dev/mtd/u-boot-env 0x10000 0x10000 +#/dev/mtd5 0x4200 0x4200 +#/dev/mtd6 0x4200 0x4200 + +# NAND example +#/dev/mtd0 0x4000 0x4000 0x20000 2 + +# Block device example +#/dev/mmcblk0 0xc0000 0x20000 diff --git a/meta-hpe/meta-gxp/recipes-bsp/u-boot/u-boot-fw-utils-gxp_2020.10.bb b/meta-hpe/meta-gxp/recipes-bsp/u-boot/u-boot-fw-utils-gxp_2020.10.bb new file mode 100644 index 000000000..daf5a2cde --- /dev/null +++ b/meta-hpe/meta-gxp/recipes-bsp/u-boot/u-boot-fw-utils-gxp_2020.10.bb @@ -0,0 +1,46 @@ +require u-boot-common-gxp_2020.10.inc + +SRC_URI += "file://fw_env.config" +SRC_URI += "file://alt_fw_env.config" + +# FIXME - Get fw_printenv/fw_setenv tool +UBOOT_MACHINE ?= "gxp_defconfig" + +SUMMARY = "U-Boot bootloader fw_printenv/setenv utilities" +DEPENDS += "mtd-utils" + +PROVIDES += "u-boot-fw-utils" + +INSANE_SKIP:${PN} = "already-stripped" +EXTRA_OEMAKE:class-target = 'CROSS_COMPILE=${TARGET_PREFIX} CC="${CC} ${CFLAGS} ${LDFLAGS}" HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}" V=1' +EXTRA_OEMAKE:class-cross = 'ARCH=${TARGET_ARCH} CC="${CC} ${CFLAGS} ${LDFLAGS}" V=1' + +inherit uboot-config + +do_compile () { + oe_runmake ${UBOOT_MACHINE} + oe_runmake envtools +} + +do_install () { + install -d ${D}${base_sbindir} + install -m 755 ${S}/tools/env/fw_printenv ${D}${base_sbindir}/fw_printenv + ln -sf fw_printenv ${D}${base_sbindir}/fw_setenv + + install -d ${D}${sysconfdir} + install -m 644 ${WORKDIR}/fw_env.config ${D}${sysconfdir}/fw_env.config + install -m 644 ${WORKDIR}/alt_fw_env.config ${D}${sysconfdir}/alt_fw_env.config +} + +do_install:class-cross () { + install -d ${D}${bindir_cross} + install -m 755 ${S}/tools/env/fw_printenv ${D}${bindir_cross}/fw_printenv + ln -sf fw_printenv ${D}${bindir_cross}/fw_setenv +} + +SYSROOT_DIRS:append:class-cross = " ${bindir_cross}" + +PACKAGE_ARCH = "${MACHINE_ARCH}" +BBCLASSEXTEND = "cross" + +RDEPENDS:${PN} = "udev-gxp-mtd-partitions" diff --git a/meta-hpe/meta-gxp/recipes-bsp/u-boot/u-boot-gxp_2019.07.bb b/meta-hpe/meta-gxp/recipes-bsp/u-boot/u-boot-gxp_2019.07.bb deleted file mode 100644 index 58a65b398..000000000 --- a/meta-hpe/meta-gxp/recipes-bsp/u-boot/u-boot-gxp_2019.07.bb +++ /dev/null @@ -1,7 +0,0 @@ -require recipes-bsp/u-boot/u-boot-common.inc -require recipes-bsp/u-boot/u-boot.inc -require u-boot-common-gxp_2019.07.inc - -S = "${WORKDIR}/git" - -PROVIDES += "u-boot" diff --git a/meta-hpe/meta-gxp/recipes-bsp/u-boot/u-boot-gxp_2020.10.bb b/meta-hpe/meta-gxp/recipes-bsp/u-boot/u-boot-gxp_2020.10.bb new file mode 100644 index 000000000..92e1975f9 --- /dev/null +++ b/meta-hpe/meta-gxp/recipes-bsp/u-boot/u-boot-gxp_2020.10.bb @@ -0,0 +1,8 @@ +require recipes-bsp/u-boot/u-boot-common.inc +require recipes-bsp/u-boot/u-boot.inc +require u-boot-common-gxp_2020.10.inc +require conf/machine/include/fitimage-sign.inc + +S = "${WORKDIR}/git" + +PROVIDES += "u-boot" -- cgit v1.2.3