2 # Copyright (C) 2006-2012 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR
)/rules.mk
9 include $(INCLUDE_DIR
)/kernel.mk
14 PKG_BUILD_DIR
:= $(KERNEL_BUILD_DIR
)/$(PKG_NAME
)
15 STAMP_PREPARED
:= $(STAMP_PREPARED
)_
$(call confvar
,CONFIG_MTD_REDBOOT_PARTS
)
20 include $(INCLUDE_DIR
)/package.mk
26 TITLE
:=Update utility for trx firmware images
29 define Package
/mtd
/description
30 This package contains an utility useful to upgrade from other firmware or
31 older OpenWrt releases.
34 target
=$(firstword $(subst -, ,$(BOARD
)))
36 MAKE_FLAGS
+= TARGET
="$(target)"
37 TARGET_CFLAGS
:= $(TARGET_CFLAGS
) -Dtarget_
$(target
)=1 -Wall
39 ifdef CONFIG_MTD_REDBOOT_PARTS
40 MAKE_FLAGS
+= FIS_SUPPORT
=1
41 TARGET_CFLAGS
+= -DFIS_SUPPORT
=1
44 define Package
/mtd
/install
45 $(INSTALL_DIR
) $(1)/sbin
46 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/mtd
$(1)/sbin
/
49 $(eval
$(call BuildPackage
,mtd
))