u-boot 2019.10rc4 on rock64

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

u-boot 2019.10rc4 on rock64

Kurt Miller-3
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.

Firmware built using the attached diffs are available
here:

http://www.intricatesoftware.com/distfiles/rock64-rk3328-2019.10rc4.zip

Connected to /dev/cuaU0 (speed 115200)

U-Boot TPL 2019.10-rc4 (Sep 26 2019 - 11:15:39)
LPDDR3
Trying to boot from BOOTROM
Returning to boot ROM...

U-Boot SPL 2019.10-rc4 (Sep 26 2019 - 11:15:39 -0400)
Trying to boot from MMC2
Card did not respond to voltage select!
spl: mmc init failed with error: -95
Trying to boot from MMC1
NOTICE:  BL31: v2.1(debug):2.1
NOTICE:  BL31: Built : 09:56:58, Sep 26 2019
ERROR:   over or zero region, nr=4187432, max=10
NOTICE:  BL31:Rockchip release version: v1.2
INFO:    ARM GICv2 driver initialized
INFO:    plat_rockchip_pmu_init: pd status 0xe
INFO:    BL31: Initializing runtime services
WARNING: BL31: cortex_a53: CPU workaround for 819472 was missing!
WARNING: BL31: cortex_a53: CPU workaround for 824069 was missing!
WARNING: BL31: cortex_a53: CPU workaround for 827319 was missing!
WARNING: BL31: cortex_a53: CPU workaround for 855873 was missing!
INFO:    BL31: Preparing for EL3 exit to normal world
INFO:    Entry point address = 0x200000
INFO:    SPSR = 0x3c9


U-Boot 2019.10-rc4 (Sep 26 2019 - 11:16:41 -0400)

Model: Pine64 Rock64
DRAM:  4 GiB
MMC:   rksdmmc@ff500000: 1, rksdmmc@ff520000: 0
Loading Environment from MMC... *** Warning - bad CRC, using default environment

In:    serial@ff130000
Out:   serial@ff130000
Err:   serial@ff130000
Model: Pine64 Rock64
Net:
Warning: ethernet@ff540000 (eth0) using random MAC address - 72:65:27:40:fe:aa
eth0: ethernet@ff540000
Hit any key to stop autoboot:  0
Card did not respond to voltage select!
switch to partitions #0, OK
mmc1 is current device
Scanning mmc 1:1...
Found EFI removable media binary efi/boot/bootaa64.efi
libfdt fdt_check_header(): FDT_ERR_BADMAGIC
Scanning disk [hidden email]...
Card did not respond to voltage select!
Scanning disk [hidden email]...
Disk [hidden email] not ready
Found 3 disks
BootOrder not defined
EFI boot manager: Cannot load any image
161090 bytes read in 14 ms (11 MiB/s)
libfdt fdt_check_header(): FDT_ERR_BADMAGIC
disks: sd0*
>> OpenBSD/arm64 BOOTAA64 0.19
boot>
cannot open sd0a:/etc/random.seed: No such file or directory
booting sd0a:/bsd: 2216420+622204+8773032+739536 [221782+109+519144+200723]=0xff8900
type 0x2 pa 0x200000 va 0x200000 pages 0x4000 attr 0x8
type 0x7 pa 0x4200000 va 0x4200000 pages 0x3ef4 attr 0x8
type 0x4 pa 0x80f4000 va 0x80f4000 pages 0x18 attr 0x8
type 0x7 pa 0x810c000 va 0x810c000 pages 0xf30b0 attr 0x8
type 0x2 pa 0xfb1bc000 va 0xfb1bc000 pages 0xc30 attr 0x8
type 0x4 pa 0xfbdec000 va 0xfbdec000 pages 0x1 attr 0x8
type 0x2 pa 0xfbded000 va 0xfbded000 pages 0x3 attr 0x8
type 0x7 pa 0xfbdf0000 va 0xfbdf0000 pages 0x1 attr 0x8
type 0x2 pa 0xfbdf1000 va 0xfbdf1000 pages 0x100 attr 0x8
type 0x1 pa 0xfbef1000 va 0xfbef1000 pages 0x28 attr 0x8
type 0x0 pa 0xfbf19000 va 0xfbf19000 pages 0x7 attr 0x8
type 0x4 pa 0xfbf20000 va 0xfbf20000 pages 0x1 attr 0x8
type 0x6 pa 0xfbf21000 va 0x3e024be000 pages 0x1 attr 0x8000000000000008
type 0x4 pa 0xfbf22000 va 0xfbf22000 pages 0x2 attr 0x8
type 0x0 pa 0xfbf24000 va 0xfbf24000 pages 0x4 attr 0x8
type 0x4 pa 0xfbf28000 va 0xfbf28000 pages 0x2 attr 0x8
type 0x6 pa 0xfbf2a000 va 0x3e024c7000 pages 0x1 attr 0x8000000000000008
type 0x2 pa 0xfbf2b000 va 0xfbf2b000 pages 0x3005 attr 0x8
type 0x5 pa 0xfef30000 va 0x3e054cd000 pages 0x10 attr 0x8000000000000008
type 0x2 pa 0xfef40000 va 0xfef40000 pages 0xc0 attr 0x8
Copyright (c) 1982, 1986, 1989, 1991, 1993
        The Regents of the University of California.  All rights reserved.
