From patchwork Mon Aug 20 15:47:07 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 10570517 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 69F711390 for ; Mon, 20 Aug 2018 15:48:54 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5A605296CC for ; Mon, 20 Aug 2018 15:48:54 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4DEB5296DF; Mon, 20 Aug 2018 15:48:54 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A1268296CC for ; Mon, 20 Aug 2018 15:48:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726604AbeHTTE4 (ORCPT ); Mon, 20 Aug 2018 15:04:56 -0400 Received: from conuserg-12.nifty.com ([210.131.2.79]:31339 "EHLO conuserg-12.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726024AbeHTTE4 (ORCPT ); Mon, 20 Aug 2018 15:04:56 -0400 Received: from grover.tkatk1.zaq.ne.jp (zaqdadce369.zaq.ne.jp [218.220.227.105]) (authenticated) by conuserg-12.nifty.com with ESMTP id w7KFlQR4005997; Tue, 21 Aug 2018 00:47:26 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-12.nifty.com w7KFlQR4005997 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1534780047; bh=AssB2o4PwhUYh/pQhv8ezhCwShZXiJMfQFGSMqFsRf8=; h=From:To:Cc:Subject:Date:From; b=Ij1wXBsI7hM+odlggzOKSo8NsHIJEotSMwhZzuaxKRTezsOUejPsdhPih14svUbgB nNaxot0UwW3GaGq1Rmtw70npT27XT9TFSTU6VNRYZLdUI5/mdihlTJ/zr1dVV/3yYT rtoUdmV9C0dWJL0tGvKcFZmI+cO/ZGBUPi/+1bZruhwQpQ9hYiVQzZ/D28O5ee74tk 1LwLzS2T8fIegOyL9Oxxx5fIxUaHtVbAOvXkZqsqM2eYoOMyvZxopFLK015QacVEEi 3erzRePaX+d08/i4Ou1khnh+X6/IeUj/NGEh1kMdKe+Yuz/uyJL7RyI1+0me4s+qt/ H2ODzlCoUDcCw== X-Nifty-SrcIP: [218.220.227.105] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: =?unknown-8bit?q?Andrzej_Pietrasiewicz_=3Candrzej=2Ep=40samsung=2Ecom=3E?= =?unknown-8bit?q?=2C_Bj=8F=A9=CCrn_Forsman__=3Cbjorn=2Eforsman=40gmail=2Eco?= =?unknown-8bit?q?m=3E=2C_Masahiro_Yamada_=3Cyamada=2Emasahiro=40socionext?= =?unknown-8bit?q?=2Ecom=3E=2C_linux-doc=40vger=2Ekernel=2Eorg=2C_Michael_Fo?= =?unknown-8bit?q?rney_=3Cforney=40google=2Ecom=3E=2C_Jonathan_Corbet_=3Ccor?= =?unknown-8bit?q?bet=40lwn=2Enet=3E=2C_Philippe_Ombredanne_=3Cpombredanne?= =?unknown-8bit?q?=40nexb=2Ecom=3E=2C_Kate_Stewart_=3Ckstewart=40linuxfounda?= =?unknown-8bit?q?tion=2Eorg=3E=2C_Florian_Fainelli_=3Cf=2Efainelli=40gmail?= =?unknown-8bit?q?=2Ecom=3E=2C_Greg_Kroah-Hartman_=3Cgregkh=40linuxfoundatio?= =?unknown-8bit?q?n=2Eorg=3E=2C_linux-kernel=40vger=2Ekernel=2Eorg?= Subject: [PATCH] initramfs: move gen_initramfs_list.sh from scripts/ to usr/ Date: Tue, 21 Aug 2018 00:47:07 +0900 Message-Id: <1534780028-6479-1-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP scripts/gen_initramfs_list.sh is only invoked from usr/Makefile. Move it so that all tools to create initramfs are self-contained in the usr/ directory. Signed-off-by: Masahiro Yamada --- Documentation/early-userspace/README | 6 +++--- Documentation/filesystems/ramfs-rootfs-initramfs.txt | 2 +- usr/Makefile | 2 +- {scripts => usr}/gen_initramfs_list.sh | 0 4 files changed, 5 insertions(+), 5 deletions(-) rename {scripts => usr}/gen_initramfs_list.sh (100%) diff --git a/Documentation/early-userspace/README b/Documentation/early-userspace/README index 2c00b07..1e10579 100644 --- a/Documentation/early-userspace/README +++ b/Documentation/early-userspace/README @@ -66,17 +66,17 @@ early userspace image can be built by an unprivileged user. As a technical note, when directories and files are specified, the entire CONFIG_INITRAMFS_SOURCE is passed to -scripts/gen_initramfs_list.sh. This means that CONFIG_INITRAMFS_SOURCE +usr/gen_initramfs_list.sh. This means that CONFIG_INITRAMFS_SOURCE can really be interpreted as any legal argument to gen_initramfs_list.sh. If a directory is specified as an argument then the contents are scanned, uid/gid translation is performed, and usr/gen_init_cpio file directives are output. If a directory is -specified as an argument to scripts/gen_initramfs_list.sh then the +specified as an argument to usr/gen_initramfs_list.sh then the contents of the file are simply copied to the output. All of the output directives from directory scanning and file contents copying are processed by usr/gen_init_cpio. -See also 'scripts/gen_initramfs_list.sh -h'. +See also 'usr/gen_initramfs_list.sh -h'. Where's this all leading? ========================= diff --git a/Documentation/filesystems/ramfs-rootfs-initramfs.txt b/Documentation/filesystems/ramfs-rootfs-initramfs.txt index b176928..79637d2 100644 --- a/Documentation/filesystems/ramfs-rootfs-initramfs.txt +++ b/Documentation/filesystems/ramfs-rootfs-initramfs.txt @@ -164,7 +164,7 @@ Documentation/early-userspace/README for more details.) The kernel does not depend on external cpio tools. If you specify a directory instead of a configuration file, the kernel's build infrastructure creates a configuration file from that directory (usr/Makefile calls -scripts/gen_initramfs_list.sh), and proceeds to package up that directory +usr/gen_initramfs_list.sh), and proceeds to package up that directory using the config file (by feeding it to usr/gen_init_cpio, which is created from usr/gen_init_cpio.c). The kernel's build-time cpio creation code is entirely self-contained, and the kernel's boot-time extractor is also diff --git a/usr/Makefile b/usr/Makefile index 237a028..748f6a6 100644 --- a/usr/Makefile +++ b/usr/Makefile @@ -24,7 +24,7 @@ $(obj)/initramfs_data.o: $(obj)/$(datafile_y) FORCE # Generate the initramfs cpio archive hostprogs-y := gen_init_cpio -initramfs := $(CONFIG_SHELL) $(srctree)/scripts/gen_initramfs_list.sh +initramfs := $(CONFIG_SHELL) $(srctree)/$(src)/gen_initramfs_list.sh ramfs-input := $(if $(filter-out "",$(CONFIG_INITRAMFS_SOURCE)), \ $(shell echo $(CONFIG_INITRAMFS_SOURCE)),-d) ramfs-args := \ diff --git a/scripts/gen_initramfs_list.sh b/usr/gen_initramfs_list.sh similarity index 100% rename from scripts/gen_initramfs_list.sh rename to usr/gen_initramfs_list.sh