3
0
mirror of https://github.com/ffrgb/site-ffrgb.git synced 2024-12-26 13:41:57 +01:00

Add patching facility, remove RE450 and RE335 due to stupid flash layout

This commit is contained in:
Bastian 2023-09-11 13:13:06 +02:00
parent be50c08e57
commit 09b3f3aae6
4 changed files with 99 additions and 2 deletions

View File

@ -2,6 +2,8 @@ GLUON_BUILD_DIR := gluon-build
GLUON_GIT_URL := https://github.com/freifunk-gluon/gluon
GLUON_GIT_REF := 4e2bd01d5f7ee1677d522e75c3818719e513eb01
PATCH_DIR := ./patches
SECRET_KEY_FILE ?= ${HOME}/.gluon-secret-key
GLUON_TARGETS ?= $(shell cat targets | tr '\n' ' ')
@ -64,9 +66,13 @@ gluon-update: | ${GLUON_BUILD_DIR}/.git
cd ${GLUON_BUILD_DIR} && git clean -fd
gluon-prepare: gluon-update
make gluon-patch
ln -sfT .. ${GLUON_BUILD_DIR}/site
${GLUON_MAKE} update
gluon-patch:
scripts/apply_patches.sh ${GLUON_BUILD_DIR} ${PATCH_DIR}
gluon-clean:
rm -rf ${GLUON_BUILD_DIR}

View File

@ -0,0 +1,41 @@
From b5fb157e3b67b2d39f5b7c391ef39f0b19e4cf2e Mon Sep 17 00:00:00 2001
From: Christian <github@grische.xyz>
Date: Fri, 18 Aug 2023 17:02:22 +0200
Subject: [PATCH] targets: drop TP-Link RE450 and RE355
The flash size is not sufficient to host the minimal set of FFMuc packages
---
targets/ath79-generic | 17 -----------------
1 file changed, 17 deletions(-)
diff --git a/targets/ath79-generic b/targets/ath79-generic
index 7a5140c9..32a03ce3 100644
--- a/targets/ath79-generic
+++ b/targets/ath79-generic
@@ -474,23 +474,6 @@ device('tp-link-eap225-outdoor-v1', 'tplink_eap225-outdoor-v1', {
packages = ATH10K_PACKAGES_QCA9888,
})
-device('tp-link-re355-v1', 'tplink_re355-v1', {
- manifest_aliases = {
- 'tp-link-re355', -- upgrade from OpenWrt 19.07
- },
- packages = ATH10K_PACKAGES_SMALLBUFFERS_QCA9880,
- broken = true, -- OOM with 5GHz enabled in most environments if device is 64M RAM variant
- class = 'tiny', -- Only 6M of usable Firmware space
-})
-
-device('tp-link-re450-v1', 'tplink_re450-v1', {
- packages = ATH10K_PACKAGES_QCA9880,
- manifest_aliases = {
- 'tp-link-re450', -- upgrade from OpenWrt 19.07
- },
- class = 'tiny', -- Only 6M of usable Firmware space
-})
-
device('tp-link-tl-wdr3500-v1', 'tplink_tl-wdr3500-v1')
device('tp-link-tl-wdr3600-v1', 'tplink_tl-wdr3600-v1')
device('tp-link-tl-wdr4300-v1', 'tplink_tl-wdr4300-v1')
--
2.25.1

50
scripts/apply_patches.sh Normal file
View File

@ -0,0 +1,50 @@
#!/usr/bin/env bash
set -eEu
set -o pipefail
shopt -s nullglob
gluon_build_dir=${1:-gluon-build}
gluon_patch_dir="${2:-patches}"
function reset_gluon_build_dir() {
# Make sure we are in the correct folder
if [[ ! $(pwd) =~ .*${gluon_build_dir} ]]; then
echo "Resetting environment in the wrong folder. Aborting."
return 1
fi
echo "Resetting environment."
# Reset all files known to git, but keep manually commited changes.
git checkout .
# Delete all files not known to git
git clean -dx --force
echo "Environment reset."
}
# Relative patches folder does not work with git-apply below. Make sure it is an absolute path.
if [[ ! ${gluon_patch_dir} =~ ^/ ]]; then
gluon_patch_dir="${PWD}/${gluon_patch_dir}"
echo "Setting patch directory to ${gluon_patch_dir}"
fi
pushd "${gluon_build_dir}"
# Check if there are any patches at all
if ! compgen -G "${gluon_patch_dir}/*.patch" >/dev/null; then
echo "No patches found in ${gluon_patch_dir}/*.patch"
exit 1
fi
# Reset previously applied patches
reset_gluon_build_dir
# Apply all patches
echo "Applying Patches."
if ! git apply --ignore-space-change --ignore-whitespace --whitespace=nowarn --verbose "${gluon_patch_dir}"/*.patch; then
echo "Patching failed. Inspect ${gluon_build_dir} folder for failed patches."
exit 1
fi
echo "Patching finished."
popd

View File

@ -170,7 +170,7 @@ ifeq ($(GLUON_TARGET),ath79-generic)
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)
GLUON_tp-link-re450-v1_SITE_PACKAGES += $(EXCLUDE_USB) $(EXCLUDE_USB_NET) $(EXCLUDE_USB_SERIAL) $(EXCLUDE_USB_STORAGE)
endif
# no pkglists for target ath79-mikrotik
@ -301,4 +301,4 @@ GLUON_SITE_PACKAGES += \
$(PCI_PACKAGES_NET) \
$(TOOLS_PACKAGES) \
$(USB_PACKAGES_NET_ADD)
endif
endif