Git Product home page Git Product logo

visionfive2's People

Contributors

123curry avatar andyhu-stf avatar arv1nzhu avatar changhuangliang avatar david-li-93 avatar hal-feng avatar huanfeng-sf avatar jianlonghuang avatar kevinxiestf avatar kfihihc avatar masonhuo avatar michaelzhuxx avatar mindachen1987 avatar saminguo avatar sfxingyuwu avatar windsomezeng avatar zivxu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

visionfive2's Issues

Both /dev/mapper/control file and dm_mod missed in 202302 image

I have just flashed fresh 202302 image to SDcard, booted directly into it (RGPIO_0=1, RGPIO_1=0).
Then I have installed kpartx package. When I tried to run it I get the following error:

# kpartx -a -v /mnt/sda1/starfive-jh7110-202302-SD-minimal-desktop.img 
/dev/mapper/control: open failed: No such device
Failure to communicate with kernel device-mapper driver.
Check that device-mapper is available in the kernel.
Incompatible libdevmapper 1.02.185 (2022-05-18) and kernel driver (unknown version).
device mapper prerequisites not met

Additional system details:

# find /lib/modules/ -iname dm*.ko
# lsmod 
Module                  Size  Used by
venc                   28672  0
vdec                   28672  0
jpu                    24576  0
# uname -a
Linux starfive 5.15.0-starfive #1 SMP Mon Feb 27 14:03:14 EST 2023 riscv64 GNU/Linux

Please build device-mapper module(s) in the next release.

Device trees limit Linux to 4GB of RAM on 8GB devices

Hi, please accept my thanks for development and release of this wonderful board.
There is small issue with device trees which can confuse newcomers like me:

in current linux you provide there, in https://github.com/starfive-tech/linux/blob/f0fce0037f9cc3fa6013d14d2f11fff7cf1a19da/arch/riscv/boot/dts/starfive/jh7110-visionfive-v2.dtsi#L47

	memory@40000000 {
		device_type = "memory";
		reg = <0x0 0x40000000 0x1 0x0>;
	};

states that only 4GB will be visible to Linux.

Situation: I ordered 8GB version, downloaded Debian Image-69 and booted, but I've seen only around 4GB of free RAM and I immediately thought that I received wrong package. But thanks to people from #riscv-main @ matrix.org I nailed down that my device is okay but wrong DTS statement limits Linux to 4GB instead of 8GB RAM.

As a quick hack I had to change it to:

	memory@40000000 {
		device_type = "memory";
		reg = <0x0 0x40000000 0x2 0x0>;
	};

(note 0x1 was changed to 0x2 in reg statement),
and Debian seen full amount of RAM.

If this issue is wrong (I booted Debian with default U-Boot environment with U-Boot updated from this repo after I received my board), then please ignore.

Thank you!

Boot failure

This ie the output I get on the serial port when trying to boot from SD-card:

dwmci_s: Response Timeout.
BOOT fail,Error is 0xffffffff
dwmci_s: Response Timeout.
BOOT fail,Error is 0xffffffff

I took that as an indication that the regular boot loader is not working so I tried to do a recovery #42.

However maybe it is a more serious issue. Can someone tell?

Unable to recovery U-boot