Copyright (c) 1995-2019 OpenBSD. All rights reserved.  https://www.OpenBSD.org

OpenBSD 6.6-beta (RAMDISK) #227: Wed Sep 25 16:09:45 MDT 2019
    [hidden email]:/usr/src/sys/arch/arm64/compile/RAMDISK
real mem  = 4210704384 (4015MB)
avail mem = 4004077568 (3818MB)
mainbus0 at root: Pine64 Rock64
cpu0 at mainbus0 mpidr 0: ARM Cortex-A53 r0p4
cpu0: 32KB 64b/line 2-way L1 VIPT I-cache, 32KB 64b/line 4-way L1 D-cache
cpu0: 256KB 64b/line 16-way L2 cache
efi0 at mainbus0: UEFI 2.8
efi0: Das U-Boot rev 0x20191000
psci0 at mainbus0: PSCI 1.1, SMCCC 1.1
syscon0 at mainbus0: "syscon"
"io-domains" at syscon0 not configured
syscon1 at mainbus0: "power-management"
rkclock0 at mainbus0
rkclock_set_parent: 0x000000b4
rkclock_set_frequency: 0x000000c4
rkclock_set_frequency: 0x000000c5
rkclock_set_frequency: 0x000000ca
rkclock_set_frequency: 0x000000c1
rkclock_set_frequency: 0x000000bf
rkclock_set_frequency: 0x000000c6
rkclock_set_frequency: 0x000000c8
rkclock_set_frequency: 0x000000c9
rkclock_set_frequency: 0x000000c4
rkclock_set_frequency: 0x000001ac
rkclock_set_frequency: 0x0000013c
rkclock_set_frequency: 0x000000c5
rkclock_set_frequency: 0x00000198
rkclock_set_frequency: 0x0000014a
rkclock_set_frequency: 0x000000ca
rkclock_set_frequency: 0x000001a9
rkclock_set_frequency: 0x000000c1
rkclock_set_frequency: 0x00000045
rkclock_set_frequency: 0x000000bf
rkclock_set_frequency: 0x000000c6
rkclock_set_frequency: 0x000000c8
rkclock_set_frequency: 0x000000c9
rkclock_set_frequency: 0x0000003e
rkclock_set_frequency: 0x00000149
rkclock_set_frequency: 0x000000ce
rkclock_set_frequency: 0x00000140
rkclock_set_frequency: 0x00000061
ampintc0 at mainbus0 nirq 160, ncpu 4: "interrupt-controller"
rkpinctrl0 at mainbus0: "pinctrl"
rkgpio0 at rkpinctrl0
rkgpio1 at rkpinctrl0
rkgpio2 at rkpinctrl0
rkgpio3 at rkpinctrl0
"fit-images" at mainbus0 not configured
"opp_table0" at mainbus0 not configured
agtimer0 at mainbus0: tick rate 24000 KHz
"xin24m" at mainbus0 not configured
com0 at mainbus0: ns16550, no working fifo
com0: console
rkiic0 at mainbus0
iic0 at rkiic0
rkpmic0 at iic0 addr 0x18: RK805
"spi" at mainbus0 not configured
simplebus0 at mainbus0: "amba"
"dmac" at simplebus0 not configured
dwmmc0 at mainbus0: 50 MHz base clock
sdmmc0 at dwmmc0: 4-bit, sd high-speed, mmc high-speed, dma
dwmmc1 at mainbus0: 50 MHz base clock
sdmmc1 at dwmmc1: 8-bit, mmc high-speed, dma
dwge0 at mainbus0
dwge0: address: 72:65:27:40:fe:aa
rgephy0 at dwge0 phy 0: RTL8169S/8110S/8211 PHY, rev. 6
ehci0 at mainbus0
usb0 at ehci0: USB revision 2.0
uhub0 at usb0 configuration 1 interface 0 "Generic EHCI root hub" rev 2.00/1.00 addr 1
ohci0 at mainbus0: version 1.0
"usb" at mainbus0 not configured
"external-gmac-clock" at mainbus0 not configured
"sdmmc-regulator" at mainbus0 not configured
"vcc-host-5v-regulator" at mainbus0 not configured
"vcc-sys" at mainbus0 not configured
"dmc" at mainbus0 not configured
"usb" at mainbus0 not configured
usb1 at ohci0: USB revision 1.0
uhub1 at usb1 configuration 1 interface 0 "Generic OHCI root hub" rev 1.00/1.00 addr 1
scsibus0 at sdmmc0: 2 targets, initiator 0
sd0 at scsibus0 targ 1 lun 0: <SD/MMC, SC32G, 0080> removable
sd0: 30436MB, 512 bytes/sector, 62333952 sectors
sdmmc1: can't enable card
softraid0 at root
scsibus1 at softraid0: 256 targets
bootfile: sd0a:/bsd
boot device: sd0
root on rd0a swap on rd0b dump on rd0b
WARNING: preposterous clock chip time
WARNING: CHECK AND RESET THE DATE!
cpu0: clock not implemented
erase ^?, werase ^W, kill ^U, intr ^C, status ^T

Welcome to the OpenBSD/arm64 6.6 installation program.
(I)nstall, (U)pgrade, (A)utoinstall or (S)hell? i
At any prompt except password prompts you can escape to a shell by
typing '!'. Default answers are shown in []'s and are selected by
pressing RETURN.  You can exit this program at any time by pressing
Control-C, but this can leave your system in an inconsistent state.

Terminal type? [vt220]
System hostname? (short form, e.g. 'foo') test

Available network interfaces are: dwge0 vlan0.
Which network interface do you wish to configure? (or 'done') [dwge0]
IPv4 address for dwge0? (or 'dhcp' or 'none') [dhcp]
dwge0: 192.168.1.92 lease accepted from 192.168.1.254 (b8:d9:4d:c3:50:0c)
IPv6 address for dwge0? (or 'autoconf' or 'none') [none]
Available network interfaces are: dwge0 vlan0.
Which network interface do you wish to configure? (or 'done') [done]
Using DNS domainname lan
Using DNS nameservers at 192.168.1.254

Password for root account? (will not echo)
Password for root account? (again)
The root password must be set.
Password for root account? (will not echo)
Password for root account? (again)
Start sshd(8) by default? [yes]
Setup a user? (enter a lower-case loginname, or 'no') [no]
Since no user was setup, root logins via sshd(8) might be useful.
WARNING: root is targeted by password guessing attacks, pubkeys are safer.
Allow root ssh login? (yes, no, prohibit-password) [no]
What timezone are you in? ('?' for list) [Europe/Paris]

Available disks are: sd0.
Which disk is the root disk? ('?' for details) [sd0]
Disk: sd0       geometry: 3880/255/63 [62333952 Sectors]
Offset: 0       Signature: 0xAA55
            Starting         Ending         LBA Info:
 #: id      C   H   S -      C   H   S [       start:        size ]
-------------------------------------------------------------------------------
*0: 0C      2  10   9 -      2 140  10 [       32768:        8192 ] FAT32L
 1: 00      0   0   0 -      0   0   0 [           0:           0 ] unused
 2: 00      0   0   0 -      0   0   0 [           0:           0 ] unused
 3: A6      2 140  11 -      4  52  48 [       40960:       26624 ] OpenBSD
