~postmarketos/pmbootstrap

d200414d8719fc0de9ec00c569dd7e9a117aa0ac — Luca Weiss 1 year, 5 months ago 204419f
kconfig check: Add USB gadget check to community

Make sure that we disable legacy gadgets like USB_ETH. Our initramfs
uses configfs gadgets instead, currently RNDIS for USB networking.

In the future this can be expanded to more options like mass storage,
MIDI or whatever we're going to integrate into the OS that can be
configured by the user.

Reviewed-by: Oliver Smith <ollieparanoid@postmarketos.org>
Link: https://lists.sr.ht/~postmarketos/pmbootstrap-devel/%3C20230423163438.746054-1-luca@z3ntu.xyz%3E
2 files changed, 15 insertions(+), 0 deletions(-)

M pmb/config/__init__.py
M pmb/parse/kconfig.py
M pmb/config/__init__.py => pmb/config/__init__.py +14 -0
@@ 636,6 636,20 @@ kconfig_options_filesystems = {
    },
}

kconfig_options_usb_gadgets = {
    ">=0.0.0": {  # all versions
        "all": {  # all arches
            # disable legacy gadgets
            "USB_ETH": False,
            "USB_FUNCTIONFS": False,
            "USB_MASS_STORAGE": False,
            "USB_G_SERIAL": False,
            # enable configfs gadgets
            "USB_CONFIGFS_RNDIS": True,  # USB networking via RNDIS
        },
    },
}

# Various other kernel config options
kconfig_options_community = {
    ">=0.0.0": {  # all versions

M pmb/parse/kconfig.py => pmb/parse/kconfig.py +1 -0
@@ 199,6 199,7 @@ def check_config(config_path, config_arch, pkgver, components_list=[],
            "iwd",
            "netboot",
            "nftables",
            "usb_gadgets",
            "waydroid",
            "wireguard",
            "zram",