Heya,
I’ve got a problem compiling a new kernel with the suggested docker tooling. I’m compiling from starfive-tech/linux and get the following error:
In file included from arch/riscv/kernel/signal.c:16:0:
arch/riscv/kernel/signal.c: In function 'setup_rt_frame':
./arch/riscv/include/asm/vdso.h:31:42: error: '__vdso_rt_sigreturn_offset' undeclared (first use in this function); did you mean '__user_rt_sigreturn'?
(void __user *)((unsigned long)(base) + __vdso_##name##_offset)
^
arch/riscv/kernel/signal.c:197:28: note: in expansion of macro 'VDSO_SYMBOL'
regs->ra = (unsigned long)VDSO_SYMBOL(
^~~~~~~~~~~
./arch/riscv/include/asm/vdso.h:31:42: note: each undeclared identifier is reported only once for each function it appears in
(void __user *)((unsigned long)(base) + __vdso_##name##_offset)
^
arch/riscv/kernel/signal.c:197:28: note: in expansion of macro 'VDSO_SYMBOL'
regs->ra = (unsigned long)VDSO_SYMBOL(
^~~~~~~~~~~
scripts/Makefile.build:277: recipe for target 'arch/riscv/kernel/signal.o' failed
make[2]: *** [arch/riscv/kernel/signal.o] Error 1
scripts/Makefile.build:540: recipe for target 'arch/riscv/kernel' failed
make[1]: *** [arch/riscv/kernel] Error 2
Makefile:1868: recipe for target 'arch/riscv' failed
make: *** [arch/riscv] Error 2
I’m not sure how this happens as I’m unable to reproduce it.
Do note that the build_*.sh scripts removes the cloned directory before running git clone, to make sure it is at a predictable state. This means that any changes you make between runs will be reverted. If you want to make changes, either comment out some of those rows in the script or run some of the manually, or add the modifications inside the script.
Can you start the container first, then launch the build script ? ./shell.sh and then inside the container do build_kernel.sh
You’ll know that you’re inside the container when the prompt changes to something like this root@d440dc6ff673:/mnt#
when you build the container, the inside of it has a mnt directory that’s empty.
when you build the different components, it fetches the sources for each, then builds it somewhere within that mnt directory.
In my experience with that docker/podman, after running many times, it never fails on me.
You must skipped a step somewhere.
The reason I showed this to you wasn’t to make you build a bonding module. It’s to show you a way of consistently accessing/changing something using make menuconfig, then rebuilding the kernel or modules in a way that doesn’t error out or veer away to far to error out. I hope it helps.