Use (W)hole disk or (E)dit the MBR? [whole]
Creating a msdos partition and an OpenBSD partition for rest of sd0...done.
/dev/rsd0i: 32668 sectors in 8167 FAT16 clusters (2048 bytes/cluster)
bps=512 spc=4 res=1 nft=2 rde=512 mid=0xf8 spf=32 spt=63 hds=255 hid=32768 bsec=32768
The auto-allocated layout for sd0 is:
#                size           offset  fstype [fsize bsize   cpg]
  a:          1024.0M            65536  4.2BSD   2048 16384     1 # /
  b:          2042.2M          2162688    swap
  c:         30436.5M                0  unused
  d:          1689.8M          6345216  4.2BSD   2048 16384     1 # /tmp
  e:          2630.9M          9805888  4.2BSD   2048 16384     1 # /var
  f:          2481.1M         15193984  4.2BSD   2048 16384     1 # /usr
  g:           972.7M         20275296  4.2BSD   2048 16384     1 # /usr/X11R6
  h:          3967.4M         22267328  4.2BSD   2048 16384     1 # /usr/local
  i:            16.0M            32768   MSDOS
  j:          1692.4M         30392480  4.2BSD   2048 16384     1 # /usr/src
  k:          5904.9M         33858592  4.2BSD   2048 16384     1 # /usr/obj
  l:          7999.1M         45951808  4.2BSD   2048 16384     1 # /home
Use (A)uto layout, (E)dit auto layout, or create (C)ustom layout? [a]
/dev/rsd0a: 1024.0MB in 2097152 sectors of 512 bytes
6 cylinder groups of 202.47MB, 12958 blocks, 25984 inodes each
/dev/rsd0l: 7999.1MB in 16382144 sectors of 512 bytes
40 cylinder groups of 202.47MB, 12958 blocks, 25984 inodes each
/dev/rsd0d: 1689.8MB in 3460672 sectors of 512 bytes
9 cylinder groups of 202.47MB, 12958 blocks, 25984 inodes each
/dev/rsd0f: 2481.1MB in 5081312 sectors of 512 bytes
13 cylinder groups of 202.47MB, 12958 blocks, 25984 inodes each
/dev/rsd0g: 972.7MB in 1992032 sectors of 512 bytes
5 cylinder groups of 202.47MB, 12958 blocks, 25984 inodes each
/dev/rsd0h: 3967.4MB in 8125152 sectors of 512 bytes
20 cylinder groups of 202.47MB, 12958 blocks, 25984 inodes each
/dev/rsd0k: 5904.9MB in 12093216 sectors of 512 bytes
30 cylinder groups of 202.47MB, 12958 blocks, 25984 inodes each
/dev/rsd0j: 1692.4MB in 3466112 sectors of 512 bytes
9 cylinder groups of 202.47MB, 12958 blocks, 25984 inodes each
/dev/rsd0e: 2630.9MB in 5388096 sectors of 512 bytes
13 cylinder groups of 202.47MB, 12958 blocks, 25984 inodes each
/dev/sd0a (f8aaba33196230fb.a) on /mnt type ffs (rw, asynchronous, local)
/dev/sd0l (f8aaba33196230fb.l) on /mnt/home type ffs (rw, asynchronous, local, nodev, nosuid)
/dev/sd0d (f8aaba33196230fb.d) on /mnt/tmp type ffs (rw, asynchronous, local, nodev, nosuid)
/dev/sd0f (f8aaba33196230fb.f) on /mnt/usr type ffs (rw, asynchronous, local, nodev)
/dev/sd0g (f8aaba33196230fb.g) on /mnt/usr/X11R6 type ffs (rw, asynchronous, local, nodev)
/dev/sd0h (f8aaba33196230fb.h) on /mnt/usr/local type ffs (rw, asynchronous, local, nodev)
/dev/sd0k (f8aaba33196230fb.k) on /mnt/usr/obj type ffs (rw, asynchronous, local, nodev, nosuid)
/dev/sd0j (f8aaba33196230fb.j) on /mnt/usr/src type ffs (rw, asynchronous, local, nodev, nosuid)
/dev/sd0e (f8aaba33196230fb.e) on /mnt/var type ffs (rw, asynchronous, local, nodev, nosuid)

Let's install the sets!
Location of sets? (disk http nfs or 'done') [http] panic: pool_do_get: anonpl free list modified: page
0xffffff800ba20000; item addr 0xffffff800ba20240; offset 0x0=0xc789c1ed4ba3ab7b != 0xc789c1ed4ba3abfb
syncing disks...4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4


