Skip to content

Commit e9cf650

Browse files
committed
Restructure overlay system into hierarchical categories with numeric prefixes
Reorganize overlays into hierarchical categories (common, common-extended, firmware-{profile}) with numeric prefixes to control patching order. Update build system to automatically discover and apply overlays based on profile selection, eliminating hardcoded overlay lists.
1 parent bd5504b commit e9cf650

File tree

42 files changed

+51
-41
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+51
-41
lines changed

.github/workflows/pre_release.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ jobs:
4242
- name: Build with Basic firmware
4343
run: ./dev.sh make build PROFILE=basic OUTPUT_FILE=U1_basic_${{ env.GIT_VERSION }}_upgrade.bin
4444

45-
- name: Build with Extended firmware
45+
- name: Build with Extended Fluidd firmware
4646
run: ./dev.sh make build PROFILE=extended OUTPUT_FILE=U1_extended_${{ env.GIT_VERSION }}_upgrade.bin
4747

4848
- name: Clear Kernel Git Repo

.github/workflows/pull_request.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ jobs:
5050
- name: Build with Basic firmware
5151
run: ./dev.sh make build PROFILE=basic OUTPUT_FILE=U1_basic_${{ env.GIT_VERSION }}_upgrade.bin
5252

53-
- name: Build with Extended firmware
53+
- name: Build with Extended Fluidd firmware
5454
run: ./dev.sh make build PROFILE=extended OUTPUT_FILE=U1_extended_${{ env.GIT_VERSION }}_upgrade.bin
5555

5656
- name: Clear Kernel Git Repo

Makefile

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,24 +6,22 @@ all: tools
66

77
OUTPUT_FILE := firmware/firmware.bin
88

9-
ifeq (basic,$(PROFILE))
10-
OVERLAYS += store-version kernel-modules
11-
OVERLAYS += enable-ssh disable-wlan-power-save
12-
OVERLAYS += enable-native-camera-fluidd
13-
else ifeq (extended,$(PROFILE))
14-
OVERLAYS += store-version kernel-modules
15-
OVERLAYS += enable-ssh disable-wlan-power-save
16-
OVERLAYS += stub-fluidd-timelapse camera-v4l2-mpp fluidd-upgrade
17-
OVERLAYS += rfid-support
18-
OVERLAYS += enable-klipper-includes enable-moonraker-apprise
9+
OVERLAYS += $(wildcard overlays/common/*/)
10+
ifneq (,$(PROFILE))
11+
OVERLAYS += $(wildcard overlays/firmware-$(PROFILE)/*/)
1912
endif
2013

14+
PROFILES := $(patsubst overlays/firmware-%,%,$(wildcard overlays/firmware-*))
15+
2116
$(OUTPUT_FILE): firmware/$(FIRMWARE_FILE) tools
22-
ifeq (,$(OVERLAYS))
23-
@echo "No overlays specified. Set PROFILE variable to 'basic' or 'extended'."
17+
ifeq (,$(PROFILE))
18+
@echo "Please specify a profile using 'make PROFILE=<profile_name>'. Available profiles are: $(PROFILES)."
19+
@exit 1
20+
else ifeq (,$(filter $(PROFILE),$(PROFILES)))
21+
@echo "Invalid profile '$(PROFILE)'. Available profiles are: $(PROFILES)."
2422
@exit 1
2523
endif
26-
./scripts/create_firmware.sh $< tmp/firmware $@ $(addprefix overlays/,$(OVERLAYS))
24+
./scripts/create_firmware.sh $< tmp/firmware $@ $(OVERLAYS)
2725

2826
.PHONY: build
2927
build: $(OUTPUT_FILE)
@@ -32,6 +30,10 @@ build: $(OUTPUT_FILE)
3230
extract: firmware/$(FIRMWARE_FILE) tools
3331
./scripts/extract_squashfs.sh $< tmp/extracted
3432

33+
.PHONY: profiles
34+
profiles:
35+
@echo "Available profiles: $(PROFILES)"
36+
3537
# ================= Tools =================
3638

3739
.PHONY: tools

docs/development.md

Lines changed: 27 additions & 21 deletions

overlays/store-version/scripts/01_store_version.sh renamed to overlays/common/01-store-version/scripts/01_store_version.sh

File renamed without changes.
File renamed without changes.

overlays/disable-wlan-power-save/root/etc/init.d/S99wlan-powersave-disable renamed to overlays/common/03-disable-wlan-power-save/root/etc/init.d/S99wlan-powersave-disable

File renamed without changes.

overlays/disable-wlan-power-save/root/usr/sbin/wlan-powersave-disable renamed to overlays/common/03-disable-wlan-power-save/root/usr/sbin/wlan-powersave-disable

File renamed without changes.

overlays/kernel-modules/scripts/01_compile_kernel_modules.sh renamed to overlays/common/04-kernel-modules/scripts/01_compile_kernel_modules.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ if [[ $# -ne 1 ]]; then
55
exit 1
66
fi
77

8-
ROOT_DIR="$(realpath "$(dirname "$0")/../../..")"
8+
ROOT_DIR="$(realpath "$(dirname "$0")/../../../..")"
99
ROOTFS_DIR="$(realpath "$1")"
1010
KERNEL_CONFIG="$ROOTFS_DIR/info/config-6.1"
1111
TEMP_DIR="$ROOT_DIR/tmp/kernel"

overlays/enable-native-camera-fluidd/patches/03-enable-nginx-camera.patch renamed to overlays/firmware-basic/01-enable-native-camera-fluidd/patches/03-enable-nginx-camera.patch

File renamed without changes.

0 commit comments

Comments
 (0)