[SOLVED] linux-aarch64-5.8.0-1 breaks Rock64

Discussion about U-Boot and the kernel.

[SOLVED] linux-aarch64-5.8.0-1 breaks Rock64

Postby as365n4 » Sun Aug 09, 2020 11:52 am

Hi all,

just did a system update on a Rock64 and the new 5.8 Kernel breaks the installation.
After reboot the board has permanently lit the white and red LED and does not boot-up at all.
To narrow down the issue I re-flashed my eMMC-Module as per alarm Wiki and ArchLinuxARM-aarch64-latest.tar.gz includes only linux-aarch64-5.7.1-1 so I run again pacman -Syuu to update and linux-aarch64-5.8.0-1 was installed and after shutdown -r now the board went dead again with permanently lit white and red LED. Pressing the reboot button or pressing and hold the reboot button on the board brings no change, board still ends up with white and red LED permanently lit.

Any ideas on how to fix linux-aarch64-5.8.0-1 so that it works on Rock64 ?

UART output as below
Code: Select all
DDR version 1.06 20170424
In
LPDDR3
786MHz
Bus Width=32 Col=11 Bank=8 Row=15/15 CS=2 Die Bus-Width=32 Size=4096MB
ddrconfig:7
OUT
Boot1 Release Time: 2017-05-18, version: 2.43
ChipType = 0x11, 127
SdmmcInit=2 0
BootCapSize=2000
UserCapSize=119276MB
FwPartOffset=2000 , 2000
SdmmcInit=0 2
StorageInit ok = 23695
Raw SecureMode = 0
SecureInit read PBA: 0x4
SecureInit read PBA: 0x404
SecureInit read PBA: 0x804
SecureInit read PBA: 0xc04
SecureInit read PBA: 0x1004
SecureInit ret = 0, SecureMode = 0
LoadTrustBL
No find bl30.bin
No find bl32.bin
Load uboot, ReadLba = 2000
Load OK, addr=0x200000, size=0x8b0ec
RunBL31 0x10000
NOTICE:  BL31: v1.3(debug):f947c7e
NOTICE:  BL31: Built : 09:28:45, May 31 2017
NOTICE:  BL31:Rockchip release version: v1.3
INFO:    ARM GICv2 driver initialized
INFO:    Using opteed sec cpu_context!
INFO:    boot cpu mask: 1
INFO:    plat_rockchip_pmu_init: pd status 0xe
INFO:    BL31: Initializing runtime services
WARNING: No OPTEE provided by BL2 boot loader, Booting device without OPTEE initialization. SMC`s destined for OPTEE will return SMC_UNK
ERROR:   Error initializing runtime service opteed_fast
INFO:    BL31: Preparing for EL3 exit to normal world
INFO:    Entry point address = 0x200000
INFO:    SPSR = 0x3c9


U-Boot 2018.03-1 (Apr 02 2018 - 19:14:47 -0600) Arch Linux ARM

Model: Rockchip RK3328 EVB
DRAM:  4 GiB
MMC:   rksdmmc@ff500000: 1, rksdmmc@ff520000: 0
Loading Environment from MMC... Card did not respond to voltage select!
*** Warning - No block device, using default environment

Failed (-5)
In:    serial@ff130000
Out:   serial@ff130000
Err:   serial@ff130000
Model: Rockchip RK3328 EVB
Net:
Warning: ethernet@ff540000 (eth0) using random MAC address - 62:72:ba:0a:ad:9a
eth0: ethernet@ff540000
Hit any key to stop autoboot:  0
switch to partitions #0, OK
mmc0(part 0) is current device
Scanning mmc 0:1...
Found U-Boot script /boot/boot.scr
890 bytes read in 17 ms (50.8 KiB/s)
## Executing script at 00500000
37171712 bytes read in 910 ms (39 MiB/s)
50174 bytes read in 27 ms (1.8 MiB/s)
8342454 bytes read in 211 ms (37.7 MiB/s)
## Flattened Device Tree blob at 01f00000
   Booting using the fdt blob at 0x1f00000
   Loading Ramdisk to fc727000, end fcf1bbb6 ... OK
   reserving fdt memory region: addr=1f00000 size=d000
   Loading Device Tree to 00000000fc717000, end 00000000fc726fff ... OK

Starting kernel ...
Last edited by as365n4 on Wed Aug 19, 2020 11:23 am, edited 1 time in total.
as365n4
 
Posts: 12
Joined: Sun Jul 19, 2020 5:04 pm

Re: linux-aarch64-5.8.0-1 breaks Rock64

Postby ramsey » Mon Aug 10, 2020 12:50 pm

My one Rock64v2 board just did this on update. My Rock64v3 boards were fine. I updated the v2 board to use the same u-boot I built from source for the v3 boards and now it works again. My dockerfile for building the arm-trusted-firmware and u-boot are here,

viewtopic.php?f=67&t=14576
ramsey
 
Posts: 25
Joined: Mon Aug 14, 2017 3:46 pm

Re: linux-aarch64-5.8.0-1 breaks Rock64

Postby mbakhterev » Mon Aug 10, 2020 4:15 pm

ramsey wrote:My one Rock64v2 board just did this on update. My Rock64v3 boards were fine. I updated the v2 board to use the same u-boot I built from source for the v3 boards and now it works again. My dockerfile for building the arm-trusted-firmware and u-boot are here,

viewtopic.php?f=67&t=14576


I've run your instructions and got a lot of u-boot* files in the /u-boot directory.

Code: Select all
# ls -lh u-boot*
-rwxr-xr-x 1 mob mob 6.1M Aug 10 20:58 u-boot
-rw-r--r-- 1 mob mob 662K Aug 10 20:58 u-boot.bin
-rw-r--r-- 1 mob mob  16K Aug 10 20:54 u-boot.cfg
-rw-r--r-- 1 mob mob  10K Aug 10 20:55 u-boot.cfg.configs
-rw-r--r-- 1 mob mob  37K Aug 10 20:58 u-boot.dtb
-rw-r--r-- 1 mob mob 662K Aug 10 20:58 u-boot-dtb.bin
-rw-r--r-- 1 mob mob 663K Aug 10 20:58 u-boot-dtb.img
-rw-r--r-- 1 mob mob 663K Aug 10 20:58 u-boot.img
-rw-r--r-- 1 mob mob 761K Aug 10 20:58 u-boot.itb
-rw-r--r-- 1 mob mob 1.2K Aug 10 20:58 u-boot.its
-rw-r--r-- 1 mob mob 1.4K Aug 10 20:55 u-boot.lds
-rw-r--r-- 1 mob mob 614K Aug 10 20:58 u-boot.map
-rwxr-xr-x 1 mob mob 626K Aug 10 20:58 u-boot-nodtb.bin
-rw-r--r-- 1 mob mob 8.8M Aug 10 20:59 u-boot-rockchip.bin
-rwxr-xr-x 1 mob mob 1.8M Aug 10 20:58 u-boot.srec
-rw-r--r-- 1 mob mob 247K Aug 10 20:58 u-boot.sym


Which one should i flash instead of uboot.img? You've mentioned u-boot.itb, but it does not look like uboot.img (size is too small), original uboot.img is 4.0M long.

Thanks for the help!
mbakhterev
 
Posts: 20
Joined: Mon Oct 14, 2019 4:45 pm

Re: linux-aarch64-5.8.0-1 breaks Rock64

Postby mbakhterev » Mon Aug 10, 2020 7:08 pm

I flashed u-boot-rockchip.bin. And it seems, SPL starts, but then nothing happens but error:

Code: Select all
U-Boot TPL 2020.10-rc1-00357-g7d08077334 (Aug 10 2020 - 20:55:06)
LPDDR3, 800MHz
BW=32 Col=11 Bk=8 CS0 Row=15 CS1 Row=15 CS=2 Die BW=16 Size=4096MB
Trying to boot from BOOTROM
Returning to boot ROM...

U-Boot SPL 2020.10-rc1-00357-g7d08077334 (Aug 10 2020 - 20:55:06 +0500)
Trying to boot from MMC1
Card did not respond to voltage select!
spl: mmc init failed with error: -95
Trying to boot from MMC2
mmc_load_image_raw_sector: mmc block read error
SPL: failed to boot from all boot devices
### ERROR ### Please RESET the board ###


Does this look like memory frequency error?
mbakhterev
 
Posts: 20
Joined: Mon Oct 14, 2019 4:45 pm

Re: linux-aarch64-5.8.0-1 breaks Rock64

Postby Kabbone » Mon Aug 10, 2020 8:01 pm

I didn't try to update the kernel myself yet, because I had no time so far.
If you want you can try my PKGBUILD as a template or even release 2020-04-SPL-TPL, but you should save your boot.txt beforehand, because I changed it a bit for myself.
Note: I decrease memory clock in PKGBUILD, because my board wasn't stable at all with the memory frequency (800 MHz) in stock u-boot.

You can find it here

I also want to make a pull request to the repo git already, but was too lazy yet.
Kabbone
 
Posts: 141
Joined: Thu Jul 25, 2013 9:20 am

Re: linux-aarch64-5.8.0-1 breaks Rock64

Postby ramsey » Mon Aug 10, 2020 10:31 pm

Which one should i flash instead of uboot.img? You've mentioned u-boot.itb, but it does not look like uboot.img (size is too small), original uboot.img is 4.0M long.


Perhaps that's because I removed the non-free blobs from arm-trusted-firmware? My idbloader.img + my u-boot.itb is what is working for me.
ramsey
 
Posts: 25
Joined: Mon Aug 14, 2017 3:46 pm

Re: linux-aarch64-5.8.0-1 breaks Rock64

Postby mbakhterev » Tue Aug 11, 2020 1:03 pm

Kabbone wrote:I didn't try to update the kernel myself yet, because I had no time so far.
If you want you can try my PKGBUILD as a template or even release 2020-04-SPL-TPL, but you should save your boot.txt beforehand, because I changed it a bit for myself.
Note: I decrease memory clock in PKGBUILD, because my board wasn't stable at all with the memory frequency (800 MHz) in stock u-boot.

You can find it here

I also want to make a pull request to the repo git already, but was too lazy yet.


Thanks for the tips. But It didn't work for me, even with 5.7.x kernel. The symptom is the same: boot process hangs with message "Starting Kernel ..." What the hell is going on?

I'll try next @ramsey recipe.
mbakhterev
 
Posts: 20
Joined: Mon Oct 14, 2019 4:45 pm

Re: linux-aarch64-5.8.0-1 breaks Rock64

Postby Kabbone » Tue Aug 11, 2020 3:03 pm

I just updated to linux-aarch64-5.8.0-1 with the linke u-boot, everything works fine.
I assume you didn't run mkscr with your original boot.txt
Kabbone
 
Posts: 141
Joined: Thu Jul 25, 2013 9:20 am

Re: linux-aarch64-5.8.0-1 breaks Rock64

Postby mbakhterev » Tue Aug 11, 2020 4:57 pm

Kabbone wrote:I just updated to linux-aarch64-5.8.0-1 with the linke u-boot, everything works fine.
I assume you didn't run mkscr with your original boot.txt


I've run it. But with mkimage from preinstalled uboot-tools 2020.04. May this be a problem?
mbakhterev
 
Posts: 20
Joined: Mon Oct 14, 2019 4:45 pm

Re: linux-aarch64-5.8.0-1 breaks Rock64

Postby mbakhterev » Tue Aug 11, 2020 5:26 pm

Kabbone wrote:I just updated to linux-aarch64-5.8.0-1 with the linke u-boot, everything works fine.
I assume you didn't run mkscr with your original boot.txt


Or can be the memory frequency be a problem? The stock uboot-rock64 sets the frequency to the 768MHz... May i instead
Code: Select all
sed -i 's/800/600/g' arch/arm/dts/rk3328-sdram-lpddr3-1600.dtsi
use
Code: Select all
sed -i 's/800/768/g' arch/arm/dts/rk3328-sdram-lpddr3-1600.dtsi
?
mbakhterev
 
Posts: 20
Joined: Mon Oct 14, 2019 4:45 pm

Next

Return to U-Boot/Kernel

Who is online

Users browsing this forum: Google [Bot] and 2 guests