pmb.parse.kconfig: add 'community' option (MR 2204)

Add the new option that will be mandatory for all devices in
community/main category. This is just a combination of anbox + iwd +
nftables + containers + zram + netboot.

While the existing options could be removed we're keeping it for now
given that also some devices with downstream kernel might find some
options useful.
This commit is contained in:
Luca Weiss 2022-09-07 22:49:23 +02:00 committed by Oliver Smith
parent 1fee644dce
commit e468fc518e
No known key found for this signature in database
GPG Key ID: 5AE7F5513E0885CB
4 changed files with 22 additions and 2 deletions

View File

@ -158,5 +158,6 @@ def menuconfig(args, pkgname, use_oldconfig):
force_containers_check=False,
force_zram_check=False,
force_netboot_check=False,
force_community_check=False,
force_uefi_check=False,
details=True)

View File

@ -384,6 +384,7 @@ def kconfig(args):
containers=args.containers,
zram=args.zram,
netboot=args.netboot,
community=args.community,
uefi=args.uefi,
details=True):
logging.info("kconfig check succeeded!")
@ -420,6 +421,7 @@ def kconfig(args):
force_containers_check=args.containers,
force_zram_check=args.zram,
force_netboot_check=args.netboot,
force_community_check=args.community,
force_uefi_check=args.uefi,
details=True):
error = True

View File

@ -476,6 +476,9 @@ def arguments_kconfig(subparser):
" options needed for zram support too")
check.add_argument("--netboot", action="store_true", help="check"
" options needed for netbooting too")
check.add_argument("--community", action="store_true", help="check"
" options needed for various features, required for"
" community/main devices")
check.add_argument("--uefi", action="store_true", help="check"
" options needed for uefi too")
add_kernel_arg(check)

View File

@ -91,6 +91,7 @@ def check_config(config_path, config_path_pretty, config_arch, pkgver,
containers=False,
zram=False,
netboot=False,
community=False,
uefi=False,
details=False):
logging.debug(f"Check kconfig: {config_path}")
@ -111,6 +112,14 @@ def check_config(config_path, config_path_pretty, config_arch, pkgver,
components["zram"] = pmb.config.necessary_kconfig_options_zram
if netboot:
components["netboot"] = pmb.config.necessary_kconfig_options_netboot
if community:
components["anbox"] = pmb.config.necessary_kconfig_options_anbox
components["iwd"] = pmb.config.necessary_kconfig_options_iwd
components["nftables"] = pmb.config.necessary_kconfig_options_nftables
components["containers"] = \
pmb.config.necessary_kconfig_options_containers
components["zram"] = pmb.config.necessary_kconfig_options_zram
components["netboot"] = pmb.config.necessary_kconfig_options_netboot
if uefi:
components["uefi"] = pmb.config.necessary_kconfig_options_uefi
@ -162,6 +171,7 @@ def check(args, pkgname,
force_containers_check=False,
force_zram_check=False,
force_netboot_check=False,
force_community_check=False,
force_uefi_check=False,
details=False,
must_exist=True):
@ -196,6 +206,8 @@ def check(args, pkgname,
"pmb:kconfigcheck-zram" in apkbuild["options"])
check_netboot = force_netboot_check or (
"pmb:kconfigcheck-netboot" in apkbuild["options"])
check_community = force_community_check or (
"pmb:kconfigcheck-community" in apkbuild["options"])
check_uefi = force_uefi_check or (
"pmb:kconfigcheck-uefi" in apkbuild["options"])
for config_path in glob.glob(aport + "/config-*"):
@ -222,6 +234,7 @@ def check(args, pkgname,
containers=check_containers,
zram=check_zram,
netboot=check_netboot,
community=check_community,
uefi=check_uefi,
details=details)
return ret
@ -260,8 +273,8 @@ def extract_version(config_file):
def check_file(config_file, anbox=False, nftables=False,
containers=False, zram=False, netboot=False, uefi=False,
details=False):
containers=False, zram=False, netboot=False,
community=False, uefi=False, details=False):
"""
Check for necessary kernel config options in a kconfig file.
@ -277,5 +290,6 @@ def check_file(config_file, anbox=False, nftables=False,
containers=containers,
zram=zram,
netboot=netboot,
community=community,
uefi=uefi,
details=details)