From e6245a6360f0f07619083e073a15358a09cc0bd9 Mon Sep 17 00:00:00 2001 From: Florian Fainelli Date: Sun, 3 Jan 2010 20:56:54 +0000 Subject: [PATCH] [package] add nvramtool (#6086) SVN-Revision: 19023 --- utils/nvramtool/Makefile | 53 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 utils/nvramtool/Makefile diff --git a/utils/nvramtool/Makefile b/utils/nvramtool/Makefile new file mode 100644 index 0000000000..ff89c8254b --- /dev/null +++ b/utils/nvramtool/Makefile @@ -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)) -- 2.30.2