From 5e61ba92e36064b53bfc1ce2ffff610d1585bebd Mon Sep 17 00:00:00 2001 From: Martin Kelly Date: Thu, 12 Apr 2018 14:28:03 -0700 Subject: [PATCH 1/4] u-boot: upgrade to 2018.03 This version of u-boot includes nanopi-neo-plus2 support. Signed-off-by: Martin Kelly --- conf/machine/nanopi-neo-air.conf | 2 +- conf/machine/nanopi-neo.conf | 2 +- conf/machine/orange-pi-one.conf | 2 +- conf/machine/orange-pi-pc.conf | 2 +- conf/machine/orange-pi-zero-plus2.conf | 2 +- conf/machine/orange-pi-zero.conf | 2 +- conf/machine/pcduino.conf | 2 +- .../files/u-boot-pylibfdt-native-build.patch | 28 +++++++++++-------- .../{u-boot_2017.11.bb => u-boot_2018.03.bb} | 4 +-- 9 files changed, 25 insertions(+), 21 deletions(-) rename recipes-bsp/u-boot/{u-boot_2017.11.bb => u-boot_2018.03.bb} (93%) diff --git a/conf/machine/nanopi-neo-air.conf b/conf/machine/nanopi-neo-air.conf index d89838f..c4b0ee1 100644 --- a/conf/machine/nanopi-neo-air.conf +++ b/conf/machine/nanopi-neo-air.conf @@ -5,7 +5,7 @@ require conf/machine/include/sun8i.inc -PREFERRED_VERSION_u-boot = "v2017.11%" +PREFERRED_VERSION_u-boot = "v2018.03%" KERNEL_DEVICETREE = "sun8i-h3-nanopi-neo-air.dtb" UBOOT_MACHINE = "nanopi_neo_air_defconfig" diff --git a/conf/machine/nanopi-neo.conf b/conf/machine/nanopi-neo.conf index 481178e..99135ee 100644 --- a/conf/machine/nanopi-neo.conf +++ b/conf/machine/nanopi-neo.conf @@ -4,7 +4,7 @@ require conf/machine/include/sun8i.inc -PREFERRED_VERSION_u-boot = "v2017.11%" +PREFERRED_VERSION_u-boot = "v2018.03%" KERNEL_DEVICETREE = "sun8i-h3-nanopi-neo.dtb" UBOOT_MACHINE = "nanopi_neo_defconfig" diff --git a/conf/machine/orange-pi-one.conf b/conf/machine/orange-pi-one.conf index 81ae884..a617294 100644 --- a/conf/machine/orange-pi-one.conf +++ b/conf/machine/orange-pi-one.conf @@ -4,7 +4,7 @@ require conf/machine/include/sun8i.inc -PREFERRED_VERSION_u-boot = "v2017.11%" +PREFERRED_VERSION_u-boot = "v2018.03%" KERNEL_DEVICETREE = "sun8i-h3-orangepi-one.dtb" UBOOT_MACHINE = "orangepi_one_defconfig" diff --git a/conf/machine/orange-pi-pc.conf b/conf/machine/orange-pi-pc.conf index d8ae8a9..097d973 100644 --- a/conf/machine/orange-pi-pc.conf +++ b/conf/machine/orange-pi-pc.conf @@ -4,7 +4,7 @@ require conf/machine/include/sun8i.inc -PREFERRED_VERSION_u-boot = "v2017.11%" +PREFERRED_VERSION_u-boot = "v2018.03%" KERNEL_DEVICETREE = "sun8i-h3-orangepi-pc.dtb" UBOOT_MACHINE = "orangepi_pc_defconfig" diff --git a/conf/machine/orange-pi-zero-plus2.conf b/conf/machine/orange-pi-zero-plus2.conf index 5777fcc..120ac16 100644 --- a/conf/machine/orange-pi-zero-plus2.conf +++ b/conf/machine/orange-pi-zero-plus2.conf @@ -5,7 +5,7 @@ require conf/machine/include/sun50i.inc -PREFERRED_VERSION_u-boot = "v2017.11%" +PREFERRED_VERSION_u-boot = "v2018.03%" KERNEL_DEVICETREE = "allwinner/sun50i-h5-orangepi-zero-plus2.dtb" UBOOT_MACHINE = "orangepi_zero_plus2_defconfig" diff --git a/conf/machine/orange-pi-zero.conf b/conf/machine/orange-pi-zero.conf index d3b2e22..c3fdcde 100644 --- a/conf/machine/orange-pi-zero.conf +++ b/conf/machine/orange-pi-zero.conf @@ -4,7 +4,7 @@ require conf/machine/include/sun8i.inc -PREFERRED_VERSION_u-boot = "v2017.11%" +PREFERRED_VERSION_u-boot = "v2018.03%" KERNEL_DEVICETREE = "sun8i-h2-plus-orangepi-zero.dtb" UBOOT_MACHINE = "orangepi_zero_defconfig" diff --git a/conf/machine/pcduino.conf b/conf/machine/pcduino.conf index 1c90f8e..8610a7a 100644 --- a/conf/machine/pcduino.conf +++ b/conf/machine/pcduino.conf @@ -4,7 +4,7 @@ require conf/machine/include/sun4i.inc -PREFERRED_VERSION_u-boot = "v2017.11%" +PREFERRED_VERSION_u-boot = "v2018.03%" KERNEL_DEVICETREE = "sun4i-a10-pcduino.dtb" UBOOT_MACHINE = "Linksprite_pcDuino_defconfig" diff --git a/recipes-bsp/u-boot/files/u-boot-pylibfdt-native-build.patch b/recipes-bsp/u-boot/files/u-boot-pylibfdt-native-build.patch index 9ac0005..3a4cc4f 100644 --- a/recipes-bsp/u-boot/files/u-boot-pylibfdt-native-build.patch +++ b/recipes-bsp/u-boot/files/u-boot-pylibfdt-native-build.patch @@ -1,12 +1,16 @@ -diff --git a/tools/Makefile b/tools/Makefile -index 5db2a54..54bd224 100644 ---- a/tools/Makefile -+++ b/tools/Makefile -@@ -134,6 +134,7 @@ tools/_libfdt.so: $(LIBFDT_SRCS) $(LIBFDT_SWIG) - $(Q)unset CC; \ - unset CROSS_COMPILE; \ - LDFLAGS="$(HOSTLDFLAGS)" CFLAGS= VERSION="u-boot-$(UBOOTVERSION)" \ -+ CC="$(HOSTCC)" LDSHARED="$(HOSTLDSHARED)" \ - CPPFLAGS="$(_hostc_flags)" OBJDIR=tools \ - SOURCES="$(LIBFDT_SRCS) tools/libfdt.i" \ - SWIG_OPTS="-I$(srctree)/lib/libfdt -I$(srctree)/lib" \ +diff --git a/scripts/dtc/pylibfdt/Makefile b/scripts/dtc/pylibfdt/Makefile +index 01d5e0ffe3..2b2dfe0bd9 100644 +--- a/scripts/dtc/pylibfdt/Makefile ++++ b/scripts/dtc/pylibfdt/Makefile +@@ -15,6 +15,8 @@ PYLIBFDT_srcs = $(addprefix $(LIBFDT_srcdir)/,$(LIBFDT_SRCS)) \ + + quiet_cmd_pymod = PYMOD $@ + cmd_pymod = unset CC; unset CROSS_COMPILE; unset CFLAGS;\ ++ CC="$(HOSTCC)" \ ++ LDSHARED="$(HOSTLDSHARED)" \ + LDFLAGS="$(HOSTLDFLAGS)" \ + VERSION="u-boot-$(UBOOTVERSION)" \ + CPPFLAGS="$(HOSTCFLAGS) -I$(LIBFDT_srcdir)" OBJDIR=$(obj) \ +-- +2.11.0 + diff --git a/recipes-bsp/u-boot/u-boot_2017.11.bb b/recipes-bsp/u-boot/u-boot_2018.03.bb similarity index 93% rename from recipes-bsp/u-boot/u-boot_2017.11.bb rename to recipes-bsp/u-boot/u-boot_2018.03.bb index 7bd20fc..f4a675d 100644 --- a/recipes-bsp/u-boot/u-boot_2017.11.bb +++ b/recipes-bsp/u-boot/u-boot_2018.03.bb @@ -21,9 +21,9 @@ SRC_URI = "git://git.denx.de/u-boot.git;branch=master \ file://boot.cmd \ " -SRCREV = "c253573f3e269fd9a24ee6684d87dd91106018a5" +SRCREV = "f95ab1fb6e37f0601f397091bb011edf7a98b890" -PV = "v2017.11+git${SRCPV}" +PV = "v2018.03+git${SRCPV}" PE = "2" S = "${WORKDIR}/git" From c0f804f573d6c3c9a6f1a69fe6d2e106c98fa23a Mon Sep 17 00:00:00 2001 From: Martin Kelly Date: Thu, 12 Apr 2018 12:33:12 -0700 Subject: [PATCH 2/4] nanopi-neo-plus2: add new board Signed-off-by: Martin Kelly --- conf/machine/nanopi-neo-plus2.conf | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 conf/machine/nanopi-neo-plus2.conf diff --git a/conf/machine/nanopi-neo-plus2.conf b/conf/machine/nanopi-neo-plus2.conf new file mode 100644 index 0000000..fae6ce0 --- /dev/null +++ b/conf/machine/nanopi-neo-plus2.conf @@ -0,0 +1,11 @@ +#@TYPE: Machine +#@NAME: nanopi-neo-plus2 +#@DESCRIPTION: Machine configuration for the FriendlyARM NanoPi Neo Plus2, based +# on the Allwinner H5 SoC. + +require conf/machine/include/sun50i.inc + +PREFERRED_VERSION_u-boot = "v2018.03%" + +KERNEL_DEVICETREE = "allwinner/sun50i-h5-nanopi-neo-plus2.dtb" +UBOOT_MACHINE = "nanopi_neo_plus2_defconfig" From d419cfe0a12e1efb7b337be854f6ebe97e92689b Mon Sep 17 00:00:00 2001 From: Martin Kelly Date: Fri, 13 Apr 2018 15:43:27 -0700 Subject: [PATCH 3/4] nanopi-neo-plus2: enable the second USB port Currently, only one of the exposed USB ports works because we haven't loaded the sunxi musb driver, which enables the OTG port to act in host mode. After enabling this driver in the config, both ports work correctly. Signed-off-by: Martin Kelly --- recipes-kernel/linux/linux-mainline/aarch64/defconfig | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/recipes-kernel/linux/linux-mainline/aarch64/defconfig b/recipes-kernel/linux/linux-mainline/aarch64/defconfig index 34480e9..f9eba85 100644 --- a/recipes-kernel/linux/linux-mainline/aarch64/defconfig +++ b/recipes-kernel/linux/linux-mainline/aarch64/defconfig @@ -431,6 +431,11 @@ CONFIG_USB_QCOM_8X16_PHY=y CONFIG_USB_ULPI=y CONFIG_USB_GADGET=y CONFIG_USB_RENESAS_USBHS_UDC=m +CONFIG_USB_MUSB_HDRC=y +# Restrict to host mode, as it is hard-coded that way in the device tree +# (dr_mode = "host" in the &usb_otg node) +CONFIG_USB_MUSB_HOST=y +CONFIG_USB_MUSB_SUNXI=y CONFIG_MMC=y CONFIG_MMC_BLOCK_MINORS=32 CONFIG_MMC_ARMMMCI=y From 4900e75a6a4a2b7a5e16297bcd68bea2092b0d63 Mon Sep 17 00:00:00 2001 From: Martin Kelly Date: Mon, 30 Apr 2018 10:52:12 -0700 Subject: [PATCH 4/4] nanopi-neo2: add new board Signed-off-by: Martin Kelly --- conf/machine/nanopi-neo2.conf | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 conf/machine/nanopi-neo2.conf diff --git a/conf/machine/nanopi-neo2.conf b/conf/machine/nanopi-neo2.conf new file mode 100644 index 0000000..c67c1f7 --- /dev/null +++ b/conf/machine/nanopi-neo2.conf @@ -0,0 +1,11 @@ +#@TYPE: Machine +#@NAME: nanopi-neo2 +#@DESCRIPTION: Machine configuration for the FriendlyARM NanoPi Neo 2, based on +# the Allwinner H5 SoC. + +require conf/machine/include/sun50i.inc + +PREFERRED_VERSION_u-boot = "v2018.03%" + +KERNEL_DEVICETREE = "allwinner/sun50i-h5-nanopi-neo2.dtb" +UBOOT_MACHINE = "nanopi_neo2_defconfig"