Root/package/mtd/Makefile

1#
2# Copyright (C) 2006-2009 OpenWrt.org
3#
4# This is free software, licensed under the GNU General Public License v2.
5# See /LICENSE for more information.
6#
7
8include $(TOPDIR)/rules.mk
9include $(INCLUDE_DIR)/kernel.mk
10
11PKG_NAME:=mtd
12PKG_RELEASE:=13
13
14PKG_BUILD_DIR := $(KERNEL_BUILD_DIR)/$(PKG_NAME)
15STAMP_PREPARED := $(STAMP_PREPARED)_$(call confvar,CONFIG_MTD_REDBOOT_PARTS)
16
17include $(INCLUDE_DIR)/package.mk
18
19define Package/mtd
20  SECTION:=utils
21  CATEGORY:=Base system
22  TITLE:=Update utility for trx firmware images
23endef
24
25define Package/mtd/description
26 This package contains an utility useful to upgrade from other firmware or
27 older OpenWrt releases.
28endef
29
30define Build/Prepare
31    mkdir -p $(PKG_BUILD_DIR)
32    $(CP) ./src/* $(PKG_BUILD_DIR)/
33endef
34
35target=$(firstword $(subst -, ,$(BOARD)))
36
37MAKE_FLAGS += TARGET="$(target)"
38TARGET_CFLAGS += -Dtarget_$(target)=1 -Wall
39
40ifdef CONFIG_MTD_REDBOOT_PARTS
41  MAKE_FLAGS += FIS_SUPPORT=1
42  TARGET_CFLAGS += -DFIS_SUPPORT=1
43endif
44
45define Package/mtd/install
46    $(INSTALL_DIR) $(1)/sbin
47    $(INSTALL_BIN) $(PKG_BUILD_DIR)/mtd $(1)/sbin/
48endef
49
50$(eval $(call BuildPackage,mtd))
51

Archive Download this file



interactive