UPDATE: sysutils/u-boot 2019.07

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

UPDATE: sysutils/u-boot 2019.07

Jonathan Gray-11
update to U-Boot 2019.07

Sinovoip_BPI_M2_Plus target was renamed to bananapi_m2_plus_h3
am335x_boneblack target replaced by am335x_evm

Add back flushing/disabling caches for armv7 efi which was removed in
2019.04 and later and is required to load kernels on i.MX 6.

tinker-rk3288 now uses another stage (TPL) and assumes u-boot exists
at an offset we'd normally put a partition.

dd if=idbloader.img of=/dev/sdXc seek=64
dd if=u-boot.img of=/dev/sdXc seek=16384

But even with a zeroed and repartitioned sd card it seems to be broken:

        Trying to boot from BOOTROM
        Returning to boot ROM...

        U-Boot SPL 2019.07 (Jul 19 2019 - 18:25:15 +1000)
        Trying to boot from MMC1
        spl: mmc init failed with error: -110
        SPL: failed to boot from all boot devices
        ### ERROR ### Please RESET the board ###

Index: Makefile
===================================================================
RCS file: /cvs/ports/sysutils/u-boot/Makefile,v
retrieving revision 1.53
diff -u -p -r1.53 Makefile
--- Makefile 12 Jul 2019 20:49:53 -0000 1.53
+++ Makefile 19 Jul 2019 05:24:16 -0000
@@ -6,8 +6,7 @@ FLAVORS= aarch64 arm
 FLAVOR?= arm
 
 COMMENT= U-Boot firmware
