Make kernel-config does not work on current github fenix

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.

Please help

Tanks for your feedback. We will check this issue.

Could you suggest a workaround in the meantime please. I want to just build the kernel after changing kernel drivers, specifically usb_serial_option.

Thank you

yes

tnx will be fixed !!!

1 Like

This issue has been fixed, please update your code and try again.

1 Like

hi @numbqq , I have used your patch.https://github.com/khadas/fenix/commit/047d9953235120f81f57ca9d15f374f9d257319b.
but,it do not work.

khadas@121645dc5342:~/fenix$ make kernel-saveconfig
[i] FENIX (scripts/build.sh) BUILD: /home/khadas/fenix/build | DL: /home/khadas/fenix/downloads | sudo: sudo -E
Info: Build host: focal
Info: Running in container: docker
Info: apt-cacher is disabled in containers.
Info: Save linux config...
make[1]: Entering directory '/home/khadas/fenix/build/linux'
scripts/kconfig/conf  --savedefconfig=defconfig Kconfig
drivers/net/wireless/bcmdhd/Kconfig:53:warning: defaults for choice values not supported
make[1]: Leaving directory '/home/khadas/fenix/build/linux'
mv: target 'kvims_defconfig' is not a directory
make: *** [Makefile:46: kernel-saveconfig] Error 1

Any idea?

Can you try this?

$ make kernel-config
$ make kernel-saveconfig
khadas@121645dc5342:~/fenix$ make kernel-config
[i] FENIX (scripts/build.sh) BUILD: /home/khadas/fenix/build | DL: /home/khadas/fenix/downloads | sudo: sudo -E
Info: Build host: focal
Info: Running in container: docker
Info: apt-cacher is disabled in containers.
Info: Config linux...
make[1]: Entering directory '/home/khadas/fenix/build/linux'
drivers/net/wireless/bcmdhd/Kconfig:53:warning: defaults for choice values not supported
#
# configuration written to .config
#
make[1]: Leaving directory '/home/khadas/fenix/build/linux'
make[1]: Entering directory '/home/khadas/fenix/build/linux'
scripts/kconfig/mconf  Kconfig
drivers/net/wireless/bcmdhd/Kconfig:53:warning: defaults for choice values not supported


*** End of the configuration.
*** Execute 'make' to start the build or try 'make help'.

make[1]: Leaving directory '/home/khadas/fenix/build/linux'

Done.

Mon 10 May 2021 09:52:50 AM CST
khadas@121645dc5342:~/fenix$  make kernel-saveconfig
[i] FENIX (scripts/build.sh) BUILD: /home/khadas/fenix/build | DL: /home/khadas/fenix/downloads | sudo: sudo -E
Info: Build host: focal
Info: Running in container: docker
Info: apt-cacher is disabled in containers.
Info: Save linux config...
make[1]: Entering directory '/home/khadas/fenix/build/linux'
scripts/kconfig/conf  --savedefconfig=defconfig Kconfig
drivers/net/wireless/bcmdhd/Kconfig:53:warning: defaults for choice values not supported
make[1]: Leaving directory '/home/khadas/fenix/build/linux'
mv: target 'kvims_defconfig' is not a directory
make: *** [Makefile:46: kernel-saveconfig] Error 1
khadas@121645dc5342:~/fenix$ 

I can copy build/linux/defconfig to build/linux/arch/arm64/configs/kvims_defconfig manually. but make kernel-saveconfig can’t work.

Are you sure you use the latest code from our GitHub and don’t have other modifications? It works well on my side.

hi @numbqq

khadas@121645dc5342:~/fenix$ git log
commit 5ac51406a9d27f91f4c73b04d1cb411690e58ccd (grafted, origin/master, origin/HEAD)
Author: Nick Xie <nick@khadas.com>
Date:   Thu Apr 15 11:03:26 2021 +0800

    CI: remove unused actions
    
    Signed-off-by: Nick Xie <nick@khadas.com>

I comment the Fenix update,kernel source and uboot source update scripts.

Please use the latest code to test.

Still error. See below history what I did:

177 mkdir project
178 cd project/
179 git clone --depth 1 GitHub - khadas/fenix: One-stop script set to build Ubuntu/Debian images
180 cd ~/project/fenix
181 source env/setenv.sh
182 make help
183 make kernel-config

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

  1. linux-mainline
  2. Ubuntu
  3. focal
  4. minimal
  5. 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.

sorry your right - need to improve it :wink: plz wait we can fix it very soon

at this moment just simple solution is

# need only 1st time) can break by Ctrl+C after downloading kernel source 
make kernel
# after can run it already
make kernel-config

ok fixed!
now u can do make kernel-config at any time

1 Like