From c1165a318f439143030eb1eb85cd3dc8326a2580 Mon Sep 17 00:00:00 2001 From: Alexandre Bard Date: Fri, 27 Oct 2023 15:04:23 +0200 Subject: [PATCH] nwl-test-image: Add missing components Since we worked mainly on the ramdisk image, the test-image was almost empty and lacking the minimum components. This components are now defined in a packagegroup which is included in all nwl-images. It also include a new MACHINE_FEATURE : nrsw-ready. This feature allows us to not include NRSW modules for devices that are not supported by NRSW: for the moment it is mainly the devices supported by core-os like cn9130-cf-pro. These devices are build against there custom kernel against which the NRSW modules are not buildable. id:458169 --- .../conf/machine/include/all-netmodule.inc | 1 + .../conf/machine/include/armada.inc | 2 ++ .../conf/machine/include/ti33x.inc | 1 + .../meta-nwl-distro/classes/nwl-image.bbclass | 4 +++ .../images/nwl-ramdisk-minimal.bb | 19 ------------ .../recipes-core/images/nwl-test-image.bb | 9 +++++- .../packagegroups/packagegroup-nwl-core.bb | 30 +++++++++++++++++++ 7 files changed, 46 insertions(+), 20 deletions(-) create mode 100644 layers/meta-netmodule-legacy-bsp/conf/machine/include/all-netmodule.inc create mode 100644 layers/meta-nwl-distro/recipes-core/packagegroups/packagegroup-nwl-core.bb diff --git a/layers/meta-netmodule-legacy-bsp/conf/machine/include/all-netmodule.inc b/layers/meta-netmodule-legacy-bsp/conf/machine/include/all-netmodule.inc new file mode 100644 index 0000000..fe6febf --- /dev/null +++ b/layers/meta-netmodule-legacy-bsp/conf/machine/include/all-netmodule.inc @@ -0,0 +1 @@ +MACHINE_FEATURES += "nrsw-ready" diff --git a/layers/meta-netmodule-legacy-bsp/conf/machine/include/armada.inc b/layers/meta-netmodule-legacy-bsp/conf/machine/include/armada.inc index fc3f641..15b2fdf 100644 --- a/layers/meta-netmodule-legacy-bsp/conf/machine/include/armada.inc +++ b/layers/meta-netmodule-legacy-bsp/conf/machine/include/armada.inc @@ -1,3 +1,5 @@ +require all-netmodule.inc + SOC_FAMILY = "armada" require conf/machine/include/soc-family.inc diff --git a/layers/meta-netmodule-legacy-bsp/conf/machine/include/ti33x.inc b/layers/meta-netmodule-legacy-bsp/conf/machine/include/ti33x.inc index 3f13b8c..bf30abf 100644 --- a/layers/meta-netmodule-legacy-bsp/conf/machine/include/ti33x.inc +++ b/layers/meta-netmodule-legacy-bsp/conf/machine/include/ti33x.inc @@ -7,6 +7,7 @@ # xf86-video-modesetting \ # " +require all-netmodule.inc MACHINE_EXTRA_RRECOMMENDS = "kernel-modules kernel-devicetree" NM_TARGET = "netbird" NM_ARCH = "arm" diff --git a/layers/meta-nwl-distro/classes/nwl-image.bbclass b/layers/meta-nwl-distro/classes/nwl-image.bbclass index 3f9fadf..d965d98 100644 --- a/layers/meta-nwl-distro/classes/nwl-image.bbclass +++ b/layers/meta-nwl-distro/classes/nwl-image.bbclass @@ -3,3 +3,7 @@ COREOS_IMAGE_GENERATE_SWU = "0" COREOS_IMAGE_GENERATE_INSTALLER = "0" inherit coreos-image + +IMAGE_INSTALL:append = " \ + packagegroup-nwl-core \ +" diff --git a/layers/meta-nwl-distro/recipes-core/images/nwl-ramdisk-minimal.bb b/layers/meta-nwl-distro/recipes-core/images/nwl-ramdisk-minimal.bb index 38588cd..c5aeb6e 100644 --- a/layers/meta-nwl-distro/recipes-core/images/nwl-ramdisk-minimal.bb +++ b/layers/meta-nwl-distro/recipes-core/images/nwl-ramdisk-minimal.bb @@ -17,30 +17,11 @@ IMAGE_FSTYPES = "cpio.xz" # Keep only the minimum packages NO_RECOMMENDATIONS = "1" -TI_WIFI_PACKAGES = " \ - firmware-ti-wl18xx \ - " - -WIFI_PACKAGES = " \ - ${@bb.utils.contains("MACHINE_FEATURES", "ti-wifi", "${TI_WIFI_PACKAGES}", "", d)} \ - " - EXTRA_IMAGE_FEATURES = "debug-tweaks ssh-server" IMAGE_INSTALL:append = " \ - coreutils \ - ncurses-terminfo-base \ - kernel-modules \ - kernel-module-board-descriptor \ - kernel-module-system-info \ - kernel-module-pcie \ - \ - networkmanager-nmcli \ - systemd-conf \ nwl-tests \ \ - ${@bb.utils.contains("MACHINE_FEATURES", "wifi", "${WIFI_PACKAGES}", "", d)} \ - \ bmap-tools \ xz \ " diff --git a/layers/meta-nwl-distro/recipes-core/images/nwl-test-image.bb b/layers/meta-nwl-distro/recipes-core/images/nwl-test-image.bb index c51c495..eda1306 100644 --- a/layers/meta-nwl-distro/recipes-core/images/nwl-test-image.bb +++ b/layers/meta-nwl-distro/recipes-core/images/nwl-test-image.bb @@ -14,6 +14,13 @@ inherit nwl-image # Add features and packages that are used in our tests: IMAGE_FEATURES += "ssh-server networkmanager swupdate" -IMAGE_INSTALL:append = " packagegroup-core-full-cmdline swupdate-www" +IMAGE_INSTALL:append = " \ + packagegroup-core-full-cmdline \ + swupdate-www \ + nwl-tests \ + " + + + IMAGE_FSTYPES += "wic.xz wic.bmap" diff --git a/layers/meta-nwl-distro/recipes-core/packagegroups/packagegroup-nwl-core.bb b/layers/meta-nwl-distro/recipes-core/packagegroups/packagegroup-nwl-core.bb new file mode 100644 index 0000000..4c74301 --- /dev/null +++ b/layers/meta-nwl-distro/recipes-core/packagegroups/packagegroup-nwl-core.bb @@ -0,0 +1,30 @@ +inherit packagegroup + +PACKAGE_ARCH = "${MACHINE_ARCH}" + + +NRSW_MODULES = " \ + kernel-module-board-descriptor \ + kernel-module-system-info \ + kernel-module-pcie \ +" + +TI_WIFI_PACKAGES = " \ + firmware-ti-wl18xx \ + " + +WIFI_PACKAGES = " \ + ${@bb.utils.contains("MACHINE_FEATURES", "ti-wifi", "${TI_WIFI_PACKAGES}", "", d)} \ + " + +RDEPENDS:${PN} = " \ + coreutils \ + ncurses-terminfo-base \ + networkmanager-nmcli \ + systemd-conf \ + \ + kernel-modules \ + ${@bb.utils.contains("MACHINE_FEATURES", "nrsw-ready", "${NRSW_MODULES}", "", d)} \ + \ + ${@bb.utils.contains("MACHINE_FEATURES", "wifi", "${WIFI_PACKAGES}", "", d)} \ +"