Root/package/nvram/Makefile

1#
2# Copyright (C) 2009-2010 Jo-Philipp Wich <xm@subsignal.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
9
10PKG_NAME:=nvram
11PKG_RELEASE:=7
12
13PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
14
15include $(INCLUDE_DIR)/package.mk
16
17define Package/nvram
18  SECTION:=utils
19  CATEGORY:=Base system
20  TITLE:=Userspace port of the Broadcom NVRAM manipulation tool
21  DEPENDS:=@TARGET_brcm_2_4||@TARGET_brcm47xx||@TARGET_ar71xx
22endef
23
24define Package/nvram/description
25 This package contains an utility to manipulate NVRAM on Broadcom based devices.
26 It works on both brcm-2.4 and bcm47xx (Linux 2.6) without using the kernel api.
27endef
28
29define Build/Prepare
30    mkdir -p $(PKG_BUILD_DIR)
31    $(CP) ./src/* $(PKG_BUILD_DIR)/
32endef
33
34define Build/Configure
35endef
36
37define Build/Compile
38    $(MAKE) -C $(PKG_BUILD_DIR) \
39        CC="$(TARGET_CC)" \
40        CFLAGS="$(TARGET_CFLAGS) -Wall" \
41        LDFLAGS="$(TARGET_LDFLAGS)"
42endef
43
44define Build/InstallDev
45    $(INSTALL_DIR) $(1)/usr/lib
46    $(INSTALL_BIN) $(PKG_BUILD_DIR)/libnvram.so.0.1 $(1)/usr/lib/
47    ln -s libnvram.so.0.1 $(1)/usr/lib/libnvram.so
48endef
49
50define Package/nvram/install
51    $(INSTALL_DIR) $(1)/etc/init.d
52    $(INSTALL_BIN) ./files/nvram.init $(1)/etc/init.d/nvram
53    $(INSTALL_DIR) $(1)/usr/sbin
54    $(INSTALL_BIN) $(PKG_BUILD_DIR)/nvram $(1)/usr/sbin/
55    $(INSTALL_DIR) $(1)/usr/lib
56    $(INSTALL_BIN) $(PKG_BUILD_DIR)/libnvram.so.0.1 $(1)/usr/lib/
57endef
58
59$(eval $(call BuildPackage,nvram))
60

Archive Download this file



interactive