On Fri, Sep 27, 2019 at 10:12:31AM +1000, Jonathan Gray wrote:
> On Thu, Sep 26, 2019 at 12:28:56PM -0400, Kurt Miller wrote:
> > I've been trying to get the rock64 to work with u-boot 2019.10rc4
> > with the help of solene@ and a motivated user with this board.
> > (I don't have one to test with). The Rock64 is close to fully
> > working with 2019.10rc4 u-boot but is experiencing a similar issue
> > to what NetBSD has reported on the u-boot list.
> > 
> > https://marc.info/?t=156888926600002&r=1&w=2
> > 
> > When booting miniroot66.fs with the u-boot TPL the install
> > eventually fails with a kernel panic as seen below on
> > solene@'s board. Using rkbin TPL the install completes
> > and the resulting system appears stable in light testing.
> > 
> > I have attached the diffs I'm using to the ports
> > sysutils/arm-trusted-firmware and sysutils/u-boot.
> > I modified the u-boot port to build idbloader with both
> > u-boot TPL and rkbin TPL.
> 
> It isn't clear what the license on rkbin is.  It is binary only but does
> it allow distribution?
> 
> U-Boot 2019.10-rc4 also won't build am335x_evm SPL with our current
> linaro-gcc port as it overflows the space.
> 
> here is the diff I have in my tree, which lacks the rockpro64 dts change
> (and has no rock64 bits):

with the dts change, and a fix for a cubox regression
requires gcc-linaro update on ports

Index: Makefile
===================================================================
RCS file: /cvs/ports/sysutils/u-boot/Makefile,v
retrieving revision 1.58
diff -u -p -r1.58 Makefile
--- Makefile    22 Sep 2019 09:39:28 -0000      1.58
+++ Makefile    24 Sep 2019 04:45:44 -0000
@@ -6,8 +6,7 @@ FLAVORS=        aarch64 arm
 FLAVOR?=       arm
 
 COMMENT=       U-Boot firmware
-VERSION=       2019.07
-REVISION=      2
+VERSION=       2019.10-rc4
 DISTNAME=      u-boot-${VERSION}
 PKGNAME=       u-boot-${FLAVOR}-${VERSION:S/-//}
 FULLPKGNAME=   ${PKGNAME}
@@ -69,7 +68,9 @@ BOARDS=\
        mvebu_espressobin-88f3720 \
        mvebu_mcbin-88f8040 \
        qemu_arm64 \
-       rpi_3
+       rockpro64-rk3399 \
+       rpi_3 \
+       rpi_4
 .elif "${FLAVOR}" == "arm"
 OMAP=\
        omap4_panda \
@@ -160,7 +161,7 @@ do-build:
                idbloader.img && \
            cat spl/u-boot-spl-dtb.bin >> idbloader.img
 .endif
-.if "${BOARD}" == "firefly-rk3399"
+.if "${BOARD}" == "firefly-rk3399" || "${BOARD}" == "rockpro64-rk3399"
        cd ${WRKSRC}/build/${BOARD} && \
            ${SETENV} ${MAKE_ENV} BL31=${RK3399_BL31} ${MAKE_PROGRAM} \
                ${MAKE_FLAGS} O="build/${BOARD}" \
Index: distinfo
===================================================================
RCS file: /cvs/ports/sysutils/u-boot/distinfo,v
retrieving revision 1.26
diff -u -p -r1.26 distinfo
--- distinfo    28 Jul 2019 06:57:19 -0000      1.26
+++ distinfo    24 Sep 2019 04:46:34 -0000
@@ -1,2 +1,2 @@
-SHA256 (u-boot-2019.07.tar.bz2) = v/T6d+jaF1IcAwykxblHoFbBsb5NPm7oY3AguNUCUdA=
-SIZE (u-boot-2019.07.tar.bz2) = 13939667
+SHA256 (u-boot-2019.10-rc4.tar.bz2) = 
UodcaScUACoHBKIMMKno/wMuPP3hoI887kbPPXgMUIE=
+SIZE (u-boot-2019.10-rc4.tar.bz2) = 14213595
Index: patches/patch-arch_arm_dts_rk3399-rockpro64_dts
===================================================================
RCS file: patches/patch-arch_arm_dts_rk3399-rockpro64_dts
diff -N patches/patch-arch_arm_dts_rk3399-rockpro64_dts
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-arch_arm_dts_rk3399-rockpro64_dts     27 Sep 2019 06:00:27 
-0000
@@ -0,0 +1,14 @@
+$OpenBSD$
+
+Index: arch/arm/dts/rk3399-rockpro64.dts
+--- arch/arm/dts/rk3399-rockpro64.dts.orig
++++ arch/arm/dts/rk3399-rockpro64.dts
+@@ -15,7 +15,7 @@
+       compatible = "pine64,rockpro64", "rockchip,rk3399";
+ 
+       chosen {
+-              stdout-path = "serial2:1500000n8";
++              stdout-path = "serial2:115200n8";
+       };
+ 
+       clkin_gmac: external-gmac-clock {
Index: patches/patch-arch_arm_mach-imx_spl_c
===================================================================
RCS file: patches/patch-arch_arm_mach-imx_spl_c
diff -N patches/patch-arch_arm_mach-imx_spl_c
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-arch_arm_mach-imx_spl_c       27 Sep 2019 09:46:56 -0000
@@ -0,0 +1,34 @@
+$OpenBSD$
+
+revert 14d319b1856b86e593e01abd0a1e3c2d63b52a8a
+spl: imx6: Let spl_boot_device return USDHC1 or USDHC2
+
+breaks cubox
+
+Index: arch/arm/mach-imx/spl.c
+--- arch/arm/mach-imx/spl.c.orig
++++ arch/arm/mach-imx/spl.c
+@@ -24,7 +24,6 @@ u32 spl_boot_device(void)
+ {
+       unsigned int bmode = readl(&src_base->sbmr2);
+       u32 reg = imx6_src_get_boot_mode();
+-      u32 mmc_index = ((reg >> 11) & 0x03);
+ 
+       /*
+        * Check for BMODE if serial downloader is enabled
+@@ -85,12 +84,11 @@ u32 spl_boot_device(void)
+       /* SD/eSD: 8.5.3, Table 8-15  */
+       case IMX6_BMODE_SD:
+       case IMX6_BMODE_ESD:
++              return BOOT_DEVICE_MMC1;
++      /* MMC/eMMC: 8.5.3 */
+       case IMX6_BMODE_MMC:
+       case IMX6_BMODE_EMMC:
+-              if (mmc_index == 1)
+-                      return BOOT_DEVICE_MMC2;
+-              else
+-                      return BOOT_DEVICE_MMC1;
++              return BOOT_DEVICE_MMC1;
+       /* NAND Flash: 8.5.2, Table 8-10 */
+       case IMX6_BMODE_NAND_MIN ... IMX6_BMODE_NAND_MAX:
+               return BOOT_DEVICE_NAND;
Index: patches/patch-configs_firefly-rk3399_defconfig
===================================================================
RCS file: 
/cvs/ports/sysutils/u-boot/patches/patch-configs_firefly-rk3399_defconfig,v
retrieving revision 1.2
diff -u -p -r1.2 patch-configs_firefly-rk3399_defconfig
--- patches/patch-configs_firefly-rk3399_defconfig      28 Jul 2019 06:57:20 
-0000      1.2
+++ patches/patch-configs_firefly-rk3399_defconfig      24 Sep 2019 04:53:39 
-0000
@@ -3,7 +3,7 @@ $OpenBSD: patch-configs_firefly-rk3399_d
 Index: configs/firefly-rk3399_defconfig
 --- configs/firefly-rk3399_defconfig.orig
 +++ configs/firefly-rk3399_defconfig
-@@ -42,7 +42,7 @@ CONFIG_PMIC_RK8XX=y
+@@ -40,7 +40,7 @@ CONFIG_PMIC_RK8XX=y
  CONFIG_REGULATOR_PWM=y
  CONFIG_REGULATOR_RK8XX=y
  CONFIG_PWM_ROCKCHIP=y
Index: patches/patch-configs_rockpro64-rk3399_defconfig
===================================================================
RCS file: 
/cvs/ports/sysutils/u-boot/patches/patch-configs_rockpro64-rk3399_defconfig,v
retrieving revision 1.1
diff -u -p -r1.1 patch-configs_rockpro64-rk3399_defconfig
--- patches/patch-configs_rockpro64-rk3399_defconfig    28 Jul 2019 06:57:20 
-0000      1.1
+++ patches/patch-configs_rockpro64-rk3399_defconfig    24 Sep 2019 04:53:42 
-0000
@@ -3,10 +3,10 @@ $OpenBSD: patch-configs_rockpro64-rk3399
 Index: configs/rockpro64-rk3399_defconfig
 --- configs/rockpro64-rk3399_defconfig.orig
 +++ configs/rockpro64-rk3399_defconfig
-@@ -41,7 +41,7 @@ CONFIG_PMIC_RK8XX=y
- CONFIG_REGULATOR_PWM=y
+@@ -43,7 +43,7 @@ CONFIG_REGULATOR_PWM=y
  CONFIG_REGULATOR_RK8XX=y
  CONFIG_PWM_ROCKCHIP=y
+ CONFIG_RAM_RK3399_LPDDR4=y
 -CONFIG_BAUDRATE=1500000
 +CONFIG_BAUDRATE=115200
  CONFIG_DEBUG_UART_SHIFT=2
Index: patches/patch-configs_rpi_2_defconfig
===================================================================
RCS file: /cvs/ports/sysutils/u-boot/patches/patch-configs_rpi_2_defconfig,v
retrieving revision 1.6
diff -u -p -r1.6 patch-configs_rpi_2_defconfig
--- patches/patch-configs_rpi_2_defconfig       15 Jan 2019 05:44:18 -0000      
1.6
+++ patches/patch-configs_rpi_2_defconfig       24 Sep 2019 04:53:45 -0000
@@ -19,7 +19,7 @@ to variants of RPi hardware.
 Index: configs/rpi_2_defconfig
 --- configs/rpi_2_defconfig.orig
 +++ configs/rpi_2_defconfig
-@@ -14,7 +14,7 @@ CONFIG_CMD_GPIO=y
+@@ -17,7 +17,7 @@ CONFIG_CMD_GPIO=y
  CONFIG_CMD_MMC=y
  CONFIG_CMD_USB=y
  CONFIG_CMD_FS_UUID=y
Index: patches/patch-configs_rpi_3_32b_defconfig
===================================================================
RCS file: /cvs/ports/sysutils/u-boot/patches/patch-configs_rpi_3_32b_defconfig,v
retrieving revision 1.6
diff -u -p -r1.6 patch-configs_rpi_3_32b_defconfig
--- patches/patch-configs_rpi_3_32b_defconfig   15 Jan 2019 05:44:18 -0000      
1.6
+++ patches/patch-configs_rpi_3_32b_defconfig   24 Sep 2019 04:53:47 -0000
@@ -19,7 +19,7 @@ to variants of RPi hardware.
 Index: configs/rpi_3_32b_defconfig
 --- configs/rpi_3_32b_defconfig.orig
 +++ configs/rpi_3_32b_defconfig
-@@ -15,7 +15,7 @@ CONFIG_CMD_GPIO=y
+@@ -18,7 +18,7 @@ CONFIG_CMD_GPIO=y
  CONFIG_CMD_MMC=y
  CONFIG_CMD_USB=y
  CONFIG_CMD_FS_UUID=y
Index: patches/patch-configs_rpi_3_defconfig
===================================================================
RCS file: /cvs/ports/sysutils/u-boot/patches/patch-configs_rpi_3_defconfig,v
retrieving revision 1.6
diff -u -p -r1.6 patch-configs_rpi_3_defconfig
--- patches/patch-configs_rpi_3_defconfig       15 Jan 2019 05:44:18 -0000      
1.6
+++ patches/patch-configs_rpi_3_defconfig       24 Sep 2019 04:53:51 -0000
@@ -19,7 +19,7 @@ to variants of RPi hardware.
 Index: configs/rpi_3_defconfig
 --- configs/rpi_3_defconfig.orig
 +++ configs/rpi_3_defconfig
-@@ -15,7 +15,7 @@ CONFIG_CMD_GPIO=y
+@@ -18,7 +18,7 @@ CONFIG_CMD_GPIO=y
  CONFIG_CMD_MMC=y
  CONFIG_CMD_USB=y
  CONFIG_CMD_FS_UUID=y
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
--- patches/patch-lib_efi_loader_efi_boottime_c 28 Jul 2019 06:57:20 -0000      
1.5
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,18 +0,0 @@
-$OpenBSD: patch-lib_efi_loader_efi_boottime_c,v 1.5 2019/07/28 06:57:20 jsg 
Exp $
-
-f69d63fae281ba98c3d063097cf4e95d17f3754d in 2019.04 and later stopped
-flushing/disabling caches on armv7 which is required to load
-OpenBSD/armv7 kernels 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: pkg/PFRAG.aarch64
===================================================================
RCS file: /cvs/ports/sysutils/u-boot/pkg/PFRAG.aarch64,v
retrieving revision 1.12
diff -u -p -r1.12 PFRAG.aarch64
--- pkg/PFRAG.aarch64   30 Jul 2019 17:55:47 -0000      1.12
+++ pkg/PFRAG.aarch64   24 Sep 2019 05:35:56 -0000
@@ -86,9 +86,18 @@ share/u-boot/pinebook/u-boot.itb
 share/u-boot/qemu_arm64/
 share/u-boot/qemu_arm64/u-boot
 share/u-boot/qemu_arm64/u-boot.bin
+share/u-boot/rockpro64-rk3399/
+share/u-boot/rockpro64-rk3399/idbloader.img
+share/u-boot/rockpro64-rk3399/u-boot
+share/u-boot/rockpro64-rk3399/u-boot.bin
+share/u-boot/rockpro64-rk3399/u-boot.img
+share/u-boot/rockpro64-rk3399/u-boot.itb
 share/u-boot/rpi_3/
 share/u-boot/rpi_3/u-boot
 share/u-boot/rpi_3/u-boot.bin
+share/u-boot/rpi_4/
+share/u-boot/rpi_4/u-boot
+share/u-boot/rpi_4/u-boot.bin
 share/u-boot/sopine_baseboard/
 share/u-boot/sopine_baseboard/sunxi-spl.bin
 share/u-boot/sopine_baseboard/u-boot
Index: pkg/PFRAG.arm
===================================================================
RCS file: /cvs/ports/sysutils/u-boot/pkg/PFRAG.arm,v
retrieving revision 1.19
diff -u -p -r1.19 PFRAG.arm
--- pkg/PFRAG.arm       5 Sep 2019 16:23:49 -0000       1.19
+++ pkg/PFRAG.arm       27 Sep 2019 07:43:13 -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

Reply via email to