uboot-envtools: add support for kirkwood ea4500
[openwrt/staging/dedeckeh.git] / package / boot / uboot-envtools / Makefile
1 #
2 # Copyright (C) 2006-2014 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=uboot-envtools
11 PKG_DISTNAME:=u-boot
12 PKG_VERSION:=2014.04
13 PKG_RELEASE:=2
14
15 PKG_SOURCE:=$(PKG_DISTNAME)-$(PKG_VERSION).tar.bz2
16 PKG_SOURCE_URL:= \
17 http://mirror2.openwrt.org/sources \
18 ftp://ftp.denx.de/pub/u-boot
19
20 PKG_MD5SUM:=6d2116d1385a66e9a59742caa9d62a54
21
22 PKG_BUILD_DIR:=$(BUILD_DIR)/u-boot-$(PKG_VERSION)
23
24 include $(INCLUDE_DIR)/package.mk
25
26 define Package/uboot-envtools
27 SECTION:=utils
28 CATEGORY:=Utilities
29 TITLE:=read/modify U-Boot bootloader environment
30 URL:=http://www.denx.de/wiki/U-Boot
31 endef
32
33 define Package/uboot-envtools/description
34 This package includes tools to read and modify U-Boot bootloader environment.
35 endef
36
37 define Build/Configure
38 touch $(PKG_BUILD_DIR)/include/config.mk
39 touch $(PKG_BUILD_DIR)/include/config.h
40 endef
41
42 define Build/Compile
43 $(MAKE) -C $(PKG_BUILD_DIR) \
44 CROSS_COMPILE="$(TARGET_CROSS)" \
45 TARGET_CFLAGS="$(TARGET_CFLAGS)" \
46 env
47 endef
48
49 define Package/uboot-envtools/conffiles
50 /etc/config/ubootenv
51 /etc/fw_env.config
52 endef
53
54 define Package/uboot-envtools/install
55 $(INSTALL_DIR) $(1)/usr/sbin
56 $(INSTALL_BIN) $(PKG_BUILD_DIR)/tools/env/fw_printenv $(1)/usr/sbin
57 ln -s fw_printenv $(1)/usr/sbin/fw_setenv
58 $(INSTALL_DIR) $(1)/lib
59 $(INSTALL_DATA) ./files/uboot-envtools.sh $(1)/lib
60 ifneq ($(CONFIG_TARGET_ar71xx),)
61 $(INSTALL_DIR) $(1)/etc/uci-defaults
62 $(INSTALL_DATA) ./files/ar71xx $(1)/etc/uci-defaults/30_uboot-envtools
63 endif
64 ifneq ($(CONFIG_TARGET_cns3xxx),)
65 $(INSTALL_DIR) $(1)/etc/uci-defaults
66 $(INSTALL_DATA) ./files/cns3xxx $(1)/etc/uci-defaults/30_uboot-envtools
67 endif
68 ifneq ($(CONFIG_TARGET_imx6),)
69 $(INSTALL_DIR) $(1)/etc/uci-defaults
70 $(INSTALL_DATA) ./files/imx6 $(1)/etc/uci-defaults/30_uboot-envtools
71 endif
72 ifneq ($(CONFIG_TARGET_kirkwood),)
73 $(INSTALL_DIR) $(1)/etc/uci-defaults
74 $(INSTALL_DATA) ./files/kirkwood $(1)/etc/uci-defaults/30_uboot-envtools
75 endif
76 ifneq ($(CONFIG_TARGET_lantiq),)
77 $(INSTALL_DIR) $(1)/etc/uci-defaults
78 $(INSTALL_DATA) ./files/lantiq $(1)/etc/uci-defaults/30_uboot-envtools
79 endif
80 ifneq ($(CONFIG_TARGET_mxs),)
81 $(INSTALL_DIR) $(1)/etc/uci-defaults
82 $(INSTALL_BIN) ./files/mxs $(1)/etc/uci-defaults/30_uboot-envtools
83 endif
84 ifneq ($(CONFIG_TARGET_ramips),)
85 $(INSTALL_DIR) $(1)/etc/uci-defaults
86 $(INSTALL_DATA) ./files/ramips $(1)/etc/uci-defaults/30_uboot-envtools
87 endif
88 endef
89
90 $(eval $(call BuildPackage,uboot-envtools))