Merge pull request #1042 from alicefr/skip-common-frag-config

fragments: skip some config base on the arch
This commit is contained in:
Graham Whaley 2020-05-29 14:21:57 +01:00 committed by GitHub
commit d1b4873bf5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 3 deletions

View File

@ -181,11 +181,13 @@ get_kernel_frag_path() {
local gpu_path="${arch_path}/../gpu"
local kernel_path="$2"
local arch="$3"
local cmdpath="${kernel_path}/scripts/kconfig/merge_config.sh"
local config_path="${arch_path}/.config"
local arch_configs="$(ls ${arch_path}/*.conf)"
local common_configs="$(ls ${common_path}/*.conf)"
# Exclude configs if they have !$arch tag in the header
local common_configs="$(grep "\!${arch}" ${common_path}/*.conf -L)"
local experimental_configs="$(ls ${common_path}/experimental/*.conf)"
# These are the strings that the kernel merge_config.sh script kicks out
@ -275,7 +277,7 @@ get_default_kernel_config() {
archfragdir="${default_config_frags_dir}/${kernel_arch}"
if [ -d "${archfragdir}" ]; then
config="$(get_kernel_frag_path ${archfragdir} ${kernel_path})"
config="$(get_kernel_frag_path ${archfragdir} ${kernel_path} ${kernel_arch})"
else
[ "${hypervisor}" == "firecracker" ] && hypervisor="kvm"
config="${default_kernel_config_dir}/${kernel_arch}_kata_${hypervisor}_${major_kernel}.x"

View File

@ -55,6 +55,12 @@ into a fragment.
If adding config entries for a new subsystem or feature, consider making a new
fragment with an appropriately descriptive name.
If you want to disable an entire fragment for a specific architecture, you can add the tag `# !${arch}` in the first line of the fragment. You can also exclude multiple architectures on the same line. Note the `#` at the beginning of the line, this is required to avoid that the tag is interpreted as a configuration.
Example of valid exclusion:
```
# !s390x !ppc64le
```
The fragment gathering tool perfoms some basic sanity checks, and the `build-kernel.sh` will
fail and report the error in the cases of:

View File

@ -1 +1 @@
78
79