Hi,
When I tried to build kernel from source(JH7110_VisionFive2_devel branch) on my VF2 (using stock Debian image), it failed with the following errors:
$ make ARCH=riscv -j4
....
CC arch/riscv/kernel/asm-offsets.s
CALL scripts/checksyscalls.sh
CALL scripts/atomic/check-atomics.sh
LDS arch/riscv/kernel/vdso/vdso.lds
AS arch/riscv/kernel/vdso/rt_sigreturn.o
CC arch/riscv/kernel/vdso/vgettimeofday.o
./arch/riscv/include/asm/vdso/gettimeofday.h: Assembler messages:
./arch/riscv/include/asm/vdso/gettimeofday.h:71: Error: unrecognized opcode `csrr a5,0xc01', extension `zicsr' req
uired
./arch/riscv/include/asm/vdso/gettimeofday.h:71: Error: unrecognized opcode `csrr a5,0xc01', extension `zicsr' req
uired
make[1]: *** [scripts/Makefile.build:277: arch/riscv/kernel/vdso/vgettimeofday.o] Error 1
make: *** [arch/riscv/Makefile:114: vdso_prepare] Error 2
Maybe it’s due to something related to binutils?