From patchwork Thu Apr 28 13:57:13 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexandru Ardelean X-Patchwork-Id: 616274 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from arrakis.dune.hu (caladan.dune.hu [78.24.191.180]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3qwdgT66lfz9t7H for ; Thu, 28 Apr 2016 23:57:25 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=O9m6MQjF; dkim-atps=neutral Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id E36BAB91FCB; Thu, 28 Apr 2016 15:57:18 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on arrakis.dune.hu X-Spam-Level: X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00,FREEMAIL_FROM, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.1 Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP; Thu, 28 Apr 2016 15:57:18 +0200 (CEST) Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id 74986B91FC5 for ; Thu, 28 Apr 2016 15:57:17 +0200 (CEST) X-policyd-weight: using cached result; rate: -7 Received: from mail-wm0-f46.google.com (mail-wm0-f46.google.com [74.125.82.46]) by arrakis.dune.hu (Postfix) with ESMTPS for ; Thu, 28 Apr 2016 15:57:17 +0200 (CEST) Received: by mail-wm0-f46.google.com with SMTP id a17so66886971wme.0 for ; Thu, 28 Apr 2016 06:57:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=EXZoZtpXAdGFFPUmQ+6ETZNuAxSVnEfVdVF6n/xsBHA=; b=O9m6MQjFBldc0fDHWiArPn3QKlFE634bNqH8KfXWpZ1nnmV9UOMDfsm/1wfAdK5dFW 4hxjKaTXctRdkDd4YlomHvZbNc+mUYdBUfSsHTTJFPZVh3zd409iB2L8exqQ4iWC5oDf HV/Ya9X29UtfX+bxcLmd6xbTslY0jY6agt4bTQ0HVy1HMZonWTQNX2gTjkw5nk9cYhk5 wkuRHA7Yms7KGI00AyIiWer0TpXihi1qg/IK1bAzVlDtzKUmspY8brNSHOKfvUfnlG9V Zz63KEYEjsEk8kdOGb2iz3+qhVGuusqLrI/V9FsCKpQxOYSLFdEyz+AFwXPhmxx9NWHT pmXg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=EXZoZtpXAdGFFPUmQ+6ETZNuAxSVnEfVdVF6n/xsBHA=; b=GGmdTdfysKv2k+ZDgTI0imWbToN+bOyCLux+P2sdfSKxdeeLfJMm1XAp194J/9XvFg Ze4/rZtxeNIozQRk4Ak7SJP6pCTsINbM1Y5OeMOnKBVXbFRlLsmWW9kPk7BYR5t+ve0/ PTbxBv/EshDg+zynxdw29yYHvod+CZY8RgTPYTQL03c93a9ntqfm+FIIX3+N5zI5GhaF 7YylheW5IBWtAWGz66mdJAWw8Kz0C1F0eABE5/xCbowQXae8uLyFpx/knv7npczK6h3k gWM9mqWyUV2YifFVFiUed2buLN+B4hU2qniTVuLAKmEHMy+2lvOSesI8yucZhk/HyZfD 1YjA== X-Gm-Message-State: AOPr4FX65wYS6DTeY2KOpf86znXXcbL8MqSTWvLcckNmlo6aCULJRW8pYbzKSoGA0U2YKg== X-Received: by 10.194.107.74 with SMTP id ha10mr15828987wjb.24.1461851836655; Thu, 28 Apr 2016 06:57:16 -0700 (PDT) Received: from localhost.localdomain ([5.2.198.78]) by smtp.gmail.com with ESMTPSA id m140sm33182479wma.24.2016.04.28.06.57.15 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 28 Apr 2016 06:57:15 -0700 (PDT) From: Alexandru Ardelean To: openwrt-devel@lists.openwrt.org Date: Thu, 28 Apr 2016 16:57:13 +0300 Message-Id: <1461851833-25393-1-git-send-email-ardeleanalex@gmail.com> X-Mailer: git-send-email 2.8.1 Subject: [OpenWrt-Devel] [PATCH] ubi-utils: package mkfs.ubifs and mtdinfo into ubi-utils X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: openwrt-devel-bounces@lists.openwrt.org Sender: "openwrt-devel" This is a partial backport from mtd-utils. mtd-utils exposed multiple sub-packages. I think mtd-utils was part of the oldpackages ; I haven't checked. But it seems that mtd-utils and ubi-utils are pretty much the same. The only thing we need on top of ubi-utils are the 'mkfs.ubifs' and 'mtdinfo' commands. I had thought about just adding the 2 cmds to the ubi-utils install rule but maybe for a more generic use-case they might not be needed. Signed-off-by: Alexandru Ardelean --- package/utils/ubi-utils/Makefile | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/package/utils/ubi-utils/Makefile b/package/utils/ubi-utils/Makefile index b89a5d2..c34e1a2 100644 --- a/package/utils/ubi-utils/Makefile +++ b/package/utils/ubi-utils/Makefile @@ -30,6 +30,10 @@ PKG_MAINTAINER:=John Crispin include $(INCLUDE_DIR)/package.mk +FILES:= \ + mkfs.ubifs:+libuuid:+liblzo:+zlib \ + mtdinfo + define Package/ubi-utils TITLE:=Utilities for ubi info/debug SECTION:=utils @@ -42,6 +46,18 @@ define Package/ubi-utils/description Utilities for manipulating memory technology devices. endef +define PartGen +define Package/ubi-utils-$(subst _,-,$(firstword $(subst :, ,$(1)))) + TITLE:=$(firstword $(subst :, ,$(1))) package from ubi-utils + URL:=http://www.linux-mtd.infradead.org/ + SECTION:=utils + CATEGORY:=Utilities + DEPENDS:=@NAND_SUPPORT +ubi-utils $(wordlist 2,$(words $(subst :, ,$(1))),$(subst :, ,$(1))) +endef +endef + +$(foreach file,$(FILES),$(eval $(call PartGen,$(file)))) + MAKE_FLAGS += \ DESTDIR="$(PKG_INSTALL_DIR)" \ BUILDDIR="$(PKG_BUILD_DIR)" \ @@ -57,5 +73,16 @@ define Package/ubi-utils/install $(PKG_INSTALL_DIR)/usr/sbin/{ubinfo,ubinize,ubirename,ubirmvol,ubirsvol,ubiupdatevol} $(1)/usr/sbin/ endef +define PartInstall +define Package/ubi-utils-$(subst _,-,$(firstword $(subst :, ,$(1))))/install + $(INSTALL_DIR) $$(1)/usr/sbin + $(INSTALL_BIN) \ + $(PKG_INSTALL_DIR)/usr/sbin/$(firstword $(subst :, ,$(1))) \ + $$(1)/usr/sbin/ +endef +endef + +$(foreach file,$(FILES),$(eval $(call PartInstall,$(file)))) $(eval $(call BuildPackage,ubi-utils)) +$(foreach file,$(FILES),$(eval $(call BuildPackage,ubi-utils-$(subst _,-,$(firstword $(subst :, ,$(file)))))))