rockchip.diffs (22K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: u-boot 2019.10rc4 on rock64

Jonathan Gray-11
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):

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-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

Reply | Threaded
Open this post in threaded view
|

Re: u-boot 2019.10rc4 on rock64

Kurt Miller-3
On Fri, 2019-09-27 at 10:12 +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?

Yea, there's no license at all and no matter how much digging
I do, I can't find one.

Mostly I was trying to point out that the rock64 board is
having the same issues that NetBSD is having with the TPL
layer in the forthcoming 2019.10 release and providing a
way for people with the Rock64 board to verify it.

I'm not sure if there's much I can do to get the TPL layer
fixed but it would be great if the 2019.10 release could
replace the 2017.09-rockchip-ayufan firmware that most
people are using and doesn't work all that well on OpenBSD.

Although I think the sysutils/arm-trusted-firmware change
could go in now, since the BL31 layer for rk3328 has been
confirmed to work by two people and it removes one more
binary blob for that board.

-Kurt

Reply | Threaded
Open this post in threaded view
|

Re: u-boot 2019.10rc4 on rock64

Jonathan Gray-11
On Thu, Sep 26, 2019 at 09:38:43PM -0400, Kurt Miller wrote:

> On Fri, 2019-09-27 at 10:12 +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?
>
> Yea, there's no license at all and no matter how much digging
> I do, I can't find one.
>
> Mostly I was trying to point out that the rock64 board is
> having the same issues that NetBSD is having with the TPL
> layer in the forthcoming 2019.10 release and providing a
> way for people with the Rock64 board to verify it.
>
> I'm not sure if there's much I can do to get the TPL layer
> fixed but it would be great if the 2019.10 release could
> replace the 2017.09-rockchip-ayufan firmware that most
> people are using and doesn't work all that well on OpenBSD.
>
> Although I think the sysutils/arm-trusted-firmware change
> could go in now, since the BL31 layer for rk3328 has been
> confirmed to work by two people and it removes one more
> binary blob for that board.

Yes, I think you should commit the arm-trusted-firmware change.

For U-Boot I would like to get rockpro64 support without breaking the
other targets.  I will see if updating linaro gcc to a newer release
gives smaller codesize for the am335x SPL.

Perhaps we wait for rock64 support in U-Boot to work without depending
on rkbin.

Reply | Threaded
Open this post in threaded view
|

Re: u-boot 2019.10rc4 on rock64

Jonathan Gray-11
In reply to this post by Jonathan Gray-11
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 | Threaded
Open this post in threaded view
|

Re: u-boot 2019.10rc4 on rock64

Kurt Miller-3
In reply to this post by Jonathan Gray-11
On Fri, 2019-09-27 at 11:50 +1000, Jonathan Gray wrote:

> On Thu, Sep 26, 2019 at 09:38:43PM -0400, Kurt Miller wrote:
> >
> > On Fri, 2019-09-27 at 10:12 +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?
> > Yea, there's no license at all and no matter how much digging
> > I do, I can't find one.
> >
> > Mostly I was trying to point out that the rock64 board is
> > having the same issues that NetBSD is having with the TPL
> > layer in the forthcoming 2019.10 release and providing a
> > way for people with the Rock64 board to verify it.
> >
> > I'm not sure if there's much I can do to get the TPL layer
> > fixed but it would be great if the 2019.10 release could
> > replace the 2017.09-rockchip-ayufan firmware that most
> > people are using and doesn't work all that well on OpenBSD.
> >
> > Although I think the sysutils/arm-trusted-firmware change
> > could go in now, since the BL31 layer for rk3328 has been
> > confirmed to work by two people and it removes one more
> > binary blob for that board.
> Yes, I think you should commit the arm-trusted-firmware change.
>
> For U-Boot I would like to get rockpro64 support without breaking the
> other targets.  I will see if updating linaro gcc to a newer release
> gives smaller codesize for the am335x SPL.
>
> Perhaps we wait for rock64 support in U-Boot to work without depending
> on rkbin.

Yea, lets see how things play out. 

An alternative if the TPL issues are not fixed would be
to provide the mkimage tool and u-boot-spl-dtb.bin for
boards with TPL issues like rock64 and rockpro64 so that
a user could combine the rkbin TPL with the SPL to create a
working idbloader.img.

Another thing I noticed is that the mkimage tool needed to
prepare the rkbin TPL/memory files for use is the same for
many of the boards we build on aarch64. 

