diff --git a/image-customization.lua b/image-customization.lua new file mode 100644 index 0000000..61bf29e --- /dev/null +++ b/image-customization.lua @@ -0,0 +1,165 @@ +-- Generic features and packages for all devices + +features { + "autoupdater", + "config-mode-domain-select", + "config-mode-geo-location-osm", + "ebtables-filter-multicast", + "ebtables-filter-ra-dhcp", + "mesh-batman-adv-15", + "mesh-vpn-fastd", + "radv-filterd", + "respondd", + "status-page", + "web-advanced", + "web-ffda-domain-director", + "web-logging", + "web-private-wifi", + "web-wizard", +} + +packages { + "ffda-domain-director", + "iwinfo", + "respondd-module-airtime", +} + +-- Packages and features for devices which are not flagged as tiny + +if not device_class("tiny") then + features { + "mesh-vpn-sqm", + "tls", + "web-cellular", + "wireless-encryption-wpa3", + } + + packages { + "ffda-gluon-usteer", + } +end + +-- Custom package lists + +local pkgs_usb = { + "usbutils", + "usb-modeswitch", +} + +local pkgs_usb_hid = { + "kmod-usb-hid", + "kmod-hid-generic", +} + +local pkgs_usb_serial = { + "kmod-usb-serial", + "kmod-usb-serial-ch341", + "kmod-usb-serial-cp210x", + "kmod-usb-serial-ftdi", + "kmod-usb-serial-pl2303", +} + +local pkgs_usb_storage = { + "block-mount", + "blkid", + "kmod-fs-ext4", + "kmod-fs-ntfs", + "kmod-fs-vfat", + "kmod-usb-storage", + "kmod-usb-storage-extras", -- Card Readers + "kmod-usb-storage-uas", -- USB Attached SCSI (UAS/UASP) + "kmod-nls-base", + "kmod-nls-cp1250", -- NLS Codepage 1250 (Eastern Europe) + "kmod-nls-cp437", -- NLS Codepage 437 (United States, Canada) + "kmod-nls-cp850", -- NLS Codepage 850 (Europe) + "kmod-nls-cp852", -- NLS Codepage 852 (Europe) + "kmod-nls-iso8859-1", -- NLS ISO 8859-1 (Latin 1) + "kmod-nls-iso8859-13", -- NLS ISO 8859-13 (Latin 7; Baltic) + "kmod-nls-iso8859-15", -- NLS ISO 8859-15 (Latin 9) + "kmod-nls-iso8859-2", -- NLS ISO 8859-2 (Latin 2) + "kmod-nls-utf8", -- NLS UTF-8 +} + +local pkgs_usb_net = { + "kmod-ath9k-htc", + "kmod-mii", + "kmod-usb-net", + "kmod-usb-net-asix", + "kmod-usb-net-asix-ax88179", + "kmod-usb-net-cdc-eem", + "kmod-usb-net-cdc-ether", + "kmod-usb-net-cdc-mbim", + "kmod-usb-net-cdc-subset", + "kmod-usb-net-dm9601-ether", + "kmod-usb-net-hso", + "kmod-usb-net-huawei-cdc-ncm", + "kmod-usb-net-ipheth", + "kmod-usb-net-kalmia", + "kmod-usb-net-kaweth", + "kmod-usb-net-mcs7830", + "kmod-usb-net-pegasus", + "kmod-usb-net-qmi-wwan", + "kmod-usb-net-rndis", + "kmod-usb-net-rtl8152", + "kmod-usb-net-sierrawireless", + "kmod-usb-net-smsc95xx", +} + +local pkgs_pci = { + "pciutils", +} + +local pkgs_pci_net = { + "kmod-bnx2", +} + +local pkgs_tools = { + "iperf", + "socat", + "tcpdump", + "vnstat", +} + +-- Assign package sets to targets + +if target("sunxi") then + packages(pkgs_usb) + packages(pkgs_usb_hid) + packages(pkgs_usb_net) + packages(pkgs_usb_serial) + packages(pkgs_usb_storage) + packages(pkgs_tools) +end + +if target("bcm27xx") then + packages(pkgs_usb) + packages(pkgs_usb_hid) + packages(pkgs_usb_net) + packages(pkgs_usb_serial) + packages(pkgs_usb_storage) + packages(pkgs_tools) +end + +if target("x86") then + packages(pkgs_pci) + packages(pkgs_pci_net) + packages(pkgs_usb) + packages(pkgs_usb_hid) + packages(pkgs_usb_net) + packages(pkgs_usb_serial) + packages(pkgs_usb_storage) + packages(pkgs_tools) +end + +-- Device specific package configuration + +if device { "linksys-wrt1200ac" } then + packages { + "-gluon-wireless-encryption-wpa3", + "-respondd-module-airtime", + } +end + +if device { "zyxel-nwa55axe" } then + packages { "ffda-network-setup-mode" } +end diff --git a/site.mk b/site.mk index cb0b32e..a94c6c3 100644 --- a/site.mk +++ b/site.mk @@ -13,172 +13,3 @@ GLUON_DEPRECATED ?= upgrade # Build gluon with multidomain support. GLUON_MULTIDOMAIN := 1 -############################# -# Default packages -############################# - -# Featureset, these are either virtual or packages prefixed with "gluon-" -GLUON_FEATURES := \ - autoupdater \ - config-mode-domain-select \ - config-mode-geo-location-osm \ - ebtables-filter-multicast \ - ebtables-filter-ra-dhcp \ - mesh-batman-adv-15 \ - mesh-vpn-fastd \ - radv-filterd \ - respondd \ - status-page \ - web-advanced \ - web-ffda-domain-director \ - web-logging \ - web-private-wifi \ - web-wizard - -GLUON_FEATURES_standard := \ - mesh-vpn-sqm \ - web-cellular \ - wireless-encryption-wpa3 - -# Additional packages to install on every image -GLUON_SITE_PACKAGES := \ - ffda-domain-director \ - iwinfo \ - respondd-module-airtime - -GLUON_SITE_PACKAGES_standard := \ - ffda-gluon-usteer - -############################# -# Additional package sets -############################# - -# USB Human Interface -USB_PACKAGES_HID := \ - kmod-usb-hid \ - kmod-hid-generic - -# USB Serial -USB_PACKAGES_SERIAL := \ - kmod-usb-serial \ - kmod-usb-serial-ftdi \ - kmod-usb-serial-pl2303 - -# USB Storage -USB_PACKAGES_STORAGE := \ - block-mount \ - blkid \ - kmod-fs-ext4 \ - kmod-fs-ntfs \ - kmod-fs-vfat \ - kmod-usb-storage \ - kmod-usb-storage-extras \ - kmod-usb-storage-uas \ - kmod-nls-base \ - kmod-nls-cp1250 \ - kmod-nls-cp437 \ - kmod-nls-cp850 \ - kmod-nls-cp852 \ - kmod-nls-iso8859-1 \ - kmod-nls-iso8859-13 \ - kmod-nls-iso8859-15 \ - kmod-nls-iso8859-2 \ - kmod-nls-utf8 - -# USB Network -USB_PACKAGES_NET := \ - kmod-ath9k-htc \ - kmod-mii \ - kmod-usb-net \ - kmod-usb-net-asix \ - kmod-usb-net-asix-ax88179 \ - kmod-usb-net-cdc-eem \ - kmod-usb-net-cdc-ether \ - kmod-usb-net-cdc-mbim \ - kmod-usb-net-cdc-subset \ - kmod-usb-net-dm9601-ether \ - kmod-usb-net-hso \ - kmod-usb-net-huawei-cdc-ncm \ - kmod-usb-net-ipheth \ - kmod-usb-net-kalmia \ - kmod-usb-net-kaweth \ - kmod-usb-net-mcs7830 \ - kmod-usb-net-pegasus \ - kmod-usb-net-qmi-wwan \ - kmod-usb-net-rndis \ - kmod-usb-net-rtl8152 \ - kmod-usb-net-sierrawireless \ - kmod-usb-net-smsc95xx - -# PCI-Express Network -PCIE_PACKAGES_NET := \ - kmod-bnx2 - -# additional packages -TOOLS_PACKAGES := \ - iperf \ - socat \ - tcpdump \ - vnstat - -# Group previous package sets -USB_PACKAGES_WITHOUT_HID := \ - usbutils \ - usb-modeswitch \ - $(USB_PACKAGES_SERIAL) \ - $(USB_PACKAGES_STORAGE) \ - $(USB_PACKAGES_NET) - -USB_PACKAGES := \ - usbutils \ - $(USB_PACKAGES_HID) \ - $(USB_PACKAGES_WITHOUT_HID) - -PCIE_PACKAGES := \ - pciutils \ - $(PCIE_PACKAGES_NET) - -################################## -# Assign package sets to targets -################################## - -# x86 Generic Purpose Hardware -ifeq ($(GLUON_TARGET),x86-generic) - GLUON_SITE_PACKAGES += $(USB_PACKAGES) $(PCIE_PACKAGES) $(TOOLS_PACKAGES) -endif - -ifeq ($(GLUON_TARGET),x86-64) - GLUON_SITE_PACKAGES += $(USB_PACKAGES) $(PCIE_PACKAGES) $(TOOLS_PACKAGES) -endif - -# PCEngines ALIX Boards -ifeq ($(GLUON_TARGET),x86-geode) - GLUON_SITE_PACKAGES += $(USB_PACKAGES) $(PCIE_PACKAGES) $(TOOLS_PACKAGES) -endif - -# Raspberry Pi A/B/B+ -ifeq ($(GLUON_TARGET),brcm2708-bcm2708) - GLUON_SITE_PACKAGES += $(USB_PACKAGES) $(TOOLS_PACKAGES) -endif - -# Raspberry Pi 2 -ifeq ($(GLUON_TARGET),brcm2708-bcm2709) - GLUON_SITE_PACKAGES += $(USB_PACKAGES) $(TOOLS_PACKAGES) -endif - -# Raspberry Pi 3 -ifeq ($(GLUON_TARGET),brcm2708-bcm2710) - GLUON_SITE_PACKAGES += $(USB_PACKAGES) $(TOOLS_PACKAGES) -endif - -# Banana Pi/Pro, Lamobo R1 -ifeq ($(GLUON_TARGET),sunxi-cortexa7) - GLUON_SITE_PACKAGES += $(USB_PACKAGES) $(TOOLS_PACKAGES) -endif - -# Linksys WRT1200AC -ifeq ($(GLUON_TARGET),mvebu-cortexa9) - GLUON_SITE_PACKAGES += \ - -gluon-wireless-encryption-wpa3 \ - -respondd-module-airtime -endif