From ee8c67ea66735ee84b2fe7a13bbecae7a1a57afe Mon Sep 17 00:00:00 2001 From: Arturo Buzarra Date: Mon, 17 Dec 2018 16:43:15 +0100 Subject: [PATCH] u-boot: move forward the u-boot version 2017.03 Signed-off-by: Arturo Buzarra --- .../files/10m50-update-device-tree.patch | 28 +++++++++++++++ .../files/MPC8315ERDB-enable-DHCP.patch | 19 +++++++++++ .../u-boot/u-boot-common_2017.09.inc | 17 ++++++++++ .../u-boot/u-boot-dey/fix_uboot_gcc.patch | 26 ++++++++++++++ .../recipes-bsp/u-boot/u-boot-dey_2017.03.bb | 1 + ...append => u-boot-fw-utils_2017.%.bbappend} | 0 .../u-boot/u-boot-fw-utils_2017.09.bb | 34 +++++++++++++++++++ meta-digi-dey/conf/distro/dey.conf | 1 + 8 files changed, 126 insertions(+) create mode 100644 meta-digi-arm/recipes-bsp/u-boot/files/10m50-update-device-tree.patch create mode 100644 meta-digi-arm/recipes-bsp/u-boot/files/MPC8315ERDB-enable-DHCP.patch create mode 100644 meta-digi-arm/recipes-bsp/u-boot/u-boot-common_2017.09.inc create mode 100644 meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/fix_uboot_gcc.patch rename meta-digi-arm/recipes-bsp/u-boot/{u-boot-fw-utils_%.bbappend => u-boot-fw-utils_2017.%.bbappend} (100%) create mode 100644 meta-digi-arm/recipes-bsp/u-boot/u-boot-fw-utils_2017.09.bb diff --git a/meta-digi-arm/recipes-bsp/u-boot/files/10m50-update-device-tree.patch b/meta-digi-arm/recipes-bsp/u-boot/files/10m50-update-device-tree.patch new file mode 100644 index 000000000..841953cd1 --- /dev/null +++ b/meta-digi-arm/recipes-bsp/u-boot/files/10m50-update-device-tree.patch @@ -0,0 +1,28 @@ +Nios II for MAX10 10m50 board requires update to +its device tree to enable CPU driver during +u-boot pre-relocation. This patch tag the CPU +with dm-pre-reloc flag. + +Upstream-Status: Submitted + +Signed-off-by: Gan, Yau Wai + +--- + arch/nios2/dts/10m50_devboard.dts | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/arch/nios2/dts/10m50_devboard.dts b/arch/nios2/dts/10m50_devboard.dts +index 05eac30..461ae68 100644 +--- a/arch/nios2/dts/10m50_devboard.dts ++++ b/arch/nios2/dts/10m50_devboard.dts +@@ -19,6 +19,7 @@ + #size-cells = <0>; + + cpu: cpu@0 { ++ u-boot,dm-pre-reloc; + device_type = "cpu"; + compatible = "altr,nios2-1.1"; + reg = <0x00000000>; +-- +2.7.4 + diff --git a/meta-digi-arm/recipes-bsp/u-boot/files/MPC8315ERDB-enable-DHCP.patch b/meta-digi-arm/recipes-bsp/u-boot/files/MPC8315ERDB-enable-DHCP.patch new file mode 100644 index 000000000..cea52b79e --- /dev/null +++ b/meta-digi-arm/recipes-bsp/u-boot/files/MPC8315ERDB-enable-DHCP.patch @@ -0,0 +1,19 @@ +Enabled dhcp client functionality for Yocto reference +hardware MPC8315E-RDB. + +Upstream-Status: Pending + +Signed-off-by: Ed Bartosh + +diff --git a/configs/MPC8315ERDB_defconfig b/configs/MPC8315ERDB_defconfig +index 4e2b705..b02ab1f 100644 +--- a/configs/MPC8315ERDB_defconfig ++++ b/configs/MPC8315ERDB_defconfig +@@ -9,6 +9,7 @@ CONFIG_HUSH_PARSER=y + CONFIG_CMD_I2C=y + CONFIG_CMD_USB=y + # CONFIG_CMD_SETEXPR is not set ++CONFIG_CMD_DHCP=y + CONFIG_CMD_MII=y + CONFIG_CMD_PING=y + CONFIG_CMD_EXT2=y diff --git a/meta-digi-arm/recipes-bsp/u-boot/u-boot-common_2017.09.inc b/meta-digi-arm/recipes-bsp/u-boot/u-boot-common_2017.09.inc new file mode 100644 index 000000000..02e51242c --- /dev/null +++ b/meta-digi-arm/recipes-bsp/u-boot/u-boot-common_2017.09.inc @@ -0,0 +1,17 @@ +HOMEPAGE = "http://www.denx.de/wiki/U-Boot/WebHome" +SECTION = "bootloaders" + +LICENSE = "GPLv2+" +LIC_FILES_CHKSUM = "file://Licenses/README;md5=a2c678cfd4a4d97135585cad908541c6" +PE = "1" + +# We use the revision in order to avoid having to fetch it from the +# repo during parse +SRCREV = "c98ac3487e413c71e5d36322ef3324b21c6f60f9" + +SRC_URI = "git://git.denx.de/u-boot.git \ + file://MPC8315ERDB-enable-DHCP.patch \ + file://10m50-update-device-tree.patch \ +" + +S = "${WORKDIR}/git" diff --git a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/fix_uboot_gcc.patch b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/fix_uboot_gcc.patch new file mode 100644 index 000000000..73d54a74a --- /dev/null +++ b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/fix_uboot_gcc.patch @@ -0,0 +1,26 @@ +diff --git a/Makefile b/Makefile +index c9d8e6d..6002726 100644 +--- a/Makefile ++++ b/Makefile +@@ -348,7 +348,7 @@ OBJCOPY = $(CROSS_COMPILE)objcopy + OBJDUMP = $(CROSS_COMPILE)objdump + AWK = awk + PERL = perl +-PYTHON = python ++PYTHON ?= python + DTC = dtc + CHECK = sparse + +diff --git a/tools/Makefile b/tools/Makefile +index 1247999..b47f475 100644 +--- a/tools/Makefile ++++ b/tools/Makefile +@@ -120,7 +120,7 @@ _libfdt.so-sharedobjs += $(LIBFDT_OBJS) + libfdt: + + tools/_libfdt.so: $(patsubst %.o,%.c,$(LIBFDT_OBJS)) tools/libfdt_wrap.c +- LDFLAGS="$(HOSTLDFLAGS)" python $(srctree)/lib/libfdt/setup.py \ ++ LDFLAGS="$(HOSTLDFLAGS)" ${PYTHON} $(srctree)/lib/libfdt/setup.py \ + "$(_hostc_flags)" $^ + mv _libfdt.so $@ + diff --git a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey_2017.03.bb b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey_2017.03.bb index 6372c4141..a6544138d 100644 --- a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey_2017.03.bb +++ b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey_2017.03.bb @@ -27,6 +27,7 @@ SRC_URI = " \ SRC_URI_append = " \ file://boot.txt \ file://install_linux_fw_sd.txt \ + file://fix_uboot_gcc.patch \ " LOCALVERSION ?= "" diff --git a/meta-digi-arm/recipes-bsp/u-boot/u-boot-fw-utils_%.bbappend b/meta-digi-arm/recipes-bsp/u-boot/u-boot-fw-utils_2017.%.bbappend similarity index 100% rename from meta-digi-arm/recipes-bsp/u-boot/u-boot-fw-utils_%.bbappend rename to meta-digi-arm/recipes-bsp/u-boot/u-boot-fw-utils_2017.%.bbappend diff --git a/meta-digi-arm/recipes-bsp/u-boot/u-boot-fw-utils_2017.09.bb b/meta-digi-arm/recipes-bsp/u-boot/u-boot-fw-utils_2017.09.bb new file mode 100644 index 000000000..02887a138 --- /dev/null +++ b/meta-digi-arm/recipes-bsp/u-boot/u-boot-fw-utils_2017.09.bb @@ -0,0 +1,34 @@ +require u-boot-common_${PV}.inc + +SUMMARY = "U-Boot bootloader fw_printenv/setenv utilities" +DEPENDS = "mtd-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 = 'HOSTCC="${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 -d ${D}${sysconfdir} + install -m 755 ${S}/tools/env/fw_printenv ${D}${base_sbindir}/fw_printenv + install -m 755 ${S}/tools/env/fw_printenv ${D}${base_sbindir}/fw_setenv + install -m 0644 ${S}/tools/env/fw_env.config ${D}${sysconfdir}/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 + install -m 755 ${S}/tools/env/fw_printenv ${D}${bindir_cross}/fw_setenv +} + +SYSROOT_DIRS_append_class-cross = " ${bindir_cross}" + +PACKAGE_ARCH = "${MACHINE_ARCH}" +BBCLASSEXTEND = "cross" diff --git a/meta-digi-dey/conf/distro/dey.conf b/meta-digi-dey/conf/distro/dey.conf index 871afe5ce..83673fbe5 100644 --- a/meta-digi-dey/conf/distro/dey.conf +++ b/meta-digi-dey/conf/distro/dey.conf @@ -60,6 +60,7 @@ PREFERRED_VERSION_linux-yocto ?= "4.14%" # Some features (swupdate, environment encryption) depends on this specific # provider for u-boot-fw-tools PREFERRED_PROVIDER_u-boot-fw-utils ?= "u-boot-fw-utils" +PREFERRED_VERSION_u-boot-fw-utils ?= "2017.09" # Use git recipe for libsoc PREFERRED_VERSION_libsoc = "git"