From patchwork Thu Dec 28 10:40:32 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Yann E. MORIN" X-Patchwork-Id: 853392 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.136; helo=silver.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="ELqYY++u"; dkim-atps=neutral Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3z6mTY44fbz9s7G for ; Thu, 28 Dec 2017 21:40:49 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 2881F2E9DD; Thu, 28 Dec 2017 10:40:46 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id S9LsKM9waliG; Thu, 28 Dec 2017 10:40:43 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id 778C42E5B0; Thu, 28 Dec 2017 10:40:43 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id 14FD81C2C7A for ; Thu, 28 Dec 2017 10:40:41 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 11B3A87474 for ; Thu, 28 Dec 2017 10:40:41 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 9RNORw3CauoX for ; Thu, 28 Dec 2017 10:40:39 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wr0-f194.google.com (mail-wr0-f194.google.com [209.85.128.194]) by hemlock.osuosl.org (Postfix) with ESMTPS id 3264687472 for ; Thu, 28 Dec 2017 10:40:39 +0000 (UTC) Received: by mail-wr0-f194.google.com with SMTP id o101so10198273wrb.6 for ; Thu, 28 Dec 2017 02:40:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=Ey6Yz0UdtevT1dD2cMmpobARZbaA1vOrmAYnmzubsUA=; b=ELqYY++uxUVZtffyj1MBjmFZY+681Pv1eYja7+l8G87MXSQsZEkTrZRWwo2W2KmLTQ T17FfoUu7Ja8KW3AIycRRa/JMaAsyITZniTEU72Jl8+2W5I130ZdzAYKah9te+nTC5ju x/ZvGuKM/sj7x94LNen8YHA3xaJiltaIk7bU7v4T0onEaOI4TcyWIdf7Zq4JZeXF5/4F veyHfZJ1FV0Me6zQFDF63kBhjhjQ5k+ATirC/QU+tGCQq6gTRmNUUoVyW7ybE+bnVgJ/ kEM+4kT1d9310TXhAeLcOzOB8nNYZGNvjwlpbRemkHP3CASp61+FgCMHmXfYm1S0gznw Xefw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=Ey6Yz0UdtevT1dD2cMmpobARZbaA1vOrmAYnmzubsUA=; b=iJdHqSOCGDYi4YATnsPVxxaYZJNRGLuvdPV9ehz5SRFThfWgP2A3VnCtf2Uu1S9Ggz BapNMah7faLyaxKYm+uFdZ6dgdNddncaBufOsEJc2qXAfKxuJD68nzDISmQKHqqqgCOD qlneRH6OhCNfmqUDTSrYWtJJApHKapbtnw46Tenk4WkSW1YJqQ7PDWYi6wq+atJ/5iVF FJzwmARmPZ0tzVu4R76zFeE5QMv8dk7SVbMP8Dxk944BGKR63NvotvreNLNDMHzZ0pgJ KfqDmvCsi+AFWjznro6XfpnocX3YBdkEQG5WoTsrD0jubR6SS0hHNwfXGfeKf1NdXAlo Zsxg== X-Gm-Message-State: AKGB3mLxnm1p/ff7RJH5t1HnRwXoPgCQbFIyfphSdIJShZ2quXUUVu2k KXGZX+IxTPoSfxHjsctAVpSItQ== X-Google-Smtp-Source: ACJfBouqzuMBTnORhL/U9gYuugBQFXrzZj/ENtt5ItrxEvxYCaheSC3tKM9LDMvVFRYiCF0XJaG7RA== X-Received: by 10.223.163.141 with SMTP id l13mr30336236wrb.136.1514457637407; Thu, 28 Dec 2017 02:40:37 -0800 (PST) Received: from localhost.localdomain (2a01cb0886107300797c3cdcf5680510.ipv6.abo.wanadoo.fr. [2a01:cb08:8610:7300:797c:3cdc:f568:510]) by smtp.gmail.com with ESMTPSA id q2sm13027084wma.19.2017.12.28.02.40.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 28 Dec 2017 02:40:36 -0800 (PST) From: "Yann E. MORIN" To: buildroot@buildroot.org Date: Thu, 28 Dec 2017 11:40:32 +0100 Message-Id: X-Mailer: git-send-email 2.11.0 In-Reply-To: References: Subject: [Buildroot] [PATCH 2/2 v2] fs: make it behave a bit more like the package infra X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.24 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "Yann E. MORIN" MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Currently, to register a filesystem, one has to call: $(eval $(call ROOTFS_TARGET,blabla)) This is very unlike the package infrastrucutre, where the name of the packagge os automatically guessed by the infra. It turns out that we can nowe do that for the filesystem infra too. Signed-off-by: "Yann E. MORIN" --- fs/axfs/axfs.mk | 2 +- fs/cloop/cloop.mk | 2 +- fs/common.mk | 7 +++---- fs/cpio/cpio.mk | 2 +- fs/cramfs/cramfs.mk | 2 +- fs/ext2/ext2.mk | 2 +- fs/iso9660/iso9660.mk | 2 +- fs/jffs2/jffs2.mk | 2 +- fs/romfs/romfs.mk | 2 +- fs/squashfs/squashfs.mk | 2 +- fs/tar/tar.mk | 2 +- fs/ubi/ubi.mk | 2 +- fs/ubifs/ubifs.mk | 2 +- fs/yaffs2/yaffs.mk | 2 +- 14 files changed, 16 insertions(+), 17 deletions(-) diff --git a/fs/axfs/axfs.mk b/fs/axfs/axfs.mk index 6c795d7062..4b93df55c0 100644 --- a/fs/axfs/axfs.mk +++ b/fs/axfs/axfs.mk @@ -10,4 +10,4 @@ define ROOTFS_AXFS_CMD $(HOST_DIR)/bin/mkfs.axfs -s -a $(TARGET_DIR) $@ endef -$(eval $(call ROOTFS_TARGET,axfs)) +$(eval $(rootfs)) diff --git a/fs/cloop/cloop.mk b/fs/cloop/cloop.mk index cbfc79b0d1..17749c5a3b 100644 --- a/fs/cloop/cloop.mk +++ b/fs/cloop/cloop.mk @@ -11,4 +11,4 @@ define ROOTFS_CLOOP_CMD $(HOST_DIR)/bin/create_compressed_fs - 65536 > $@ endef -$(eval $(call ROOTFS_TARGET,cloop)) +$(eval $(rootfs)) diff --git a/fs/common.mk b/fs/common.mk index b06e9b5597..98232f0b9f 100644 --- a/fs/common.mk +++ b/fs/common.mk @@ -37,7 +37,7 @@ ROOTFS_USERS_TABLES = $(call qstrip,$(BR2_ROOTFS_USERS_TABLES)) # Since this function will be called from within an $(eval ...) # all variable references except the arguments must be $$-quoted. -define ROOTFS_TARGET_INTERNAL +define inner-rootfs # extra deps ROOTFS_$(2)_DEPENDENCIES += host-fakeroot host-makedevs \ @@ -128,8 +128,7 @@ endif endef -define ROOTFS_TARGET - $(call ROOTFS_TARGET_INTERNAL,$(1),$(call UPPERCASE,$(1))) -endef +# $(pkgname) also works well to return the filesystem name +rootfs = $(call inner-rootfs,$(pkgname),$(call UPPERCASE,$(pkgname))) include $(sort $(wildcard fs/*/*.mk)) diff --git a/fs/cpio/cpio.mk b/fs/cpio/cpio.mk index c68e0bfb97..aa4d947fa5 100644 --- a/fs/cpio/cpio.mk +++ b/fs/cpio/cpio.mk @@ -40,4 +40,4 @@ endef ROOTFS_CPIO_POST_GEN_HOOKS += ROOTFS_CPIO_UBOOT_MKIMAGE endif -$(eval $(call ROOTFS_TARGET,cpio)) +$(eval $(rootfs)) diff --git a/fs/cramfs/cramfs.mk b/fs/cramfs/cramfs.mk index 85b98b8ccd..f880871935 100644 --- a/fs/cramfs/cramfs.mk +++ b/fs/cramfs/cramfs.mk @@ -16,4 +16,4 @@ endef ROOTFS_CRAMFS_DEPENDENCIES = host-cramfs -$(eval $(call ROOTFS_TARGET,cramfs)) +$(eval $(rootfs)) diff --git a/fs/ext2/ext2.mk b/fs/ext2/ext2.mk index 12b87a722c..6bb4b1c7f8 100644 --- a/fs/ext2/ext2.mk +++ b/fs/ext2/ext2.mk @@ -43,4 +43,4 @@ endef ROOTFS_EXT2_POST_GEN_HOOKS += ROOTFS_EXT2_SYMLINK endif -$(eval $(call ROOTFS_TARGET,ext2)) +$(eval $(rootfs)) diff --git a/fs/iso9660/iso9660.mk b/fs/iso9660/iso9660.mk index c2de27101a..ab11a393e1 100644 --- a/fs/iso9660/iso9660.mk +++ b/fs/iso9660/iso9660.mk @@ -128,4 +128,4 @@ endef ROOTFS_ISO9660_POST_GEN_HOOKS += ROOTFS_ISO9660_GEN_HYBRID endif -$(eval $(call ROOTFS_TARGET,iso9660)) +$(eval $(rootfs)) diff --git a/fs/jffs2/jffs2.mk b/fs/jffs2/jffs2.mk index 9a36a75ff4..740ab3e03d 100644 --- a/fs/jffs2/jffs2.mk +++ b/fs/jffs2/jffs2.mk @@ -49,4 +49,4 @@ define ROOTFS_JFFS2_CMD endef endif -$(eval $(call ROOTFS_TARGET,jffs2)) +$(eval $(rootfs)) diff --git a/fs/romfs/romfs.mk b/fs/romfs/romfs.mk index eded91df0a..163751b4e2 100644 --- a/fs/romfs/romfs.mk +++ b/fs/romfs/romfs.mk @@ -10,4 +10,4 @@ define ROOTFS_ROMFS_CMD $(HOST_DIR)/bin/genromfs -d $(TARGET_DIR) -f $@ endef -$(eval $(call ROOTFS_TARGET,romfs)) +$(eval $(rootfs)) diff --git a/fs/squashfs/squashfs.mk b/fs/squashfs/squashfs.mk index 7de7f51af1..51abd5d7d0 100644 --- a/fs/squashfs/squashfs.mk +++ b/fs/squashfs/squashfs.mk @@ -24,4 +24,4 @@ define ROOTFS_SQUASHFS_CMD $(HOST_DIR)/bin/mksquashfs $(TARGET_DIR) $@ $(ROOTFS_SQUASHFS_ARGS) endef -$(eval $(call ROOTFS_TARGET,squashfs)) +$(eval $(rootfs)) diff --git a/fs/tar/tar.mk b/fs/tar/tar.mk index 0e3eacbedf..e39c2fdbf1 100644 --- a/fs/tar/tar.mk +++ b/fs/tar/tar.mk @@ -11,4 +11,4 @@ define ROOTFS_TAR_CMD tar $(TAR_OPTS) -cf $@ --null --no-recursion -T - --numeric-owner) endef -$(eval $(call ROOTFS_TARGET,tar)) +$(eval $(rootfs)) diff --git a/fs/ubi/ubi.mk b/fs/ubi/ubi.mk index b71a555efb..c78feda5a3 100644 --- a/fs/ubi/ubi.mk +++ b/fs/ubi/ubi.mk @@ -29,4 +29,4 @@ define ROOTFS_UBI_CMD rm $(BUILD_DIR)/ubinize.cfg endef -$(eval $(call ROOTFS_TARGET,ubi)) +$(eval $(rootfs)) diff --git a/fs/ubifs/ubifs.mk b/fs/ubifs/ubifs.mk index 4f45acdc4a..2cfc397aca 100644 --- a/fs/ubifs/ubifs.mk +++ b/fs/ubifs/ubifs.mk @@ -27,4 +27,4 @@ define ROOTFS_UBIFS_CMD $(HOST_DIR)/sbin/mkfs.ubifs -d $(TARGET_DIR) $(UBIFS_OPTS) -o $@ endef -$(eval $(call ROOTFS_TARGET,ubifs)) +$(eval $(rootfs)) diff --git a/fs/yaffs2/yaffs.mk b/fs/yaffs2/yaffs.mk index 30570735fa..9cba27af70 100644 --- a/fs/yaffs2/yaffs.mk +++ b/fs/yaffs2/yaffs.mk @@ -10,4 +10,4 @@ define ROOTFS_YAFFS2_CMD $(HOST_DIR)/bin/mkyaffs2 --all-root $(TARGET_DIR) $@ endef -$(eval $(call ROOTFS_TARGET,yaffs2)) +$(eval $(rootfs))