ls build/*/tools/mkimage | xargs md5 
MD5 (build/a64-olinuxino/tools/mkimage) = 0a4e12767bf11ec4503a079c25dc0c6f
MD5 (build/bananapi_m64/tools/mkimage) = 0a4e12767bf11ec4503a079c25dc0c6f
MD5 (build/firefly-rk3399/tools/mkimage) = 0a4e12767bf11ec4503a079c25dc0c6f
MD5 (build/mvebu_espressobin-88f3720/tools/mkimage) = 41ee34de89f48092109e9058cc167aae
MD5 (build/mvebu_mcbin-88f8040/tools/mkimage) = 41ee34de89f48092109e9058cc167aae
MD5 (build/nanopi_a64/tools/mkimage) = 0a4e12767bf11ec4503a079c25dc0c6f
MD5 (build/nanopi_neo2/tools/mkimage) = 0a4e12767bf11ec4503a079c25dc0c6f
MD5 (build/orangepi_pc2/tools/mkimage) = 0a4e12767bf11ec4503a079c25dc0c6f
MD5 (build/orangepi_prime/tools/mkimage) = 0a4e12767bf11ec4503a079c25dc0c6f
MD5 (build/orangepi_win/tools/mkimage) = 0a4e12767bf11ec4503a079c25dc0c6f
MD5 (build/pine64-lts/tools/mkimage) = 0a4e12767bf11ec4503a079c25dc0c6f
MD5 (build/pine64_plus/tools/mkimage) = 0a4e12767bf11ec4503a079c25dc0c6f
MD5 (build/pinebook/tools/mkimage) = 0a4e12767bf11ec4503a079c25dc0c6f
MD5 (build/qemu_arm64/tools/mkimage) = 41ee34de89f48092109e9058cc167aae
MD5 (build/rock64-rk3328/tools/mkimage) = 0a4e12767bf11ec4503a079c25dc0c6f
MD5 (build/rockpro64-rk3399/tools/mkimage) = 0a4e12767bf11ec4503a079c25dc0c6f
MD5 (build/rpi_3/tools/mkimage) = 41ee34de89f48092109e9058cc167aae
MD5 (build/sopine_baseboard/tools/mkimage) = 0a4e12767bf11ec4503a079c25dc0c6f

There appears to be only two variations in that list.

-Kurt

Reply | Threaded
Open this post in threaded view
|

Re: u-boot 2019.10rc4 on rock64

Mark Kettenis
In reply to this post by Kurt Miller-3
> From: Kurt Miller <[hidden email]>
> Date: Thu, 26 Sep 2019 12:28:56 -0400

...

> rkclock0 at mainbus0
> rkclock_set_parent: 0x000000b4
> rkclock_set_frequency: 0x000000c4
> rkclock_set_frequency: 0x000000c5
> rkclock_set_frequency: 0x000000ca
> rkclock_set_frequency: 0x000000c1
> rkclock_set_frequency: 0x000000bf
> rkclock_set_frequency: 0x000000c6
> rkclock_set_frequency: 0x000000c8
> rkclock_set_frequency: 0x000000c9
> rkclock_set_frequency: 0x000000c4
> rkclock_set_frequency: 0x000001ac
> rkclock_set_frequency: 0x0000013c
> rkclock_set_frequency: 0x000000c5
> rkclock_set_frequency: 0x00000198
> rkclock_set_frequency: 0x0000014a
> rkclock_set_frequency: 0x000000ca
> rkclock_set_frequency: 0x000001a9
> rkclock_set_frequency: 0x000000c1
> rkclock_set_frequency: 0x00000045
> rkclock_set_frequency: 0x000000bf
> rkclock_set_frequency: 0x000000c6
> rkclock_set_frequency: 0x000000c8
> rkclock_set_frequency: 0x000000c9
> rkclock_set_frequency: 0x0000003e
> rkclock_set_frequency: 0x00000149
> rkclock_set_frequency: 0x000000ce
> rkclock_set_frequency: 0x00000140
> rkclock_set_frequency: 0x00000061

So one issue here that U-Boot isn't using the correct clock binding.
So the numbers in the device tree don't match what our driver expects.
Using a device tree from Linux (i.e. from the dtb package) should
help.  But I've got no idea whether that actually fixes the issue.