From 8347d8b4fbe41ce7db386f948df3ebb6c6bc32d3 Mon Sep 17 00:00:00 2001 From: Stijn Tintel Date: Fri, 30 Jul 2021 01:11:37 +0300 Subject: base-files: add generic sdcard upgrade method Add a generic sdcard upgrade method instead of duplicating code in yet another target, and add a feature flag to only install this upgrade method in targets that set this flag. Copied from mvebu. Signed-off-by: Stijn Tintel --- package/base-files/Makefile | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'package/base-files/Makefile') diff --git a/package/base-files/Makefile b/package/base-files/Makefile index 5f816a0d1b..f19b07cfe1 100644 --- a/package/base-files/Makefile +++ b/package/base-files/Makefile @@ -23,6 +23,7 @@ PKG_LICENSE:=GPL-2.0 PKG_CONFIG_DEPENDS += \ CONFIG_SIGNED_PACKAGES CONFIG_TARGET_INIT_PATH CONFIG_TARGET_PREINIT_DISABLE_FAILSAFE \ CONFIG_NAND_SUPPORT \ + CONFIG_SDCARD_SUPPORT \ CONFIG_CLEAN_IPKG \ CONFIG_PER_FEED_REPO \ $(foreach feed,$(FEEDS_AVAILABLE),CONFIG_FEED_$(feed)) @@ -123,10 +124,18 @@ ifeq ($(CONFIG_NAND_SUPPORT),) endef endif +ifeq ($(CONFIG_SDCARD_SUPPORT),) + define Package/base-files/sdcard-support + rm -f $(1)/lib/upgrade/sdcard.sh + endef +endif + + define Package/base-files/install $(CP) ./files/* $(1)/ $(Package/base-files/install-key) $(Package/base-files/nand-support) + $(Package/base-files/sdcard-support) if [ -d $(GENERIC_PLATFORM_DIR)/base-files/. ]; then \ $(CP) $(GENERIC_PLATFORM_DIR)/base-files/* $(1)/; \ fi -- cgit v1.2.3