RockPro64 booting w/ u-boot v2019-rc3

KIRIYAMA Kazuhiko kiri at truefc.org
Thu Oct 15 22:54:27 UTC 2020


Hi, list

I'm afraid of picking up too late topic, but I tried latest
version of u-boot of Pinebook pro according to this mail, so
I dare to report.

I've made boot image of Pinebook pro using idbloader.img and
u-boot.itb of sysutils/u-boot-pinebookpro as follows:

# mdconfig -a -t vnode -f FreeBSD-13.0-CURRENT-arm64-aarch64-PINEBOOKPRO-20201001-e18fc94e525-memstick.img
md0
# gpart destroy -F md0
md0 destroyed
# gpart create -s gpt md0
md0 created
# gpart add -b 32768 -t efi -s 66584 md0
md0p1 added
# gpart show md0
=>     40  2097072  md0  GPT  (1.0G)
       40    32728       - free -  (16M)
    32768    66584    1  efi  (33M)
    99352  1997760       - free -  (975M)

# gpart add -b 40 -t freebsd-boot -s 32728 md0
md0p2 added
# gpart show md0
=>     40  2097072  md0  GPT  (1.0G)
       40    32728    2  freebsd-boot  (16M)
    32768    66584    1  efi  (33M)
    99352  1997760       - free -  (975M)

# gpart add -t freebsd md0
md0s3 added
# gpart show md0
=>     40  2097072  md0  GPT  (1.0G)
       40    32728    2  freebsd-boot  (16M)
    32768    66584    1  efi  (33M)
    99352  1997760    3  freebsd  (975M)

# mdconfig -a -t vnode -f FreeBSD-13.0-CURRENT-arm64-aarch64-20201001-e18fc94e525-memstick.img
md1
# gpart show md1
=>      3  1655448  md1  GPT  (808M)
        3    66584    1  efi  (33M)
    66587  1588864    2  freebsd  (776M)

# dd if=/usr/local/share/u-boot/u-boot-pinebookpro/idbloader.img of=/dev/md0 seek=64 bs=512 conv=sync
322+0 records in
322+0 records out
164864 bytes transferred in 1.421807 secs (115954 bytes/sec)
# dd if=/usr/local/share/u-boot/u-boot-pinebookpro/u-boot.itb of=/dev/md0 seek=16384 bs=512 conv=sync
1800+0 records in
1800+0 records out
921600 bytes transferred in 8.740609 secs (105439 bytes/sec)
# dd if=/dev/md1p1 of=/dev/md0p1 bs=10240 conv=sync 
dd: /dev/md0p1: short write on character device
dd: /dev/md0p1: end of device
3330+0 records in
3329+1 records out
34091008 bytes transferred in 28.605167 secs (1191778 bytes/sec)
# dd if=/dev/md1s2 of=/dev/md0s3 bs=10240 conv=sync
79444+0 records in
79444+0 records out
813506560 bytes transferred in 681.676168 secs (1193392 bytes/sec)
# gpart show md0
=>     40  2097072  md0  GPT  (1.0G)
       40    32728    2  freebsd-boot  (16M)
    32768    66584    1  efi  (33M)
    99352  1997760    3  freebsd  (975M)

# 

And write FreeBSD-13.0-CURRENT-arm64-aarch64-PINEBOOKPRO-20201001-e18fc94e525-memstick.img
to micro SD, and put it into Pinebook pro sd slot and boot
it. But it could not boot with power led blinking.

Is there any progress about Pinebook pro u-boot issues ?

Best regards

