Jump to content

Issues building kernel with custom config


Recommended Posts

Hi!

 

I’ve been trying to build a kernel with custom settings for a couple of days now, but am facing some issues. My build setup is a virtual machine (running in VMWare Workstation Pro v15) based on the mini.iso image that's recommended in the Armbian documentation (and post here in the forums). The target is an Odroid N2+ SBC.

 

There was no apparent issues setting up the build framework, installing git and cloning the repository. I then executed the compile.sh script and manually set the kernel configuration via the menuconfig interface that pops up. This however yielded an output image that, surprisingly enough, does not use my supplied configuration. After building I’ve checked the output/ folder and output/config/ just contains the default config file (i.e. not containing any of my settings) and the packages in output/debs/ folder are (not surprisingly) based on this default config -- I’ve verified this by installing it on the SBC.

 

I’ve been trying to figure out why it is behaving this way, and if anything in my build setup is incorrect (but found nothing suggesting that). The output from the compile.sh script also doesn't indicate any errors along the way. So after a discussion with a guy (Werner) on the Armbian IRC I instead tested putting my custom config file -- which I was able to export using "Save" in the menuconfig interface -- in userpatches/ folder as

 

userpatches/linux-meson64-current.config

 

to see if it would then recognise, and take into account, my configuration. Building again, I used tee to log the output from the script:

 

./compile.sh RELEASE=buster BOARD=odroidn2 BRANCH=current KERNEL_ONLY=yes KERNEL_CONFIGURE=no | tee build_log.txt

 

Examining the output -- see attached "build_log.txt" -- it appears to use the config file:

 

[o.k.] Using kernel config provided by user userpatches/linux-meson64-current.config

 

but the output/debs/ folder no longer contains the expected linux-image-current-meson64_21.02.0-trunk_arm64.deb, just linux-sources-[...].deb and linux-u-boot-[...].deb. See attached "list_debs.txt" (ls -lA output/debs/) and "list_buster.txt" (ls -lA output/debs/buster/). Also the output/config/ folder is empty (maybe expected when using config supplied in userpatches/?).

 

So the latter method (supposedly) produces output based on my config but lacks the kernel image, whereas the former method produces default config and images. I would very much appreciate any tips on what might be going on and suggestions on what to try. Obviously it would be good to also get the first method working so I can easily manipulate the config, but I'm okay with either way.

 

For what it's worth, the kernel settings I'm modifying is very minor -- basically just setting the timer frequency to 1000 Hz, changing the scheduler policy to periodic and setting a local version (to differentiate from default) -- see "linux-meson64-current.config" if interested.

Link to comment
Share on other sites

On 3/7/2021 at 7:00 PM, WhoIsWho said:

 

So the latter method (supposedly) produces output based on my config but lacks the kernel image, whereas the former method produces default config and images. I would very much appreciate any tips on what might be going on and suggestions on what to try. Obviously it would be good to also get the first method working so I can easily manipulate the config, but I'm okay with either way.


We are using build system daily for development and there are several automated systems that are doing something ...

 

On 3/7/2021 at 7:00 PM, WhoIsWho said:

basically just setting the timer frequency to 1000 Hz


Perhaps setting this value is the problem? That would explain this trouble.

 

On 3/7/2021 at 7:00 PM, WhoIsWho said:

changing the scheduler policy to periodic


That could also be questionable.

 

On 3/7/2021 at 7:00 PM, WhoIsWho said:

and setting a local version


That is under build system control. You can't do that, but we are addressing this problem within this:

 

 

Link to comment
Share on other sites

On 3/7/2021 at 9:00 PM, WhoIsWho said:

./compile.sh RELEASE=buster BOARD=odroidn2 BRANCH=current KERNEL_ONLY=yes KERNEL_CONFIGURE=no | tee build_log.txt

 

Examining the output -- see attached "build_log.txt" -- it appears to use the config file:

 

You have posted a clean log that does not contain errors. The next line makes little sense:

./compile.sh | tee -a log.txt

 

See output/debug/compilation.log

 

Perhaps the package didn't build because there were compilation errors. This is an assumption.

 

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines