From 8b9c8dff7fffec5d7879d1141af8f192d09ab1a6 Mon Sep 17 00:00:00 2001 From: Claudio Mignanti Date: Fri, 9 Jan 2009 20:40:24 +0100 Subject: [PATCH] try to add make flash.... --- Makefile | 2 ++ include/kernel-build.mk | 2 ++ include/target.mk | 6 ++++++ target/Makefile | 1 + target/linux/Makefile | 2 +- target/linux/etrax/Makefile | 4 ++++ 6 files changed, 16 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 4bdc4651e8..a63a6c8be8 100644 --- a/Makefile +++ b/Makefile @@ -88,6 +88,8 @@ package/symlinks-install: package/symlinks-clean: $(SCRIPT_DIR)/feeds uninstall -a +flash: $(target/flash) + .PHONY: clean dirclean prereq prepare world package/symlinks package/symlinks-install package/symlinks-clean endif diff --git a/include/kernel-build.mk b/include/kernel-build.mk index 477c9eeddf..1737192150 100644 --- a/include/kernel-build.mk +++ b/include/kernel-build.mk @@ -96,4 +96,6 @@ define BuildKernel prereq: image-prereq + flash: + echo test endef diff --git a/include/target.mk b/include/target.mk index 58f657efe2..07ad145f47 100644 --- a/include/target.mk +++ b/include/target.mk @@ -170,6 +170,12 @@ define BuildTargets/DumpCurrent $(if $(SUBTARGET),,@$(foreach SUBTARGET,$(SUBTARGETS),$(SUBMAKE) -s DUMP=1 SUBTARGET=$(SUBTARGET); )) endef +ifndef Target/Flash +define Target/Flash + echo "Sorry! No flash method define for this target." +endef +endif + include $(INCLUDE_DIR)/kernel.mk ifeq ($(TARGET_BUILD),1) include $(INCLUDE_DIR)/kernel-build.mk diff --git a/target/Makefile b/target/Makefile index 3d36d26718..03793337c0 100644 --- a/target/Makefile +++ b/target/Makefile @@ -9,6 +9,7 @@ curdir:=target $(curdir)/builddirs:=linux sdk imagebuilder $(curdir)/builddirs-default:=linux $(curdir)/builddirs-install:=linux $(if $(CONFIG_SDK),sdk) $(if $(CONFIG_IB),imagebuilder) +$(curdir)/flash:=linux $(eval $(call Target/Flash)) $(curdir)/imagebuilder/prepare:=$(curdir)/linux/install diff --git a/target/linux/Makefile b/target/linux/Makefile index 769452274b..92b8a62cc3 100644 --- a/target/linux/Makefile +++ b/target/linux/Makefile @@ -9,5 +9,5 @@ include $(INCLUDE_DIR)/target.mk export TARGET_BUILD=1 -prereq clean download prepare compile install menuconfig oldconfig update refresh: FORCE +prereq clean download prepare compile install menuconfig oldconfig update refresh flash: FORCE @+$(NO_TRACE_MAKE) -C $(BOARD) $@ diff --git a/target/linux/etrax/Makefile b/target/linux/etrax/Makefile index fbb3ae41fb..c3006105b8 100644 --- a/target/linux/etrax/Makefile +++ b/target/linux/etrax/Makefile @@ -20,4 +20,8 @@ define Target/Description Build firmware images for the FOXBOARD made by acmesystems.it endef +define Target/Flash + sudo $(BIN_DIR)/boot_linux -F -i $(BIN_DIR)/openwrt-etrax-jffs2-64k-fimage +endef + $(eval $(call BuildTarget)) -- 2.11.4.GIT