~postmarketos/pmbootstrap-devel

This thread contains a patchset. You're looking at the original emails, but you may wish to use the patch review UI. Review patch
3 2

[PATCH pmbootstrap] kconfig check: Add USB gadget check to community

Details
Message ID
<20230423163438.746054-1-luca@z3ntu.xyz>
DKIM signature
missing
Download raw message
Patch: +15 -0
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.
---
I will submit an MR adjusting current main/community devices to be
compliant with this. That pmaports MR should be merged before this patch
is applied to avoid any kconfig check failures before.

Also if someone disagress with using USB like this, let me know. I think
this makes it much nicer and keeps USB setup somewhat consistent.

 pmb/config/__init__.py | 14 ++++++++++++++
 pmb/parse/kconfig.py   |  1 +
 2 files changed, 15 insertions(+)

diff --git a/pmb/config/__init__.py b/pmb/config/__init__.py
index 06997d9f..fcca55bb 100644
--- a/pmb/config/__init__.py
+++ b/pmb/config/__init__.py
@@ -632,6 +632,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
diff --git a/pmb/parse/kconfig.py b/pmb/parse/kconfig.py
index 7b1863a0..9562dd71 100644
--- a/pmb/parse/kconfig.py
+++ b/pmb/parse/kconfig.py
@@ -199,6 +199,7 @@ def check_config(config_path, config_arch, pkgver, components_list=[],
            "iwd",
            "netboot",
            "nftables",
            "usb_gadgets",
            "waydroid",
            "wireguard",
            "zram",
-- 
2.40.0

[pmbootstrap/patches/.build.yml] build success

builds.sr.ht <builds@sr.ht>
Details
Message ID
<CS4AJVURXXQB.1MJO5R2WV4SA9@cirno2>
In-Reply-To
<20230423163438.746054-1-luca@z3ntu.xyz> (view parent)
DKIM signature
missing
Download raw message
pmbootstrap/patches/.build.yml: SUCCESS in 18m36s

[kconfig check: Add USB gadget check to community][0] from [Luca Weiss][1]

[0]: https://lists.sr.ht/~postmarketos/pmbootstrap-devel/patches/40610
[1]: luca@z3ntu.xyz

✓ #978394 SUCCESS pmbootstrap/patches/.build.yml https://builds.sr.ht/~postmarketos/job/978394
Details
Message ID
<CS87UKPB6MTI.2UZQT449PQO8J@pm-mail-aerc>
In-Reply-To
<20230423163438.746054-1-luca@z3ntu.xyz> (view parent)
DKIM signature
missing
Download raw message
On Sun Apr 23, 2023 at 6:34 PM CEST, Luca Weiss wrote:
> 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.

Thanks, LGTM!

Reviewed-by: Oliver Smith <ollieparanoid@postmarketos.org>

> ---
> I will submit an MR adjusting current main/community devices to be
> compliant with this. That pmaports MR should be merged before this patch
> is applied to avoid any kconfig check failures before.
>
> Also if someone disagress with using USB like this, let me know. I think
> this makes it much nicer and keeps USB setup somewhat consistent.
>
>  pmb/config/__init__.py | 14 ++++++++++++++
>  pmb/parse/kconfig.py   |  1 +
>  2 files changed, 15 insertions(+)
>
> diff --git a/pmb/config/__init__.py b/pmb/config/__init__.py
> index 06997d9f..fcca55bb 100644
> --- a/pmb/config/__init__.py
> +++ b/pmb/config/__init__.py
> @@ -632,6 +632,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
> diff --git a/pmb/parse/kconfig.py b/pmb/parse/kconfig.py
> index 7b1863a0..9562dd71 100644
> --- a/pmb/parse/kconfig.py
> +++ b/pmb/parse/kconfig.py
> @@ -199,6 +199,7 @@ def check_config(config_path, config_arch, pkgver, components_list=[],
>              "iwd",
>              "netboot",
>              "nftables",
> +            "usb_gadgets",
>              "waydroid",
>              "wireguard",
>              "zram",
> -- 
> 2.40.0
Details
Message ID
<168300979554.1582.6138311841889837089.b4-ty@postmarketos.org>
In-Reply-To
<20230423163438.746054-1-luca@z3ntu.xyz> (view parent)
DKIM signature
missing
Download raw message
On Sun, 23 Apr 2023 18:34:39 +0200, Luca Weiss wrote:
> 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.
> 
> [...]

Applied, thanks!

[1/1] kconfig check: Add USB gadget check to community
      commit: d200414d8719fc0de9ec00c569dd7e9a117aa0ac

Best regards,
-- 
Oliver Smith <ollieparanoid@postmarketos.org>
Reply to thread Export thread (mbox)