I built U-boot following the instructions on Github and everything seemed to compile properly but after flashing it seems it was a bad build. I’m trying to recover the firmware using the instructions on Github and in the quick-start guide (https://doc-en.rvspace.org/VisionFive2/PDF/VisionFive2_QSG.pdf). I have my jumpers set to 1,1, and when I boot the device I get UART output of “CCCCCCCC” (which is what I understand it should be). However, I’m unable to send the recovery firmware file successfully.

I have tried two different USB-serial cables, each that seem fine. I have tried using minicom, picocom, and screen to send the file via xmodem, but no luck with anything.

Using picocom (my preferred console app), I get the following:

CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
*** file: jh7110-recovery-20221205.bin
$ sx -avO jh7110-recovery-20221205.bin
Sending jh7110-recovery-20221205.bin, 1291 blocks: Give your local XMODEM receive command now.
Retry 0: NAK on sector
Retry 0: NAK on sector
Retry 0: NAK on sector
Retry 0: NAK on sector
Retry 0: NAK on sector
Retry 0: NAK on sector
Retry 0: NAK on sector
Retry 0: NAK on sector
Retry 0: NAK on sector
Retry 0: NAK on sector
Retry 0: NAK on sector
Retry 0: Retry Count Exceeded

Transfer incomplete

*** exit status: 128 ***
 Error

I’ve tried resetting the device with both power and the reset button while transferring, and leaving it as is. I’ve tried with MacOS and with Kali (Kali is a VM, if that makes a difference). Still no luck though. Can someone post step-by-step instructions for what to run software-wise? Everything I’ve seen says “send the file via xmodem” but there are many possibilities of how to do that, so I’d appreciate if someone can tell me how they’ve done it.

/proc/mtd no such file or directory

Hello,

I've recived my boards and I can't update them since the mtd partitions aren't available on the 55 version of debian.

So how should I update my board ?

(Also why is it only using 4GB since I have 8 GB)

Allow other modes of U-boot recovery

It would be nice to have allow U-boot recovery through SD, tftp/dhcp, ftp or http.

For example, Like many bios/firmware update methods, one can copy a special file to a (ext2 or dos-formatted) SD and trigger automatically the u-boot recovery. The same file can be accessed through tftp/dhcp, ftp:// or http:// URI.

No serial cable is needed.

My preference goes to to the http:// method. Other methods are welcome.

Not sure if u-boot does not already have this possibility. In that case, a documentation is OK.

Create Dockerfile for build environment

It seems people are having some issues building this very complex project and I suspect some of that is due to dependencies in the build packages. To ensure a consistent build environment include a Dockerfile that generates a build platform we know works because we also include a CI component that builds the required artifacts before allowing merges into master.

Thoughts and feedbacks on this most welcome. I am quite happy to have a go at this in my spare time if someone from starfive-tech can give me some input on their preferred base docker image (I always like Ubuntu most recent LTS myself).

CPU frequency is lower than it should be

The cpuinfo_cur_freq and scaling_cur_freq don't match, suggesting that the kernel is unable to control the CPU frequency. Note that cpuinfo_cur_freq is reported by the hardware and scaling_cur_freq is the last frequency the kernel requested the hardware to use.

$ cat /sys/devices/system/cpu/cpufreq/policy0/cpuinfo_{cur,max}_freq
1000000
1500000
$ cat /sys/devices/system/cpu/cpufreq/policy0/scaling_{driver,governor,cur_freq}
cpufreq-dt
performance
1500000

The system isn't thermal throttling, since the temperature is well under the passive trip point.

$ cat /sys/class/thermal/thermal_zone0/temp
45945
$ cat /sys/class/thermal/thermal_zone0/trip_point_0_{temp,type}
75000
passive

I'm using Linux 6.4.0 from commit e5a381c51d624ffd8784db908a58ae227d0608a4 (from the JH7110_VisionFive2_upstream branch) and u-boot from release 2.10.4 of this repository since later versions don't fit into flash. I can't use a later release of u-boot because, at the moment, I can only boot from flash.

This kernel version includes the PMIC and CPU frequency patch sets, so I expect it to be able to control the CPU frequency. The kernel config can be found here. I've also tried explicitly enabling REGULATOR_AXP15060, but that didn't make a difference.

Is something missing from the kernel or u-boot to make this work?

Update VisionFive 2 Quick Start Guide

I found a correction in the Quick Start Guide.
Where can I update this PDF?


During boot of OpenSBI, it's important to disable "Hardware Flow Control" and enable "Software Flow Control" so the developer can send keyboard input to the device. Without this, you'll waste time staring at the login prompt, unsure if your keyboard is communicating with the board at all.

fatal: Could not read from remote repository. fatal: clone of [email protected]:starfive-tech/buildroot.git

PROBLEM

Ok so my first time to clone and build all this and the clone instructions failed.

git clone [email protected]:starfive-tech/VisionFive2.git
[email protected]: Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
fatal: clone of '[email protected]:starfive-tech/buildroot.git' into submodule path '/home/davidm/visionfive2prep/VisionFive2/buildroot' failed
Failed to clone 'buildroot'. Retry scheduled

SOLUTION

Please change the instructions for the fetch sources to the steps that follow to save others some time:

  1. Create a preparation directory
mkdir visionfive2prep
cd visionfive2prep/
  1. Fetch the script to add the git lfs repo and install it git lfs
curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh -o script.deb.sh
sudo bash ./script.deb.sh
sudo apt-get install git-lfs
  1. clone but use https instead
git clone https://github.com/starfive-tech/VisionFive2.git

Here's the successful clone output:

Cloning into 'VisionFive2'...
remote: Enumerating objects: 3901, done.        
remote: Counting objects: 100% (25/25), done.        
remote: Compressing objects: 100% (25/25), done.        
remote: Total 3901 (delta 9), reused 3 (delta 0), pack-reused 3876        
Receiving objects: 100% (3901/3901), 290.49 MiB | 33.77 MiB/s, done.
Resolving deltas: 100% (2135/2135), done.
Filtering content: 100% (9/9), 149.12 MiB | 31.34 MiB/s, done.

4 . Tweak the VisionFive2/.gitmodules file.
Replace [email protected]:starfive-tech → https://github.com/starfive-tech

cat .gitmodules 
[submodule "buildroot"]
	path = buildroot
	url = https://github.com/starfive-tech/buildroot.git
	branch = JH7110_VisionFive2_devel
[submodule "u-boot"]
	path = u-boot
	url = https://github.com/starfive-tech/u-boot.git
	branch = JH7110_VisionFive2_devel
[submodule "linux"]
	path = linux
	url = https://github.com/starfive-tech/linux.git
	branch = JH7110_VisionFive2_devel
[submodule "opensbi"]
	path = opensbi
	url = https://github.com/starfive-tech/opensbi.git
	branch = master
  1. Now check out and submodule update
cd VisionFive2
git checkout JH7110_VisionFive2_devel
git submodule update --init --recursive

Repository is read and cloned. Here's the successful submodule update output:

Submodule 'buildroot' (https://github.com/starfive-tech/buildroot.git) registered for path 'buildroot'
Submodule 'linux' (https://github.com/starfive-tech/linux.git) registered for path 'linux'
Submodule 'opensbi' (https://github.com/starfive-tech/opensbi.git) registered for path 'opensbi'
Submodule 'u-boot' (https://github.com/starfive-tech/u-boot.git) registered for path 'u-boot'
Cloning into '/home/davidm/visionfive2prep/VisionFive2/buildroot'...
Cloning into '/home/davidm/visionfive2prep/VisionFive2/linux'...
Cloning into '/home/davidm/visionfive2prep/VisionFive2/opensbi'...
Cloning into '/home/davidm/visionfive2prep/VisionFive2/u-boot'...
Submodule path 'buildroot': checked out '4646c7fb71bbb628552a1e4d750fe74360345415'
Submodule path 'linux': checked out '7b7b4eddd8d5ae55f6e0ee09b93e16e23ab4f97b'
Submodule path 'opensbi': checked out '6f1fe98c2f565a394f258178b0daa3843672395c'
Submodule path 'u-boot': checked out '5ac796dddad5065c586360d01563db4c25a6865b'

Internal compiler error: Error reporting routines re-entered

GEN Makefile CALL /home/jacky/VisionFive2/linux/scripts/checksyscalls.sh CALL /home/jacky/VisionFive2/linux/scripts/atomic/check-atomics.sh CHK include/generated/compile.h CC drivers/gpu/drm/img/img-rogue/services/server/common/physmem_lma.o /home/jacky/VisionFive2/linux/drivers/gpu/drm/img/img-rogue/services/server/common/physmem_lma.c:1846:2: error: positional initialization of field in 'struct' declared with 'designated_init' attribute [-Werror=designated-init] 1846 | &PMRLockSysPhysAddressesLocalMem, | ^ /home/jacky/VisionFive2/linux/drivers/gpu/drm/img/img-rogue/services/server/common/physmem_lma.c:1846:2: note: (near initialization for '_sPMRLMAFuncTab') /home/jacky/VisionFive2/linux/drivers/gpu/drm/img/img-rogue/services/server/common/physmem_lma.c:1846:2: error: invalid initializer /home/jacky/VisionFive2/linux/drivers/gpu/drm/img/img-rogue/services/server/common/physmem_lma.c:1846:2: note: (near initialization for '_sPMRLMAFuncTab.<anonymous>') /home/jacky/VisionFive2/linux/drivers/gpu/drm/img/img-rogue/services/server/common/physmem_lma.c:1848:2: error: positional initialization of field in 'struct' declared with 'designated_init' attribute [-Werror=designated-init] 1848 | &PMRUnlockSysPhysAddressesLocalMem, | ^ /home/jacky/VisionFive2/linux/drivers/gpu/drm/img/img-rogue/services/server/common/physmem_lma.c:1848:2: note: (near initialization for '_sPMRLMAFuncTab') /home/jacky/VisionFive2/linux/drivers/gpu/drm/img/img-rogue/services/server/common/physmem_lma.c:1848:2: error: initialization of 'PVRSRV_ERROR (*)(void *, IMG_DEVMEM_OFFSET_T, IMG_UINT8 *, size_t, size_t *)' {aka 'enum PVRSRV_ERROR_TAG (*)(void *, long long unsigned int, unsigned char *, long unsigned int, long unsigned int *)'} from incompatible pointer type 'PVRSRV_ERROR (*)(void *)' {aka 'enum PVRSRV_ERROR_TAG (*)(void *)'} [-Werror=incompatible-pointer-types] /home/jacky/VisionFive2/linux/drivers/gpu/drm/img/img-rogue/services/server/common/physmem_lma.c:1848:2: note: (near initialization for '_sPMRLMAFuncTab.pfnReadBytes') /home/jacky/VisionFive2/linux/drivers/gpu/drm/img/img-rogue/services/server/common/physmem_lma.c:1850:2: error: positional initialization of field in 'struct' declared with 'designated_init' attribute [-Werror=designated-init] 1850 | &PMRSysPhysAddrLocalMem, | ^ /home/jacky/VisionFive2/linux/drivers/gpu/drm/img/img-rogue/services/server/common/physmem_lma.c:1850:2: note: (near initialization for '_sPMRLMAFuncTab') /home/jacky/VisionFive2/linux/drivers/gpu/drm/img/img-rogue/services/server/common/physmem_lma.c:1850:2: error: initialization of 'PVRSRV_ERROR (*)(void *, size_t, size_t, void **, void **, PMR_FLAGS_T)' {aka 'enum PVRSRV_ERROR_TAG (*)(void *, long unsigned int, long unsigned int, void **, void **, long long unsigned int)'} from incompatible pointer type 'PVRSRV_ERROR (*)(void *, IMG_UINT32, IMG_UINT32, IMG_DEVMEM_OFFSET_T *, IMG_BOOL *, IMG_DEV_PHYADDR *)' {aka 'enum PVRSRV_ERROR_TAG (*)(void *, unsigned int, unsigned int, long long unsigned int *, enum tag_img_bool *, IMG_DEV_PHYADDR *)'} [-Werror=incompatible-pointer-types] /home/jacky/VisionFive2/linux/drivers/gpu/drm/img/img-rogue/services/server/common/physmem_lma.c:1850:2: note: (near initialization for '_sPMRLMAFuncTab.pfnAcquireKernelMappingData') /home/jacky/VisionFive2/linux/drivers/gpu/drm/img/img-rogue/services/server/common/physmem_lma.c:1852:2: error: positional initialization of field in 'struct' declared with 'designated_init' attribute [-Werror=designated-init] 1852 | &PMRAcquireKernelMappingDataLocalMem, | ^ /home/jacky/VisionFive2/linux/drivers/gpu/drm/img/img-rogue/services/server/common/physmem_lma.c:1852:2: note: (near initialization for '_sPMRLMAFuncTab') /home/jacky/VisionFive2/linux/drivers/gpu/drm/img/img-rogue/services/server/common/physmem_lma.c:1852:2: error: initialization of 'void (*)(void)' from incompatible pointer type 'PVRSRV_ERROR (*)(void *, size_t, size_t, void **, void **, PMR_FLAGS_T)' {aka 'enum PVRSRV_ERROR_TAG (*)(void *, long unsigned int, long unsigned int, void **, void **, long long unsigned int)'} [-Werror=incompatible-pointer-types] /home/jacky/VisionFive2/linux/drivers/gpu/drm/img/img-rogue/services/server/common/physmem_lma.c:1852:2: note: (near initialization for '_sPMRLMAFuncTab.pfnReleasePMRFactoryLock') /home/jacky/VisionFive2/linux/drivers/gpu/drm/img/img-rogue/services/server/common/physmem_lma.c:1854:2: error: positional initialization of field in 'struct' declared with 'designated_init' attribute [-Werror=designated-init] 1854 | &PMRReleaseKernelMappingDataLocalMem, | ^ /home/jacky/VisionFive2/linux/drivers/gpu/drm/img/img-rogue/services/server/common/physmem_lma.c:1854:2: note: (near initialization for '_sPMRLMAFuncTab') /home/jacky/VisionFive2/linux/drivers/gpu/drm/img/img-rogue/services/server/common/physmem_lma.c:1854:2: error: initialization of 'PVRSRV_ERROR (*)(void *)' {aka 'enum PVRSRV_ERROR_TAG (*)(void *)'} from incompatible pointer type 'void (*)(void *, void *)' [-Werror=incompatible-pointer-types] /home/jacky/VisionFive2/linux/drivers/gpu/drm/img/img-rogue/services/server/common/physmem_lma.c:1854:2: note: (near initialization for '_sPMRLMAFuncTab.pfnUnpinMem') /home/jacky/VisionFive2/linux/drivers/gpu/drm/img/img-rogue/services/server/common/physmem_lma.c:1856:2: error: positional initialization of field in 'struct' declared with 'designated_init' attribute [-Werror=designated-init] 1856 | &PMRReadBytesLocalMem, | ^ /home/jacky/VisionFive2/linux/drivers/gpu/drm/img/img-rogue/services/server/common/physmem_lma.c:1856:2: note: (near initialization for '_sPMRLMAFuncTab') /home/jacky/VisionFive2/linux/drivers/gpu/drm/img/img-rogue/services/server/common/physmem_lma.c:1858:2: error: positional initialization of field in 'struct' declared with 'designated_init' attribute [-Werror=designated-init] 1858 | &PMRWriteBytesLocalMem, | ^ /home/jacky/VisionFive2/linux/drivers/gpu/drm/img/img-rogue/services/server/common/physmem_lma.c:1858:2: note: (near initialization for '_sPMRLMAFuncTab') /home/jacky/VisionFive2/linux/drivers/gpu/drm/img/img-rogue/services/server/common/physmem_lma.c:1858:2: error: initialization of 'PVRSRV_ERROR (*)(void *, const PMR *, IMG_UINT64, IMG_UINT32, IMG_UINT32 *, IMG_UINT32, IMG_UINT32 *)' {aka 'enum PVRSRV_ERROR_TAG (*)(void *, const struct _PMR_ *, long long unsigned int, unsigned int, unsigned int *, unsigned int, unsigned int *)'} from incompatible pointer type 'PVRSRV_ERROR (*)(void *, IMG_DEVMEM_OFFSET_T, IMG_UINT8 *, size_t, size_t *)' {aka 'enum PVRSRV_ERROR_TAG (*)(void *, long long unsigned int, unsigned char *, long unsigned int, long unsigned int *)'} [-Werror=incompatible-pointer-types] /home/jacky/VisionFive2/linux/drivers/gpu/drm/img/img-rogue/services/server/common/physmem_lma.c:1858:2: note: (near initialization for '_sPMRLMAFuncTab.pfnChangeSparseMemCPUMap') In file included from /home/jacky/VisionFive2/linux/include/uapi/linux/posix_types.h:5, from /home/jacky/VisionFive2/linux/include/uapi/linux/types.h:14, from /home/jacky/VisionFive2/linux/include/linux/types.h:6, from /home/jacky/VisionFive2/linux/drivers/gpu/drm/img/img-rogue/include/img_types.h:69, from /home/jacky/VisionFive2/linux/drivers/gpu/drm/img/img-rogue/services/server/common/physmem_lma.c:45: /home/jacky/VisionFive2/linux/include/linux/stddef.h:8:14: error: positional initialization of field in 'struct' declared with 'designated_init' attribute [-Werror=designated-init] 8 | #define NULL ((void *)0) | ^ /home/jacky/VisionFive2/linux/drivers/gpu/drm/img/img-rogue/services/server/common/physmem_lma.c:1860:2: note: in expansion of macro 'NULL' 1860 | NULL, | ^~~~ /home/jacky/VisionFive2/linux/include/linux/stddef.h:8:14: note: (near initialization for '_sPMRLMAFuncTab') 8 | #define NULL ((void *)0) | ^ /home/jacky/VisionFive2/linux/drivers/gpu/drm/img/img-rogue/services/server/common/physmem_lma.c:1860:2: note: in expansion of macro 'NULL' 1860 | NULL, | ^~~~ /home/jacky/VisionFive2/linux/include/linux/stddef.h:8:14: error: positional initialization of field in 'struct' declared with 'designated_init' attribute [-Werror=designated-init] 8 | #define NULL ((void *)0) | ^ /home/jacky/VisionFive2/linux/drivers/gpu/drm/img/img-rogue/services/server/common/physmem_lma.c:1862:2: note: in expansion of macro 'NULL' 1862 | NULL, | ^~~~ /home/jacky/VisionFive2/linux/include/linux/stddef.h:8:14: note: (near initialization for '_sPMRLMAFuncTab') 8 | #define NULL ((void *)0) | ^ /home/jacky/VisionFive2/linux/drivers/gpu/drm/img/img-rogue/services/server/common/physmem_lma.c:1862:2: note: in expansion of macro 'NULL' 1862 | NULL, | ^~~~ /home/jacky/VisionFive2/linux/drivers/gpu/drm/img/img-rogue/services/server/common/physmem_lma.c:1864:2: error: positional initialization of field in 'struct' declared with 'designated_init' attribute [-Werror=designated-init] 1864 | &PMRChangeSparseMemLocalMem, | ^ /home/jacky/VisionFive2/linux/drivers/gpu/drm/img/img-rogue/services/server/common/physmem_lma.c:1864:2: note: (near initialization for '_sPMRLMAFuncTab') 'PVRSRV_ERROR (*)(void *, PMR_MAPPING_TABLE *) Internal compiler error: Error reporting routines re-entered. 0x7f222bf1a082 __libc_start_main ../csu/libc-start.c:308 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See <http://bugs.buildroot.net/> for instructions. make[7]: *** [/home/jacky/VisionFive2/linux/scripts/Makefile.build:277: drivers/gpu/drm/img/img-rogue/services/server/common/physmem_lma.o] Error 1 make[6]: *** [/home/jacky/VisionFive2/linux/scripts/Makefile.build:540: drivers/gpu/drm/img/img-rogue] Error 2 make[5]: *** [/home/jacky/VisionFive2/linux/scripts/Makefile.build:540: drivers/gpu/drm/img] Error 2 make[4]: *** [/home/jacky/VisionFive2/linux/scripts/Makefile.build:540: drivers/gpu/drm] Error 2 make[3]: *** [/home/jacky/VisionFive2/linux/scripts/Makefile.build:540: drivers/gpu] Error 2 make[2]: *** [/home/jacky/VisionFive2/linux/Makefile:1868: drivers] Error 2 make[2]: Leaving directory '/home/jacky/VisionFive2/work/linux' make[1]: *** [Makefile:219: __sub-make] Error 2 make[1]: Leaving directory '/home/jacky/VisionFive2/linux' make: *** [Makefile:218: /home/jacky/VisionFive2/work/linux/vmlinux] Error 2

  • OS: Ubuntu 20.04.3
    How to sovle this issue? 

Build on Device

What is the process to build/rebuild ALL the soft_3rdpart on the actual device itself and then re-install it?
I would like to be able to do this to get the GPU and other software here installed on other Linux based Systems other than the
standard sd_card or Debian image.
In my case I am running Gentoo on my Visionfive 2 and I know how to compile the Kernel and create the initramfs on the device.
Gentoo

Last versions are not flashable.

Fw images are not flashable on my board since VisionFive2 Software v2.11.5

root@DietPi:~# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00040000 00001000 "spl"
mtd1: 00300000 00001000 "uboot"
mtd2: 00010000 00001000 "data"
root@DietPi:~# flashcp -v visionfive2_fw_payload.img /dev/mtd0
visionfive2_fw_payload.img won't fit into /dev/mtd0!

even on sdcard.img or any other version that has flashcp...

I can flash uboot without issues.

Unable to upload recovery bootloader

One of the cards I have won’t boot so I thought I should flash the bootloader reovery over UART. I set the dip switches so I get the CCCCC on the serial port as per the instructions. I use minicom to transfer the recovery file which is initiated correctly but I get a CRC Error and then the CCCC continues. Any help is appreciated.

FDT incorrectly claims JH7110 hart 0 is a U74

https://github.com/starfive-tech/u-boot/blob/1539c1fb5a498fd7d20c2cffc84c187d703c8b66/arch/riscv/dts/jh7110.dtsi#L22-L47

This says it's a U74 with a modified ISA string, but that is not correct, it is an S7, which in particular means it does not have an MMU (it doesn't even have supervisor mode). Moreover, since U-Boot is providing the jh7110-u-boot.dtsi-based FDT via EFI, the status = "disabled"; gets overridden to status = "okay";. Combined, these two mean FreeBSD believes that it should be attempting to start the S7 hart 0 as an AP, which is clearly nonsense. Attempting to make an SBI HSM call to do so eventually leads to firmware dying with a fatal load access fault on hart 0, and I have to run fdt prop /cpus/cpu@0/status disabled at the FreeBSD loader prompt to correct this in order to boot.

Please fix all three of these issues; the FDT should have the correct properties for the S7 core (including no MMU), the FDT provided to the EFI application should not indicate that the S7 core has an okay status, and any attempt to make an SBI HSM call to start hart 0 should gracefully return an error code.

Claimed PCIe support doesn't actually work

StarFive # version
U-Boot 2021.10 (Mar 24 2023 - 01:42:56 +0800), Build: jenkins-github_visionfive2-13

riscv64-buildroot-linux-gnu-gcc.br_real (Buildroot VF2_v2.11.5) 10.3.0
GNU ld (GNU Binutils) 2.36.1
StarFive # pci enum
starfive_pcie pcie@2C000000: Starfive PCIe bus probed.
PCI: Failed autoconfig bar 10
StarFive # pci
Scanning PCI devices on bus 0
BusDevFun  VendorId   DeviceId   Device Class       Sub-Class
_____________________________________________________________
00.00.00   0x1556     0x1111     Bridge device           0x04

That just shows the host bridge for one of the PLDA controllers, with no sign of the other one and no sign of my NVMe drive.

soft_3rdpart/spl_tool/create_{hdr,sbl} are amd64 binaries

The current SDK cannot be built on non-x86_64 Linux systems since some shipped programs cannot be executed elsewhere. In adition there is no source available... This is yet another unfortunate problem for a SDK targetting a "open source" SBC.

I'm building on ppc64le and got through most of the build already but I'm stuck here. binfmt tries to rescue me but I don't have a x86_64 chroot for it to work.

image

build of SDK failed - Source img-gpu-powervr-bin-1.17.6210866.tar.gz not found

Hello together,

i try to build the SDK but i get the following error:
ERROR: img-gpu-powervr-bin-1.17.6210866.tar.gz has wrong sha256 hash:
ERROR: expected: 8ef5eba77c776e0d4444d819e12c64bfa8eee0ae2cdf90b6eb7a3a9df7bd7ef2
ERROR: got : c242d40d0f7ae9733f37df2720ef61621c578c4f3e630c8456b92c206720f2c8
ERROR: Incomplete download, or man-in-the-middle (MITM) attack
wget --passive-ftp -nd -t 3 -O '/home/damian/kernel/misc/riscv/VisionFive2/work/buildroot_initramfs/build/.img-gpu-powervr-bin-1.17.6210866.tar.gz.qP0g3t/output' 'http://sources.buildroot.net/img-gpu-powervr/img-gpu-powervr-bin-1.17.6210866.tar.gz'
--2022-12-15 20:04:49-- http://sources.buildroot.net/img-gpu-powervr/img-gpu-powervr-bin-1.17.6210866.tar.gz
Resolving sources.buildroot.net (sources.buildroot.net)... 2606:4700:20::681a:25, 2606:4700:20::ac43:4838, 2606:4700:20::681a:125, ...
Connecting to sources.buildroot.net (sources.buildroot.net)|2606:4700:20::681a:25|:80... connected.
HTTP request sent, awaiting response... 404 Not Found
2022-12-15 20:04:50 ERROR 404: Not Found.

Any ideas when the source available again ?

Best regards
Damian

Instructions to fetch correct Ubuntu Focal 20.04 and not 20.04.5

The build instructions indicate to use ubuntu 20.04, but when you attempt to go there on the ubuntu web site, it redirects you to an updated version of 20.04.5 which causes more build issues. Don't use that.
https://releases.ubuntu.com/20.04/ubuntu-20.04.5-desktop-amd64.iso

You need to use the older original 20.04 version. Also disable and package upgrades and only install the original packages pinned to that 20.04 release.
https://old-releases.ubuntu.com/releases/20.04/ubuntu-20.04-desktop-amd64.iso

Repo's with progress

Hello together,

I don't see any progress in the development / extension of functions in the public repos. Where can I find the active repos where development is ongoing ?

Best regards
Damian

Update README.md to refer to new Ubuntu image for VisionFive2

In May 2023 Ubuntu annouced an image for this board. I think it would be very useful to have a section in this README that refers people to that. This most useful link is this one. This could be useful for people who want to get their boards up and running and don't have the skills needed to do an entire toolchain and rootfs build themselves.

error: positional initialization of field in ‘struct’ declared with ‘designated_init’ attribute [-Werror=designated-init]

when it compiling to drivers/gpu/drm/img/img-rogue/services/server/common/physmem_lma.o, it will crash and raise an error message:

  CALL    /home/jacky/VisionFive2/linux/scripts/atomic/check-atomics.sh
  CHK     include/generated/compile.h
  CC      drivers/gpu/drm/img/img-rogue/services/server/common/physmem_lma.o
/home/jacky/VisionFive2/linux/drivers/gpu/drm/img/img-rogue/services/server/common/physmem_lma.c:1846:2: error: positional initialization of field in ‘struct’ declared with ‘designated_init’ attribute [-Werror=designated-init]
 1846 |  &PMRLockSysPhysAddressesLocalMem,
      |  ^
/home/jacky/VisionFive2/linux/drivers/gpu/drm/img/img-rogue/services/server/common/physmem_lma.c:1846:2: note: (near initialization for ‘_sPMRLMAFuncTab’)
/home/jacky/VisionFive2/linux/drivers/gpu/drm/img/img-rogue/services/server/common/physmem_lma.c:1846:2: error: invalid initializer
/home/jacky/VisionFive2/linux/drivers/gpu/drm/img/img-rogue/services/server/common/physmem_lma.c:1846:2: note: (near initialization for ‘_sPMRLMAFuncTab.<anonymous>’)
/home/jacky/VisionFive2/linux/drivers/gpu/drm/img/img-rogue/services/server/common/physmem_lma.c:1848:2: error: positional initialization of field in ‘struct’ declared with ‘designated_init’ attribute [-Werror=designated-init]
 1848 |  &PMRUnlockSysPhysAddressesLocalMem,
/home/jacky/VisionFive2/linux/drivers/gpu/drm/img/img-rogue/services/server/common/physmem_lma.c:1848:2: note: (near initialization for ‘_sPMRLMAFuncTab’)
/home/jacky/VisionFive2/linux/drivers/gpu/drm/img/img-rogue/services/server/common/physmem_lma.c:1848:2: error: initialization of ‘PVRSRV_ERROR (*)(void *, IMG_DEVMEM_OFFSET_T,  IMG_UINT8 *, size_t,  size_t *)’ {aka ‘enum PVRSRV_ERROR_TAG (*)(void *, long long unsigned int,  unsigned char *, long unsigned int,  long unsigned int *)’} from incompatible pointer type ‘PVRSRV_ERROR (*)(void *)’ {aka ‘enum PVRSRV_ERROR_TAG (*)(void *)’} [-Werror=incompatible-pointer-types]
/home/jacky/VisionFive2/linux/drivers/gpu/drm/img/img-rogue/services/server/common/physmem_lma.c:1848:2: note: (near initialization for ‘_sPMRLMAFuncTab.pfnReadBytes’)
/home/jacky/VisionFive2/linux/drivers/gpu/drm/img/img-rogue/services/server/common/physmem_lma.c:1850:2: error: positional initialization of field in ‘struct’ declared with ‘designated_init’ attribute [-Werror=designated-init]
 1850 |  &PMRSysPhysAddrLocalMem,
      |  ^
/home/jacky/VisionFive2/linux/drivers/gpu/drm/img/img-rogue/services/server/common/physmem_lma.c:1850:2: note: (near initialization for ‘_sPMRLMAFuncTab’)
/home/jacky/VisionFive2/linux/drivers/gpu/drm/img/img-rogue/services/server/common/physmem_lma.c:1850:2: error: initialization of ‘PVRSRV_ERROR (*)(void *, size_t,  size_t,  void **, void **, PMR_FLAGS_T)’ {aka ‘enum PVRSRV_ERROR_TAG (*)(void *, long unsigned int,  long unsigned int,  void **, void **, long long unsigned int)’} from incompatible pointer type ‘PVRSRV_ERROR (*)(void *, IMG_UINT32,  IMG_UINT32,  IMG_DEVMEM_OFFSET_T *, IMG_BOOL *, IMG_DEV_PHYADDR *)’ {aka ‘enum PVRSRV_ERROR_TAG (*)(void *, unsigned int,  unsigned int,  long long unsigned int *, enum tag_img_bool *, IMG_DEV_PHYADDR *)’} [-Werror=incompatible-pointer-types]
/home/jacky/VisionFive2/linux/drivers/gpu/drm/img/img-rogue/services/server/common/physmem_lma.c:1850:2: note: (near initialization for ‘_sPMRLMAFuncTab.pfnAcquireKernelMappingData’)
/home/jacky/VisionFive2/linux/drivers/gpu/drm/img/img-rogue/services/server/common/physmem_lma.c:1852:2: error: positional initialization of field in ‘struct’ declared with ‘designated_init’ attribute [-Werror=designated-init]
 1852 |  &PMRAcquireKernelMappingDataLocalMem,
      |  ^
/home/jacky/VisionFive2/linux/drivers/gpu/drm/img/img-rogue/services/server/common/physmem_lma.c:1852:2: note: (near initialization for ‘_sPMRLMAFuncTab’)
/home/jacky/VisionFive2/linux/drivers/gpu/drm/img/img-rogue/services/server/common/physmem_lma.c:1852:2: error: initialization of ‘void (*)(void)’ from incompatible pointer type ‘PVRSRV_ERROR (*)(void *, size_t,  size_t,  void **, void **, PMR_FLAGS_T)’ {aka ‘enum PVRSRV_ERROR_TAG (*)(void *, long unsigned int,  long unsigned int,  void **, void **, long long unsigned int)’} [-Werror=incompatible-pointer-types]
/home/jacky/VisionFive2/linux/drivers/gpu/drm/img/img-rogue/services/server/common/physmem_lma.c:1852:2: note: (near initialization for ‘_sPMRLMAFuncTab.pfnReleasePMRFactoryLock’)
/home/jacky/VisionFive2/linux/drivers/gpu/drm/img/img-rogue/services/server/common/physmem_lma.c:1854:2: error: positional initialization of field in ‘struct’ declared with ‘designated_init’ attribute [-Werror=designated-init]
 1854 |  &PMRReleaseKernelMappingDataLocalMem,
      |  ^
/home/jacky/VisionFive2/linux/drivers/gpu/drm/img/img-rogue/services/server/common/physmem_lma.c:1854:2: note: (near initialization for ‘_sPMRLMAFuncTab’)
/home/jacky/VisionFive2/linux/drivers/gpu/drm/img/img-rogue/services/server/common/physmem_lma.c:1854:2: error: initialization of ‘PVRSRV_ERROR (*)(void *)’ {aka ‘enum PVRSRV_ERROR_TAG (*)(void *)’} from incompatible pointer type ‘void (*)(void *, void *)’ [-Werror=incompatible-pointer-types]
/home/jacky/VisionFive2/linux/drivers/gpu/drm/img/img-rogue/services/server/common/physmem_lma.c:1854:2: note: (near initialization for ‘_sPMRLMAFuncTab.pfnUnpinMem’)
/home/jacky/VisionFive2/linux/drivers/gpu/drm/img/img-rogue/services/server/common/physmem_lma.c:1856:2: error: positional initialization of field in ‘struct’ declared with ‘designated_init’ attribute [-Werror=designated-init]
 1856 |  &PMRReadBytesLocalMem,
      |  ^
/home/jacky/VisionFive2/linux/drivers/gpu/drm/img/img-rogue/services/server/common/physmem_lma.c:1856:2: note: (near initialization for ‘_sPMRLMAFuncTab’)
/home/jacky/VisionFive2/linux/drivers/gpu/drm/img/img-rogue/services/server/common/physmem_lma.c:1858:2: error: positional initialization of field in ‘struct’ declared with ‘designated_init’ attribute [-Werror=designated-init]
 1858 |  &PMRWriteBytesLocalMem,
      |  ^
/home/jacky/VisionFive2/linux/drivers/gpu/drm/img/img-rogue/services/server/common/physmem_lma.c:1858:2: note: (near initialization for ‘_sPMRLMAFuncTab’)
/home/jacky/VisionFive2/linux/drivers/gpu/drm/img/img-rogue/services/server/common/physmem_lma.c:1858:2: error: initialization of ‘PVRSRV_ERROR (*)(void *, const PMR *, IMG_UINT64,  IMG_UINT32,  IMG_UINT32 *, IMG_UINT32,  IMG_UINT32 *)’ {aka ‘enum PVRSRV_ERROR_TAG (*)(void *, const struct _PMR_ *, long long unsigned int,  unsigned int,  unsigned int *, unsigned int,  unsigned int *)’} from incompatible pointer type ‘PVRSRV_ERROR (*)(void *, IMG_DEVMEM_OFFSET_T,  IMG_UINT8 *, size_t,  size_t *)’ {aka ‘enum PVRSRV_ERROR_TAG (*)(void *, long long unsigned int,  unsigned char *, long unsigned int,  long unsigned int *)’} [-Werror=incompatible-pointer-types]
/home/jacky/VisionFive2/linux/drivers/gpu/drm/img/img-rogue/services/server/common/physmem_lma.c:1858:2: note: (near initialization for ‘_sPMRLMAFuncTab.pfnChangeSparseMemCPUMap’)
In file included from /home/jacky/VisionFive2/linux/include/uapi/linux/posix_types.h:5,
                 from /home/jacky/VisionFive2/linux/include/uapi/linux/types.h:14,
                 from /home/jacky/VisionFive2/linux/include/linux/types.h:6,
                 from /home/jacky/VisionFive2/linux/drivers/gpu/drm/img/img-rogue/include/img_types.h:69,
                 from /home/jacky/VisionFive2/linux/drivers/gpu/drm/img/img-rogue/services/server/common/physmem_lma.c:45:
/home/jacky/VisionFive2/linux/include/linux/stddef.h:8:14: error: positional initialization of field in ‘struct’ declared with ‘designated_init’ attribute [-Werror=designated-init]
    8 | #define NULL ((void *)0)
      |              ^
/home/jacky/VisionFive2/linux/drivers/gpu/drm/img/img-rogue/services/server/common/physmem_lma.c:1860:2: note: in expansion of macro ‘NULL’
 1860 |  NULL,
      |  ^~~~
/home/jacky/VisionFive2/linux/include/linux/stddef.h:8:14: note: (near initialization for ‘_sPMRLMAFuncTab’)
    8 | #define NULL ((void *)0)
      |              ^
/home/jacky/VisionFive2/linux/drivers/gpu/drm/img/img-rogue/services/server/common/physmem_lma.c:1860:2: note: in expansion of macro ‘NULL’
 1860 |  NULL,
      |  ^~~~
/home/jacky/VisionFive2/linux/include/linux/stddef.h:8:14: error: positional initialization of field in ‘struct’ declared with ‘designated_init’ attribute [-Werror=designated-init]
    8 | #define NULL ((void *)0)
      |              ^
/home/jacky/VisionFive2/linux/drivers/gpu/drm/img/img-rogue/services/server/common/physmem_lma.c:1862:2: note: in expansion of macro ‘NULL’
 1862 |  NULL,
      |  ^~~~
/home/jacky/VisionFive2/linux/include/linux/stddef.h:8:14: note: (near initialization for ‘_sPMRLMAFuncTab’)
    8 | #define NULL ((void *)0)
      |              ^
/home/jacky/VisionFive2/linux/drivers/gpu/drm/img/img-rogue/services/server/common/physmem_lma.c:1862:2: note: in expansion of macro ‘NULL’
 1862 |  NULL,
      |  ^~~~
/home/jacky/VisionFive2/linux/drivers/gpu/drm/img/img-rogue/services/server/common/physmem_lma.c:1864:2: error: positional initialization of field in ‘struct’ declared with ‘designated_init’ attribute [-Werror=designated-init]
 1864 |  &PMRChangeSparseMemLocalMem,
      |  ^
/home/jacky/VisionFive2/linux/drivers/gpu/drm/img/img-rogue/services/server/common/physmem_lma.c:1864:2: note: (near initialization for ‘_sPMRLMAFuncTab’)
‘PVRSRV_ERROR (*)(void *, PMR_MAPPING_TABLE *)
Internal compiler error: Error reporting routines re-entered.
0x7f1c08055082 __libc_start_main
        ../csu/libc-start.c:308
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://bugs.buildroot.net/> for instructions.
make[7]: *** [/home/jacky/VisionFive2/linux/scripts/Makefile.build:277: drivers/gpu/drm/img/img-rogue/services/server/common/physmem_lma.o] Error 1
make[6]: *** [/home/jacky/VisionFive2/linux/scripts/Makefile.build:540: drivers/gpu/drm/img/img-rogue] Error 2
make[5]: *** [/home/jacky/VisionFive2/linux/scripts/Makefile.build:540: drivers/gpu/drm/img] Error 2
make[4]: *** [/home/jacky/VisionFive2/linux/scripts/Makefile.build:540: drivers/gpu/drm] Error 2
make[3]: *** [/home/jacky/VisionFive2/linux/scripts/Makefile.build:540: drivers/gpu] Error 2
make[2]: *** [/home/jacky/VisionFive2/linux/Makefile:1868: drivers] Error 2
make[2]: Leaving directory '/home/jacky/VisionFive2/work/linux'
make[1]: *** [Makefile:219: __sub-make] Error 2
make[1]: Leaving directory '/home/jacky/VisionFive2/linux'
make: *** [Makefile:218: /home/jacky/VisionFive2/work/linux/vmlinux] Error 2
jacky@Dev1:~/VisionFive2$

How can I solve this problem ? 

trying to buildroot with fedora silverblue podman container with ubuntu 20.04 focal

Running within Fedora Silverblue 37, I attempted to build the VF2(visionfive 2) image from within a podman ubuntu 20.04(focal) container rather than from straight ubuntu focal. Unfortunately, I have not been able to successfully repeat the build to get all the described VF2 build binaries and images and such with the steps described below.

  • Afterwards, how does one slip in/overlay the Fedora Silverblue 37 packages as much as possible into the VF2 image using the existing working VF2 kernel?
  • Why is it that buildroot also annoying downloads all the dependant packages from different repositories within the build process?
  • Why couldn't all these buildroot packages all be fetched beforehand AND THEN build?
  • Why is it that we don't separate the package documentation from the package binaries and optionally build documentation afterwards? This could save enormous amounts of build time when iterating through all this.
  1. fetch ubuntu 20.04 focal container

podman pull ubuntu:focal-20221130

  1. create a directory to share data between the container and the host fedora silverblue 37

mkdir -p /mnt/vf2share

  1. start ubuntu 20.04 focal container
podman run -v ~/vf2share:/mnt/vf2share --net host -i -t ubuntu:focal-20221130 /bin/bash
#Later we'll start it like this after it has been committed
podman run -v /var/home/davidm/vf2share:/mnt/vf2share:Z --net host -i -t ubuntu-vf2-buildr /bin/bash
  1. issues with group and owner in the build.
tar: Makefile.in: Cannot change ownership to uid 71588, gid 10513: Invalid argument
tar: README: Cannot change ownership to uid 71588, gid 10513: Invalid argument
tar: Exiting with failure status due to previous errors

Attempted to resolve them with this alias, but did nothing to help. There are a lot of instances of "am__untar" holding tar commands. I can't possibly ask for a change request for this many files just to run this in a container. Don't most CI systems use containers to build stuff? Are there other devs here experiencing such issues or you resort to running native os in order to do this kind of work always? The tar flag in question to resolve all this is "--no-same-owner" but it has to be applied everywhere consistently.
alias tar='tar --no-same-owner'

Inside ubuntu 20.04 focal container

  1. create the vf2 prep directory
mkdir visionfive2prep
cd visionfive2prep/
  1. install required build packages
apt update
apt-get install curl
apt-get install git-lfs
apt-get install build-essential g++ git autoconf automake autotools-dev texinfo bison xxd curl flex gawk gdisk gperf libgmp-dev libmpfr-dev libmpc-dev libz-dev libssl-dev libncurses-dev libtool patchutils python screen texinfo unzip zlib1g-dev libyaml-dev wget cpio bc dosfstools mtools device-tree-compiler libglib2.0-dev libpixman-1-dev kpartx
apt-get install rsync
apt-get install kmod
apt-get install time
apt-get install emacs-nox
  1. finish configuring git-lfs
curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh -o script.deb.sh
sudo bash ./script.deb.sh

 
8. clone the vf2 repo

git clone https://github.com/starfive-tech/VisionFive2.git

  1. changed directory to within vf2

cd VisionFive2

  1. modify the .gitmodules file to point to https url.
cat .gitmodules 
[submodule "buildroot"]
    path = buildroot
    url = https://github.com/starfive-tech/buildroot.git
    branch = JH7110_VisionFive2_devel
[submodule "u-boot"]
    path = u-boot
    url = https://github.com/starfive-tech/u-boot.git
    branch = JH7110_VisionFive2_devel
[submodule "linux"]
    path = linux
    url = https://github.com/starfive-tech/linux.git
    branch = JH7110_VisionFive2_devel
[submodule "opensbi"]
    path = opensbi
    url = https://github.com/starfive-tech/opensbi.git
    branch = master
  1. modify conf/buildroot_initramfs_config and conf/buildroot_rootfs_config to have the same https url

BR2_KERNEL_HEADERS_CUSTOM_REPO_URL="https://github.com/starfive-tech/linux.git"
 
12. Now checkout and submodule update

cd VisionFive2
git checkout JH7110_VisionFive2_devel
git submodule update --init --recursive
  1. Ensure we checkout on the label JH7110_VisionFive2_devel for all except opensbi
cd buildroot && git checkout --track origin/JH7110_VisionFive2_devel && cd ..
cd u-boot && git checkout --track origin/JH7110_VisionFive2_devel && cd ..
cd linux && git checkout --track origin/JH7110_VisionFive2_devel && cd ..
cd opensbi && git checkout master && cd ..
cd soft_3rdpart && git checkout JH7110_VisionFive2_devel && cd ..

 
14. I used an emacs shell with no color enabled to capture the build output for discussing with other developers. You can use whatever you want.

emacs -nw --color=no
#alt-x shell
  1. Now start the build of everything
time make -j$(nproc)
# or 
time make -j$(nproc) all

FINISHED ubuntu 20.04 focal container

  1. pause podman container

ctrl-p ctrl-q
 
17. list podman containers

podman ps

Output will contain:
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
8c35f4187b36 docker.io/library/ubuntu:focal-20221130 /bin/bash 2 hours ago Up 2 hours ago admiring_wescoff

  1. save all our actions and name the container

podman commit 8c35f4187b36 ubuntu-vf2-buildr
 
attach back into the running session

podman attach ubuntu-vf2-buildr

exit the container

exit

kill any running containers

podman kill 8c35f4187b36
 
next time you want to use this container:

podman run -v /var/home/davidm/vf2share:/mnt/vf2share:Z --net host -i -t ubuntu-vf2-buildr /bin/bash

Thank you in advance for any help on these matters. Cheers.

Build buildroot_rootfs fails (404 not found / mismatched hash)

Building on Ubuntu 20.04. Building a fresh checkout fails with wget of img-gpu-powervr-bin-1.17.6210866.tar.gz not found.

Following the instructions in this forum post resulted in an MD5 mismatch and a 404 Not found:

'/home/vagrant/VisionFive2/buildroot/../soft_3rdpart/IMG_GPU/out/img-gpu-powervr-bin-1.17.6210866.tar.gz' -> '/home/vagrant/VisionFive2/work/buildroot_initramfs/build/.img-gpu-powervr-bin-1.17.6210866.tar.gz.moArTp/output'
ERROR: img-gpu-powervr-bin-1.17.6210866.tar.gz has wrong sha256 hash:
ERROR: expected: 237c44e22453e4be6648a854c4333493d00fe5a2e5bd8775644005758198807c
ERROR: got     : cc99dfe5746321aa0d3f2b40de2300d2066e9e0a0d7b8de984bb98645a1be940
ERROR: Incomplete download, or man-in-the-middle (MITM) attack
wget --passive-ftp -nd -t 3 -O '/home/vagrant/VisionFive2/work/buildroot_initramfs/build/.img-gpu-powervr-bin-1.17.6210866.tar.gz.Bf4ldP/output' 'http://sources.buildroot.net/img-gpu-powervr/img-gpu-powervr-bin-1.17.6210866.tar.gz' 
--2023-05-28 02:10:49--  http://sources.buildroot.net/img-gpu-powervr/img-gpu-powervr-bin-1.17.6210866.tar.gz
Resolving sources.buildroot.net (sources.buildroot.net)... 104.26.0.37, 104.26.1.37, 172.67.72.56, ...
Connecting to sources.buildroot.net (sources.buildroot.net)|104.26.0.37|:80... connected.
HTTP request sent, awaiting response... 404 Not Found
2023-05-28 02:10:49 ERROR 404: Not Found.

When compile u-boot with GCC 12.2.0 toolchain, arch/riscv/Makefile needs to be updated.

I got u-boot source code from here:
https://github.com/starfive-tech/u-boot/releases/tag/VF2_v2.5.0

[u-boot-VF2_v2.5.0]$ riscv64-linux-gnu-gcc --version
riscv64-linux-gnu-gcc (GCC) 12.2.0

When I use this version of toolchain to compile u-boot, got compiling error:

arch/riscv/cpu/cpu.c: Assembler messages:
arch/riscv/cpu/cpu.c:96: Error: unrecognized opcode `csrs sstatus,a5', extension `zicsr' required
arch/riscv/cpu/cpu.c:97: Error: unrecognized opcode `csrw 0x003,0', extension `zicsr' required
make[1]: *** [scripts/Makefile.build:254: arch/riscv/cpu/cpu.o] Error 1
make: *** [Makefile:1817: arch/riscv/cpu] Error 2

After search a while, I fetched
https://github.com/u-boot/u-boot/blob/master/arch/riscv/Makefile
to replace the original file in u-boot_path/arch/riscv/

And then compile without error.

Way from SDK to IMG

Hello together,

is there a way or description how we move new features from SDK to an Image for example the new released starfive image.
For example i can build in SDK new kernel options or drivers but i dont know how to move it to the image.
Here is such example to move new kernel feuter to the fedora image https://github.com/starfive-tech/linux

But it isnt usable for starvision2 ?

Best regards
Damian

ispsdk build fails due to broken linker script

I'm trying to build HEAD (at 532608c) and am failing in the ispsdk step.

make -C /home/kth5/code/riscv/VisionFive2/buildroot RISCV=/home/kth5/code/riscv/VisionFive2/work/buildroot_initramfs/host O=/home/kth5/code/riscv/VisionFive2/work/buildroot_initramfs
make[1]: Entering directory '/home/kth5/code/riscv/VisionFive2/buildroot'
>>> ispsdk 2.0.0 Building
PATH="/home/kth5/code/riscv/VisionFive2/work/buildroot_initramfs/host/bin:/home/kth5/code/riscv/VisionFive2/work/buildroot_initramfs/host/sbin:/home/kth5/.bin:/home/kth5/code/archpower-tools/helpers:/home/kth5/.bin:/home/kth5/code/archpower-tools/helpers:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/usr/lib/jvm/default/bin"  /usr/bin/make -j33  -C /home/kth5/code/riscv/VisionFive2/work/buildroot_initramfs/build/ispsdk-2.0.0//buildroot-build
make[2]: Entering directory '/home/kth5/code/riscv/VisionFive2/work/buildroot_initramfs/build/ispsdk-2.0.0/buildroot-build'
make[3]: Entering directory '/home/kth5/code/riscv/VisionFive2/work/buildroot_initramfs/build/ispsdk-2.0.0/buildroot-build'
make[4]: Entering directory '/home/kth5/code/riscv/VisionFive2/work/buildroot_initramfs/build/ispsdk-2.0.0/buildroot-build'
make[4]: Leaving directory '/home/kth5/code/riscv/VisionFive2/work/buildroot_initramfs/build/ispsdk-2.0.0/buildroot-build'
[  0%] Built target Mantis_RegistersDefinitions
make[4]: Entering directory '/home/kth5/code/riscv/VisionFive2/work/buildroot_initramfs/build/ispsdk-2.0.0/buildroot-build'
make[4]: Leaving directory '/home/kth5/code/riscv/VisionFive2/work/buildroot_initramfs/build/ispsdk-2.0.0/buildroot-build'
[  9%] Built target SensorApi
make[4]: Entering directory '/home/kth5/code/riscv/VisionFive2/work/buildroot_initramfs/build/ispsdk-2.0.0/buildroot-build'
make[4]: Entering directory '/home/kth5/code/riscv/VisionFive2/work/buildroot_initramfs/build/ispsdk-2.0.0/buildroot-build'
make[4]: Entering directory '/home/kth5/code/riscv/VisionFive2/work/buildroot_initramfs/build/ispsdk-2.0.0/buildroot-build'
make[4]: Leaving directory '/home/kth5/code/riscv/VisionFive2/work/buildroot_initramfs/build/ispsdk-2.0.0/buildroot-build'
make[4]: Leaving directory '/home/kth5/code/riscv/VisionFive2/work/buildroot_initramfs/build/ispsdk-2.0.0/buildroot-build'
make[4]: Leaving directory '/home/kth5/code/riscv/VisionFive2/work/buildroot_initramfs/build/ispsdk-2.0.0/buildroot-build'
make[4]: Entering directory '/home/kth5/code/riscv/VisionFive2/work/buildroot_initramfs/build/ispsdk-2.0.0/buildroot-build'
make[4]: Entering directory '/home/kth5/code/riscv/VisionFive2/work/buildroot_initramfs/build/ispsdk-2.0.0/buildroot-build'
make[4]: Entering directory '/home/kth5/code/riscv/VisionFive2/work/buildroot_initramfs/build/ispsdk-2.0.0/buildroot-build'
make[4]: Entering directory '/home/kth5/code/riscv/VisionFive2/work/buildroot_initramfs/build/ispsdk-2.0.0/buildroot-build'
[ 10%] Linking C executable stf_isp_ctrl
[ 12%] Linking C executable stf_isp_test
make[4]: Leaving directory '/home/kth5/code/riscv/VisionFive2/work/buildroot_initramfs/build/ispsdk-2.0.0/buildroot-build'
[ 13%] Linking C executable StarFiveServer
/home/kth5/code/riscv/VisionFive2/work/buildroot_initramfs/host/lib/gcc/riscv64-buildroot-linux-gnu/10.3.0/../../../../riscv64-buildroot-linux-gnu/bin/ld:/home/kth5/code/riscv/VisionFive2/work/buildroot_initramfs/build/ispsdk-2.0.0/libispsdk/libStfIncludes.a: file format not recognized; treating as linker script
/home/kth5/code/riscv/VisionFive2/work/buildroot_initramfs/host/lib/gcc/riscv64-buildroot-linux-gnu/10.3.0/../../../../riscv64-buildroot-linux-gnu/bin/ld:/home/kth5/code/riscv/VisionFive2/work/buildroot_initramfs/build/ispsdk-2.0.0/libispsdk/libStfIncludes.a:1: syntax error
collect2: error: ld returned 1 exit status
make[4]: *** [test_apps/stf_isp_ctrl/CMakeFiles/stf_isp_ctrl.dir/build.make:105: test_apps/stf_isp_ctrl/stf_isp_ctrl] Error 1
make[4]: Leaving directory '/home/kth5/code/riscv/VisionFive2/work/buildroot_initramfs/build/ispsdk-2.0.0/buildroot-build'
make[3]: *** [CMakeFiles/Makefile2:359: test_apps/stf_isp_ctrl/CMakeFiles/stf_isp_ctrl.dir/all] Error 2
make[3]: *** Waiting for unfinished jobs....
/home/kth5/code/riscv/VisionFive2/work/buildroot_initramfs/host/lib/gcc/riscv64-buildroot-linux-gnu/10.3.0/../../../../riscv64-buildroot-linux-gnu/bin/ld:/home/kth5/code/riscv/VisionFive2/work/buildroot_initramfs/build/ispsdk-2.0.0/libispsdk/libStfIncludes.a: file format not recognized; treating as linker script
/home/kth5/code/riscv/VisionFive2/work/buildroot_initramfs/host/lib/gcc/riscv64-buildroot-linux-gnu/10.3.0/../../../../riscv64-buildroot-linux-gnu/bin/ld:/home/kth5/code/riscv/VisionFive2/work/buildroot_initramfs/build/ispsdk-2.0.0/libispsdk/libStfIncludes.a:1: syntax error
collect2: error: ld returned 1 exit status
make[4]: *** [test_apps/stf_isp_test/CMakeFiles/stf_isp_test.dir/build.make:216: test_apps/stf_isp_test/stf_isp_test] Error 1
make[4]: Leaving directory '/home/kth5/code/riscv/VisionFive2/work/buildroot_initramfs/build/ispsdk-2.0.0/buildroot-build'
make[3]: *** [CMakeFiles/Makefile2:385: test_apps/stf_isp_test/CMakeFiles/stf_isp_test.dir/all] Error 2
/home/kth5/code/riscv/VisionFive2/work/buildroot_initramfs/host/lib/gcc/riscv64-buildroot-linux-gnu/10.3.0/../../../../riscv64-buildroot-linux-gnu/bin/ld:/home/kth5/code/riscv/VisionFive2/work/buildroot_initramfs/build/ispsdk-2.0.0/libispsdk/libStfIncludes.a: file format not recognized; treating as linker script
/home/kth5/code/riscv/VisionFive2/work/buildroot_initramfs/host/lib/gcc/riscv64-buildroot-linux-gnu/10.3.0/../../../../riscv64-buildroot-linux-gnu/bin/ld:/home/kth5/code/riscv/VisionFive2/work/buildroot_initramfs/build/ispsdk-2.0.0/libispsdk/libStfIncludes.a:1: syntax error
collect2: error: ld returned 1 exit status
make[4]: Entering directory '/home/kth5/code/riscv/VisionFive2/work/buildroot_initramfs/build/ispsdk-2.0.0/buildroot-build'
make[4]: *** [startfive_apps/StarFiveServer/CMakeFiles/StarFiveServer.dir/build.make:281: startfive_apps/StarFiveServer/StarFiveServer] Error 1
make[4]: Leaving directory '/home/kth5/code/riscv/VisionFive2/work/buildroot_initramfs/build/ispsdk-2.0.0/buildroot-build'
make[3]: *** [CMakeFiles/Makefile2:411: startfive_apps/StarFiveServer/CMakeFiles/StarFiveServer.dir/all] Error 2
[ 15%] Linking C executable ISP_test
/home/kth5/code/riscv/VisionFive2/work/buildroot_initramfs/host/lib/gcc/riscv64-buildroot-linux-gnu/10.3.0/../../../../riscv64-buildroot-linux-gnu/bin/ld:/home/kth5/code/riscv/VisionFive2/work/buildroot_initramfs/build/ispsdk-2.0.0/libispsdk/libStfIncludes.a: file format not recognized; treating as linker script
/home/kth5/code/riscv/VisionFive2/work/buildroot_initramfs/host/lib/gcc/riscv64-buildroot-linux-gnu/10.3.0/../../../../riscv64-buildroot-linux-gnu/bin/ld:/home/kth5/code/riscv/VisionFive2/work/buildroot_initramfs/build/ispsdk-2.0.0/libispsdk/libStfIncludes.a:1: syntax error
collect2: error: ld returned 1 exit status
make[4]: *** [test_apps/ISP_test/CMakeFiles/ISP_test.dir/build.make:649: test_apps/ISP_test/ISP_test] Error 1
make[4]: Leaving directory '/home/kth5/code/riscv/VisionFive2/work/buildroot_initramfs/build/ispsdk-2.0.0/buildroot-build'
make[3]: *** [CMakeFiles/Makefile2:333: test_apps/ISP_test/CMakeFiles/ISP_test.dir/all] Error 2
make[3]: Leaving directory '/home/kth5/code/riscv/VisionFive2/work/buildroot_initramfs/build/ispsdk-2.0.0/buildroot-build'
make[2]: *** [Makefile:146: all] Error 2
make[2]: Leaving directory '/home/kth5/code/riscv/VisionFive2/work/buildroot_initramfs/build/ispsdk-2.0.0/buildroot-build'
make[1]: *** [package/pkg-generic.mk:295: /home/kth5/code/riscv/VisionFive2/work/buildroot_initramfs/build/ispsdk-2.0.0/.stamp_built] Error 2
make[1]: Leaving directory '/home/kth5/code/riscv/VisionFive2/buildroot'
make: *** No rule to make target '/home/kth5/code/riscv/VisionFive2/work/buildroot_initramfs/images/rootfs.tar', needed by '/home/kth5/code/riscv/VisionFive2/work/.buildroot_initramfs_sysroot'.  Stop.

The contents of libStfIncludes.a are:

version https://git-lfs.github.com/spec/v1
oid sha256:52ea68d85a53c83430536a66b3d159f6610bd8cd44f26f4679519e29e576ca85
size 14854

This is building on Arch POWER on ppc64le btw.

Linux Kernel Crypto API produces garbage for AES

Steps to reproduce

  1. Install a system with Debian using the (currently latest available) starfive-jh7110-VF2_515_v2.5.0-69.img image linked to from https://debian.starfivetech.com/ & set the system up with build tools. then do:
mkdir repro-bad-aes && cd repro-bad-aes
git clone https://github.com/python/cpython -b 3.11
mkdir build && cd build
../cpython/configure && make -j4
./python -m test -v test_socket -m '*LinuxKernelCrypto*'

Failures

======================================================================
FAIL: test_aead_aes_gcm (test.test_socket.LinuxKernelCryptoAPI.test_aead_aes_gcm)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "../cpython/Lib/test/test_socket.py", line 6507, in test_aead_aes_gcm
    self.assertEqual(expected_ct, res[assoclen:-taglen])
AssertionError: b'\x93\xfe}\x9e\x9b\xfd\x104\x8aV\x06\xe5\xca\xfasT' != b'^\xcb\x8e3\x7f\xd2wN\xc2W\xccH\xe6\xa1T\x0e'

======================================================================
FAIL: test_aes_cbc (test.test_socket.LinuxKernelCryptoAPI.test_aes_cbc)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "../cpython/Lib/test/test_socket.py", line 6451, in test_aes_cbc
    self.assertEqual(op.recv(msglen), msg)
AssertionError: b'\x06\x8c\x86gk\x0b@0\xbdt^\xfa\xed\xb4:\xa7' != b'Single block msg'

The other LinuxKernelCryptoAPI tests pass, it seems to be the ones attempting to use AES that produce garbage.

$ uname -a
Linux starfive 5.15.0-starfive #1 SMP Mon Dec 19 07:56:37 EST 2022 riscv64 GNU/Linux

1G network jack not working, 100M network jack does

I can't get the 1G networking to work with either the precompiled debian image or using the linux kernel for the VisionFive2 off the starfive-tech github. The 100M jack works fine.

Does the 1G network work? I can get the interface to go up and see the cable is up on my switch, but nothing works.

Failed to compile standalone driver module

i use img debian 69
and the toolchain is the gcc that i installed by apt in the 69img

and i git cloned the linux source form here,then i follow this doc to build the img to configure the settings.and i use this way to build,the makefile:

ARCH = riscv
CROSS_COMPILE =


KERN_DIR =  /home/**path to linux source**/linux

all:
        make -C $(KERN_DIR) M=`pwd` modules 

clean:
        make -C $(KERN_DIR) M=`pwd` modules clean
        rm -rf modules.order

obj-m   += hello_drv.o

i can get the .ko file but i cannot insmod this file.the message is

insmod: ERROR: could not insert module hello_drv.ko: Invalid module format

when i use the commanddmesg |grep hellodev(the mode name),the message is:

hello_drv: version magic '5.15.0 SMP mod_unload riscv' should be '5.15.0-starfive SMP mod_unload riscv'

so,i change the makefile:

ARCH = riscv
CROSS_COMPILE =

KVERSION = $(shell uname -r)
KERN_DIR =  /lib/modules/$(KVERSION)/build 

all:
        make -C $(KERN_DIR) M=`pwd` modules 

clean:
        make -C $(KERN_DIR) M=`pwd` modules clean
        rm -rf modules.order

obj-m   += hello_drv.o

but the err message is :

make -C /lib/modules/5.15.0-starfive/build  M=`pwd` modules 
make[1]: 进入目录“/usr/src/linux-headers-5.15.0-starfive”
scripts/Makefile.build:44: arch/riscv/kernel/vdso/Makefile: 没有那个文件或目录
make[2]: *** 没有规则可制作目标“arch/riscv/kernel/vdso/Makefile”。 停止。
make[1]: *** [arch/riscv/Makefile:114:vdso_prepare] 错误 2
make[1]: 离开目录“/usr/src/linux-headers-5.15.0-starfive”
make: *** [Makefile:8:all] 错误 2

Monochrome camera sensor support (Y8 Y10)

Hello, just briefly looked into kernel code and found no out-of-the-box support for:

  • MEDIA_BUS_FMT_Y8_1X8
  • MEDIA_BUS_FMT_Y10_1X10

Those are only two formats my camera sensor can work with.

Is this planned?
What are the code changes required to output my camera to /dev/video0 (directly)?

error when running make

I am following the build instructions in README.md.

However, I am getting the following error

(py38) kuangfangjun:VisionFive2$ rm -rf work/
(py38) kuangfangjun:VisionFive2$ make -j 3
mkdir -p /star-fj/fangjun/open-source/VisionFive2/work/buildroot_initramfs/
cp /star-fj/fangjun/open-source/VisionFive2/conf/buildroot_initramfs_config /star-fj/fangjun/open-source/VisionFive2/work/buildroot_initramfs/.config
make -C /star-fj/fangjun/open-source/VisionFive2/buildroot RISCV=/star-fj/fangjun/open-source/VisionFive2/work/buildroot_initramfs/host O=/star-fj/fan
gjun/open-source/VisionFive2/work/buildroot_initramfs olddefconfig
make[1]: Entering directory '/star-fj/fangjun/open-source/VisionFive2/buildroot'
mkdir -p /star-fj/fangjun/open-source/VisionFive2/work/buildroot_initramfs/build/buildroot-config/lxdialog
PKG_CONFIG_PATH="" make CC="/usr/bin/gcc" HOSTCC="/usr/bin/gcc" \
    obj=/star-fj/fangjun/open-source/VisionFive2/work/buildroot_initramfs/build/buildroot-config -C support/kconfig -f Makefile.br conf
make[2]: Entering directory '/star-fj/fangjun/open-source/VisionFive2/buildroot/support/kconfig'
/usr/bin/gcc -D_GNU_SOURCE -D_DEFAULT_SOURCE -I/usr/include/ncursesw -DCURSES_LOC="<ncurses.h>" -DNCURSES_WIDECHAR=1 -DLOCALE  -I/star-fj/fangjun/open
-source/VisionFive2/work/buildroot_initramfs/build/buildroot-config -DCONFIG_=\"\"  -MM *.c > /star-fj/fangjun/open-source/VisionFive2/work/buildroot_
initramfs/build/buildroot-config/.depend 2>/dev/null || :
/usr/bin/gcc -D_GNU_SOURCE -D_DEFAULT_SOURCE -I/usr/include/ncursesw -DCURSES_LOC="<ncurses.h>" -DNCURSES_WIDECHAR=1 -DLOCALE  -I/star-fj/fangjun/open
-source/VisionFive2/work/buildroot_initramfs/build/buildroot-config -DCONFIG_=\"\"   -c conf.c -o /star-fj/fangjun/open-source/VisionFive2/work/buildroot_initramfs/build/buildroot-config/conf.o
/usr/bin/gcc -D_GNU_SOURCE -D_DEFAULT_SOURCE -I/usr/include/ncursesw -DCURSES_LOC="<ncurses.h>" -DNCURSES_WIDECHAR=1 -DLOCALE  -I/star-fj/fangjun/open-source/VisionFive2/work/buildroot_initramfs/build/buildroot-config -DCONFIG_=\"\"  -I. -c /star-fj/fangjun/open-source/VisionFive2/work/buildroot_initramfs/build/buildroot-config/zconf.tab.c -o /star-fj/fangjun/open-source/VisionFive2/work/buildroot_initramfs/build/buildroot-config/zconf.tab.o
/usr/bin/gcc -D_GNU_SOURCE -D_DEFAULT_SOURCE -I/usr/include/ncursesw -DCURSES_LOC="<ncurses.h>" -DNCURSES_WIDECHAR=1 -DLOCALE  -I/star-fj/fangjun/open-source/VisionFive2/work/buildroot_initramfs/build/buildroot-config -DCONFIG_=\"\"   /star-fj/fangjun/open-source/VisionFive2/work/buildroot_initramfs/build/buildroot-config/conf.o /star-fj/fangjun/open-source/VisionFive2/work/buildroot_initramfs/build/buildroot-config/zconf.tab.o  -o /star-fj/fangjun/open-source/VisionFive2/work/buildroot_initramfs/build/buildroot-config/conf
rm /star-fj/fangjun/open-source/VisionFive2/work/buildroot_initramfs/build/buildroot-config/zconf.tab.c
make[2]: Leaving directory '/star-fj/fangjun/open-source/VisionFive2/buildroot/support/kconfig'
  GEN     /star-fj/fangjun/open-source/VisionFive2/work/buildroot_initramfs/Makefile
package/starfive/img-gpu-powervr/Config.in:77:warning: config symbol defined without type
#
# configuration written to /star-fj/fangjun/open-source/VisionFive2/work/buildroot_initramfs/.config
#
make[1]: Leaving directory '/star-fj/fangjun/open-source/VisionFive2/buildroot'
make -C /star-fj/fangjun/open-source/VisionFive2/buildroot RISCV=/star-fj/fangjun/open-source/VisionFive2/work/buildroot_initramfs/host O=/star-fj/fan
gjun/open-source/VisionFive2/work/buildroot_initramfs
make[1]: Entering directory '/star-fj/fangjun/open-source/VisionFive2/buildroot'
/usr/bin/make -j1 O=/star-fj/fangjun/open-source/VisionFive2/work/buildroot_initramfs HOSTCC="/usr/bin/gcc" HOSTCXX="/usr/bin/g++" syncconfig
make[2]: Entering directory '/star-fj/fangjun/open-source/VisionFive2/buildroot'
make[2]: warning: -jN forced in submake: disabling jobserver mode.
  GEN     /star-fj/fangjun/open-source/VisionFive2/work/buildroot_initramfs/Makefile
package/starfive/img-gpu-powervr/Config.in:77:warning: config symbol defined without type
make[2]: Leaving directory '/star-fj/fangjun/open-source/VisionFive2/buildroot'

You seem to have the current working directory in your
LD_LIBRARY_PATH environment variable. This doesn't work.
support/dependencies/dependencies.mk:27: recipe for target 'dependencies' failed
make[1]: *** [dependencies] Error 1
make[1]: Leaving directory '/star-fj/fangjun/open-source/VisionFive2/buildroot'
make: *** No rule to make target '/star-fj/fangjun/open-source/VisionFive2/work/buildroot_initramfs/host/bin/riscv64-buildroot-linux-gnu-gcc', needed
by '/star-fj/fangjun/open-source/VisionFive2/work/u-boot/u-boot.bin'.  Stop.
(py38) kuangfangjun:VisionFive2$ echo $LD_LIBRARY_PATH
/star-fj/fangjun/software/protobuf-3.20.1-cmake/lib:/star-fj/fangjun/software/cuda-10.2.89/lib:/star-fj/fangjun/software/cuda-10.2.89/lib64:
(py38) kuangfangjun:VisionFive2$

The error log is not informative and I have no idea where to start debugging.

The repository 'https://snapshot.debian.org/archive/debian-ports/20221225T084846Z unstable InRelease' is not signed

Get:1 https://snapshot.debian.org/archive/debian-ports/20221225T084846Z unstable InRelease [69.6 kB]
Err:1 https://snapshot.debian.org/archive/debian-ports/20221225T084846Z unstable InRelease
The following signatures were invalid: EXPKEYSIG $MYKEY Debian Ports Archive Automatic Signing Key (2022) [email protected]
Reading package lists... Done
W: GPG error: https://snapshot.debian.org/archive/debian-ports/20221225T084846Z unstable InRelease: The following signatures were invalid: EXPKEYSIG $MYKEY Debian Ports Archive Automatic Signing Key (2022) [email protected]
E: The repository 'https://snapshot.debian.org/archive/debian-ports/20221225T084846Z unstable InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

kernel tag VF2_v3.0.4 crashes on boot

I compile the kernel with tag VF2_v3.0.4 and when boot it i got: [drm:inno_hdmi_bind] ERROR cannot get hpd gpio property
and a kernel panic.

[ 0.000000] Linux version 5.15.0+ (user@starfive) (gcc (Debian 12.2.0-10) 12.2.0, GNU ld (GNU Binutils for Debian) 2.39.50.20221224) #2 SMP Mon Jun 5 20:22:46 UTC 2023
[ 0.000000] OF: fdt: Ignoring memory range 0x40000000 - 0x40200000
[ 0.000000] Machine model: StarFive VisionFive V2
[ 0.000000] earlycon: uart0 at MMIO32 0x0000000010000000 (options '115200')
[ 0.000000] printk: bootconsole [uart0] enabled
[ 0.000000] efi: UEFI not found.
[ 0.000000] Reserved memory: created CMA memory pool at 0x0000000080000000, size 512 MiB
[ 0.000000] OF: reserved mem: initialized node linux,cma, compatible id shared-dma-pool
[ 0.000000] Zone ranges:
[ 0.000000] DMA32 [mem 0x0000000040200000-0x00000000ffffffff]
[ 0.000000] Normal [mem 0x0000000100000000-0x000000023fffffff]
[ 0.000000] Movable zone start for each node
[ 0.000000] Early memory node ranges
[ 0.000000] node 0: [mem 0x0000000040200000-0x00000000c010ffff]
[ 0.000000] node 0: [mem 0x00000000c0110000-0x00000000c01fffff]
[ 0.000000] node 0: [mem 0x00000000c0200000-0x000000023fffffff]
[ 0.000000] Initmem setup node 0 [mem 0x0000000040200000-0x000000023fffffff]
[ 0.000000] SBI specification v1.0 detected
[ 0.000000] SBI implementation ID=0x1 Version=0x10002
[ 0.000000] SBI TIME extension detected
[ 0.000000] SBI IPI extension detected
[ 0.000000] SBI RFENCE extension detected
[ 0.000000] SBI SRST extension detected
[ 0.000000] SBI v0.2 HSM extension detected
[ 0.000000] CPU with hartid=0 is not available
[ 0.000000] CPU with hartid=0 is not available
[ 0.000000] riscv: base ISA extensions acdfim
[ 0.000000] riscv: ELF capabilities acdfim
[ 0.000000] percpu: Embedded 18 pages/cpu s34024 r8192 d31512 u73728
[ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 2067975
[ 0.000000] Kernel command line: root=/dev/mmcblk1p4 root=/dev/mmcblk1p4 rw console=tty0 console=ttyS0,115200 earlycon rootwait stmmaceth=chain_mode:1 selinux=0
[ 0.000000] Unknown command line parameters: stmmaceth=chain_mode:1 selinux=0
[ 0.000000] Dentry cache hash table entries: 1048576 (order: 11, 8388608 bytes, linear)
[ 0.000000] Inode-cache hash table entries: 524288 (order: 10, 4194304 bytes, linear)
[ 0.000000] mem auto-init: stack:all(pattern), heap alloc:off, heap free:off
[ 0.000000] software IO TLB: mapped [mem 0x00000000fbfff000-0x00000000fffff000] (64MB)
[ 0.000000] Memory: 7580644K/8386560K available (10050K kernel code, 4991K rwdata, 4096K rodata, 2197K init, 619K bss, 281628K reserved, 524288K cma-reserved)
[ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[ 0.000000] rcu: Hierarchical RCU implementation.
[ 0.000000] rcu: RCU restricting CPUs from NR_CPUS=8 to nr_cpu_ids=4.
[ 0.000000] rcu: RCU debug extended QS entry/exit.
[ 0.000000] Tracing variant of Tasks RCU enabled.
[ 0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies.
[ 0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=4
[ 0.000000] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0
[ 0.000000] CPU with hartid=0 is not available
[ 0.000000] riscv-intc: unable to find hart id for /cpus/cpu@0/interrupt-controller
[ 0.000000] riscv-intc: 64 local interrupts mapped
[ 0.000000] plic: plic@c000000: mapped 136 interrupts with 4 handlers for 9 contexts.
[ 0.000000] random: get_random_bytes called from start_kernel+0x4d6/0x6f2 with crng_init=0
[ 0.000000] riscv_timer_init_dt: Registering clocksource cpuid [0] hartid [1]
[ 0.000000] clocksource: riscv_clocksource: mask: 0xffffffffffffffff max_cycles: 0x1d854df40, max_idle_ns: 881590404240 ns
[ 0.000001] sched_clock: 64 bits at 4MHz, resolution 250ns, wraps every 2199023255500ns
[ 0.008999] clocksource: [email protected]: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[ 0.020322] clocksource: [email protected]: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[ 0.031644] clocksource: [email protected]: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[ 0.042966] clocksource: [email protected]: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[ 0.054500] Console: colour dummy device 80x25
[ 0.060766] printk: console [tty0] enabled
[ 0.065321] Calibrating delay loop (skipped), value calculated using timer frequency.. 8.00 BogoMIPS (lpj=40000)
[ 0.076546] pid_max: default: 32768 minimum: 301
[ 0.081895] Mount-cache hash table entries: 16384 (order: 5, 131072 bytes, linear)
[ 0.090386] Mountpoint-cache hash table entries: 16384 (order: 5, 131072 bytes, linear)
[ 0.100710] ASID allocator disabled
[ 0.104647] rcu: Hierarchical SRCU implementation.
[ 0.110099] EFI services will not be available.
[ 0.115491] smp: Bringing up secondary CPUs ...
[ 0.122164] smp: Brought up 1 node, 4 CPUs
[ 0.128675] devtmpfs: initialized
[ 0.140554] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[ 0.151421] futex hash table entries: 1024 (order: 4, 65536 bytes, linear)
[ 0.172156] pinctrl core: initialized pinctrl subsystem
[ 0.178825] NET: Registered PF_NETLINK/PF_ROUTE protocol family
[ 0.186062] thermal_sys: Registered thermal governor 'step_wise'
[ 0.186410] cpuidle: using governor menu
[ 0.221692] platform soc:dsi-output: Fixing up cyclic dependency with 29400000.dc8200
[ 0.230885] platform 295d0000.mipi: Fixing up cyclic dependency with soc:dsi-output
[ 0.239739] platform 29590000.hdmi: Fixing up cyclic dependency with 29400000.dc8200
[ 0.260173] HugeTLB registered 1.00 GiB page size, pre-allocated 0 pages
[ 0.267558] HugeTLB registered 2.00 MiB page size, pre-allocated 0 pages
[ 0.278652] vgaarb: loaded
[ 0.281885] SCSI subsystem initialized
[ 0.286380] usbcore: registered new interface driver usbfs
[ 0.292458] usbcore: registered new interface driver hub
[ 0.298413] usbcore: registered new device driver usb
[ 0.304215] mc: Linux media interface: v0.10
[ 0.308948] videodev: Linux video capture interface: v2.00
[ 0.315198] Advanced Linux Sound Architecture Driver Initialized.
[ 0.322316] Bluetooth: Core ver 2.22
[ 0.326276] NET: Registered PF_BLUETOOTH protocol family
[ 0.332132] Bluetooth: HCI device and connection manager initialized
[ 0.339130] Bluetooth: HCI socket layer initialized
[ 0.344523] Bluetooth: L2CAP socket layer initialized
[ 0.350093] Bluetooth: SCO socket layer initialized
[ 0.355794] clocksource: Switched to clocksource riscv_clocksource
[ 0.362842] FS-Cache: Loaded
[ 0.373444] NET: Registered PF_INET protocol family
[ 0.379787] IP idents hash table entries: 131072 (order: 8, 1048576 bytes, linear)
[ 0.395751] tcp_listen_portaddr_hash hash table entries: 4096 (order: 5, 163840 bytes, linear)
[ 0.405505] TCP established hash table entries: 65536 (order: 7, 524288 bytes, linear)
[ 0.415075] TCP bind hash table entries: 65536 (order: 9, 2097152 bytes, linear)
[ 0.425754] TCP: Hash tables configured (established 65536 bind 65536)
[ 0.433238] UDP hash table entries: 4096 (order: 6, 393216 bytes, linear)
[ 0.441300] UDP-Lite hash table entries: 4096 (order: 6, 393216 bytes, linear)
[ 0.450019] NET: Registered PF_UNIX/PF_LOCAL protocol family
[ 0.456826] RPC: Registered named UNIX socket transport module.
[ 0.463352] RPC: Registered udp transport module.
[ 0.468549] RPC: Registered tcp transport module.
[ 0.473725] RPC: Registered tcp NFSv4.1 backchannel transport module.
[ 0.481693] PCI: CLS 0 bytes, default 64
[ 0.486425] Unpacking initramfs...
[ 0.487015] Initialise system trusted keyrings
[ 0.495255] workingset: timestamp_bits=62 max_order=21 bucket_order=0
[ 0.508711] NFS: Registering the id_resolver key type
[ 0.514308] Key type id_resolver registered
[ 0.518953] Key type id_legacy registered
[ 0.523486] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[ 0.530905] nfs4flexfilelayout_init: NFSv4 Flexfile Layout Driver Registering...
[ 0.539159] ntfs: driver 2.1.32 [Flags: R/W].
[ 0.544246] jffs2: version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
[ 0.551506] fuse: init (API version 7.34)
[ 0.595623] NET: Registered PF_ALG protocol family
[ 0.600961] Key type asymmetric registered
[ 0.605481] Asymmetric key parser 'x509' registered
[ 0.610996] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 249)
[ 0.619185] io scheduler mq-deadline registered
[ 0.624189] io scheduler kyber registered
[ 0.732482] clk-starfive-jh7110 13020000.clock-controller: starfive JH7110 clkgen init successfully.
[ 0.743970] L2CACHE: DataError @ 0x00000000.08040110
[ 0.749558] L2CACHE: DataFail @ 0x00000000.0804005B
[ 0.755037] L2CACHE: No. of Banks in the cache: 8
[ 0.760259] L2CACHE: No. of ways per bank: 16
[ 0.765075] L2CACHE: Sets per bank: 256
[ 0.769333] L2CACHE: Bytes per cache block: 64
[ 0.774248] L2CACHE: Index of the largest way enabled: 15
[ 0.780581] jh7110-pmu 17030000.power-controller: registered 8 power domains
[ 0.853955] Serial: 8250/16550 driver, 6 ports, IRQ sharing disabled
[ 0.877923] loop: module loaded
[ 0.883406] cadence-qspi 13010000.spi: Failed to get clk 'clk_src': -2
[ 0.890677] cadence-qspi 13010000.spi: cadence_quadspi_clk_init: failed to get qspi clocks
[ 0.899856] cadence-qspi: probe of 13010000.spi failed with error -2
[ 0.908060] libphy: Fixed MDIO Bus: probed
[ 0.914161] CAN device driver interface
[ 0.919104] starfive-eth-plat 16030000.ethernet: force_sf_dma_mode is ignored if force_thresh_dma_mode is set.
[ 0.930634] starfive-eth-plat 16030000.ethernet: User ID: 0x41, Synopsys ID: 0x52
[ 0.938967] starfive-eth-plat 16030000.ethernet: DWMAC4/5
[ 0.945041] starfive-eth-plat 16030000.ethernet: DMA HW capability register supported
[ 0.953728] starfive-eth-plat 16030000.ethernet: RX Checksum Offload Engine supported
[ 0.962408] starfive-eth-plat 16030000.ethernet: Wake-Up On Lan supported
[ 0.970029] starfive-eth-plat 16030000.ethernet: TSO supported
[ 0.976499] starfive-eth-plat 16030000.ethernet: Enable RX Mitigation via HW Watchdog Timer
[ 0.985752] starfive-eth-plat 16030000.ethernet: Enabled Flow TC (entries=1)
[ 0.993563] starfive-eth-plat 16030000.ethernet: TSO feature enabled
[ 1.000601] starfive-eth-plat 16030000.ethernet: Using 40 bits DMA width
[ 1.341315] Freeing initrd memory: 10960K
[ 1.604178] libphy: stmmac: probed
[ 1.607998] YT8531 Gigabit Ethernet stmmac-0:00: attached PHY driver (mii_bus:phy_addr=stmmac-0:00, irq=POLL)
[ 1.618959] YT8531 Gigabit Ethernet stmmac-0:01: attached PHY driver (mii_bus:phy_addr=stmmac-0:01, irq=POLL)
[ 1.631178] starfive-eth-plat 16040000.ethernet: force_sf_dma_mode is ignored if force_thresh_dma_mode is set.
[ 1.642623] starfive-eth-plat 16040000.ethernet: User ID: 0x41, Synopsys ID: 0x52
[ 1.650913] starfive-eth-plat 16040000.ethernet: DWMAC4/5
[ 1.656995] starfive-eth-plat 16040000.ethernet: DMA HW capability register supported
[ 1.665640] starfive-eth-plat 16040000.ethernet: RX Checksum Offload Engine supported
[ 1.674298] starfive-eth-plat 16040000.ethernet: Wake-Up On Lan supported
[ 1.681865] starfive-eth-plat 16040000.ethernet: TSO supported
[ 1.688330] starfive-eth-plat 16040000.ethernet: Enable RX Mitigation via HW Watchdog Timer
[ 1.697582] starfive-eth-plat 16040000.ethernet: Enabled Flow TC (entries=1)
[ 1.705365] starfive-eth-plat 16040000.ethernet: TSO feature enabled
[ 1.712388] starfive-eth-plat 16040000.ethernet: Using 40 bits DMA width
[ 1.974393] libphy: stmmac: probed
[ 1.978209] YT8531 Gigabit Ethernet stmmac-1:00: attached PHY driver (mii_bus:phy_addr=stmmac-1:00, irq=POLL)
[ 1.989180] YT8531 Gigabit Ethernet stmmac-1:01: attached PHY driver (mii_bus:phy_addr=stmmac-1:01, irq=POLL)
[ 2.001777] Intel(R) Wireless WiFi driver for Linux
[ 2.009589] cdns3-starfive 10210000.usbdrd: usb mode 2 2.0 probe success
[ 2.017890] usbcore: registered new interface driver uas
[ 2.023811] usbcore: registered new interface driver usb-storage
[ 2.046255] starfive-rtc 17040000.rtc: registered as rtc0
[ 2.052242] starfive-rtc 17040000.rtc: setting system clock to 2001-01-01T00:00:00 UTC (978307200)
[ 2.062315] i2c_dev: i2c /dev entries driver
[ 2.067597] usbcore: registered new interface driver uvcvideo
[ 2.085825] thermal thermal_zone0: failed to read out thermal zone (-110)
[ 2.093976] starfive-wdt 13070000.wdog: Heartbeat: timeout=15, count/2=180000000 (0aba9500)
[ 2.103774] Bluetooth: HCI UART driver ver 2.3
[ 2.108711] Bluetooth: HCI UART protocol H4 registered
[ 2.115110] sdhci: Secure Digital Host Controller Interface driver
[ 2.121974] sdhci: Copyright(c) Pierre Ossman
[ 2.126830] Synopsys Designware Multimedia Card Interface Driver
[ 2.133784] sdhci-pltfm: SDHCI platform and OF driver helper
[ 2.141249] jh7110-sec 16000000.crypto: Unable to request sec_m dma channel in DMA channel
[ 2.150420] jh7110-sec 16000000.crypto: Cannot initial dma chan
[ 2.157267] usbcore: registered new interface driver usbhid
[ 2.163435] usbhid: USB HID core driver
[ 2.167931] riscv-pmu-sbi: SBI PMU extension is available
[ 2.173920] riscv-pmu-sbi: 16 firmware and 4 hardware counters
[ 2.180398] riscv-pmu-sbi: Perf sampling/filtering is not supported as sscof extension is not available
[ 2.191175] usbcore: registered new interface driver snd-usb-audio
[ 2.206853] NET: Registered PF_INET6 protocol family
[ 2.213672] Segment Routing with IPv6
[ 2.217779] In-situ OAM (IOAM) with IPv6
[ 2.222239] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
[ 2.229425] NET: Registered PF_PACKET protocol family
[ 2.235017] can: controller area network core
[ 2.239939] NET: Registered PF_CAN protocol family
[ 2.245242] can: raw protocol
[ 2.248536] can: broadcast manager protocol
[ 2.253173] can: netlink gateway - max_hops=1
[ 2.258267] Bluetooth: RFCOMM TTY layer initialized
[ 2.263670] Bluetooth: RFCOMM socket layer initialized
[ 2.269401] Bluetooth: RFCOMM ver 1.11
[ 2.273559] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[ 2.279438] Bluetooth: BNEP filters: protocol multicast
[ 2.285219] Bluetooth: BNEP socket layer initialized
[ 2.290771] lib80211: common routines for IEEE802.11 drivers
[ 2.297220] 9pnet: Installing 9P2000 support
[ 2.302001] Key type dns_resolver registered
[ 2.307588] Loading compiled-in X.509 certificates
[ 2.350736] starfive_jh7110-pinctrl 13040000.gpio: SiFive GPIO chip registered 64 GPIOs
[ 2.360374] starfive_jh7110-pinctrl 17020000.gpio: SiFive GPIO chip registered 4 GPIOs
[ 2.369381] pl08xdmac 16008000.sec_dma: initialized 8 virtual memcpy channels
[ 2.377302] pl08xdmac 16008000.sec_dma: initialized 16 virtual slave channels
[ 2.387000] debugfs: Directory '16008000.sec_dma' with parent 'dmaengine' already present!
[ 2.396196] pl08xdmac 16008000.sec_dma: DMA: PL080 rev0 at 0x16008000 irq 23
[ 2.404238] ssp-pl022 10060000.spi: ARM PL022 driver for StarFive SoC platform, device ID: 0x00041022
[ 2.414470] ssp-pl022 10060000.spi: mapped registers from 0x0000000010060000 to (ptrval)
[ 2.424641] ssp-pl022 10060000.spi: Requested frequency: 10000000 Hz is unsupported,select by default 8250000 Hz
[ 2.436305] ssp-pl022 10060000.spi: will use autosuspend for runtime pm, delay 100ms
[ 2.446314] i2c 2-0045: Fixing up cyclic dependency with 295d0000.mipi
[ 2.453799] seeed_panel 2-0045: Unknown Atmel firmware revision: 0x00
[ 2.461148] tinker_ft5406 2-0038: Address = 0x38
[ 2.466264] tinker_ft5406 2-0038: width = 800, height = 480, reverse = 1
[ 2.473800] tinker_ft5406 2-0038: i2c read error, -121
[ 2.479496] tinker_ft5406 2-0038: Checking touch ic failed
[ 2.485556] tinker_ft5406: probe of 2-0038 failed with error -121
[ 2.492497] i2c 2-0019: Fixing up cyclic dependency with 295d0000.mipi
[ 2.500631] Goodix-TS 2-0014: supply AVDD28 not found, using dummy regulator
[ 2.508579] Goodix-TS 2-0014: supply VDDIO not found, using dummy regulator
[ 2.635952] Goodix-TS 2-0014: i2c test failed attempt 1: -121
[ 2.675952] Goodix-TS 2-0014: i2c test failed attempt 2: -121
[ 2.715816] Goodix-TS 2-0014: I2C communication failure: -121
[ 2.722335] Goodix-TS: probe of 2-0014 failed with error -121
[ 2.729643] at24 5-0050: supply vcc not found, using dummy regulator
[ 2.737476] at24 5-0050: 512 byte 24c04 EEPROM, writable, 16 bytes/write
[ 2.746836] axp15060-regulator 5-0036: Register mipi_0p9 done! vol range:900 ~ 900 mV
[ 2.756980] axp15060-regulator 5-0036: Register hdmi_1p8 done! vol range:1800 ~ 1800 mV
[ 2.766440] axp15060-regulator 5-0036: Register sdio_vdd done! vol range:0 ~ 0 mV
[ 2.776198] axp15060-regulator 5-0036: Register hdmi_0p9 done! vol range:900 ~ 900 mV
[ 2.785416] axp15060-regulator 5-0036: Register vcc_3v3 done! vol range:0 ~ 0 mV
[ 2.795124] axp15060-regulator 5-0036: Register cpu_vdd done! vol range:500 ~ 1540 mV
[ 2.804630] i2c 6-0010: Fixing up cyclic dependency with 19800000.vin_sysctl
[ 2.812858] imx219 6-0010: supply VANA not found, using dummy regulator
[ 2.820338] imx219 6-0010: supply VDIG not found, using dummy regulator
[ 2.827752] imx219 6-0010: supply VDDL not found, using dummy regulator
[ 2.849769] imx219 6-0010: failed to read chip id 219
[ 2.855552] imx219: probe of 6-0010 failed with error -5
[ 2.864136] pcie_plda 2b000000.pcie: Failed to get reset-gpio.
[ 2.870627] pcie_plda 2b000000.pcie: Init gpio failed
[ 2.876229] pcie_plda: probe of 2b000000.pcie failed with error -22
[ 2.885936] pcie_plda 2c000000.pcie: Failed to get reset-gpio.
[ 2.892388] pcie_plda 2c000000.pcie: Init gpio failed
[ 2.898003] pcie_plda: probe of 2c000000.pcie failed with error -22
[ 2.919513] clk-starfive-jh7110-vout 295c0000.clock-controller: starfive JH7110 clk_vout init successfully.
[ 2.942184] clk-starfive-jh7110-isp 19810000.clock-controller: starfive JH7110 clk_isp init successfully.
[ 2.953480] dw_axi_dmac_platform 16050000.dma-controller: DesignWare AXI DMA Controller, 4 channels
[ 2.964582] printk: console [ttyS0] disabled
[ 2.989558] 10000000.serial: ttyS0 at MMIO 0x10000000 (irq = 17, base_baud = 1500000) is a 16550A
[ 2.999434] printk: console [ttyS0] enabled
[ 2.999434] printk: console [ttyS0] enabled
[ 3.008247] printk: bootconsole [uart0] disabled
[ 3.008247] printk: bootconsole [uart0] disabled
[ 3.018650] jh7110-vin 19800000.vin_sysctl: stfcamss probe enter!
[ 3.026884] jh7110-vin 19800000.vin_sysctl: stfcamss probe success!
[ 3.044291] dwmmc_starfive 16010000.sdio0: IDMAC supports 32-bit address mode.
[ 3.044579] dwmmc_starfive 16020000.sdio1: IDMAC supports 32-bit address mode.
[ 3.051630] dwmmc_starfive 16010000.sdio0: Using internal DMA controller.
[ 3.051674] jh7110-sec 16000000.crypto: will run requests pump with realtime priority
[ 3.054017] jh7110-sec 16000000.crypto: Initialized
[ 3.054774] starfive-i2s 120b0000.i2stx_4ch0: designware: play supported
[ 3.054780] starfive-i2s 120b0000.i2stx_4ch0: designware: i2s master mode supported
[ 3.054893] sf-mipi-dphy-tx 295e0000.mipi-dphy: sf_dphy_probe begin
[ 3.054899] sf-mipi-dphy-tx 295e0000.mipi-dphy: ===> sf_dphy_probe enter, 445
[ 3.054979] sf-mipi-dphy-tx 295e0000.mipi-dphy: control ECO
[ 3.054991] sf-mipi-dphy-tx 295e0000.mipi-dphy: supply mipi_1p8 not found, using dummy regulator
[ 3.055184] sf-mipi-dphy-tx 295e0000.mipi-dphy: sf_dphy_probe end
[ 3.055302] cdns-dsi 295d0000.mipi: dsi_sys_clk = 297000000
[ 3.055437] cdns-dsi 295d0000.mipi: starfive dsi bind end
[ 3.056802] of_cfs_init
[ 3.056826] of_cfs_init: OK
[ 3.057148] starfive-pwmdac 100b0000.pwmdac: clk_apb0 = 49500000, clk_pwmdac_apb = 49500000, clk_pwmdac_core = 4068493
[ 3.057436] cfg80211: Loading compiled-in X.509 certificates for regulatory database
[ 3.058834] dwmmc_starfive 16020000.sdio1: Using internal DMA controller.
[ 3.065623] dwmmc_starfive 16010000.sdio0: Version ID is 290a
[ 3.073480] dwmmc_starfive 16020000.sdio1: Version ID is 290a
[ 3.073521] dwmmc_starfive 16020000.sdio1: DW MMC controller at irq 30,32 bit host data width,32 deep fifo
[ 3.078407] dwmmc_starfive 16010000.sdio0: DW MMC controller at irq 29,32 bit host data width,32 deep fifo
[ 3.085299] mmc_host mmc1: card is polling.
[ 3.092930] mmc_host mmc0: card is non-removable.
[ 3.170928] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
[ 3.214809] platform regulatory.0: Direct firmware load for regulatory.db failed with error -2
[ 3.223467] cfg80211: failed to load regulatory.db
[ 3.315902] mmc_host mmc1: Bus speed (slot 0) = 198000000Hz (slot req 400000Hz, actual 399193HZ div = 248)
[ 3.385919] mmc_host mmc0: Bus speed (slot 0) = 198000000Hz (slot req 400000Hz, actual 399193HZ div = 248)
[ 3.569239] mmc_host mmc1: Bus speed (slot 0) = 198000000Hz (slot req 50000000Hz, actual 49500000HZ div = 2)
[ 3.579384] mmc1: new high speed SDHC card at address 0007
[ 3.586676] mmcblk1: mmc1:0007 SD32G 29.0 GiB
[ 3.605601] mmcblk1: p1 p2 p3 p4
[ 3.612164] starfive soc:display-subsystem: bound 29400000.dc8200 (ops 0xffffffff80e7b1d0)
[ 3.620479] innohdmi-starfive 29590000.hdmi: inno hdmi bind begin
[ 3.627840] innohdmi-starfive 29590000.hdmi: [drm:inno_hdmi_bind] ERROR cannot get hpd gpio property
[ 3.637189] Kernel BUG [#1]
[ 3.639989] Modules linked in:
[ 3.643050] CPU: 2 PID: 1 Comm: swapper/0 Not tainted 5.15.0+ #2
[ 3.649060] Hardware name: StarFive VisionFive V2 (DT)
[ 3.654202] epc : _regulator_put+0x14a/0x14e
[ 3.658483] ra : regulator_put+0x26/0x3c
[ 3.662498] epc : ffffffff8040c95e ra : ffffffff8040c988 sp : ffffffd00400b9e0
[ 3.669735] gp : ffffffff815045a8 tp : ffffffe0bff40000 t0 : ffffffd00400b648
[ 3.676963] t1 : 0000000000000002 t2 : 0000000000000000 s0 : ffffffd00400ba10
[ 3.684200] s1 : ffffffe0c30efa80 a0 : ffffffe0c30efa80 a1 : 0000000000000115
[ 3.691437] a2 : 0000000000000000 a3 : ffffffe1f8999590 a4 : 0000000000000000
[ 3.698673] a5 : 0000000000000001 a6 : 0000000200000022 a7 : ffffffe0c30eaf40
[ 3.705910] s2 : ffffffff814a3348 s3 : ffffffe0c0638810 s4 : ffffffd00400ba48
[ 3.713147] s5 : 0000000000000009 s6 : ffffffe0c2804000 s7 : fffffffffffffffe
[ 3.720383] s8 : ffffffff814adbb8 s9 : 0000000000000000 s10: 0000000000000000
[ 3.727620] s11: 0000000000000000 t3 : 0000000007200720 t4 : 0000000000000001
[ 3.734856] t5 : ffffffff81044448 t6 : 6720647068207465
[ 3.740172] status: 0000000200000120 badaddr: 0000000000000000 cause: 0000000000000003
[ 3.748105] [] _regulator_put+0x14a/0x14e
[ 3.753685] [] regulator_put+0x26/0x3c
[ 3.759000] [] devm_regulator_release+0xe/0x16
[ 3.765011] [] devres_release_group+0xa2/0x102
[ 3.771024] [] component_bind_all+0xdc/0x1b6
[ 3.776866] [] vs_drm_bind+0x76/0x112
[ 3.782101] [] try_to_bring_up_master+0x102/0x140
[ 3.788377] [] component_master_add_with_match+0xc4/0x104
[ 3.795347] [] vs_drm_platform_probe+0x12c/0x19c
[ 3.801536] [] platform_probe+0x4e/0x92
[ 3.806940] [] really_probe.part.0+0x66/0x232
[ 3.812867] [] __driver_probe_device+0x70/0xde
[ 3.818877] [] driver_probe_device+0x2c/0xb0
[ 3.824718] [] __driver_attach+0x60/0xf4
[ 3.830211] [] bus_for_each_dev+0x6e/0xae
[ 3.835789] [] driver_attach+0x1a/0x22
[ 3.835806] mmc_host mmc0: Bus speed (slot 0) = 198000000Hz (slot req 300000Hz, actual 300000HZ div = 330)
[ 3.841104] [] bus_add_driver+0xe6/0x198
[ 3.841110] [] driver_register+0x50/0xe4
[ 3.841116] [] __platform_driver_register+0x1c/0x24
[ 3.868179] [] vs_drm_init+0x34/0x56
[ 3.873325] [] do_one_initcall+0x4e/0x178
[ 3.878905] [] kernel_init_freeable+0x1a8/0x20a
[ 3.885005] [] kernel_init+0x1e/0x104
[ 3.890237] [] ret_from_exception+0x0/0xc
[ 3.895850] ---[ end trace d8bf584a996f34f9 ]---
[ 3.900477] Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b
[ 3.908148] SMP: stopping secondary CPUs
[ 3.912083] ---[ end Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b ]---

wifi dongle delivered with VisionFive2

Hello,

i got a wifi dongle delivered with my VisonFive2 . And now the question is how i get work this dongle. Need i do anything additional ?

my output of dmesg on my visonfive2:

[214767.263948] usb 3-7: new high-speed USB device number 16 using xhci_hcd
[214767.390622] usb 3-7: New USB device found, idVendor=3452, idProduct=6600, bcdDevice= 0.01
[214767.390633] usb 3-7: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[214767.390637] usb 3-7: Product: 6600U
[214767.390639] usb 3-7: Manufacturer: ESWIN
[214767.390641] usb 3-7: SerialNumber: 6600U
[214776.85

rsync missing from list of packages required

Hi. Will working on issue #50 I noticed that rsync is needed for building but is not mentioned in the list of packages in the README.md. So that should be added to avoid confusion. rsync is often already installed so most people won't see this issue but when building from a base image this is a problem so it needs to be addressed.

u-boot 2.10.4 and 2.11.5 won't fit

I bricked my StarFive2 v1.2A (super early bird) when tried to write u-boot with dd.
With SD card recovery I was able to write only version 2.8.0

u-boot-spl.bin.normal.out 129.1K

flashcp -v u-boot-spl.bin.normal.out /dev/mtd0

u-boot-spl.bin.normal.out won't fit into /dev/mtd0!

Getting nvme QID 2 / QID 4 timeouts during heavy use

I'm seeing occasional errors like:

[60386.019927] nvme nvme0: I/O 210 QID 4 timeout, completion polled
[60416.259353] nvme nvme0: I/O 195 QID 4 timeout, completion polled
[60479.458282] nvme nvme0: I/O 220 QID 2 timeout, completion polled
[60509.487744] nvme nvme0: I/O 222 QID 2 timeout, completion polled

When doing large RPM package installs, and once while rsyncing a big file tree to the VF2.

When it happens the operation hangs for some time, then you get this in the log and the operation proceeds and eventually completes successfully.

This has occurred with the stock Debian-69 and v2.10.4 releases, and I just saw it with the latest v2.11.5 release. I do not see any additional info in the error logs although there is a missing or invalid SUBNQN field message at startup, otherwise the NVMe (Patriot P300) works well.

I have a 45W Samsung wall-wart USB PD supply, and have not seen any other issues with this card (indeed, it works well apart from this).

I saw the these errors while re-installing the latest Debian packages using the provided install script. They all occurred during the final dpkg -i phase.

root@rose:~# dmesg | grep nvme
[    0.000000] Kernel command line: root=/dev/nvme0n1p4 rw console=tty0 console=ttyS0,115200 earlycon rootwait stmmaceth=chain_mod
e:1 selinux=0
[    4.440152] nvme nvme0: pci function 0001:01:00.0
[    4.451660] nvme 0001:01:00.0: enabling device (0000 -> 0002)
[    4.469585] nvme nvme0: missing or invalid SUBNQN field.
[    4.585406] nvme nvme0: allocated 64 MiB host memory buffer.
[    4.816532] nvme nvme0: 4/0/0 default/read/poll queues
[    4.854331]  nvme0n1: p1 p2 p3 p4
[    9.004199] EXT4-fs (nvme0n1p4): mounted filesystem with ordered data mode. Opts: (null). Quota mode: disabled.
[   10.105598] EXT4-fs (nvme0n1p4): re-mounted. Opts: (null). Quota mode: disabled.
[60386.019927] nvme nvme0: I/O 210 QID 4 timeout, completion polled
[60416.259353] nvme nvme0: I/O 195 QID 4 timeout, completion polled
[60479.458282] nvme nvme0: I/O 220 QID 2 timeout, completion polled
[60509.487744] nvme nvme0: I/O 222 QID 2 timeout, completion polled
root@rose:~# nvme list
Node                  Generic               SN                   Model                                    Namespace Usage                      Format           FW Rev
--------------------- --------------------- -------------------- ---------------------------------------- --------- -------------------------- ---------------- --------
/dev/nvme0n1          /dev/ng0n1            P300ABBB22111821071  Patriot M.2 P300 256GB                   1       256.06  GB / 256.06  GB    512   B +  0 B   V0513A0
root@rose:~# uname -a
Linux rose.easytarget.org 5.15.310 #1 SMP Mon Mar 27 19:55:33 CEST 2023 riscv64 GNU/Linux

I build my own kernel to add USB serial and additional Bluetooth adaptors:

  • The .310 kernel was built yesterday (I bump minor version to avoid confusing myself) from the v2.11.5 source on the VF2 itself.
  • I made the following config differences:
user@rose:~/kernel/linux$ diff .config .config.defconfig 
938c938
< CONFIG_BT_HIDP=y
---
> # CONFIG_BT_HIDP is not set
951,958c951
< CONFIG_BT_INTEL=y
< CONFIG_BT_BCM=y
< CONFIG_BT_RTL=y
< CONFIG_BT_HCIBTUSB=y
< # CONFIG_BT_HCIBTUSB_AUTOSUSPEND is not set
< CONFIG_BT_HCIBTUSB_BCM=y
< CONFIG_BT_HCIBTUSB_MTK=y
< CONFIG_BT_HCIBTUSB_RTL=y
---
> # CONFIG_BT_HCIBTUSB is not set
971d963
< # CONFIG_BT_ATH3K is not set
4163,4216c4155
< CONFIG_USB_SERIAL=y
< # CONFIG_USB_SERIAL_CONSOLE is not set
< CONFIG_USB_SERIAL_GENERIC=y
skip lots of < # CONFIG_USB_SERIAL_XXX is not set messages
---
> # CONFIG_USB_SERIAL is not set

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.