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: 144650 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp4133838ljj; Mon, 20 Aug 2018 08:48:51 -0700 (PDT) X-Google-Smtp-Source: AA+uWPyw1DIPovnCKs3myD7QT9GEnqjHYU629Gf6tl+HCV9MJeUN3gvERUfeI5Afu5IF9Tvd9fk4 X-Received: by 2002:a17:902:d211:: with SMTP id t17-v6mr11318349ply.258.1534780130705; Mon, 20 Aug 2018 08:48:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1534780130; cv=none; d=google.com; s=arc-20160816; b=R2/iE+KBrSLYNJrcxL+Xy4tcxO/TG8eHW3+jUcjaQJQlJtL9AYPtzywKf3J/bt4LoU HUwBYwjwMedaa/dpO2mN1z5mh1/OkDstKDc/l/4QMKlDy8BYwqc4s9BQQZ+1BZgQ8bT0 VIz7ynIXBm1JqY2u1NllW3G54jK7wg4NSzuwyPrL0YwB6SjNjDz7j2dy1oLXVaJmaerl QHFF3iPDIC7/yhOuo92va17vbBnDsvn3meGBmO7JuJzJZZ5yfA5tQm7P9/6hVG7FwceH U41u6Ahske5WgXPtuLrpzh+b1msJlUsG4T9GtXyOvTDBGOv+TK1LsvkM3k0Ha8IVi8O5 cEhQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:dkim-filter:arc-authentication-results; bh=AssB2o4PwhUYh/pQhv8ezhCwShZXiJMfQFGSMqFsRf8=; b=QarUODwxpySvrV9fKzxnRleKH78Pww9Qwl2NDkCHkgqe9NjGystVxTnkc2H5tYRge2 SX8STuwteKNey7NNH/H4Z+Ku/DcBI1exp01J4FDz8hqkDIEPeryyKTvJKjr9a0I2WanV SfkD98F32x5EXd679Ip15rFlU2XT1MrmzF/pCdEbjEXiN7givS5SeN+in0R4/wuHIDHM yo4GNanYLKdN1nBW+BwJHBGnloDdazX5uIFHQbnja7FBGLaoptLURo3LNkqi0f2f1y8k aF5+5HRULLjEwCEcm2KcGafridskbkK6BhuKrAqPpZNmXYLFk7a+IeEsQuVuc5uk/yEG d60g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=Ij1wXBsI; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p1-v6si9763739plk.294.2018.08.20.08.48.50; Mon, 20 Aug 2018 08:48:50 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=Ij1wXBsI; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726655AbeHTTE4 (ORCPT + 32 others); 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: Andrzej Pietrasiewicz , Bj???rn Forsman , Masahiro Yamada , linux-doc@vger.kernel.org, Michael Forney , Jonathan Corbet , Philippe Ombredanne , Kate Stewart , Florian Fainelli , Greg Kroah-Hartman , linux-kernel@vger.kernel.org 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-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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%) -- 2.7.4 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