I'm trying to build the latest linux crypto drivers for a Ubuntu server. Ubuntu server has a running kernel, extras and headers installed. However, the source code for the crypto modules are coming from Torvald's GitHub (and not Ubuntu).
I'm also working from the kernel doc Building External Modules. I cloned the latest kernel with:
git clone --depth=1 https://github.com/torvalds/linux.git
Then:
cd linux
Next:
$ make -C /usr/src/linux-headers-4.2.0-34 M=$PWD crypto
make: Entering directory '/usr/src/linux-headers-4.2.0-34'
ERROR: Kernel configuration is invalid.
include/generated/autoconf.h or include/config/auto.conf are missing.
Run 'make oldconfig && make prepare' on kernel src to fix it.
make: Nothing to be done for 'crypto'.
make: Leaving directory '/usr/src/linux-headers-4.2.0-34'
And:
$ find /usr/src -name 'autoconf.h'
/usr/src/linux-headers-4.2.0-34-generic/include/generated/autoconf.h
$ find /usr/src -name 'auto.conf'
/usr/src/linux-headers-4.2.0-34-generic/include/config/auto.conf
And this:
$ find /usr/src -type d -name 'build'
/usr/src/linux-headers-4.2.0-34/tools/build
/usr/src/linux-headers-4.2.0-34-generic/include/config/build
Trying to use the build
directory results in the following:
$ make -C /usr/src/linux-headers-4.2.0-34/tools/build M=$PWD crypto
make: Entering directory '/usr/src/linux-headers-4.2.0-34/tools/build'
make: *** No rule to make target 'crypto'. Stop.
make: Leaving directory '/usr/src/linux-headers-4.2.0-34/tools/build'
I'm obviously missing something obvious. That's not surprising since I know next to nothing about kbuild. I have an exiting configuration and sources at /usr/src
, and I have new files at $PWD/crypto
. Its not clear to me why I am generating a new configuration for an existing configuration.
How do I update kernel crypto modules against a running kernel provided by someone else?