Date:2009-11-05 08:21:18 (14 years 4 months ago)
Author:Xiangfu Liu
Commit:fe2c7bdf61e4c3172d42d5c1288a50d30942d322
Message:add ubi-utils

Files: ubi-utils/Makefile (1 diff)

Change Details

ubi-utils/Makefile
1#
2# Copyright (C) 2009 Qi Hardware Inc.
3# Author: Xiangfu Liu <xiangfu@qi-hardware.com>
4#
5# This is free software, licensed under the GNU General Public License v3.
6# See /LICENSE for more information.
7#
8
9include $(TOPDIR)/rules.mk
10
11PKG_NAME:=ubi-utils
12PKG_VERSION:=1.2.0
13PKG_REV:=600337e7c81e812d34460b413c5b044f454bc49d
14PKG_RELEASE:=1
15
16PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
17PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
18PKG_SOURCE_URL:=git://git.infradead.org/mtd-utils.git
19PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
20PKG_SOURCE_VERSION:=$(PKG_REV)
21
22include $(INCLUDE_DIR)/package.mk
23
24define Package/ubi-utils
25    TITLE:=ubi-utils
26    SECTION:=utils
27    CATEGORY:=Utilities
28    URL:=http://www.linux-mtd.infradead.org/doc/ubi.html
29endef
30
31define Package/ubi-utils/description
32    UBI (Latin: "where?") stands for "Unsorted Block Images". It is a volume management system for raw flash devices which manages multiple logical volumes on a single physical flash device and spreads the I/O load (i.e, wear-leveling) across whole flash chip.
33endef
34
35define Build/Compile
36    (cd $(PKG_BUILD_DIR)/$(PKG_NAME); \
37    $(MAKE) CC="$(TARGET_CROSS)gcc" \
38        ARCH="$(ARCH)"; \
39    $(MAKE) CC="$(TARGET_CROSS)gcc" \
40        ARCH="$(ARCH)" \
41        DESTDIR="$(PKG_INSTALL_DIR)" \
42        SBINDIR="/usr/bin/" \
43        install \
44    )
45endef
46
47define Package/ubi-utils/install
48    $(INSTALL_DIR) $(1)/usr/bin
49    $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/mtdinfo $(1)/usr/bin/
50    $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/ubinfo $(1)/usr/bin/
51    $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/ubimkvol $(1)/usr/bin/
52    $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/ubirmvol $(1)/usr/bin/
53    $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/ubinize $(1)/usr/bin/
54    $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/ubidetach $(1)/usr/bin/
55    $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/ubicrc32 $(1)/usr/bin/
56    $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/ubiformat $(1)/usr/bin/
57    $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/ubiupdatevol $(1)/usr/bin/
58    $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/ubirsvol $(1)/usr/bin/
59    $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/ubiattach $(1)/usr/bin/
60    $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/ubirename $(1)/usr/bin/
61endef
62
63$(eval $(call BuildPackage,ubi-utils))

Archive Download the corresponding diff file



interactive