I'd like to grab information from the shell and pass it into a kernel module through the makefile. I can do this with user space programs using -D.
Is there a similar mechanism for kernel modules? For example, if I define a makefile variable
CURRENT_DATE := '"$(shell date +"%Y%m%dT%H%M%SZ")"'
I can get a hold of that date as a string in the user space program by appending -DCURRENT_DATE to the end of the build command. Is there a way to do this with kernel modules?
shell, Are you asking about building kernel modules? Have you seen kernel.org/doc/html/v5.9/kbuild/index.html