[PATCH rtems-libbsd v2 4/5] libbsd.py: add usb template files
Chris Johns
chrisj at rtems.org
Thu Jul 29 00:08:37 UTC 2021
On 28/7/21 9:56 pm, Husni Faiz wrote:
> add the imported template files for CDC Ethernet
> register the dev_usb_template module
> enable usb template in default buildset
>
> Signed-off-by: Husni Faiz <ahamedhusni73 at gmail.com>
> ---
> buildset/default.ini | 1 +
> buildset/minimal.ini | 3 ++-
> libbsd.py | 25 +++++++++++++++++++++++++
> 3 files changed, 28 insertions(+), 1 deletion(-)
>
> diff --git a/buildset/default.ini b/buildset/default.ini
> index 472c535d..117bacc3 100644
> --- a/buildset/default.ini
> +++ b/buildset/default.ini
> @@ -34,6 +34,7 @@ dev_usb_net = on
> dev_usb_quirk = on
> dev_usb_serial = on
> dev_usb_storage = on
> +dev_usb_template = on
> dev_usb_wlan = off
> dev_wlan_rtwn = off
> iic = on
> diff --git a/buildset/minimal.ini b/buildset/minimal.ini
> index 03dd96bb..060b1930 100644
> --- a/buildset/minimal.ini
> +++ b/buildset/minimal.ini
> @@ -19,5 +19,6 @@ extends = default.ini
>
> [modules]
> crypto_openssl = off
> +dev_usb_template = off
> netinet6 = off
> -usr_bin_openssl = off
> +usr_bin_openssl = off
> \ No newline at end of file
What happened here?
Chris
> diff --git a/libbsd.py b/libbsd.py
> index c9151901..049ec7f8 100644
> --- a/libbsd.py
> +++ b/libbsd.py
> @@ -1162,6 +1162,30 @@ class dev_usb_storage(builder.Module):
> mm.generator['source']()
> )
>
> +#
> +# USB Template
> +#
> +class dev_usb_template(builder.Module):
> +
> + def __init__(self, manager):
> + super(dev_usb_template, self).__init__(manager, type(self).__name__)
> +
> + def generate(self):
> + mm = self.manager
> + self.addDependency('dev_usb')
> + self.addKernelSpaceHeaderFiles(
> + [
> + 'sys/dev/usb/template/usb_template.h',
> + ]
> + )
> + self.addKernelSpaceSourceFiles(
> + [
> + 'sys/dev/usb/template/usb_template.c',
> + 'sys/dev/usb/template/usb_template_cdce.c',
> + ],
> + mm.generator['source']()
> + )
> +
> #
> # BBB USB
> #
> @@ -5480,6 +5504,7 @@ def load(mm):
>
> mm.addModule(cam(mm))
> mm.addModule(dev_usb_storage(mm))
> + mm.addModule(dev_usb_template(mm))
> mm.addModule(dev_usb_controller_bbb(mm))
>
> mm.addModule(net(mm))
>
More information about the devel
mailing list