|
|
910dbc |
# Make rules for configuration files.
|
|
|
910dbc |
#
|
|
|
910dbc |
# $Id$
|
|
|
910dbc |
|
|
|
910dbc |
OUTPUT := $(abspath ../../)
|
|
|
910dbc |
ifeq ("$(origin O)", "command line")
|
|
|
910dbc |
_EXTRA_ARGS := O=$(O)
|
|
|
910dbc |
OUTPUT := $(O)
|
|
|
910dbc |
endif
|
|
|
910dbc |
|
|
|
910dbc |
CFG = kernel-$(VERSION)
|
|
|
910dbc |
CFG_DIR = $(OUTPUT)/configs
|
|
|
910dbc |
|
|
|
910dbc |
CONFIGFILES = \
|
|
|
910dbc |
$(CFG)-aarch64.config $(CFG)-aarch64-debug.config
|
|
|
910dbc |
|
|
|
910dbc |
PLATFORMS = arm64
|
|
|
910dbc |
TEMPFILES = $(addprefix temp-, $(addsuffix -generic, $(PLATFORMS)))
|
|
|
910dbc |
|
|
|
910dbc |
configs: clean-configs $(CONFIGFILES)
|
|
|
910dbc |
@rm -f kernel-*-config
|
|
|
910dbc |
@rm -f $(TEMPFILES)
|
|
|
910dbc |
@rm -f temp-generic temp-*-generic temp-*-generic-tmp
|
|
|
910dbc |
|
|
|
910dbc |
# Clean up our cruft so old merge files aren't used
|
|
|
910dbc |
clean-configs:
|
|
|
910dbc |
@rm -fv $(CONFIGFILES) $(TEMPFILES) temp-arm64* kernel-*config config-*-merged
|
|
|
910dbc |
|
|
|
910dbc |
# Augment the clean target to clean up our own cruft
|
|
|
910dbc |
clean ::
|
|
|
910dbc |
@rm -fv $(CONFIGFILES) $(TEMPFILES) temp-arm64* kernel-*config config-*-merged
|
|
|
910dbc |
|
|
|
910dbc |
configs-prep: clean configs
|
|
|
910dbc |
@rm -fr $(CFG_DIR)
|
|
|
910dbc |
@mkdir -p $(CFG_DIR)
|
|
|
910dbc |
@cp $(CFG)*.config $(CFG_DIR)
|
|
|
910dbc |
@cd ../../ && \
|
|
|
910dbc |
for i in $(CFG_DIR)/*.config; do \
|
|
|
910dbc |
mv $$i $(OUTPUT)/.config; \
|
|
|
910dbc |
ARCH=$$(head -1 $(OUTPUT)/.config | cut -b 3-); \
|
|
|
910dbc |
echo "Configuring $$i"; \
|
|
|
910dbc |
make ARCH=$$ARCH listnewconfig $(_EXTRA_ARGS) >/dev/null || exit 1; \
|
|
|
910dbc |
make ARCH=$$ARCH oldnoconfig $(_EXTRA_ARGS) >/dev/null || exit 1; \
|
|
|
910dbc |
echo "# $$ARCH" > $$i; \
|
|
|
910dbc |
cat $(OUTPUT)/.config >> $$i; \
|
|
|
910dbc |
rm $(OUTPUT)/.config; \
|
|
|
910dbc |
done
|
|
|
910dbc |
|
|
|
910dbc |
config-%-merged:
|
|
|
910dbc |
@if [ -f $$(basename $@ -merged)-redhat ]; then \
|
|
|
910dbc |
perl merge.pl $$(basename $@ -merged)-redhat $$(basename $@ -merged) >$@; \
|
|
|
910dbc |
else \
|
|
|
910dbc |
cp $$(basename $@ -merged) $@; \
|
|
|
910dbc |
fi
|
|
|
910dbc |
|
|
|
910dbc |
temp-generic: config-nodebug-merged config-generic-merged
|
|
|
910dbc |
cat $^ > temp-generic
|
|
|
910dbc |
|
|
|
910dbc |
temp-debug-generic: config-debug-merged config-generic-merged
|
|
|
910dbc |
cat $^ > temp-debug-generic
|
|
|
910dbc |
|
|
|
910dbc |
temp-arm-generic: config-arm-generic-merged temp-generic
|
|
|
910dbc |
perl merge.pl $^ > $@
|
|
|
910dbc |
|
|
|
910dbc |
temp-arm-debug-generic: config-arm-generic-merged temp-debug-generic
|
|
|
910dbc |
perl merge.pl $^ > $@
|
|
|
910dbc |
|
|
|
910dbc |
temp-arm64: config-arm64-merged temp-arm-generic
|
|
|
910dbc |
perl merge.pl $^ > $@
|
|
|
910dbc |
|
|
|
910dbc |
temp-arm64-debug: config-arm64-merged temp-arm-debug-generic
|
|
|
910dbc |
perl merge.pl $^ > $@
|
|
|
910dbc |
|
|
|
910dbc |
$(CFG)-aarch64.config: /dev/null temp-arm64
|
|
|
910dbc |
perl merge.pl $^ arm64 > $@
|
|
|
910dbc |
|
|
|
910dbc |
$(CFG)-aarch64-debug.config: /dev/null temp-arm64-debug
|
|
|
910dbc |
perl merge.pl $^ arm64 > $@
|
|
|
910dbc |
|