Repository navigation
Expand file tree
/
Copy pathMakefile.targets
More file actions
415 lines (388 loc) · 15.9 KB
/
Copy pathMakefile.targets
File metadata and controls
415 lines (388 loc) · 15.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
# Create the user config skeleton (common, per-camera, per-device).
# Opt-in: run `make user-dirs` or pass USER_DIRS=1 to a build target, so
# regular builds do not litter the user directory with empty files.
USER_DIRS ?=
ifeq (user-dirs,$(filter user-dirs,$(MAKECMDGOALS)))
USER_DIRS := 1
endif
user-dirs:
ifeq ($(USER_DIRS),1)
ifneq ($(THINGINO_USER_DIR),/dev/null)
$(call create_user_dir,$(THINGINO_USER_COMMON_DIR))
ifdef THINGINO_USER_CAMERA_DIR
$(call create_user_dir,$(THINGINO_USER_CAMERA_DIR))
endif
ifdef THINGINO_USER_DEVICE_DIR
$(call create_user_dir,$(THINGINO_USER_DEVICE_DIR))
endif
endif
else
@:
endif
# Default: fast parallel incremental build
all: user-dirs defconfig build_fast pack
@$(TEAL) "$@"
# legacy target used by GitHub CI
fast: user-dirs defconfig build_fast pack
@$(TEAL) "$@"
# Development build: slow serial for debugging compilation issues
dev: user-dirs defconfig build pack
@$(TEAL) "$@"
# Clean build from scratch with parallel compilation
cleanbuild: user-dirs distclean defconfig build_fast pack
@$(TEAL) "$@"
@date +%T
# --- RAM build ----------------------------------------------------------
# Build the entire output tree on a tmpfs so compile/install writes never
# touch the SSD, then copy the finished images (and logs) back to disk.
# dl/ and ccache stay on disk and make cold rebuilds cheap, so the volatile
# build tree is disposable.
#
# One-time setup (raises the tmpfs inode limit, which a full build needs):
# make ram-setup
#
# Usage:
# CAMERA=<camera> make ram-build
# CAMERA=<camera> make ram-build RAM_BUILD_DIR=/mnt/ramdisk # custom tmpfs
RAM_BUILD_DIR ?= /tmp/thingino-build
RAM_OUTPUT_DIR = $(RAM_BUILD_DIR)/$(notdir $(OUTPUT_DIR))
RAM_DISK_OUTPUT_DIR = $(OUTPUT_DIR)
# Raise the tmpfs inode limit so a full build (~1.1M files/dirs, mostly
# per-package dirs) fits. Run once; the remount is lost on reboot.
ram-setup:
@$(TEAL) "$@"
@mkdir -p "$(RAM_BUILD_DIR)"
@mnt=$$(findmnt -n -o TARGET -T "$(RAM_BUILD_DIR)" 2>/dev/null || echo "$(RAM_BUILD_DIR)"); \
if [ "$$(stat -f -c %T "$$mnt" 2>/dev/null)" != "tmpfs" ]; then \
echo "ERROR: $$mnt is not tmpfs. Mount a dedicated tmpfs and set RAM_BUILD_DIR."; \
exit 1; \
fi; \
sudo mount -o remount,nr_inodes=4m "$$mnt" && \
echo "Done: $$(stat -f -c %d "$(RAM_BUILD_DIR)") free inodes on $$mnt."
# Copy images/logs/config from the tmpfs output tree back to disk. Shared by
# ram-build (wipes the tree) and ram-dev (keeps it for resuming).
define ram_copy_artifacts
@mkdir -p "$(RAM_DISK_OUTPUT_DIR)/images"
@cp -a "$(RAM_OUTPUT_DIR)/images/." "$(RAM_DISK_OUTPUT_DIR)/images/"
@if [ -d "$(RAM_OUTPUT_DIR)/logs" ]; then \
mkdir -p "$(RAM_DISK_OUTPUT_DIR)/logs"; \
cp -a "$(RAM_OUTPUT_DIR)/logs/." "$(RAM_DISK_OUTPUT_DIR)/logs/"; \
fi
@for f in $(RAM_OUTPUT_DIR)/.config*; do \
[ -e "$$f" ] || continue; \
cp -a "$$f" "$(RAM_DISK_OUTPUT_DIR)/"; \
done
@for f in buildscope-report.json uenv.txt; do \
if [ -e "$(RAM_OUTPUT_DIR)/$$f" ]; then \
cp -a "$(RAM_OUTPUT_DIR)/$$f" "$(RAM_DISK_OUTPUT_DIR)/"; \
fi; \
done
endef
ram-build:
@$(TEAL) "$@"
@mkdir -p "$(RAM_BUILD_DIR)"
@fstype=$$(stat -f -c %T "$(RAM_BUILD_DIR)" 2>/dev/null || true); \
ifree=$$(stat -f -c %d "$(RAM_BUILD_DIR)" 2>/dev/null || echo 0); \
free_kb=$$(( $$(stat -f -c %a "$(RAM_BUILD_DIR)" 2>/dev/null || echo 0) * $$(stat -f -c %S "$(RAM_BUILD_DIR)" 2>/dev/null || echo 1) / 1024 )); \
if [ "$$fstype" != "tmpfs" ]; then \
echo "ERROR: $(RAM_BUILD_DIR) is not tmpfs (filesystem: '$$fstype')."; \
exit 1; \
fi; \
if [ "$$ifree" -lt 2000000 ]; then \
echo "ERROR: only $$ifree free inodes; a full build needs ~2M. Run 'make ram-setup' once."; \
exit 1; \
fi; \
if [ ! -d "$(RAM_OUTPUT_DIR)" ] && [ "$$free_kb" -lt 8388608 ]; then \
echo "ERROR: only $$(( $$free_kb / 1024 / 1024 )) GiB free; a clean build needs ~7 GiB."; \
echo " Wipe the previous tree (rm -rf $(RAM_OUTPUT_DIR)) and retry."; \
exit 1; \
fi
@echo "RAM output: $(RAM_OUTPUT_DIR)"
@echo "Disk output: $(RAM_DISK_OUTPUT_DIR)"
@$(MAKE) THINGINO_OUTPUT_DIR="$(RAM_OUTPUT_DIR)" all
$(ram_copy_artifacts)
@rm -rf "$(RAM_OUTPUT_DIR)"
@$(GREEN) "Saved artifacts to $(RAM_DISK_OUTPUT_DIR); tmpfs freed."
# Build on tmpfs, in parallel, KEEPING the tree so you can resume after a crash.
# This is the dev-loop counterpart to ram-build: same SSD-write savings, but the
# tmpfs output tree is NEVER wiped, so an interrupted build can be resumed
# package by package - Buildroot rebuilds only the packages whose stamp files
# were left incomplete by the failed run. Re-run it as many times as needed:
# CAMERA=<camera> make ram-dev
# CAMERA=<camera> make ram-dev # resumes where the last run stopped
# On success the images/logs are copied back to disk, but the tmpfs tree stays
# in place for the next iteration. To abandon the tree and start clean, wipe it
# by hand: rm -rf "$(RAM_OUTPUT_DIR)"
ram-dev:
@$(TEAL) "$@"
@mkdir -p "$(RAM_BUILD_DIR)"
@fstype=$$(stat -f -c %T "$(RAM_BUILD_DIR)" 2>/dev/null || true); \
ifree=$$(stat -f -c %d "$(RAM_BUILD_DIR)" 2>/dev/null || echo 0); \
free_kb=$$(( $$(stat -f -c %a "$(RAM_BUILD_DIR)" 2>/dev/null || echo 0) * $$(stat -f -c %S "$(RAM_BUILD_DIR)" 2>/dev/null || echo 1) / 1024 )); \
if [ "$$fstype" != "tmpfs" ]; then \
echo "ERROR: $(RAM_BUILD_DIR) is not tmpfs (filesystem: '$$fstype')."; \
echo " Mount a tmpfs and/or set RAM_BUILD_DIR, then run 'make ram-setup' once."; \
exit 1; \
fi; \
if [ ! -d "$(RAM_OUTPUT_DIR)" ]; then \
if [ "$$ifree" -lt 2000000 ]; then \
echo "ERROR: only $$ifree free inodes; a fresh build needs ~2M."; \
echo " Run 'make ram-setup' once (raises the tmpfs inode limit)."; \
exit 1; \
fi; \
if [ "$$free_kb" -lt 8388608 ]; then \
echo "ERROR: only $$(( $$free_kb / 1024 / 1024 )) GiB free; a clean build needs ~7 GiB."; \
exit 1; \
fi; \
else \
echo "Resuming existing tree at $(RAM_OUTPUT_DIR) (free: $$(( $$free_kb / 1024 / 1024 )) GiB, $$ifree free inodes)."; \
fi
@echo "RAM output: $(RAM_OUTPUT_DIR)"
@echo "Disk output: $(RAM_DISK_OUTPUT_DIR)"
@$(MAKE) THINGINO_OUTPUT_DIR="$(RAM_OUTPUT_DIR)" fast
$(ram_copy_artifacts)
@$(GREEN) "Build complete. Tree kept at $(RAM_OUTPUT_DIR) - re-run 'make ram-dev' to resume as needed."
# update repo and submodules (buildroot overrides live in the pinned
# themactep/buildroot branch, so there is nothing to patch here)
update:
@$(TEAL) "$@"
@echo "=== UPDATING MAIN REPOSITORY ==="
git pull --rebase --autostash
@echo "=== UPDATING SUBMODULES ==="
git submodule init
git submodule update
@echo "=== CHECKING EXTERNAL TOOLCHAIN BUNDLES ==="
BR2_DL_DIR=$(BR2_DL_DIR) \
$(SCRIPTS_DIR)/update_toolchain_bundles.sh
@$(ORANGE) "$(GIT_BRANCH)"
update_manual:
@echo "=== UPDATING BUILDROOT MANUALS ==="
@curl -s -z docs/buildroot/manual.pdf -o docs/buildroot/manual.pdf https://buildroot.org/manual.pdf
@curl -s -z docs/buildroot/manual.txt -o docs/buildroot/manual.txt https://buildroot.org/manual.text
# install what's needed
bootstrap:
@$(TEAL) "$@"
$(SCRIPTS_DIR)/dep_check.sh
# Configure repository-local git hooks path for team pre-commit automation.
setup-hooks:
@$(TEAL) "$@"
@git config core.hooksPath .githooks
@echo "Configured local git hooks path: $$(git config --get core.hooksPath)"
build: BR2_MAKE_JOBS =
build: $(U_BOOT_ENV_TXT)
@$(TEAL) "$@"
build_fast: BR2_MAKE_JOBS = -j$(NPROC)
build_fast: $(U_BOOT_ENV_TXT)
@$(TEAL) "$@"
### Configuration
# Configuration dependency files
CONFIG_DEPS_FILE = $(OUTPUT_DIR)/.config.deps
CONFIG_INPUT_FILES = $(TOOLCHAIN_FRAGMENT_FILE) $(CONFIG_FRAGMENT_FILES) $(CAMERA_CONFIG_REAL)
CONFIG_INPUT_FILES += $(THINGINO_USER_FRAGMENT_FILES)
ifneq ($(wildcard $(BR2_EXTERNAL)/local.mk),)
CONFIG_INPUT_FILES += $(BR2_EXTERNAL)/local.mk
endif
CONFIG_INPUT_FILES += $(THINGINO_USER_MK_FILES)
# Function to check if configuration needs regeneration
define config_needs_regen
$(shell \
if [ ! -f $(OUTPUT_DIR)/.config ] || [ ! -f $(CONFIG_DEPS_FILE) ]; then \
echo "yes"; \
else \
for file in $(CONFIG_INPUT_FILES); do \
if [ "$$file" -nt $(OUTPUT_DIR)/.config ]; then \
echo "yes"; \
break; \
fi; \
done; \
fi \
)
endef
# Smart configuration check - only regenerate if needed
check-config: buildroot/Makefile
@$(TEAL) "$@"
@if [ "$(call config_needs_regen)" = "yes" ]; then \
echo "Configuration files have changed, regenerating .config"; \
$(MAKE) force-config; \
else \
echo "Configuration is up to date"; \
fi
# Force configuration regeneration
force-config: buildroot/Makefile $(OUTPUT_DIR)/.keep
@$(TEAL) "$@"
# delete older config
$(info * remove existing .config file)
rm -rvf $(OUTPUT_DIR)/.config
ifeq ($(RAW_DEFCONFIG_MODE),y)
# preprocess a plain Buildroot defconfig used by GitHub workflows
$(info * preprocess raw defconfig $(CAMERA_CONFIG_REAL))
$(SED_CONFIG_VARS) $(CAMERA_CONFIG_REAL) >$(OUTPUT_DIR)/.config
else
# add toolchain fragment (from preset selection)
$(info * add toolchain fragment $(TOOLCHAIN_FRAGMENT_FILE))
@if [ ! -f "$(TOOLCHAIN_FRAGMENT_FILE)" ]; then \
echo "ERROR: Missing toolchain fragment $(TOOLCHAIN_FRAGMENT_FILE)"; \
exit 1; \
fi
@echo "# $$(basename "$(TOOLCHAIN_FRAGMENT_FILE)")" >> $(OUTPUT_DIR)/.config
@$(SED_CONFIG_VARS) "$(TOOLCHAIN_FRAGMENT_FILE)" >> $(OUTPUT_DIR)/.config
@echo >> $(OUTPUT_DIR)/.config
# add other fragments
$(info * add fragments FRAGMENTS=$(FRAGMENTS) from $(CAMERA_CONFIG_REAL))
for i in $(FRAGMENTS); do \
fragment_path="configs/fragments/$$i.fragment"; \
if [ ! -f "$$fragment_path" ]; then \
echo "ERROR: Missing fragment $$fragment_path"; \
exit 1; \
fi; \
echo "** add $$fragment_path"; \
echo "# $$(basename "$$fragment_path")" >> $(OUTPUT_DIR)/.config; \
$(SED_CONFIG_VARS) "$$fragment_path" >>$(OUTPUT_DIR)/.config; \
echo >>$(OUTPUT_DIR)/.config; \
done
# add kernel-specific headers based on SOC requirements
# @if [ "$(SOC_FAMILY)" = "t23" ] || [ "$(SOC_FAMILY)" = "t40" ] || [ "$(SOC_FAMILY)" = "t41" ] || [ "$(SOC_FAMILY)" = "a1" ]; then
@if [ "$(KERNEL_VERSION_4)" = "y" ]; then \
echo "** add kernel headers: 4.4 (SOC: $(SOC_FAMILY))"; \
echo "BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_4=y" >>$(OUTPUT_DIR)/.config; \
echo "BR2_TOOLCHAIN_EXTERNAL_HEADERS_4_4=y" >>$(OUTPUT_DIR)/.config; \
else \
echo "** add kernel headers: 3.10 (SOC: $(SOC_FAMILY))"; \
echo "BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_10=y" >>$(OUTPUT_DIR)/.config; \
echo "BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_10=y" >>$(OUTPUT_DIR)/.config; \
fi; \
echo >>$(OUTPUT_DIR)/.config
# add camera configuration
$(SED_CONFIG_VARS) $(CAMERA_CONFIG_REAL) >>$(OUTPUT_DIR)/.config
# add SOC-derived values
@echo "# SOC-derived configuration" >>$(OUTPUT_DIR)/.config
@echo 'BR2_SOC_FAMILY="$(SOC_FAMILY)"' >>$(OUTPUT_DIR)/.config
@echo 'BR2_SOC_RAM_MB=$(SOC_RAM_MB)' >>$(OUTPUT_DIR)/.config
@echo >>$(OUTPUT_DIR)/.config
# append camera-specific overlay if it exists
@if [ -d "$(BR2_EXTERNAL)/$(CAMERA_SUBDIR)/$(CAMERA)/overlay" ]; then \
sed -i 's|^\(BR2_ROOTFS_OVERLAY="\)\(.*\)"|\1\2 $(BR2_EXTERNAL)/$(CAMERA_SUBDIR)/$(CAMERA)/overlay"|' $(OUTPUT_DIR)/.config; \
echo "Camera overlay: $(BR2_EXTERNAL)/$(CAMERA_SUBDIR)/$(CAMERA)/overlay"; \
fi
endif
for file in $(THINGINO_USER_FRAGMENT_FILES); do \
if [ -f "$$file" ]; then \
cat "$$file" >>$(OUTPUT_DIR)/.config; \
printf '\n' >>$(OUTPUT_DIR)/.config; \
fi; \
done; \
rm -f $(OUTPUT_DIR)/local.mk; \
for file in $(THINGINO_USER_MK_FILES); do \
if [ -f "$$file" ]; then \
cat "$$file" >>$(OUTPUT_DIR)/local.mk; \
printf '\n' >>$(OUTPUT_DIR)/local.mk; \
fi; \
done; \
if [ ! -L $(OUTPUT_DIR)/thingino ]; then \
ln -s $(BR2_EXTERNAL) $(OUTPUT_DIR)/thingino; \
fi
# add U-Boot version fragment LAST so it overrides build system choice from core fragment
$(info * add U-Boot fragment $(THINGINO_UBOOT_FRAGMENT_FILE))
@if [ ! -f "$(THINGINO_UBOOT_FRAGMENT_FILE)" ]; then \
echo "ERROR: Missing U-Boot fragment $(THINGINO_UBOOT_FRAGMENT_FILE)"; \
exit 1; \
fi
@echo "# $$(basename "$(THINGINO_UBOOT_FRAGMENT_FILE)")" >> $(OUTPUT_DIR)/.config
@cat "$(THINGINO_UBOOT_FRAGMENT_FILE)" >> $(OUTPUT_DIR)/.config
@echo >> $(OUTPUT_DIR)/.config
# add U-Boot board settings after version fragment (must come after build-system choice)
@echo "# U-Boot board configuration" >> $(OUTPUT_DIR)/.config
@echo 'BR2_TARGET_UBOOT_BOARDNAME="$(UBOOT_BOARDNAME)"' >>$(OUTPUT_DIR)/.config
@echo 'BR2_TARGET_UBOOT_BOARD_DEFCONFIG="$(UBOOT_DEFCONFIG)"' >>$(OUTPUT_DIR)/.config
@if ! grep -q '^BR2_TARGET_UBOOT_FORMAT_CUSTOM_NAME=' $(OUTPUT_DIR)/.config 2>/dev/null; then \
echo 'BR2_TARGET_UBOOT_FORMAT_CUSTOM_NAME="$(UBOOT_BIN_NAME)"' >>$(OUTPUT_DIR)/.config; \
fi
@echo >>$(OUTPUT_DIR)/.config
# Kernel config override: only 3.10.14 uses official kernel.org tarball + patches.
# All other versions (4.4.94, 7.1-rc1) use custom git repo from thingino-linux.
@if [ "$(KERNEL_VERSION)" != "3.10.14" ]; then \
echo "** kernel override: $(KERNEL_VERSION) uses custom git repo"; \
$(SED) 's/^BR2_LINUX_KERNEL_CUSTOM_VERSION=y/# BR2_LINUX_KERNEL_CUSTOM_VERSION is not set/' $(OUTPUT_DIR)/.config; \
$(SED) '/^BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE=/d' $(OUTPUT_DIR)/.config; \
echo "BR2_LINUX_KERNEL_CUSTOM_GIT=y" >> $(OUTPUT_DIR)/.config; \
echo 'BR2_LINUX_KERNEL_CUSTOM_REPO_URL="$(KERNEL_SITE)"' >> $(OUTPUT_DIR)/.config; \
echo 'BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="$(KERNEL_HASH)"' >> $(OUTPUT_DIR)/.config; \
fi
cp $(OUTPUT_DIR)/.config $(OUTPUT_DIR)/.config_original
$(BR2_MAKE) BR2_DEFCONFIG=$(CAMERA_CONFIG_REAL) olddefconfig
# Create dependency tracking file
@echo "# Configuration dependency tracking file" > $(CONFIG_DEPS_FILE)
@echo "# Generated on $$(date)" >> $(CONFIG_DEPS_FILE)
@echo "CONFIG_INPUT_FILES = $(CONFIG_INPUT_FILES)" >> $(CONFIG_DEPS_FILE)
@for file in $(CONFIG_INPUT_FILES); do \
if [ -f "$$file" ]; then \
echo "$$file: $$(stat -c %Y "$$file")" >> $(CONFIG_DEPS_FILE); \
fi; \
done
# Configure buildroot for a particular board
defconfig: check-config
@$(TEAL) "$@"
# Ensure buildroot is properly configured
$(BR2_MAKE) BR2_DEFCONFIG=$(CAMERA_CONFIG_REAL) olddefconfig
# Lint all shell scripts with shellcheck
shellcheck:
@if ! command -v shellcheck >/dev/null 2>&1; then \
echo "shellcheck is not installed. Run: apt install shellcheck"; \
exit 1; \
fi
@echo "Linting shell scripts..."
@find scripts/ -name '*.sh' ! -path '*.venv/*' -exec shellcheck -x {} +
@echo "All shell scripts passed."
# Full lint suite: shellcheck + do-not-edit + defconfig sort + plugin validation
# + tz.json strings
lint: shellcheck
@echo "Checking do-not-edit paths..."
@git diff --name-only --diff-filter=ACMR HEAD | $(BR2_EXTERNAL)/scripts/check-do-not-edit.sh
@echo "Checking defconfig sort order..."
@failed=0; \
for f in configs/cameras/*/"*_defconfig"; do \
[ -f "$$f" ] || continue; \
cp "$$f" "$$f.lint.bak" || exit 1; \
$(BR2_EXTERNAL)/scripts/sort_defconfig.py "$$f" 2>/dev/null; \
if ! cmp -s "$$f" "$$f.lint.bak"; then \
echo " FAIL: $$f is not sorted. Run: scripts/sort_defconfig.py $$f"; \
failed=1; \
fi; \
mv "$$f.lint.bak" "$$f"; \
done; \
if [ "$$failed" -eq 1 ]; then \
echo "Some defconfigs are not sorted. Run 'make sort-defconfigs' to fix."; \
exit 1; \
fi
@echo "All defconfigs sorted."
@echo "Validating webui plugins..."
@$(BR2_EXTERNAL)/scripts/check-plugins.sh
@echo "Checking tz.json TZ strings..."
@$(BR2_EXTERNAL)/scripts/check-tz-json.sh
@echo "All lint checks passed."
# Sort all camera defconfigs
sort-defconfigs:
@for f in configs/cameras/*/*_defconfig; do \
[ -f "$$f" ] || continue; \
$(BR2_EXTERNAL)/scripts/sort_defconfig.py "$$f"; \
done
@echo "All defconfigs sorted."
# Configuration debugging and maintenance targets
show-config-deps:
@$(TEAL) "$@"
@echo "Configuration input files:"
@for file in $(CONFIG_INPUT_FILES); do \
if [ -f "$$file" ]; then \
echo " $$file (exists, modified: $$(stat -c %Y "$$file"))"; \
else \
echo " $$file (missing)"; \
fi; \
done
@if [ -f $(CONFIG_DEPS_FILE) ]; then \
echo ""; \
echo "Current dependency tracking:"; \
cat $(CONFIG_DEPS_FILE); \
else \
echo ""; \
echo "No dependency tracking file found at $(CONFIG_DEPS_FILE)"; \
fi