Can you please share the exact command with whom you could build the driver? I am getting the following error after calling make on this Makefile:
root@d7743918aff8:/home/work/milk-v_duo_oled_driver/driver# make
make -C /home/work//linux_5.10/build/cv1800b_milkv_duo_sd M=/home/work/milk-v_duo_oled_driver/driver modules
make[1]: Entering directory '/home/work/linux_5.10/build/cv1800b_milkv_duo_sd'
LDS arch/riscv/kernel/vdso/vdso.lds
AS arch/riscv/kernel/vdso/rt_sigreturn.o
CC arch/riscv/kernel/vdso/vgettimeofday.o
In file included from /home/work/linux_5.10/include/vdso/datapage.h:137,
from /home/work/linux_5.10/lib/vdso/gettimeofday.c:5,
from <command-line>:
/home/work/linux_5.10/arch/riscv/include/asm/vdso/gettimeofday.h: In function 'gettimeofday_fallback':
/home/work/linux_5.10/arch/riscv/include/asm/vdso/gettimeofday.h:21:31: error: '__NR_gettimeofday' undeclared (first use in this function)
21 | register long nr asm("a7") = __NR_gettimeofday;
| ^~~~~~~~~~~~~~~~~
/home/work/linux_5.10/arch/riscv/include/asm/vdso/gettimeofday.h:21:31: note: each undeclared identifier is reported only once for each function it appears in
/home/work/linux_5.10/arch/riscv/include/asm/vdso/gettimeofday.h: In function 'clock_gettime_fallback':
/home/work/linux_5.10/arch/riscv/include/asm/vdso/gettimeofday.h:37:31: error: '__NR_clock_gettime' undeclared (first use in this function)
37 | register long nr asm("a7") = __NR_clock_gettime;
| ^~~~~~~~~~~~~~~~~~
/home/work/linux_5.10/arch/riscv/include/asm/vdso/gettimeofday.h: In function 'clock_getres_fallback':
/home/work/linux_5.10/arch/riscv/include/asm/vdso/gettimeofday.h:53:31: error: '__NR_clock_getres' undeclared (first use in this function)
53 | register long nr asm("a7") = __NR_clock_getres;
| ^~~~~~~~~~~~~~~~~
make[3]: *** [/home/work/linux_5.10/scripts/Makefile.build:279: arch/riscv/kernel/vdso/vgettimeofday.o] Error 1
make[2]: *** [arch/riscv/Makefile:108: vdso_prepare] Error 2
make[1]: *** [/home/work/linux_5.10/Makefile:185: __sub-make] Error 2
make[1]: Leaving directory '/home/work/linux_5.10/build/cv1800b_milkv_duo_sd'
make: *** [Makefile:8: all] Error 2
root@d7743918aff8:/home/work/milk-v_duo_oled_driver/driver#
Also added the following lines to the beggining of the Makefile: