LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > slarm64
User Name
Password
slarm64 This forum is for the discussion of slarm64.

Notices


Reply
  Search this Thread
Old 02-05-2024, 06:21 AM   #1
DesRoin
LQ Newbie
 
Registered: Feb 2024
Posts: 3

Rep: Reputation: 0
StarFive VisionFive 2 kernel update and boot errors


Hello everyone,
So I've been using the slarm64-current-riscv64-xfce-visionfive_2-6.1.56-build-20231008.img image on my VisionFive 2 and in terms of getting it to run it works. However I've been trying to update the Kernel to the provided 6.5.5 packages (or the official repository kernel packages which seems to be a bad idea). However everytime I touch the kernel in any way the system stops booting with the following error messages:
Quote:
Loading Environment from SPIFlash... SF: Detected gd25lq128 with page size 256 Bytes, erase size 4 KiB, total 16 MiB
*** Warning - bad CRC, using default environment

StarFive EEPROM format v2

--------EEPROM INFO--------
Vendor : StarFive Technology Co., Ltd.
Product full SN: VF7110B1-2253-D008E000-00004122
data version: 0x2
PCB revision: 0xb2
BOM revision: A
Ethernet MAC0 address: 6c:cf:39:00:43:90
Ethernet MAC1 address: 6c:cf:39:00:43:91
--------EEPROM INFO--------

In: serial@10000000
Out: serial@10000000
Err: serial@10000000
Model: StarFive VisionFive V2
Net: eth0: ethernet@16030000, eth1: ethernet@16040000
switch to partitions #0, OK
mmc1 is current device
found device 1
bootmode flash device 1
Can't set block device
Failed to load '/boot/uEnv.txt'
Hit any key to stop autoboot: 0
Can't set block device
Importing environment from mmc1 ...
## Warning: Input data exceeds 1048576 bytes - truncated
## Info: input data size = 1048578 = 0x100002
** Invalid partition 2 **
Couldn't find partition mmc 1:2
Can't set block device
## Warning: defaulting to text format
## Error: "boot2" not defined
switch to partitions #0, OK
mmc1 is current device
Scanning mmc 1:3...
Found U-Boot script /boot.scr
2846 bytes read in 7 ms (396.5 KiB/s)
## Executing script at 43900000
Boot script loaded from mmc 1:3
141 bytes read in 6 ms (22.5 KiB/s)
Failed to load '/dtb/starfive/jh7110-visionfive-v2.dtb'
20244992 bytes read in 869 ms (22.2 MiB/s)
libfdt fdt_check_header(): FDT_ERR_BADMAGIC
Failed to load '/dtb/starfive/overlay/starfive-fixup.scr'
10654142 bytes read in 457 ms (22.2 MiB/s)
Moving Image from 0x44000000 to 0x40200000, end=415d5000
## Loading init Ramdisk from Legacy Image at 48100000 ...
Image Name: uInitrd
Image Type: RISC-V Linux RAMDisk Image (gzip compressed)
Data Size: 10654078 Bytes = 10.2 MiB
Load Address: 00000000
Entry Point: 00000000
Verifying Checksum ... OK
ERROR: Did not find a cmdline Flattened Device Tree
Could not find a valid device tree
SCRIPT FAILED: continuing...
** Bad partition specification mmc 1:3:3 **
Couldn't find partition mmc 1:3:3
** Bad partition specification mmc 1:3:3 **
Couldn't find partition mmc 1:3:3
** Bad partition specification mmc 1:3:3 **
Couldn't find partition mmc 1:3:3
** Bad partition specification mmc 1:3:3 **
Couldn't find partition mmc 1:3:3
** Bad partition specification mmc 1:3:3 **
Couldn't find partition mmc 1:3:3
** Bad partition specification mmc 1:3:3 **
Couldn't find partition mmc 1:3:3
libfdt fdt_check_header(): FDT_ERR_BADMAGIC
Card did not respond to voltage select! : -110
** File not found ubootefi.var **
Failed to load EFI variables
** Bad partition specification mmc 1:3:3 **
Couldn't find partition mmc 1:3:3
ethernet@16030000 Waiting for PHY auto negotiation to complete..... done
BOOTP broadcast 1
BOOTP broadcast 2
BOOTP broadcast 3
DHCP client bound to address 192.168.178.31 (763 ms)
Using ethernet@16030000 device
TFTP from server 192.168.178.1; our IP address is 192.168.178.31
Filename 'boot.scr.uimg'.
Load address: 0x88100000
Loading: *
TFTP server died; starting again
BOOTP broadcast 1
DHCP client bound to address 192.168.178.31 (89 ms)
Using ethernet@16030000 device
TFTP from server 192.168.178.1; our IP address is 192.168.178.31
Filename 'boot.scr.uimg'.
Load address: 0x44000000
Loading: *
TFTP server died; starting again
StarFive # boot
Can't set block device
Importing environment from mmc1:3 ...
## Error: Environment import failed: errno = 12
** Invalid partition 2 **
Couldn't find partition mmc 1:2
Can't set block device
## Warning: defaulting to text format
## Error: "boot2" not defined
switch to partitions #0, OK
mmc1 is current device
** Bad device specification mmc 1:3 **
** Bad partition specification mmc 1:3:1 **
Couldn't find partition mmc 1:3:1
BOOTP broadcast 1
DHCP client bound to address 192.168.178.31 (6 ms)
Using ethernet@16030000 device
TFTP from server 192.168.178.1; our IP address is 192.168.178.31
Filename 'boot.scr.uimg'.
Load address: 0x88100000
Loading: *
TFTP server died; starting again
BOOTP broadcast 1
DHCP client bound to address 192.168.178.31 (67 ms)
Using ethernet@16030000 device
TFTP from server 192.168.178.1; our IP address is 192.168.178.31
Filename 'boot.scr.uimg'.
Load address: 0x44000000
Loading: *
TFTP server died; starting again
StarFive #
Now what I did was I've installed the new packages from the mirror for VisionFive 2 and rebuild the Uinitrd using the initrd script in /boot/
I did check all the symlinks in /boot and they looked fine, only difference I could find was between /boot/dtbs/ and the corresponding kernel version directories which had a different layout and different files.
Now I have two questions regarding this:
1.) is there any documentation on the correct procedure for this board so I don't have to run with a trial and error approach in the future
2.) is there a way to save my installation?

