1 include $(TOPDIR
)/rules.mk
7 PKG_SOURCE
:=$(PKG_DISTNAME
)-$(PKG_VERSION
).
tar.bz2
9 https
://ftp.denx.de
/pub
/u-boot \
10 https
://mirror.cyberbits.eu
/u-boot \
11 ftp
://ftp.denx.de
/pub
/u-boot
12 PKG_URL
:=https
://docs.u-boot.org
/en
/latest
/
13 PKG_HASH
:=b4f032848e56cc8f213ad59f9132c084dbbb632bc29176d024e58220e0efdf4a
14 PKG_SOURCE_SUBDIR
:=$(PKG_DISTNAME
)-$(PKG_VERSION
)
15 PKG_BUILD_DIR
:=$(BUILD_DIR
)/$(PKG_DISTNAME
)-$(PKG_VERSION
)
17 PKG_BUILD_DEPENDS
:=fstools
19 PKG_LICENSE
:=GPL-2.0 GPL-2.0
+
20 PKG_LICENSE_FILES
:=Licenses
/README
23 #PKG_FLAGS:=nonshared # Use PKGFLAGS instead of PKG_FLAGS for per-binary flags
25 include $(INCLUDE_DIR
)/package.mk
27 define Package
/dumpimage
31 TITLE
:=dumpimage lists and extracts data from U-Boot images.
34 define Package
/dumpimage
/description
35 dumpimage lists and extracts data from U-Boot images.
36 If
-l is specified
, dumpimage lists the components in
37 image.Otherwise
, dumpimage extracts the component at
41 define Package
/fit-check-sign
45 TITLE
:=verify uImage.FIT
48 define Package
/fit-check-sign
/description
49 fit_check_sign validates uImage.FIT hashes and signatures
52 define Package
/uboot-envtools
57 TITLE
:=read
/modify U-Boot bootloader environment
60 define Package
/uboot-envtools
/description
61 This package includes tools to read and modify U-Boot
62 bootloader environment.
65 define Package
/uboot-envtools
/conffiles
71 define Build
/Configure
72 $(call Build
/Compile
/Default
,tools-only_defconfig
)
73 $(SED
) 's/CONFIG_TOOLS_LIBCRYPTO=y/# CONFIG_TOOLS_LIBCRYPTO is not set/' $(PKG_BUILD_DIR
)/.config
74 $(SED
) 's/CONFIG_TOOLS_KWBIMAGE=y/# CONFIG_TOOLS_KWBIMAGE is not set/' $(PKG_BUILD_DIR
)/.config
79 TARGET_CFLAGS
="$(TARGET_CFLAGS)" \
80 TARGET_LDFLAGS
="$(TARGET_LDFLAGS)" \
82 V
=$(if
$(findstring c
,$(OPENWRT_VERBOSE
)),1,)
86 ifneq ($(CONFIG_PACKAGE_uboot-envtools
),)
87 $(call Build
/Compile
/Default
,envtools
)
89 ifneq ($(CONFIG_PACKAGE_dumpimage
)$(CONFIG_PACKAGE_fit-check-sign
),)
90 $(call Build
/Compile
/Default
,cross_tools
)
95 define Package
/dumpimage
/install
96 $(INSTALL_DIR
) $(1)/usr
/bin
97 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/tools
/dumpimage
$(1)/usr
/bin
100 define Package
/fit-check-sign
/install
101 $(INSTALL_DIR
) $(1)/usr
/bin
102 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/tools
/fit_check_sign
$(1)/usr
/bin
105 define Package
/uboot-envtools
/install
106 $(INSTALL_DIR
) $(1)/usr
/sbin
107 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/tools
/env
/fw_printenv
$(1)/usr
/sbin
108 $(LN
) fw_printenv
$(1)/usr
/sbin
/fw_setenv
109 $(INSTALL_BIN
) .
/uboot-envtools
/files
/fw_printsys
$(1)/usr
/sbin
110 $(INSTALL_BIN
) .
/uboot-envtools
/files
/fw_setsys
$(1)/usr
/sbin
111 $(INSTALL_BIN
) .
/uboot-envtools
/files
/fw_loadenv
$(1)/usr
/sbin
112 $(INSTALL_DIR
) $(1)/etc
/board.d
113 $(INSTALL_DATA
) .
/uboot-envtools
/files
/fw_defaults
$(1)/etc
/board.d
/05_fw_defaults
114 $(INSTALL_DIR
) $(1)/lib
115 $(INSTALL_DATA
) .
/uboot-envtools
/files
/uboot-envtools.sh
$(1)/lib
116 $(INSTALL_DIR
) $(1)/etc
/uci-defaults
117 $(if
$(wildcard .
/uboot-envtools
/files
/$(BOARD
)_
$(SUBTARGET
)), \
118 $(INSTALL_DATA
) .
/uboot-envtools
/files
/$(BOARD
)_
$(SUBTARGET
) \
119 $(1)/etc
/uci-defaults
/30_uboot-envtools
, \
120 $(if
$(wildcard .
/uboot-envtools
/files
/$(BOARD
)), \
121 $(INSTALL_DATA
) .
/uboot-envtools
/files
/$(BOARD
) \
122 $(1)/etc
/uci-defaults
/30_uboot-envtools \
127 $(eval
$(call BuildPackage
,dumpimage
))
128 $(eval
$(call BuildPackage
,fit-check-sign
))
129 $(eval
$(call BuildPackage
,uboot-envtools
))