I am using Ubuntu 20.04LTS on a Desktop to build the Khadas Linux image. I can configure and run make and it generates a complete image based on ./fenix/build/linux_mainline-5.12.
If I run make help from the ./ folder, I get the help indicating I can build the kernel separately. I can run make kernel and it makes the default kernel.
Now I want to make changes to the default kernel and so I run make kernel-config. It returns cp: cannot create regular file ‘/home/ubuntu/fenix/build/linux-mainline-*/.config’: No such file or directory.
One of the scripts seems to be wanting to copy a single file into a wildcard or there is an environmental variable not set. I have searched through files, but the khadas build is so extrapolated that I cannot find the location.
I want to set custom options which I can set inder ./fenix/build/linux-mainline-5.12/make menuconfig
Once finished it writes it to ./fenix/build/linux-mainline-5.12/.config. However when going to ./fenix/make kernel it overwrites the .config again with defaults. I presume the “make kernel-config” allows me to overwrite the defaults but it does not work.
It then ran though a number of steps and failed here
…
…
2021-05-11 12:14:31 (347 KB/s) - ‘images_upgrade-df70a352d25388eff7e25e59d0efda80ad26bf2b.tar.gz’ saved [236701]
Calculated checksum is: a955630eafcb73c96c7cd6c8325357bb52120e2a4e3a5d51fc0a8f7007f5acd8
Extracting ‘images_upgrade-df70a352d25388eff7e25e59d0efda80ad26bf2b.tar.gz’ to ‘/home/ubuntu/project/fenix/build’…
Info: Config linux…
cp: cannot create regular file ‘/home/ubuntu/project/fenix/build/linux-mainline-*/.config’: No such file or directory
make: *** [Makefile:39: kernel-config] Error 1
THIS IS THE SETUP:
4. VIM3
2. uboot-mainline
linux-mainline
Ubuntu
focal
minimal
SD
N. Do not compress
if I however add this line in ./fenix/config/functions/build
LINUX_DIR=/home/ubuntu/dashcam/fenix/build/linux-mainline-5.12
then it works. So it appears that LINUX_DIR is not setup correctly.