-VERSION= 2019.01
-REVISION= 5
+VERSION= 2019.07
 DISTNAME= u-boot-${VERSION}
 PKGNAME= u-boot-${FLAVOR}-${VERSION:S/-//}
 FULLPKGNAME= ${PKGNAME}
@@ -73,7 +72,6 @@ BOARDS=\
 .elif "${FLAVOR}" == "arm"
 OMAP=\
  omap4_panda \
- am335x_boneblack \
  am335x_evm
 SUNXI64=
 SUNXI=\
@@ -85,6 +83,7 @@ SUNXI=\
  A20-OLinuXino_MICRO \
  Bananapi \
  Bananapi_m2m \
+ bananapi_m2_plus_h3 \
  bananapi_m2_zero \
  Bananapro \
  CHIP \
@@ -106,8 +105,7 @@ SUNXI=\
  orangepi_pc_plus \
  orangepi_plus \
  orangepi_plus2e \
- orangepi_zero \
- Sinovoip_BPI_M2_Plus
+ orangepi_zero
 IMX=\
  cm_fx6 \
  mx6cuboxi \
@@ -142,6 +140,7 @@ FILES=\
  u-boot-with-spl.bin \
  u-boot.itb \
  idbspl.img \
+ idbloader.img \
  spl/sunxi-spl.bin \
 
 pre-build:
@@ -161,15 +160,14 @@ do-build:
         -f ${MAKE_FILE} ${ALL_TARGET}
 .if "${BOARD}" == "tinker-rk3288"
  cd ${WRKSRC}/build/${BOARD} && \
-    tools/mkimage -n rk3288 -T rksd -d spl/u-boot-spl-dtb.bin \
-        u-boot-with-spl.bin && \
-    cat u-boot-dtb.bin >> u-boot-with-spl.bin
+    tools/mkimage -n rk3288 -T rksd -d tpl/u-boot-tpl.bin \
+        idbloader.img && \
+    cat spl/u-boot-spl-dtb.bin >> idbloader.img
 .endif
 .if "${BOARD}" == "firefly-rk3399"
  cd ${WRKSRC}/build/${BOARD} && \
-    ln -s ${RK3399_BL31} bl31.elf && \
-    ${SETENV} ${MAKE_ENV} ${MAKE_PROGRAM} ${MAKE_FLAGS} \
-        O="build/${BOARD}" \
+    ${SETENV} ${MAKE_ENV} BL31=${RK3399_BL31} ${MAKE_PROGRAM} \
+ ${MAKE_FLAGS} O="build/${BOARD}" \
         -f ${MAKE_FILE} u-boot.itb && \
     tools/mkimage -n rk3399 -T rksd -d spl/u-boot-spl.bin idbspl.img
 .endif
Index: distinfo
===================================================================
RCS file: /cvs/ports/sysutils/u-boot/distinfo,v
retrieving revision 1.25
diff -u -p -r1.25 distinfo
--- distinfo 15 Jan 2019 05:44:18 -0000 1.25
+++ distinfo 9 Jul 2019 01:28:18 -0000
@@ -1,2 +1,2 @@
-SHA256 (u-boot-2019.01.tar.bz2) = UL1+WkZquCiRTQgNX2pDI0W1AOj7oa07e2HpXmDVHCI=
-SIZE (u-boot-2019.01.tar.bz2) = 13366005
+SHA256 (u-boot-2019.07.tar.bz2) = v/T6d+jaF1IcAwykxblHoFbBsb5NPm7oY3AguNUCUdA=
+SIZE (u-boot-2019.07.tar.bz2) = 13939667
Index: patches/patch-arch_arm_dts_rk3399-firefly_dts
===================================================================
RCS file: patches/patch-arch_arm_dts_rk3399-firefly_dts
diff -N patches/patch-arch_arm_dts_rk3399-firefly_dts
--- patches/patch-arch_arm_dts_rk3399-firefly_dts 17 Jan 2019 20:41:47 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,14 +0,0 @@
-$OpenBSD: patch-arch_arm_dts_rk3399-firefly_dts,v 1.1 2019/01/17 20:41:47 kettenis Exp $
-
-Index: arch/arm/dts/rk3399-firefly.dts
---- arch/arm/dts/rk3399-firefly.dts.orig
-+++ arch/arm/dts/rk3399-firefly.dts
-@@ -15,7 +15,7 @@
-
- chosen {
- stdout-path = &uart2;
-- u-boot,spl-boot-order = &sdhci, &sdmmc;
-+ u-boot,spl-boot-order = "same-as-spl", &sdhci, &sdmmc;
- };
-
- backlight: backlight {
Index: patches/patch-configs_firefly-rk3399_defconfig
===================================================================
RCS file: /cvs/ports/sysutils/u-boot/patches/patch-configs_firefly-rk3399_defconfig,v
retrieving revision 1.1
diff -u -p -r1.1 patch-configs_firefly-rk3399_defconfig
--- patches/patch-configs_firefly-rk3399_defconfig 17 Jan 2019 20:41:47 -0000 1.1
+++ patches/patch-configs_firefly-rk3399_defconfig 9 Jul 2019 01:39:57 -0000
@@ -3,10 +3,10 @@ $OpenBSD: patch-configs_firefly-rk3399_d
 Index: configs/firefly-rk3399_defconfig
 --- configs/firefly-rk3399_defconfig.orig
 +++ configs/firefly-rk3399_defconfig
-@@ -58,7 +58,7 @@ CONFIG_REGULATOR_RK8XX=y
+@@ -42,7 +42,7 @@ CONFIG_PMIC_RK8XX=y
+ CONFIG_REGULATOR_PWM=y
+ CONFIG_REGULATOR_RK8XX=y
  CONFIG_PWM_ROCKCHIP=y
- CONFIG_RAM=y
- CONFIG_SPL_RAM=y
 -CONFIG_BAUDRATE=1500000
 +CONFIG_BAUDRATE=115200
  CONFIG_DEBUG_UART_SHIFT=2
Index: patches/patch-include_efi_h
===================================================================
RCS file: patches/patch-include_efi_h
diff -N patches/patch-include_efi_h
--- patches/patch-include_efi_h 9 Apr 2019 22:32:48 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,17 +0,0 @@
-$OpenBSD: patch-include_efi_h,v 1.1 2019/04/09 22:32:48 patrick Exp $
-
-Use 1ULL to make sure that when EFI_PAGE_MASK is used to mask
-bits on 64-bit integers on 32-bit platforms it is 64-bit wide.
-
-Index: include/efi.h
---- include/efi.h.orig
-+++ include/efi.h
-@@ -190,7 +190,7 @@ enum efi_mem_type {
- #define EFI_MEM_DESC_VERSION 1
-
- #define EFI_PAGE_SHIFT 12
--#define EFI_PAGE_SIZE (1UL << EFI_PAGE_SHIFT)
-+#define EFI_PAGE_SIZE (1ULL << EFI_PAGE_SHIFT)
- #define EFI_PAGE_MASK (EFI_PAGE_SIZE - 1)
-
- struct efi_mem_desc {
Index: patches/patch-lib_efi_loader_efi_boottime_c
===================================================================
RCS file: patches/patch-lib_efi_loader_efi_boottime_c
diff -N patches/patch-lib_efi_loader_efi_boottime_c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-lib_efi_loader_efi_boottime_c 19 Jul 2019 01:26:41 -0000
@@ -0,0 +1,18 @@
+$OpenBSD$
+
+f69d63fae281ba98c3d063097cf4e95d17f3754d in 2019.04 and later stopped
+flushing/disabling caches on armv7 which is required to load
+OpenBSD/armv7 kernls on at least i.MX 6.
+
+Index: lib/efi_loader/efi_boottime.c
+--- lib/efi_loader/efi_boottime.c.orig
++++ lib/efi_loader/efi_boottime.c
+@@ -2875,8 +2875,6 @@ efi_status_t EFIAPI efi_start_image(efi_handle_t image
+ if (ret != EFI_SUCCESS)
+ return EFI_EXIT(EFI_INVALID_PARAMETER);
+
+- efi_is_direct_boot = false;
+-
+ image_obj->exit_data_size = exit_data_size;
+ image_obj->exit_data = exit_data;
+
Index: patches/patch-lib_efi_loader_efi_memory_c
===================================================================
RCS file: patches/patch-lib_efi_loader_efi_memory_c
diff -N patches/patch-lib_efi_loader_efi_memory_c
--- patches/patch-lib_efi_loader_efi_memory_c 9 Apr 2019 22:32:48 -0000 1.3
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,30 +0,0 @@
-$OpenBSD: patch-lib_efi_loader_efi_memory_c,v 1.3 2019/04/09 22:32:48 patrick Exp $
-
-efi_allocate_pages() expects a (uint64_t *) pointer to pass the
-address of the assigned memory. If we pass the address of a pointer
-here, an illegal memory access occurs on 32bit systems.  This patch
-will be part of U-Boot 2019.04.
-
-Index: lib/efi_loader/efi_memory.c
---- lib/efi_loader/efi_memory.c.orig
-+++ lib/efi_loader/efi_memory.c
-@@ -440,6 +440,7 @@ efi_status_t efi_free_pages(uint64_t memory, efi_uintn
- efi_status_t efi_allocate_pool(int pool_type, efi_uintn_t size, void **buffer)
- {
- efi_status_t r;
-+ u64 addr;
- struct efi_pool_allocation *alloc;
- u64 num_pages = efi_size_in_pages(size +
-  sizeof(struct efi_pool_allocation));
-@@ -453,9 +454,9 @@ efi_status_t efi_allocate_pool(int pool_type, efi_uint
- }
-
- r = efi_allocate_pages(EFI_ALLOCATE_ANY_PAGES, pool_type, num_pages,
--       (uint64_t *)&alloc);
--
-+       &addr);
- if (r == EFI_SUCCESS) {
-+ alloc = (struct efi_pool_allocation *)(uintptr_t)addr;
- alloc->num_pages = num_pages;
- *buffer = alloc->data;
- }
Index: pkg/PFRAG.arm
===================================================================
RCS file: /cvs/ports/sysutils/u-boot/pkg/PFRAG.arm,v
retrieving revision 1.17
diff -u -p -r1.17 PFRAG.arm
--- pkg/PFRAG.arm 20 Jan 2019 11:51:02 -0000 1.17
+++ pkg/PFRAG.arm 19 Jul 2019 09:03:05 -0000
@@ -19,13 +19,13 @@ share/u-boot/A20-OLinuXino-Lime/u-boot
 share/u-boot/A20-OLinuXino-Lime/u-boot-sunxi-with-spl.bin
 share/u-boot/A20-OLinuXino-Lime/u-boot.bin
 share/u-boot/A20-OLinuXino-Lime/u-boot.img
-share/u-boot/A20-OLinuXino-Lime2/
 share/u-boot/A20-OLinuXino-Lime2-eMMC/
 share/u-boot/A20-OLinuXino-Lime2-eMMC/sunxi-spl.bin
 share/u-boot/A20-OLinuXino-Lime2-eMMC/u-boot
 share/u-boot/A20-OLinuXino-Lime2-eMMC/u-boot-sunxi-with-spl.bin
 share/u-boot/A20-OLinuXino-Lime2-eMMC/u-boot.bin
 share/u-boot/A20-OLinuXino-Lime2-eMMC/u-boot.img
+share/u-boot/A20-OLinuXino-Lime2/
 share/u-boot/A20-OLinuXino-Lime2/sunxi-spl.bin
 share/u-boot/A20-OLinuXino-Lime2/u-boot
 share/u-boot/A20-OLinuXino-Lime2/u-boot-sunxi-with-spl.bin
@@ -121,22 +121,17 @@ share/u-boot/Orangepi_mini/u-boot
 share/u-boot/Orangepi_mini/u-boot-sunxi-with-spl.bin
 share/u-boot/Orangepi_mini/u-boot.bin
 share/u-boot/Orangepi_mini/u-boot.img
-share/u-boot/Sinovoip_BPI_M2_Plus/
-share/u-boot/Sinovoip_BPI_M2_Plus/sunxi-spl.bin
-share/u-boot/Sinovoip_BPI_M2_Plus/u-boot
-share/u-boot/Sinovoip_BPI_M2_Plus/u-boot-sunxi-with-spl.bin
-share/u-boot/Sinovoip_BPI_M2_Plus/u-boot.bin
-share/u-boot/Sinovoip_BPI_M2_Plus/u-boot.img
-share/u-boot/am335x_boneblack/
-share/u-boot/am335x_boneblack/MLO
-share/u-boot/am335x_boneblack/u-boot
-share/u-boot/am335x_boneblack/u-boot.bin
-share/u-boot/am335x_boneblack/u-boot.img
 share/u-boot/am335x_evm/
 share/u-boot/am335x_evm/MLO
 share/u-boot/am335x_evm/u-boot
 share/u-boot/am335x_evm/u-boot.bin
 share/u-boot/am335x_evm/u-boot.img
+share/u-boot/bananapi_m2_plus_h3/
+share/u-boot/bananapi_m2_plus_h3/sunxi-spl.bin
+share/u-boot/bananapi_m2_plus_h3/u-boot
+share/u-boot/bananapi_m2_plus_h3/u-boot-sunxi-with-spl.bin
+share/u-boot/bananapi_m2_plus_h3/u-boot.bin
+share/u-boot/bananapi_m2_plus_h3/u-boot.img
 share/u-boot/bananapi_m2_zero/
 share/u-boot/bananapi_m2_zero/sunxi-spl.bin
 share/u-boot/bananapi_m2_zero/u-boot
@@ -240,8 +235,8 @@ share/u-boot/rpi_3_32b/
 share/u-boot/rpi_3_32b/u-boot
 share/u-boot/rpi_3_32b/u-boot.bin
 share/u-boot/tinker-rk3288/
+share/u-boot/tinker-rk3288/idbloader.img
 share/u-boot/tinker-rk3288/u-boot
-share/u-boot/tinker-rk3288/u-boot-with-spl.bin
 share/u-boot/tinker-rk3288/u-boot.bin
 share/u-boot/tinker-rk3288/u-boot.img
 share/u-boot/turris_omnia/