diff --git a/recipes-core/images/netmodule-linux-image-dev.bb b/recipes-core/images/netmodule-linux-image-dev.bb index 5d84639..c761e32 100644 --- a/recipes-core/images/netmodule-linux-image-dev.bb +++ b/recipes-core/images/netmodule-linux-image-dev.bb @@ -28,7 +28,6 @@ BENCH_TOOLS = " \ rt-tests \ " GPS_TOOLS = " \ - gps-utils \ ser2net \ gnss-mgr-test \ " @@ -50,18 +49,15 @@ IMAGE_INSTALL_append = " \ ${GPS_TOOLS} \ ${MONITORING} \ python3 \ - python3-misc \ python3-pip \ + python3-pycurl \ minicom \ binutils \ util-linux \ i2c-tools \ - spitools \ - ethtool \ evtest \ devmem2 \ board-descriptor \ tmate \ - python3-pycurl \ " OSTREE_BRANCHNAME = "${LAYERSERIES_CORENAMES}-${MACHINE}-dev" diff --git a/recipes-core/images/netmodule-linux-image-minimal.bb b/recipes-core/images/netmodule-linux-image-minimal.bb index d8c6dbb..0eba927 100644 --- a/recipes-core/images/netmodule-linux-image-minimal.bb +++ b/recipes-core/images/netmodule-linux-image-minimal.bb @@ -6,18 +6,13 @@ SUMMARY = "Minimal image for bringup" NO_RECOMMENDATIONS = "1" +# Minimal NM distribution + tools to fetch and flash images IMAGE_INSTALL = " \ - packagegroup-core-boot \ + packagegroup-nm-minimal \ e2fsprogs-mke2fs \ devmem2 \ - util-linux-agetty \ - systemd-serialgetty \ - networkmanager \ curl \ tar \ - less \ - ncurses-terminfo-base \ - haveged \ " IMAGE_INSTALL_append_netbird = " kernel-module-wlan-backports" diff --git a/recipes-core/images/netmodule-linux-image.bb b/recipes-core/images/netmodule-linux-image.bb index 0303ee0..ff9170c 100644 --- a/recipes-core/images/netmodule-linux-image.bb +++ b/recipes-core/images/netmodule-linux-image.bb @@ -10,95 +10,16 @@ PROVIDES += "virtual/netmodule-image" IMAGE_FEATURES_append = " \ package-management \ - ssh-server-openssh \ " -BASE_TOOLS = " \ - bash \ - less \ - curl \ - parted \ - mmc-utils \ - " - -NET_TOOLS = " \ - iproute2 \ - ethtool \ - iptables \ - networkmanager \ - bridge-utils \ - " - -WWAN_TOOLS = " \ - modemmanager \ - wwan-config \ - " - -BT_TOOLS = " \ - bluez5 \ - bluez5-obex \ - bluez5-noinst-tools \ - ${@bb.utils.contains("MACHINE_FEATURES", "tibluetooth", "tibluetooth", "", d)} \ - " -WIFI_TOOLS = " \ - hostapd \ - iw \ - wpa-supplicant \ - wireless-regdb-static \ - " - -TIME_TOOLS = " \ - chrony \ - chronyc \ - " - -NM_TOOLS = " \ - nmhw-auto-part \ - udev-rules-nmhw \ - nmhw-fwupdate \ - packagegroup-system-state-framework \ - " - -IMAGE_INSTALL_append = " \ - ${CORE_IMAGE_BASE_INSTALL} \ - ${BASE_TOOLS} \ - ${NET_TOOLS} \ - ${NM_TOOLS} \ - ${TIME_TOOLS} \ +IMAGE_INSTALL = " \ + packagegroup-nm-minimal \ + packagegroup-nm-base \ + packagegroup-nm-extended \ ${FIRMWARE} \ - openssh-sftp-server \ - haveged \ - openvpn \ - pciutils \ - kernel-modules \ - packagegroup-netmodule-linux \ - rng-tools \ - gpsd \ - gps-utils \ - socat \ - cryptodev-module \ - packagegroup-ublox-modules \ - \ - ${@bb.utils.contains("DISTRO_FEATURES", "custom-mac-addresses", "mac-address-set", "", d)} \ - \ - ${@bb.utils.contains("MACHINE_FEATURES", "can", "can-utils", "", d)} \ - ${@bb.utils.contains("MACHINE_FEATURES", "wwan", "${WWAN_TOOLS}", "", d)} \ - ${@bb.utils.contains("MACHINE_FEATURES", "gnss", "gnss-mgr", "", d)} \ - ${@bb.utils.contains("MACHINE_FEATURES", "bluetooth", "${BT_TOOLS}", "", d)} \ - ${@bb.utils.contains("MACHINE_FEATURES", "imx-boot", "", "bootloader-config", d)} \ - ${@bb.utils.contains("MACHINE_FEATURES", "usb-hub-reset", "usb-hub-reset", "", d)} \ - ${@bb.utils.contains("MACHINE_FEATURES", "v2x", "v2x-ieee802.11p", "", d)} \ - ${@bb.utils.contains("MACHINE_FEATURES", "fpga", "fpga-image", "", d)} \ - ${@bb.utils.contains("MACHINE_FEATURES", "am335x-wakeup-timer", "wakeup-timer", "", d)} \ - ${@bb.utils.contains("MACHINE_FEATURES", "spi", "spitools", "", d)} \ - ${@bb.utils.contains("MACHINE_FEATURES", "imu", "imu-setup", "", d)} \ " -IMAGE_INSTALL_append_imx8-nmhw23 = " \ - gnss-init \ - " - IMAGE_INSTALL_append_sota = " mount-overlay" IMAGE_INSTALL_append_netbird = " kernel-module-wlan-backports" diff --git a/recipes-core/packagegroups-features/packagegroup-feature.inc b/recipes-core/packagegroups-features/packagegroup-feature.inc new file mode 100644 index 0000000..de28eba --- /dev/null +++ b/recipes-core/packagegroups-features/packagegroup-feature.inc @@ -0,0 +1,7 @@ +inherit packagegroup + +PACKAGES = "${PN}-minimal ${PN}-base ${PN}-extended" + +SUMMARY_${PN}-minimal = "Minimal packages for ${PN}" +SUMMARY_${PN}-base = "Base packages for ${PN}" +SUMMARY_${PN}-extended = "Extended packages for ${PN}" diff --git a/recipes-core/packagegroups-features/packagegroup-nm-bluetooth.bb b/recipes-core/packagegroups-features/packagegroup-nm-bluetooth.bb new file mode 100644 index 0000000..dedae6f --- /dev/null +++ b/recipes-core/packagegroups-features/packagegroup-nm-bluetooth.bb @@ -0,0 +1,13 @@ +SUMMARY = "Bluetooth tools for NetModule distributions" +LICENSE = "MIT" + +require packagegroup-feature.inc + +PACKAGE_ARCH = "${MACHINE_ARCH}" + +RDEPENDS_${PN}-base = " \ + bluez5 \ + bluez5-obex \ + bluez5-noinst-tools \ + ${@bb.utils.contains("MACHINE_FEATURES", "tibluetooth", "tibluetooth", "", d)} \ + " diff --git a/recipes-core/packagegroups-features/packagegroup-nm-boot-tools.bb b/recipes-core/packagegroups-features/packagegroup-nm-boot-tools.bb new file mode 100644 index 0000000..d995c27 --- /dev/null +++ b/recipes-core/packagegroups-features/packagegroup-nm-boot-tools.bb @@ -0,0 +1,10 @@ +SUMMARY = "Bootloader management tools for NetModule distributions" +LICENSE = "MIT" + +require packagegroup-feature.inc + +PACKAGE_ARCH = "${MACHINE_ARCH}" + +RDEPENDS_${PN}-extended = " \ + ${@bb.utils.contains("MACHINE_FEATURES", "imx-boot", "", "bootloader-config", d)} \ + " diff --git a/recipes-core/packagegroups-features/packagegroup-nm-can.bb b/recipes-core/packagegroups-features/packagegroup-nm-can.bb new file mode 100644 index 0000000..c639650 --- /dev/null +++ b/recipes-core/packagegroups-features/packagegroup-nm-can.bb @@ -0,0 +1,12 @@ +SUMMARY = "CAN tools for NetModule distributions" +LICENSE = "MIT" + +require packagegroup-feature.inc + +RDEPENDS_${PN}-base = " \ + can-utils \ + " + +RDEPENDS_${PN}-extended = " \ + cannelloni \ + " diff --git a/recipes-core/packagegroups-features/packagegroup-nm-fpga.bb b/recipes-core/packagegroups-features/packagegroup-nm-fpga.bb new file mode 100644 index 0000000..aca2c12 --- /dev/null +++ b/recipes-core/packagegroups-features/packagegroup-nm-fpga.bb @@ -0,0 +1,8 @@ +SUMMARY = "FPGA image for NetModule distributions" +LICENSE = "MIT" + +require packagegroup-feature.inc + +RDEPENDS_${PN}-base = " \ + fpga-image \ + " diff --git a/recipes-core/packagegroups-features/packagegroup-nm-gnss.bb b/recipes-core/packagegroups-features/packagegroup-nm-gnss.bb new file mode 100644 index 0000000..9f54901 --- /dev/null +++ b/recipes-core/packagegroups-features/packagegroup-nm-gnss.bb @@ -0,0 +1,13 @@ +SUMMARY = "GNSS tools for NetModule distributions" + +LICENSE = "MIT" + +require packagegroup-feature.inc + +PACKAGE_ARCH = "${MACHINE_ARCH}" + +RDEPENDS_${PN}-extended = " \ + gpsd \ + gps-utils \ + ${@bb.utils.contains("MACHINE_FEATURES", "advanced-gnss", "gnss-mgr", "", d)} \ + " diff --git a/recipes-core/packagegroups-features/packagegroup-nm-imu.bb b/recipes-core/packagegroups-features/packagegroup-nm-imu.bb new file mode 100644 index 0000000..c080716 --- /dev/null +++ b/recipes-core/packagegroups-features/packagegroup-nm-imu.bb @@ -0,0 +1,8 @@ +SUMMARY = "IMU tools for NetModule distributions" +LICENSE = "MIT" + +require packagegroup-feature.inc + +RDEPENDS_${PN}-extended = " \ + imu-setup \ + " diff --git a/recipes-core/packagegroups-features/packagegroup-nm-net.bb b/recipes-core/packagegroups-features/packagegroup-nm-net.bb new file mode 100644 index 0000000..0c270bf --- /dev/null +++ b/recipes-core/packagegroups-features/packagegroup-nm-net.bb @@ -0,0 +1,23 @@ +SUMMARY = "Network tools for NetModule distributions" +LICENSE = "MIT" + +require packagegroup-feature.inc + +# less is needed for nmcli to show proper output +RDEPENDS_${PN}-minimal = " \ + networkmanager \ + less \ + " + +RDEPENDS_${PN}-base = " \ + iproute2 \ + packagegroup-core-ssh-openssh \ + openssh-sftp-server \ + " + +RDEPENDS_${PN}-extended= " \ + ethtool \ + iptables \ + bridge-utils \ + openvpn \ + " diff --git a/recipes-core/packagegroups-features/packagegroup-nm-spi.bb b/recipes-core/packagegroups-features/packagegroup-nm-spi.bb new file mode 100644 index 0000000..5cb738a --- /dev/null +++ b/recipes-core/packagegroups-features/packagegroup-nm-spi.bb @@ -0,0 +1,8 @@ +SUMMARY = "SPI tools for NetModule distributions" +LICENSE = "MIT" + +require packagegroup-feature.inc + +RDEPENDS_${PN}-base = " \ + spitools \ + " diff --git a/recipes-core/packagegroups-features/packagegroup-nm-time.bb b/recipes-core/packagegroups-features/packagegroup-nm-time.bb new file mode 100644 index 0000000..74cd7da --- /dev/null +++ b/recipes-core/packagegroups-features/packagegroup-nm-time.bb @@ -0,0 +1,9 @@ +SUMMARY = "Time tools for NetModule distributions" +LICENSE = "MIT" + +require packagegroup-feature.inc + +RDEPENDS_${PN}-extended = " \ + chrony \ + chronyc \ + " diff --git a/recipes-core/packagegroups-features/packagegroup-nm-v2x.bb b/recipes-core/packagegroups-features/packagegroup-nm-v2x.bb new file mode 100644 index 0000000..41653f7 --- /dev/null +++ b/recipes-core/packagegroups-features/packagegroup-nm-v2x.bb @@ -0,0 +1,8 @@ +SUMMARY = "V2X tools for NetModule distributions" +LICENSE = "MIT" + +require packagegroup-feature.inc + +RDEPENDS_${PN}-extended = " \ + v2x-ieee802.11p \ + " diff --git a/recipes-core/packagegroups-features/packagegroup-nm-wakeup-timer.bb b/recipes-core/packagegroups-features/packagegroup-nm-wakeup-timer.bb new file mode 100644 index 0000000..85c59f3 --- /dev/null +++ b/recipes-core/packagegroups-features/packagegroup-nm-wakeup-timer.bb @@ -0,0 +1,8 @@ +SUMMARY = "Wakeup Timer driver for NetModule distributions" +LICENSE = "MIT" + +require packagegroup-feature.inc + +RDEPENDS_${PN}-extended = " \ + wakeup-timer \ + " diff --git a/recipes-core/packagegroups-features/packagegroup-nm-wifi.bb b/recipes-core/packagegroups-features/packagegroup-nm-wifi.bb new file mode 100644 index 0000000..9ee96c1 --- /dev/null +++ b/recipes-core/packagegroups-features/packagegroup-nm-wifi.bb @@ -0,0 +1,11 @@ +SUMMARY = "Wifi tools for NetModule distributions" +LICENSE = "MIT" + +require packagegroup-feature.inc + +RDEPENDS_${PN}-extended = " \ + hostapd \ + iw \ + wpa-supplicant \ + wireless-regdb-static \ + " diff --git a/recipes-core/packagegroups-features/packagegroup-nm-wwan.bb b/recipes-core/packagegroups-features/packagegroup-nm-wwan.bb new file mode 100644 index 0000000..76aaeee --- /dev/null +++ b/recipes-core/packagegroups-features/packagegroup-nm-wwan.bb @@ -0,0 +1,9 @@ +SUMMARY = "WWAN tools for NetModule distributions" +LICENSE = "MIT" + +require packagegroup-feature.inc + +RDEPENDS_${PN}-extended = " \ + modemmanager \ + wwan-config \ + " diff --git a/recipes-core/packagegroups-sets/packagegroup-nm-base.bb b/recipes-core/packagegroups-sets/packagegroup-nm-base.bb new file mode 100644 index 0000000..f3a3fd3 --- /dev/null +++ b/recipes-core/packagegroups-sets/packagegroup-nm-base.bb @@ -0,0 +1,15 @@ +SUMMARY = "Netmodule Linux Base Packages" +LICENSE = "MIT" + +require packagegroup-nm.inc +FEATURE_LEVEL = "base" + +RDEPENDS_${PN} = " \ + packagegroup-nm-minimal \ + bash \ + curl \ + parted \ + mmc-utils \ + usbutils \ + udev-rules-nmhw \ + " diff --git a/recipes-core/packagegroups-sets/packagegroup-nm-extended.bb b/recipes-core/packagegroups-sets/packagegroup-nm-extended.bb new file mode 100644 index 0000000..43632f0 --- /dev/null +++ b/recipes-core/packagegroups-sets/packagegroup-nm-extended.bb @@ -0,0 +1,26 @@ +DESCRIPTION = "Netmodule Linux Extended Packages" +LICENSE = "MIT" + +require packagegroup-nm.inc +FEATURE_LEVEL = "extended" + +RDEPENDS_${PN} = " \ + packagegroup-nm-base \ + nmhw-auto-part \ + nmhw-fwupdate \ + packagegroup-system-state-framework \ + ${@bb.utils.contains("DISTRO_FEATURES", "custom-mac-addresses", "mac-address-set", "", d)} \ + \ + rng-tools \ + cryptodev-module \ + kernel-modules \ + \ + socat \ + pciutils \ + " + +# Hacks for V2X-GNSS-HUB power sequence on HW23 +RDEPENDS_${PN}_append_imx8-nmhw23 = " \ + usb-hub-reset \ + gnss-init \ + " diff --git a/recipes-core/packagegroups-sets/packagegroup-nm-minimal.bb b/recipes-core/packagegroups-sets/packagegroup-nm-minimal.bb new file mode 100644 index 0000000..5cc5f6b --- /dev/null +++ b/recipes-core/packagegroups-sets/packagegroup-nm-minimal.bb @@ -0,0 +1,13 @@ +SUMMARY = "Netmodule Linux Minimal Packages" +LICENSE = "MIT" + +require packagegroup-nm.inc +FEATURE_LEVEL = "minimal" + +RDEPENDS_${PN} = " \ + packagegroup-core-boot \ + util-linux-agetty \ + systemd-serialgetty \ + ncurses-terminfo-base \ + haveged \ + " diff --git a/recipes-core/packagegroups-sets/packagegroup-nm.inc b/recipes-core/packagegroups-sets/packagegroup-nm.inc new file mode 100644 index 0000000..8fd3201 --- /dev/null +++ b/recipes-core/packagegroups-sets/packagegroup-nm.inc @@ -0,0 +1,22 @@ +inherit packagegroup + +PACKAGE_ARCH = "${MACHINE_ARCH}" +# FEATURE_LEVEL must be defined by including file + +RDEPENDS_${PN}_append = " \ + \ + packagegroup-nm-net-${FEATURE_LEVEL} \ + packagegroup-nm-boot-tools-${FEATURE_LEVEL} \ + packagegroup-nm-time-${FEATURE_LEVEL} \ + \ + ${@bb.utils.contains("MACHINE_FEATURES", "bluetooth", "packagegroup-nm-bluetooth-${FEATURE_LEVEL}", "", d)} \ + ${@bb.utils.contains("MACHINE_FEATURES", "can", "packagegroup-nm-can-${FEATURE_LEVEL}", "", d)} \ + ${@bb.utils.contains("MACHINE_FEATURES", "imu", "packagegroup-nm-imu-${FEATURE_LEVEL}", "", d)} \ + ${@bb.utils.contains("MACHINE_FEATURES", "fpga", "packagegroup-nm-fpga-${FEATURE_LEVEL}", "", d)} \ + ${@bb.utils.contains("MACHINE_FEATURES", "gnss", "packagegroup-nm-gnss-${FEATURE_LEVEL}", "", d)} \ + ${@bb.utils.contains("MACHINE_FEATURES", "spi", "packagegroup-nm-spi-${FEATURE_LEVEL}", "", d)} \ + ${@bb.utils.contains("MACHINE_FEATURES", "v2x", "packagegroup-nm-v2x-${FEATURE_LEVEL}", "", d)} \ + ${@bb.utils.contains("MACHINE_FEATURES", "wakeup-timer", "packagegroup-nm-wakeup-timer-${FEATURE_LEVEL}", "", d)} \ + ${@bb.utils.contains("MACHINE_FEATURES", "wifi", "packagegroup-nm-wifi-${FEATURE_LEVEL}", "", d)} \ + ${@bb.utils.contains("MACHINE_FEATURES", "wwan", "packagegroup-nm-wwan-${FEATURE_LEVEL}", "", d)} \ + "