Sorry for acting a bit like a dummy here, but it's a bit difficult to find the right way to treat this board and the current builds ^^'
I've also blacklisted the kernel packages in slackpkg thinking it could help to mitigate this error since slackpkg and the riscv64 repositories have no concept of the VisionFive 2 kernel build I think

kind regards,
DesRoin
 
Old 02-05-2024, 11:58 AM   #2
sndwvs
Senior Member
 
Registered: Aug 2014
Posts: 1,915

Rep: Reputation: Disabled
Quote:
Originally Posted by DesRoin View Post
1.) is there any documentation on the correct procedure for this board so I don't have to run with a trial and error approach in the future
The procedure for one update is standard, but you need to use the kernels that are collected for this board https://dl.slarm64.org/slackware/ima...five_2/kernel/, the kernel from the distribution kit may not support all the equipment of this board.

Quote:
Originally Posted by DesRoin View Post
2.) is there a way to save my installation?
To restore the kernel you just need to mount the partitions and unpack the kernel packages; for this board the bootloader is not installed on the SDcard but uses a chain with spi.
 
Old 02-05-2024, 12:13 PM   #3
DesRoin
LQ Newbie
 
Registered: Feb 2024
Posts: 3

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by sndwvs View Post
The procedure for one update is standard, but you need to use the kernels that are collected for this board https://dl.slarm64.org/slackware/ima...five_2/kernel/, the kernel from the distribution kit may not support all the equipment of this board.



To restore the kernel you just need to mount the partitions and unpack the kernel packages; for this board the bootloader is not installed on the SDcard but uses a chain with spi.
Thank you very much for the information. I did use the provided kernels from this directory (and blacklisted kernel packages so they don't get removed). I've also managed to get it to boot again, so what I had to do was to edit /boot/uEnv.txt to look like this:

Quote:
verbosity=4
console=both
fdtfile=starfive/jh7110-starfive-visionfive-2-v1.3b.dtb
rootdev=UUID=32539e08-a5c0-4084-9f32-0932043d95e3
overlay_prefix=starfive
(I only changed the fdtfile entry to point to the only matching file in /boot/dtbs/6.5.5/)
The system will however now throw a pagefault upon booting which sometimes causes it to reboot instead of waiting for the timeout of the device (works most of the time though).
It still mentions that it can't find a file upon booting as well but I couldn't find that specific file even with the original image so I assume I just didn't notice it on a fresh installation.
Next thing for me will be to figure out where the pagefault comes from and how to get the wifi stick that came with the board to work. On the 6.5.5 kernel it is at least able to read the manufacturers code so... step by step I guess
(also the transfer-to-disk script doesn't work which is another story entirely).
Anyway thank you very much for the reply!
 
Old 02-05-2024, 01:16 PM   #4
sndwvs
Senior Member
 
Registered: Aug 2014
Posts: 1,915

Rep: Reputation: Disabled
Quote:
Originally Posted by DesRoin View Post
Thank you very much for the information. I did use the provided kernels from this directory (and blacklisted kernel packages so they don't get removed). I've also managed to get it to boot again, so what I had to do was to edit /boot/uEnv.txt to look like this:


(I only changed the fdtfile entry to point to the only matching file in /boot/dtbs/6.5.5/)
The system will however now throw a pagefault upon booting which sometimes causes it to reboot instead of waiting for the timeout of the device (works most of the time though).
It still mentions that it can't find a file upon booting as well but I couldn't find that specific file even with the original image so I assume I just didn't notice it on a fresh installation.
Next thing for me will be to figure out where the pagefault comes from and how to get the wifi stick that came with the board to work. On the 6.5.5 kernel it is at least able to read the manufacturers code so... step by step I guess
(also the transfer-to-disk script doesn't work which is another story entirely).
Anyway thank you very much for the reply!
I updated patches 6.5.5 -> 6.6.15
 
  


Reply

Tags
riscv64, slackware, starfive, visionfive



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
StarFive VisionFive 2 JH7110 (riscv64) sndwvs slarm64 13 05-05-2024 11:40 AM
LXer: Ubuntu 23.04 Now Works on StarFive’s VisionFive 2 RISC-V Single-Board Computer LXer Syndicated Linux News 0 05-10-2023 06:51 PM
LXer: Ubuntu Is Now Officially Supported on StarFive’s VisionFive RISC-V Single-Board Computers LXer Syndicated Linux News 0 08-17-2022 05:38 PM
StarFive VisionFive V1 JH7100 (riscv64) sndwvs slarm64 0 12-16-2021 10:55 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > slarm64

All times are GMT -5. The time now is 01:18 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration