kernelci / kernelci-core

Core KernelCI tools
https://kernelci.org
GNU Lesser General Public License v2.1
107 stars 97 forks source link

Build a "bootable" allmodconfig #20

Open roxell opened 5 years ago

roxell commented 5 years ago

Can we add a new allmodconfig build where we build allmodconfig + the architecture specific defconfig ? The idea is that this should be a bootable configuration.

for x86 $ make allmodconfig KCONFIG_ALLCONFIG=$(pwd)/arch/x86/configs/x86_64_defconfig

for arm64 $ make ARCH=arm64 CROSS_COMPILE=... allmodconfig \ KCONFIG_ALLCONFIG=$(pwd)/arch/arm64/configs/defconfig

gctucker commented 5 years ago

While it may be complicated to make the build system take arbitrary environment variables, it's possible to have this created as an extra config when generating the source tarball.

roxell commented 5 years ago

When you say "extra config" do you mean a config like we generate kselftest.config but for the defconfig.config or something?

Does this mean that we will end up doing something like this: make allmodconfig ./scripts/kconfig/merge_config.sh .config kernel/configs/defconfig.config (or whatever we want to call the fragment file) make olddefconfig

The difference is that merging the .config from an allmodconfig output will not turn on things that depend on something in the defconfig file. merge_config.sh has the problem with newly visible symbols.

When you do allmodconfig with KCONFIG_ALLCONFIG, it will just start out with the defaults and modify all other options.

gctucker commented 5 years ago

When you say "extra config" do you mean a config like we generate kselftest.config but for the defconfig.config or something?

Sort of, I mean creating a config file that is not in the git tree and include that in the source tarball used by build jobs. It wouldn't be a config fragment per se though.

Does this mean that we will end up doing something like this: make allmodconfig ./scripts/kconfig/merge_config.sh .config kernel/configs/defconfig.config (or whatever we want to call the fragment file) make olddefconfig

The difference is that merging the .config from an allmodconfig output will not turn on things that depend on something in the defconfig file. merge_config.sh has the problem with newly visible symbols.

When you do allmodconfig with KCONFIG_ALLCONFIG, it will just start out with the defaults and modify all other options.

It's possible to run the commands you mentioned in your first comment and then save a defconfig file from that. For example, if we called it x86_64_all_defconfig for x86, we could have something like this:

make allmodconfig KCONFIG_ALLCONFIG=$(pwd)/arch/x86/configs/x86_64_defconfig
make savedefconfig
mv defconfig arch/x86/configs/x86_64_all_defconfig

Then one build job would be doing make x86_64_all_defconfig.

It's essentially easier to create any arbitrary config file in the first part of the KernelCI build system, to include it in the source tarball, than to run fancy build commands in the build jobs themselves. Also we should be able to define that allmodconfig + KCONFIG_ALLCONFIG way of creating config files with parameters in build-configs.yaml to keep things relatively clean.

gctucker commented 5 years ago

@roxell Is this still a relevant thing to do?

If so, maybe you could share a known working defconfig and we try to reproduce it on staging.kernelci.org and see what happens with boot testing it.

nuclearcat commented 2 years ago

Is issue still relevant or maybe we close it?

gctucker commented 2 years ago

It's still relevant and it's the next one on my ToDo list once we've resolved the QEMU MIPS malta one.

The allmodconfig arm64 build can run on QEMU arm64 natively in Linaro's LKFT lab.

mgalka commented 1 year ago

@gctucker Is it still valid?

gctucker commented 1 year ago

Yes, right now the allmodconfig + arm64 defconfig kernel binaries are booting but without all the modules.