[package] add nvramtool (#6086)
authorFlorian Fainelli <florian@openwrt.org>
Sun, 3 Jan 2010 20:56:54 +0000 (20:56 +0000)
committerFlorian Fainelli <florian@openwrt.org>
Sun, 3 Jan 2010 20:56:54 +0000 (20:56 +0000)
SVN-Revision: 19023

utils/nvramtool/Makefile [new file with mode: 0644]

diff --git a/utils/nvramtool/Makefile b/utils/nvramtool/Makefile
new file mode 100644 (file)
index 0000000..ff89c82
--- /dev/null
@@ -0,0 +1,53 @@
+#
+# Copyright (C) 2008 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=nvramtool
+PKG_REV:=4887
+PKG_VERSION:=$(PKG_REV)
+PKG_RELEASE:=1
+
+PKG_SOURCE_PROTO:=svn
+PKG_SOURCE_VERSION:=$(PKG_REV)
+PKG_SOURCE_SUBDIR:=nvramtool-$(PKG_VERSION)
+PKG_SOURCE_URL:=svn://coreboot.org/repos/trunk/util/nvramtool
+PKG_SOURCE:=$(PKG_SOURCE_SUBDIR).tar.gz
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/nvramtool
+  SECTION:=utils
+  CATEGORY:=Utilities
+  URL:=http://www.coreboot.org/Nvramtool
+  TITLE:=Coreboot nvramtool
+  DEPENDS:=@TARGET_x86 +@PACKAGE_pciutils +zlib
+endef
+
+define Package/nvramtool/description
+       nvramtool (previously known as lxbios and cmos_util) is a utility for reading/writing coreboot parameters and displaying information from the coreboot table in CMOS/NVRAM.
+       The program is intended only for x86-based Linux systems that use coreboot, but can also be used for non-coreboot systems (e.g. for dumping all NVRAM bytes).
+endef
+
+define Build/Configure
+endef
+
+define Build/Compile
+       $(MAKE) -C $(PKG_BUILD_DIR) \
+               CC="$(TARGET_CC)" \
+               CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include" \
+               LDFLAGS="-L$(STAGING_DIR)/usr/lib" \
+               LIBS="-lpci -lz" \
+               DESTDIR="$(PKG_INSTALL_DIR)" \
+               nvramtool
+endef
+
+define Package/nvramtool/install
+       $(INSTALL_DIR) $(1)/sbin
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/nvramtool $(1)/sbin/nvramtool
+endef
+
+$(eval $(call BuildPackage,nvramtool))