On Mon, 16 Sep 2019 15:46:40 +0900,
jmg at funkthat.com (John-Mark Gurney) wrote:
> 
> I recently received my RockPro64, and w/ a bit of help from manu, I
> built a new u-boot firmware and get it booting from SD card.  The
> u-boot port firmware will boot, but receives an Unhandled System Error
> shortly after going to multiuser mode.
> 
> It doesn't yet set the PCIe slot.  Is anyone working on this?  If so,
> can you point me to code?  I'd like to get this working.
> 
> Building u-boot isn't hard, but finding the correct part to build took
> some help.
> 
> Possibly imcomplete list of packages used:
> aarch64-none-elf-binutils-2.32_1,1 GNU binutils for bare metal AArch64 cross-development
> aarch64-none-elf-gcc-6.4.0_6   Cross GNU Compiler Collection for aarch64noneelf
> atf-rk3399-v2.1                ARM TF-A for platform rk3399
> bison-3.4.1,1                  Parser generator from FSF, (mostly) compatible with Yacc
> dtc-1.4.7                      Device Tree Compiler
> gmake-4.2.1_3                  GNU version of 'make' utility
> gsed-4.7                       GNU stream editor
> python3-3_3                    The "meta-port" for version 3 of the Python interpreter
> 
> The default sed fails at one point, so used this patch:
> diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
> index ef116e0e0a..e0dedf8943 100644
> --- a/scripts/Makefile.lib
> +++ b/scripts/Makefile.lib
> @@ -302,7 +302,7 @@ cmd_dtc = mkdir -p $(dir ${dtc-tmp}) ; \
>                 -i $(dir $<) $(DTC_FLAGS) \
>                 -d $(depfile).dtc.tmp $(dtc-tmp) ; \
>         cat $(depfile).pre.tmp $(depfile).dtc.tmp > $(depfile) ; \
> -       sed -i "s:$(pre-tmp):$(<):" $(depfile)
> +       gsed -i "s:$(pre-tmp):$(<):" $(depfile)
> 
>  $(obj)/%.dtb: $(src)/%.dts FORCE
>         $(call if_changed_dep,dtc)
> 
> 
> There is also a failure on the config step, and needs this patch as
> well:
> diff --git a/scripts/config_whitelist.txt b/scripts/config_whitelist.txt
> index b18eab1707..3260c472b9 100644
> --- a/scripts/config_whitelist.txt
> +++ b/scripts/config_whitelist.txt
> @@ -3100,6 +3100,7 @@ CONFIG_SYS_MACB2_BASE
>  CONFIG_SYS_MACB3_BASE
>  CONFIG_SYS_MAIN_PWR_ON
>  CONFIG_SYS_MALLOC_BASE
> +CONFIG_SYS_MALLOC_CLEAR_ON_INIT
>  CONFIG_SYS_MALLOC_SIMPLE
>  CONFIG_SYS_MAMR
>  CONFIG_SYS_MAPLE
> 
> 
> And then built using the following commands:
> export BL31=/usr/local/share/atf-rk3399/bl31.elf
> gmake clean
> gmake rockpro64-rk3399_defconfig
> CROSS_COMPILE=aarch64-none-elf- gmake -j 4
> 
> I may have forgotten to include some steps.  After building, I
> installed the parts via:
> dd if=idbloader.img of=/dev/disk4 oseek=64 bs=512
> dd if=u-boot.itb of=/dev/disk4 oseek=16384 bs=512
> 
> I used FreeBSD-13.0-CURRENT-arm64-aarch64-20190906-r351901-memstick.img
> as a base, but it has the UEFI boot partition in this area, so I used
> mdconfig to extract the parts, and then expanded the image, created a
> new freebsd-boot partition to cover the space for the above, and then
> replaced the images...
> 
> =>      3  2111549  mmcsd0  GPT  (30G) [CORRUPT]
>         3    32765       2  freebsd-boot  (16M)
>     32768    67584       1  efi  (33M)
>    100352  2011200       3  freebsd  (982M)
> 
> The corrupt tag is because I haven't expanded the gpt to cover the
> full SD card yet.
> 
> -- 
>   John-Mark Gurney				Voice: +1 415 225 5579
> 
>      "All that I will do, has been done, All that I have, has not."
> 
> From peter at rulingia.com  Mon Sep 16 07:44:45 2019

---
Kazuhiko Kiriyama <kiri at truefc.org>


More information about the freebsd-arm mailing list