From: Michael Heimpold Date: Sun, 28 Oct 2018 14:26:08 +0000 (+0100) Subject: uboot-mxs: bump to v2018.09 X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=79b766d07d56d22536120de2066e2e203ed01eb0;p=openwrt%2Fstaging%2Fynezz.git uboot-mxs: bump to v2018.09 Also update the U-Boot BSP patch for I2SE Duckbill devices and remove upstreamed patch for LibreSSL support. Signed-off-by: Michael Heimpold --- diff --git a/package/boot/uboot-mxs/Makefile b/package/boot/uboot-mxs/Makefile index 5636dcfbb4..cd26704cb6 100644 --- a/package/boot/uboot-mxs/Makefile +++ b/package/boot/uboot-mxs/Makefile @@ -8,10 +8,10 @@ include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/kernel.mk -PKG_VERSION:=2017.11 +PKG_VERSION:=2018.09 PKG_RELEASE:=1 -PKG_HASH:=6a018fd3caf58f3dcfa23ee989a82bd35df03af71872b9dca8c6d758a0d26c05 +PKG_HASH:=839bf23cfe8ce613a77e583a60375179d0ad324e92c82fbdd07bebf0fd142268 include $(INCLUDE_DIR)/u-boot.mk include $(INCLUDE_DIR)/package.mk diff --git a/package/boot/uboot-mxs/patches/001-add-i2se-duckbill.patch b/package/boot/uboot-mxs/patches/001-add-i2se-duckbill.patch index 1ad67fbba8..e5d3484d8e 100644 --- a/package/boot/uboot-mxs/patches/001-add-i2se-duckbill.patch +++ b/package/boot/uboot-mxs/patches/001-add-i2se-duckbill.patch @@ -1,6 +1,6 @@ -From 25de6430219d3f3698d709c10358fbea17b24cf1 Mon Sep 17 00:00:00 2001 +From 7b919a74c562ca33ae28c9214f225a79b57209e4 Mon Sep 17 00:00:00 2001 From: Michael Heimpold -Date: Fri, 21 Apr 2017 11:08:19 +0200 +Date: Thu, 13 Sep 2018 21:40:19 +0200 Subject: [PATCH] arm: mxs: add support for I2SE's Duckbill boards The Duckbill devices are small, pen-drive sized boards based on @@ -8,7 +8,7 @@ NXP's i.MX28 SoC. While the initial variants (Duckbill series) were equipped with a micro SD card slot only, the latest generation (Duckbill 2 series) have an additional internal eMMC onboard. -Both device generations consists of four "family members": +Both device generations consist of four "family members": - Duckbill/Duckbill 2: generic board, intended to be used as baseboard for custom designs and/or as development board @@ -26,15 +26,15 @@ Both device generations consists of four "family members": Signed-off-by: Michael Heimpold Signed-off-by: Stefan Wahren --- - arch/arm/Kconfig | 9 +- + arch/arm/mach-imx/mxs/Kconfig | 5 + board/i2se/duckbill/Kconfig | 15 +++ board/i2se/duckbill/MAINTAINERS | 6 ++ - board/i2se/duckbill/Makefile | 12 +++ - board/i2se/duckbill/duckbill.c | 181 ++++++++++++++++++++++++++++++++++++ - board/i2se/duckbill/iomux.c | 157 +++++++++++++++++++++++++++++++ - configs/duckbill_defconfig | 31 +++++++ - include/configs/duckbill.h | 199 ++++++++++++++++++++++++++++++++++++++++ - 8 files changed, 609 insertions(+), 1 deletion(-) + board/i2se/duckbill/Makefile | 10 ++ + board/i2se/duckbill/duckbill.c | 186 ++++++++++++++++++++++++++++++++ + board/i2se/duckbill/iomux.c | 156 +++++++++++++++++++++++++++ + configs/duckbill_defconfig | 38 +++++++ + include/configs/duckbill.h | 179 ++++++++++++++++++++++++++++++ + 8 files changed, 595 insertions(+) create mode 100644 board/i2se/duckbill/Kconfig create mode 100644 board/i2se/duckbill/MAINTAINERS create mode 100644 board/i2se/duckbill/Makefile @@ -43,38 +43,27 @@ Signed-off-by: Stefan Wahren create mode 100644 configs/duckbill_defconfig create mode 100644 include/configs/duckbill.h ---- a/arch/arm/Kconfig -+++ b/arch/arm/Kconfig -@@ -373,6 +373,12 @@ config TARGET_MX28EVK - select SUPPORT_SPL - select BOARD_EARLY_INIT_F +--- a/arch/arm/mach-imx/mxs/Kconfig ++++ b/arch/arm/mach-imx/mxs/Kconfig +@@ -50,6 +50,10 @@ config TARGET_APX4DEVKIT + config TARGET_BG0900 + bool "Support bg0900" +config TARGET_DUCKBILL + bool "Support duckbill" -+ select CPU_ARM926EJS -+ select SUPPORT_SPL + select BOARD_EARLY_INIT_F + - config TARGET_MX23_OLINUXINO - bool "Support mx23_olinuxino" - select CPU_ARM926EJS -@@ -1250,6 +1256,7 @@ source "board/gumstix/pepper/Kconfig" - source "board/h2200/Kconfig" - source "board/hisilicon/hikey/Kconfig" - source "board/hisilicon/poplar/Kconfig" -+source "board/i2se/duckbill/Kconfig" - source "board/imx31_phycore/Kconfig" - source "board/isee/igep003x/Kconfig" - source "board/olimex/mx23_olinuxino/Kconfig" -@@ -1279,7 +1286,7 @@ source "arch/arm/Kconfig.debug" - endmenu - - config SPL_LDSCRIPT -- default "arch/arm/cpu/arm926ejs/mxs/u-boot-spl.lds" if TARGET_APX4DEVKIT || TARGET_BG0900 || TARGET_M28EVK || TARGET_MX23_OLINUXINO || TARGET_MX23EVK || TARGET_MX28EVK || TARGET_SANSA_FUZE_PLUS || TARGET_SC_SPS_1 || TARGET_TS4600 || TARGET_XFI3 -+ default "arch/arm/cpu/arm926ejs/mxs/u-boot-spl.lds" if TARGET_APX4DEVKIT || TARGET_BG0900 || TARGET_M28EVK || TARGET_MX23_OLINUXINO || TARGET_MX23EVK || TARGET_MX28EVK || TARGET_DUCKBILL || TARGET_SANSA_FUZE_PLUS || TARGET_SC_SPS_1 || TARGET_TS4600 || TARGET_XFI3 - default "arch/arm/cpu/arm1136/u-boot-spl.lds" if CPU_ARM1136 - default "arch/arm/cpu/armv8/u-boot-spl.lds" if ARM64 + config TARGET_MX28EVK + bool "Support mx28evk" + select BOARD_EARLY_INIT_F +@@ -67,6 +71,7 @@ config SYS_SOC + source "board/bluegiga/apx4devkit/Kconfig" + source "board/freescale/mx28evk/Kconfig" ++source "board/i2se/duckbill/Kconfig" + source "board/ppcag/bg0900/Kconfig" + source "board/schulercontrol/sc_sps_1/Kconfig" + source "board/technologic/ts4600/Kconfig" --- /dev/null +++ b/board/i2se/duckbill/Kconfig @@ -0,0 +1,15 @@ @@ -104,13 +93,11 @@ Signed-off-by: Stefan Wahren +F: configs/duckbill_defconfig --- /dev/null +++ b/board/i2se/duckbill/Makefile -@@ -0,0 +1,12 @@ +@@ -0,0 +1,10 @@ ++# SPDX-License-Identifier: GPL-2.0+ +# -+# (C) Copyright 2014-2017 ++# (C) Copyright 2014-2018 +# Michael Heimpold, mhei@heimpold.de. -+# -+# SPDX-License-Identifier: GPL-2.0+ -+# + +ifndef CONFIG_SPL_BUILD +obj-y := duckbill.o @@ -119,13 +106,12 @@ Signed-off-by: Stefan Wahren +endif --- /dev/null +++ b/board/i2se/duckbill/duckbill.c -@@ -0,0 +1,181 @@ +@@ -0,0 +1,186 @@ ++// SPDX-License-Identifier: GPL-2.0+ +/* + * I2SE Duckbill board + * -+ * (C) Copyright 2014-2017 Michael Heimpold -+ * -+ * SPDX-License-Identifier: GPL-2.0+ ++ * (C) Copyright 2014-2018 Michael Heimpold + */ + +#include @@ -205,7 +191,7 @@ Signed-off-by: Stefan Wahren + /* give PHY some time to get out of the reset */ + udelay(10000); + -+ ret = fecmxc_initialize(bis); ++ ret = fecmxc_initialize_multi(bis, 0, 0, MXS_ENET0_BASE); + if (ret) { + puts("FEC MXS: Unable to init FEC\n"); + return ret; @@ -228,22 +214,20 @@ Signed-off-by: Stefan Wahren + uint8_t enetaddr[6]; + u32 mac = 0; + -+ enetaddr[0] = 0x00; -+ enetaddr[1] = 0x01; -+ enetaddr[2] = 0x87; -+ +#ifdef CONFIG_MXS_OCOTP + /* only Duckbill SPI has a MAC for the QCA7k */ + fuse_read(0, 1, &mac); +#endif + + if (mac != 0) { ++ enetaddr[0] = 0x00; ++ enetaddr[1] = 0x01; ++ enetaddr[2] = 0x87; + enetaddr[3] = (mac >> 16) & 0xff; + enetaddr[4] = (mac >> 8) & 0xff; + enetaddr[5] = mac & 0xff; + -+ fdt_find_and_setprop(blob, -+ "/apb@80000000/apbh@80000000/ssp@80014000/ethernet@0", ++ fdt_find_and_setprop(blob, "spi1/ethernet@0", + "local-mac-address", enetaddr, 6, 1); + } + @@ -279,6 +263,14 @@ Signed-off-by: Stefan Wahren + gpio_get_value(MX28_PAD_LCD_D17__GPIO_1_17); + system_rev += 1; + ++ /* guess DT blob if not set in environment */ ++ if (!env_get("fdt_file")) { ++ if (system_rev == 1) ++ env_set("fdt_file", "imx28-duckbill.dtb"); ++ else ++ env_set("fdt_file", "imx28-duckbill-2.dtb"); ++ } ++ + /* enable red LED to indicate a running bootloader */ + if (system_rev == 1) + led_red_gpio = MX28_PAD_AUART1_RX__GPIO_3_4; @@ -303,13 +295,12 @@ Signed-off-by: Stefan Wahren +} --- /dev/null +++ b/board/i2se/duckbill/iomux.c -@@ -0,0 +1,157 @@ +@@ -0,0 +1,156 @@ ++// SPDX-License-Identifier: GPL-2.0+ +/* + * I2SE Duckbill IOMUX setup + * -+ * Copyright (C) 2013-2017 Michael Heimpold -+ * -+ * SPDX-License-Identifier: GPL-2.0+ ++ * Copyright (C) 2013-2018 Michael Heimpold + */ + +#include @@ -463,63 +454,64 @@ Signed-off-by: Stefan Wahren +} --- /dev/null +++ b/configs/duckbill_defconfig -@@ -0,0 +1,31 @@ +@@ -0,0 +1,38 @@ +CONFIG_ARM=y -+CONFIG_TARGET_DUCKBILL=y ++CONFIG_ARCH_MX28=y ++CONFIG_SYS_TEXT_BASE=0x40002000 +CONFIG_SPL_GPIO_SUPPORT=y +CONFIG_SPL_LIBCOMMON_SUPPORT=y +CONFIG_SPL_LIBGENERIC_SUPPORT=y ++CONFIG_TARGET_DUCKBILL=y +CONFIG_SPL_SERIAL_SUPPORT=y ++CONFIG_SPL=y ++CONFIG_NR_DRAM_BANKS=1 +CONFIG_BOOTDELAY=1 -+# CONFIG_CONSOLE_MUX is not set +CONFIG_SYS_CONSOLE_IS_IN_ENV=y +CONFIG_VERSION_VARIABLE=y +# CONFIG_DISPLAY_BOARDINFO is not set -+# CONFIG_EFI_LOADER is not set +CONFIG_ARCH_MISC_INIT=y -+CONFIG_SPL=y ++# CONFIG_SPL_FRAMEWORK is not set +CONFIG_HUSH_PARSER=y +CONFIG_CMD_BOOTZ=y -+# CONFIG_CMD_IMLS is not set ++# CONFIG_CMD_ELF is not set ++CONFIG_CMD_UNZIP=y +# CONFIG_CMD_FLASH is not set -+CONFIG_CMD_MMC=y ++CONFIG_CMD_FUSE=y +CONFIG_CMD_GPIO=y ++CONFIG_CMD_MMC=y ++CONFIG_CMD_MMC_SWRITE=y +CONFIG_CMD_DHCP=y +CONFIG_CMD_MII=y +CONFIG_CMD_PING=y -+CONFIG_CMD_CACHE=y +CONFIG_CMD_EXT4=y +CONFIG_CMD_EXT4_WRITE=y -+CONFIG_CMD_FAT=y +CONFIG_CMD_FS_GENERIC=y ++CONFIG_DOS_PARTITION=y +CONFIG_ENV_IS_IN_MMC=y +CONFIG_MMC_MXS=y ++CONFIG_MII=y ++CONFIG_CONS_INDEX=0 +CONFIG_OF_LIBFDT=y ++# CONFIG_EFI_LOADER is not set --- /dev/null +++ b/include/configs/duckbill.h -@@ -0,0 +1,199 @@ +@@ -0,0 +1,179 @@ ++/* SPDX-License-Identifier: GPL-2.0+ */ +/* -+ * Copyright (C) 2014-2015 Michael Heimpold ++ * Copyright (C) 2014-2018 Michael Heimpold + * -+ * SPDX-License-Identifier: GPL-2.0+ + */ +#ifndef __CONFIGS_DUCKBILL_H__ +#define __CONFIGS_DUCKBILL_H__ + +/* System configurations */ -+#define CONFIG_MX28 /* i.MX28 SoC */ +#define CONFIG_MACH_TYPE MACH_TYPE_DUCKBILL + +#define CONFIG_MISC_INIT_R + +#define CONFIG_SYS_MXS_VDD5V_ONLY + -+/* U-Boot Commands */ -+#define CONFIG_CMD_FUSE -+#define CONFIG_CMD_UNZIP -+ +/* Memory configuration */ -+#define CONFIG_NR_DRAM_BANKS 1 /* 1 bank of DRAM */ +#define PHYS_SDRAM_1 0x40000000 /* Base address */ +#define PHYS_SDRAM_1_SIZE 0x40000000 /* Max 1 GB RAM */ +#define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM_1 @@ -533,12 +525,10 @@ Signed-off-by: Stefan Wahren +#define CONFIG_SYS_REDUNDAND_ENVIRONMENT + +/* FEC Ethernet on SoC */ -+#ifdef CONFIG_CMD_NET ++#ifdef CONFIG_CMD_NET +#define CONFIG_FEC_MXC -+#define CONFIG_NET_MULTI +#define CONFIG_MX28_FEC_MAC_IN_OCOTP -+#define CONFIG_FEC_MXC_PHYADDR 1 -+#define IMX_FEC_BASE MXS_ENET0_BASE ++#define CONFIG_FEC_MXC_MDIO_BASE MXS_ENET0_BASE +#endif + +#define CONFIG_IPADDR 192.168.1.10 @@ -546,17 +536,6 @@ Signed-off-by: Stefan Wahren +#define CONFIG_NETMASK 255.255.255.0 +#define CONFIG_GATEWAYIP 192.168.1.254 + -+/* BOOTP options */ -+#define CONFIG_BOOTP_SUBNETMASK -+#define CONFIG_BOOTP_GATEWAY -+#define CONFIG_BOOTP_HOSTNAME -+ -+/* SPI */ -+#ifdef CONFIG_CMD_SPI -+#define CONFIG_DEFAULT_SPI_BUS 2 -+#define CONFIG_DEFAULT_SPI_MODE SPI_MODE_0 -+#endif -+ +/* Boot Linux */ +#define CONFIG_BOOTDELAY 1 +#define CONFIG_BOOTFILE "zImage" @@ -596,7 +575,7 @@ Signed-off-by: Stefan Wahren + "setexpr i ${update_fw_parts}; setexpr error 0; " \ + "while itest ${i} -gt 0; do " \ + "echo Transfering firmware image part ${i} of ${update_fw_parts}; " \ -+ "if itest ${i} -le 9; then " \ ++ "if itest ${i} -le f; then " \ + "setenv j 0${i}; " \ + "else " \ + "setenv j ${i}; " \ @@ -625,7 +604,6 @@ Signed-off-by: Stefan Wahren + "erase_env2=mmc erase 200 100\0" \ + "image=zImage\0" \ + "console=ttyAMA0\0" \ -+ "fdt_file=imx28-duckbill-2.dtb\0" \ + "fdt_addr=0x41000000\0" \ + "boot_fdt=try\0" \ + "ip_dyn=yes\0" \ diff --git a/package/boot/uboot-mxs/patches/002-tools-mxsimage-Support-building-with-LibreSSL.patch b/package/boot/uboot-mxs/patches/002-tools-mxsimage-Support-building-with-LibreSSL.patch deleted file mode 100644 index aa7285ebce..0000000000 --- a/package/boot/uboot-mxs/patches/002-tools-mxsimage-Support-building-with-LibreSSL.patch +++ /dev/null @@ -1,36 +0,0 @@ -From c5b0bca4c3ca5c3d1d8ee99fdbf3b494a3986dbd Mon Sep 17 00:00:00 2001 -From: Hauke Mehrtens -Date: Sun, 18 Mar 2018 16:03:47 +0100 -Subject: [PATCH] tools/mxsimage: Support building with LibreSSL - -The mxsimage utility fails to compile against LibreSSL version < 2.7.0 -because LibreSSL says it is OpenSSL 2.0, but it does not support the -complete OpenSSL 1.1 interface. - -LibreSSL defines OPENSSL_VERSION_NUMBER with 0x20000000L and therefor -claims to have an API compatible with OpenSSL 2.0, but it implements -EVP_MD_CTX_new(), EVP_MD_CTX_free() and EVP_CIPHER_CTX_reset() only -starting with version 2.7.0, which is not yet released. OpenSSL -implements this function since version 1.1.0. - -This commit will activate the compatibility code meant for -OpenSSL < 1.1.0 also for LibreSSL version < 2.7.0. - -Signed-off-by: Hauke Mehrtens -Reviewed-by: Jonathan Gray ---- - tools/mxsimage.c | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - ---- a/tools/mxsimage.c -+++ b/tools/mxsimage.c -@@ -26,7 +26,8 @@ - * OpenSSL 1.1.0 and newer compatibility functions: - * https://wiki.openssl.org/index.php/1.1_API_Changes - */ --#if OPENSSL_VERSION_NUMBER < 0x10100000L -+#if OPENSSL_VERSION_NUMBER < 0x10100000L || \ -+ (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x2070000fL) - static void *OPENSSL_zalloc(size_t num) - { - void *ret = OPENSSL_malloc(num); diff --git a/package/boot/uboot-mxs/patches/210-link-libcrypto-static.patch b/package/boot/uboot-mxs/patches/210-link-libcrypto-static.patch index 87b70ccea4..022e798f19 100644 --- a/package/boot/uboot-mxs/patches/210-link-libcrypto-static.patch +++ b/package/boot/uboot-mxs/patches/210-link-libcrypto-static.patch @@ -3,7 +3,7 @@ needed dependencies are added too. --- a/tools/Makefile +++ b/tools/Makefile -@@ -163,7 +163,7 @@ endif +@@ -147,7 +147,7 @@ endif # MXSImage needs LibSSL ifneq ($(CONFIG_MX23)$(CONFIG_MX28)$(CONFIG_ARMADA_38X)$(CONFIG_ARMADA_39X)$(CONFIG_FIT_SIGNATURE),) HOSTLOADLIBES_mkimage += \