3
0
mirror of https://github.com/ffrgb/site-ffrgb.git synced 2024-12-26 13:41:57 +01:00
This commit is contained in:
Bastian 2023-08-21 17:03:50 +02:00
parent 06659e70a4
commit 0191f7c568
4 changed files with 198 additions and 240 deletions

View File

@ -1,48 +1,27 @@
GLUON_BUILD_DIR := gluon-build
GLUON_GIT_URL := https://github.com/freifunk-gluon/gluon
GLUON_GIT_REF := 684b4a80a0cdeccf1455c9efa12f80aabc9bad2a
GLUON_GIT_REF := v2023.1
SECRET_KEY_FILE ?= ${HOME}/.gluon-secret-key
GLUON_TARGETS ?= $(shell cat targets | tr '\n' ' ')
GLUON_TARGETS ?= \
ath79-generic \
ath79-nand \
bcm27xx-bcm2708 \
bcm27xx-bcm2709 \
ipq40xx-generic \
ipq806x-generic \
lantiq-xrx200 \
lantiq-xway \
mediatek-mt7622 \
mpc85xx-p1010 \
mpc85xx-p1020 \
ramips-mt7620 \
ramips-mt7621 \
ramips-mt76x8 \
rockchip-armv8 \
sunxi-cortexa7 \
x86-generic \
x86-geode \
x86-legacy \
x86-64 \
GLUON_RELEASE := $(shell git describe --tags 2>/dev/null)
ifneq (,$(shell git describe --exact-match --tags 2>/dev/null))
GLUON_BRANCH := stable
GLUON_AUTOUPDATER_ENABLED := 1
GLUON_RELEASE := $(shell git describe --tags 2>/dev/null)
else
GLUON_BRANCH := experimental
GLUON_AUTOUPDATER_ENABLED := 0
EXP_FALLBACK = $(shell date '+%Y%m%d')
BUILD_NUMBER ?= $(EXP_FALLBACK)
GLUON_RELEASE := $(shell git describe --tags)~exp$(BUILD_NUMBER)
endif
JOBS ?= $(shell cat /proc/cpuinfo | grep processor | wc -l)
#JOBS = 1
GLUON_MAKE := ${MAKE} BROKEN=0 -j ${JOBS} -C ${GLUON_BUILD_DIR} \
GLUON_RELEASE=${GLUON_RELEASE} \
GLUON_BRANCH=${GLUON_BRANCH} \
GLUON_MAKE := ${MAKE} -j ${JOBS} -C ${GLUON_BUILD_DIR} \
GLUON_RELEASE=${GLUON_RELEASE} \
GLUON_AUTOUPDATER_BRANCH=${GLUON_AUTOUPDATER_BRANCH} \
GLUON_AUTOUPDATER_ENABLED=${GLUON_AUTOUPDATER_ENABLED}
all: info
@ -51,46 +30,48 @@ all: info
info:
@echo
@echo '#########################'
@echo '# FFRGB Firmare build'
@echo '# Building release ${GLUON_RELEASE} for branch ${GLUON_BRANCH}'
@echo '# make params: ${GLUON_MAKE}'
@echo '# FFRGB Firmware build'
@echo '# Building release ${GLUON_RELEASE} for branch ${GLUON_AUTOUPDATER_BRANCH}'
@echo
build: gluon-prepare
build: gluon-prepare output-clean
for target in ${GLUON_TARGETS}; do \
echo ""Building target $$target""; \
${GLUON_MAKE} GLUON_TARGET="$$target"; \
${GLUON_MAKE} download all GLUON_TARGET="$$target"; \
done
buildonly:
for target in ${GLUON_TARGETS}; do \
echo ""Building target $$target""; \
${GLUON_MAKE} GLUON_TARGET="$$target"; \
done
manifest: build
${GLUON_MAKE} manifest
mv ${GLUON_BUILD_DIR}/output .
for branch in next experimental testing stable; do \
${GLUON_MAKE} manifest GLUON_AUTOUPDATER_BRANCH=$$branch;\
done
mv -f ${GLUON_BUILD_DIR}/output/* ./output/
sign: manifest
${GLUON_BUILD_DIR}/contrib/sign.sh ${SECRET_KEY_FILE} images/sysupgrade/${GLUON_BRANCH}.manifest
${GLUON_BUILD_DIR}/contrib/sign.sh ${SECRET_KEY_FILE} output/images/sysupgrade/${GLUON_AUTOUPDATER_BRANCH}.manifest
${GLUON_BUILD_DIR}:
git clone ${GLUON_GIT_URL} ${GLUON_BUILD_DIR}
mkdir -p ${GLUON_BUILD_DIR}
gluon-prepare: images-clean ${GLUON_BUILD_DIR}
(cd ${GLUON_BUILD_DIR} \
&& git remote set-url origin ${GLUON_GIT_URL} \
&& git fetch origin \
&& git checkout -q ${GLUON_GIT_REF})
# Note: "|" means "order only", e.g. "do not care about folder timestamps"
# https://www.gnu.org/savannah-checkouts/gnu/make/manual/html_node/Prerequisite-Types.html
${GLUON_BUILD_DIR}/.git: | ${GLUON_BUILD_DIR}
git init ${GLUON_BUILD_DIR}
cd ${GLUON_BUILD_DIR} && git remote add origin ${GLUON_GIT_URL}
gluon-update: | ${GLUON_BUILD_DIR}/.git
cd ${GLUON_BUILD_DIR} && git fetch --tags origin ${GLUON_GIT_REF}
cd ${GLUON_BUILD_DIR} && git reset --hard FETCH_HEAD
cd ${GLUON_BUILD_DIR} && git clean -fd
gluon-prepare: gluon-update
ln -sfT .. ${GLUON_BUILD_DIR}/site
${GLUON_MAKE} update
gluon-clean:
rm -rf ${GLUON_BUILD_DIR}
images-clean:
rm -rf images
output-clean:
mkdir -p output/
rm -rf output/*
clean: gluon-clean images-clean
clean: gluon-clean output-clean

View File

@ -4,4 +4,4 @@ PACKAGES_FFRGB_BRANCH=master
PACKAGES_FFRGB_COMMIT=af2c608f31e264a279b919814896e4470c455e72
PACKAGES_COMMUNITY_REPO=https://github.com/ffrgb/community-packages.git
PACKAGES_COMMUNITY_BRANCH=gluon-mesh-vpn-wireguard-vxlan
PACKAGES_COMMUNITY_COMMIT=86f28f9ebce00871bef9940a09d6865ffdf669b2
PACKAGES_COMMUNITY_COMMIT=94b91d247484ac87b57880f1c4d2c92288bcfa99

View File

@ -66,7 +66,7 @@
interfaces = {
lan = {
default_roles = { 'client', 'mesh' },
default_roles = { 'client' },
},
wan = {
default_roles = { 'uplink', 'mesh' },

339
site.mk
View File

@ -1,3 +1,6 @@
GLUON_MULTIDOMAIN=1
GLUON_DEPRECATED ?= upgrade
GLUON_FEATURES := \
autoupdater \
config-mode-domain-select \
@ -14,197 +17,171 @@ GLUON_FEATURES := \
web-wizard
# base packages
GLUON_SITE_PACKAGES := \
gluon-segment-mover \
iwinfo \
iptables \
gluon-ssid-changer \
respondd-module-airtime \
gluon-mesh-vpn-wireguard-vxlan \
ffrgb-banner
# basic support for USB stack
USB_PACKAGES_BASIC := \
kmod-usb-core \
kmod-usb2
# storage support for USB devices
USB_PACKAGES_STORAGE := \
block-mount \
blkid \
kmod-fs-ext4 \
kmod-fs-vfat \
kmod-usb-storage \
kmod-usb-storage-extras \
kmod-nls-cp1250 \
kmod-nls-cp1251 \
kmod-nls-cp437 \
kmod-nls-cp775 \
kmod-nls-cp850 \
kmod-nls-cp852 \
kmod-nls-cp866 \
kmod-nls-iso8859-1 \
kmod-nls-iso8859-13 \
kmod-nls-iso8859-15 \
kmod-nls-iso8859-2 \
kmod-nls-koi8r \
kmod-nls-utf8 \
swap-utils
# network support for USB devices
USB_PACKAGES_NET := \
kmod-mii \
kmod-nls-base \
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-ncm \
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
# broken
# kmod-usb-net-rtl8150 \
# additional USB network devices (ie Edimax)
USB_PACKAGES_NET_ADD := \
kmod-rtl8192cu \
kmod-rtl8187 \
kmod-ath9k-htc \
kmod-ath9k-common \
kmod-ath \
kmod-rt73-usb \
kmod-carl9170 \
kmod-brcmfmac
# network support for PCI devices
PCI_PACKAGES_NET := \
kmod-3c59x \
kmod-e100 \
kmod-e1000 \
kmod-e1000e \
kmod-forcedeth \
kmod-natsemi \
kmod-ne2k-pci \
kmod-pcnet32 \
kmod-r8169 \
kmod-sis900 \
kmod-sky2 \
kmod-tg3 \
kmod-tulip \
kmod-via-rhine
# broken
# kmod-ixgbe \
# kmod-r8139too \
# additional packages
TOOLS_PACKAGES := \
iperf \
socat \
tcpdump \
usbutils \
vnstat
# broken
# pciutils \
#
# $(GLUON_TARGET) specific settings:
#
# x86-generic
ifeq ($(GLUON_TARGET),x86-generic)
# support the usb stack on x86 devices
# and add a few common USB and PCI NICs
GLUON_SITE_PACKAGES += \
kmod-usb-hid \
kmod-hid-generic \
kmod-button-hotplug \
$(USB_PACKAGES_BASIC) \
$(USB_PACKAGES_STORAGE) \
$(USB_PACKAGES_NET) \
$(PCI_PACKAGES_NET) \
$(TOOLS_PACKAGES) \
$(USB_PACKAGES_NET_ADD)
endif
# x86-64
ifeq ($(GLUON_TARGET),x86-64)
# support the usb stack on x86-64 devices
# and add a few common USB and PCI NICs
GLUON_SITE_PACKAGES += \
kmod-usb-hid \
kmod-hid-generic \
kmod-button-hotplug \
$(USB_PACKAGES_BASIC) \
$(USB_PACKAGES_STORAGE) \
$(USB_PACKAGES_NET) \
$(PCI_PACKAGES_NET) \
$(TOOLS_PACKAGES) \
$(USB_PACKAGES_NET_ADD)
endif
# Raspberry Pi A/B/B+
ifeq ($(GLUON_TARGET),brcm2708-bcm2708)
GLUON_SITE_PACKAGES += \
kmod-usb-hid \
kmod-hid-generic \
$(USB_PACKAGES_BASIC) \
$(USB_PACKAGES_STORAGE) \
$(USB_PACKAGES_NET) \
$(TOOLS_PACKAGES) \
$(USB_PACKAGES_NET_ADD)
endif
# Raspberry Pi 2
ifeq ($(GLUON_TARGET),brcm2708-bcm2709)
GLUON_SITE_PACKAGES += \
kmod-usb-hid \
kmod-hid-generic \
$(USB_PACKAGES_BASIC) \
$(USB_PACKAGES_STORAGE) \
$(USB_PACKAGES_NET) \
$(TOOLS_PACKAGES) \
$(USB_PACKAGES_NET_ADD)
endif
# ar71xx-generic
GLUON_TLWR842_SITE_PACKAGES := $(USB_PACKAGES_BASIC) $(TOOLS_PACKAGES) $(USB_PACKAGES_STORAGE)
GLUON_TLWR1043_SITE_PACKAGES := $(USB_PACKAGES_BASIC) $(TOOLS_PACKAGES) $(USB_PACKAGES_STORAGE)
GLUON_TLWR2543_SITE_PACKAGES := $(USB_PACKAGES_BASIC) $(TOOLS_PACKAGES) $(USB_PACKAGES_STORAGE)
GLUON_TLWDR4300_SITE_PACKAGES := $(USB_PACKAGES_BASIC) $(TOOLS_PACKAGES) $(USB_PACKAGES_STORAGE)
GLUON_WNDR3700_SITE_PACKAGES := $(USB_PACKAGES_BASIC) $(TOOLS_PACKAGES) $(USB_PACKAGES_STORAGE)
GLUON_WRT160NL_SITE_PACKAGES := $(USB_PACKAGES_BASIC) $(TOOLS_PACKAGES) $(USB_PACKAGES_STORAGE)
GLUON_ARCHERC7_SITE_PACKAGES := $(USB_PACKAGES_BASIC) $(TOOLS_PACKAGES) $(USB_PACKAGES_STORAGE)
GLUON_GLINET_SITE_PACKAGES := $(USB_PACKAGES_BASIC) $(TOOLS_PACKAGES) $(USB_PACKAGES_STORAGE)
GLUON_WZRHPG450H_SITE_PACKAGES := $(USB_PACKAGES_BASIC) $(TOOLS_PACKAGES) $(USB_PACKAGES_STORAGE)
GLUON_WZRHPAG300H_SITE_PACKAGES := $(USB_PACKAGES_BASIC) $(TOOLS_PACKAGES) $(USB_PACKAGES_STORAGE)
# mpc85xx-generic
GLUON_TLWDR4900_SITE_PACKAGES := $(USB_PACKAGES_BASIC) $(TOOLS_PACKAGES) $(USB_PACKAGES_STORAGE)
DEFAULT_GLUON_RELEASE := snapshot~$(shell date '+%Y%m%d')
# Allow overriding the release number from the command line
GLUON_RELEASE ?= $(DEFAULT_GLUON_RELEASE)
GLUON_DEPRECATED ?= 1
GLUON_PRIORITY ?= 0
# Languages to include
GLUON_REGION ?= eu
GLUON_LANGS ?= en de
GLUON_WLAN_MESH := 11s
GLUON_MULTIDOMAIN=1
# additional packages
INCLUDE_USB := \
usbutils
EXCLUDE_USB := \
-usbutils
INCLUDE_USB_HID := \
kmod-usb-hid \
kmod-hid-generic
EXCLUDE_USB_HID := \
-kmod-usb-hid \
-kmod-hid-generic
INCLUDE_USB_SERIAL := \
kmod-usb-serial \
kmod-usb-serial-ftdi \
kmod-usb-serial-pl2303
EXCLUDE_USB_SERIAL := \
-kmod-usb-serial \
-kmod-usb-serial-ftdi \
-kmod-usb-serial-pl2303
INCLUDE_USB_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
EXCLUDE_USB_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
INCLUDE_USB_NET := \
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-subset \
kmod-usb-net-dm9601-ether \
kmod-usb-net-hso \
kmod-usb-net-ipheth \
kmod-usb-net-mcs7830 \
kmod-usb-net-pegasus \
kmod-usb-net-rndis \
kmod-usb-net-rtl8152 \
kmod-usb-net-smsc95xx
EXCLUDE_USB_NET := \
-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-subset \
-kmod-usb-net-dm9601-ether \
-kmod-usb-net-hso \
-kmod-usb-net-ipheth \
-kmod-usb-net-mcs7830 \
-kmod-usb-net-pegasus \
-kmod-usb-net-rndis \
-kmod-usb-net-rtl8152 \
-kmod-usb-net-smsc95xx
INCLUDE_PCI := \
pciutils
EXCLUDE_PCI := \
-pciutils
INCLUDE_PCI_NET := \
kmod-bnx2
EXCLUDE_PCI_NET := \
-kmod-bnx2
INCLUDE_TLS := \
ca-bundle \
libustream-openssl
EXCLUDE_TLS := \
-ca-bundle \
-libustream-openssl
ifeq ($(GLUON_TARGET),ath79-generic)
GLUON_SITE_PACKAGES += $(INCLUDE_TLS)
GLUON_devolo-wifi-pro-1750e_SITE_PACKAGES += $(INCLUDE_USB) $(INCLUDE_USB_NET) $(INCLUDE_USB_SERIAL) $(INCLUDE_USB_STORAGE)
GLUON_gl.inet-gl-ar150_SITE_PACKAGES += $(INCLUDE_USB) $(INCLUDE_USB_NET) $(INCLUDE_USB_SERIAL) $(INCLUDE_USB_STORAGE)
GLUON_gl.inet-gl-ar300m-lite_SITE_PACKAGES += $(INCLUDE_USB) $(INCLUDE_USB_NET) $(INCLUDE_USB_SERIAL) $(INCLUDE_USB_STORAGE)
GLUON_gl.inet-gl-ar750_SITE_PACKAGES += $(INCLUDE_USB) $(INCLUDE_USB_NET) $(INCLUDE_USB_SERIAL) $(INCLUDE_USB_STORAGE)
GLUON_joy-it-jt-or750i_SITE_PACKAGES += $(INCLUDE_USB) $(INCLUDE_USB_NET) $(INCLUDE_USB_SERIAL) $(INCLUDE_USB_STORAGE)
GLUON_netgear-wndr3700-v2_SITE_PACKAGES += $(INCLUDE_USB) $(INCLUDE_USB_NET) $(INCLUDE_USB_SERIAL) $(INCLUDE_USB_STORAGE)
GLUON_tp-link-archer-a7-v5_SITE_PACKAGES += $(INCLUDE_USB) $(INCLUDE_USB_NET) $(INCLUDE_USB_SERIAL) $(INCLUDE_USB_STORAGE)
GLUON_tp-link-archer-c5-v1_SITE_PACKAGES += $(INCLUDE_USB) $(INCLUDE_USB_NET) $(INCLUDE_USB_SERIAL) $(INCLUDE_USB_STORAGE)
GLUON_tp-link-archer-c7-v2_SITE_PACKAGES += $(INCLUDE_USB) $(INCLUDE_USB_NET) $(INCLUDE_USB_SERIAL) $(INCLUDE_USB_STORAGE)
GLUON_tp-link-archer-c7-v5_SITE_PACKAGES += $(INCLUDE_USB) $(INCLUDE_USB_NET) $(INCLUDE_USB_SERIAL) $(INCLUDE_USB_STORAGE)
GLUON_tp-link-archer-c59-v1_SITE_PACKAGES += $(INCLUDE_USB) $(INCLUDE_USB_NET) $(INCLUDE_USB_SERIAL) $(INCLUDE_USB_STORAGE)
GLUON_tp-link-tl-wr842n-v3_SITE_PACKAGES += $(INCLUDE_USB) $(INCLUDE_USB_NET) $(INCLUDE_USB_SERIAL) $(INCLUDE_USB_STORAGE)
GLUON_tp-link-tl-wr1043nd-v4_SITE_PACKAGES += $(INCLUDE_USB) $(INCLUDE_USB_NET) $(INCLUDE_USB_SERIAL) $(INCLUDE_USB_STORAGE)
GLUON_d-link-dir825b1_SITE_PACKAGES += $(EXCLUDE_TLS)
GLUON_tp-link-re355-v1_SITE_PACKAGES += $(EXCLUDE_TLS)
GLUON_tp-link-re450-v1_SITE_PACKAGES += $(EXCLUDE_TLS)
endif
# no pkglists for target ath79-mikrotik
ifeq ($(GLUON_TARGET),ath79-nand)
GLUON_SITE_PACKAGES += $(INCLUDE_TLS) $(INCLUDE_USB) $(INCLUDE_USB_NET) $(INCLUDE_USB_SERIAL) $(INCLUDE_USB_STORAGE)
endif
ifeq ($(GLUON_TARGET),bcm27xx-bcm2708)
GLUON_SITE_PACKAGES += $(INCLUDE_TLS) $(INCLUDE_USB) $(INCLUDE_USB_HID) $(INCLUDE_USB_NET) $(INCLUDE_USB_SERIAL) $(INCLUDE_USB_STORAGE)
endif