From patchwork Fri Aug 11 19:22:49 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Pitre X-Patchwork-Id: 9896471 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 9CA7A603F2 for ; Fri, 11 Aug 2017 19:32:02 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 91D8628CD3 for ; Fri, 11 Aug 2017 19:32:02 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 852EB28CD2; Fri, 11 Aug 2017 19:32:02 +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=-6.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_HI autolearn=unavailable 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 8CCC628CD7 for ; Fri, 11 Aug 2017 19:32:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753742AbdHKTbA (ORCPT ); Fri, 11 Aug 2017 15:31:00 -0400 Received: from pb-smtp2.pobox.com ([64.147.108.71]:58929 "EHLO sasl.smtp.pobox.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753401AbdHKTa5 (ORCPT ); Fri, 11 Aug 2017 15:30:57 -0400 Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by pb-smtp2.pobox.com (Postfix) with ESMTP id CD4E2A4267; Fri, 11 Aug 2017 15:23:01 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=from:to:cc :subject:date:message-id:in-reply-to:references; s=sasl; bh=Kzk1 NoZ34grNpdHOoyv80jv8ttk=; b=Y1ii0t1GS1rEDUp+4tBwBzWdT4CMTJ1WgyWC JMZHMXAiFIeWtggheoWmmYefeJtIYKYFJbP0MctlTrawxZMt2snZzqmkbFb+6A4o FEXGtBVYL3oy7Pu8KDM48Qaxwpu2ItmmtfEQ9SN/BwZ2Kw68ekTHfXXVfaeEZDcw 9GB4VH8= Received: from pb-smtp2.nyi.icgroup.com (unknown [127.0.0.1]) by pb-smtp2.pobox.com (Postfix) with ESMTP id 5EBC5A4261; Fri, 11 Aug 2017 15:23:01 -0400 (EDT) Received: from yoda.home (unknown [96.23.157.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pb-smtp2.pobox.com (Postfix) with ESMTPSA id 203A4A4258; Fri, 11 Aug 2017 15:23:00 -0400 (EDT) Received: from xanadu.home (xanadu.home [192.168.2.2]) by yoda.home (Postfix) with ESMTP id 7A6082DA0679; Fri, 11 Aug 2017 15:22:59 -0400 (EDT) From: Nicolas Pitre To: Alexander Viro Cc: linux-fsdevel@vger.kernel.org, linux-embedded@vger.kernel.org, linux-kernel@vger.kernel.org, Chris Brandt Subject: [PATCH 2/5] cramfs: make cramfs_physmem usable as root fs Date: Fri, 11 Aug 2017 15:22:49 -0400 Message-Id: <20170811192252.19062-3-nicolas.pitre@linaro.org> X-Mailer: git-send-email 2.9.4 In-Reply-To: <20170811192252.19062-1-nicolas.pitre@linaro.org> References: <20170811192252.19062-1-nicolas.pitre@linaro.org> X-Pobox-Relay-ID: 7CDD8764-7ECA-11E7-BCC6-9D2B0D78B957-78420484!pb-smtp2.pobox.com Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Nicolas Pitre --- init/do_mounts.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/init/do_mounts.c b/init/do_mounts.c index c2de5104aa..43b5817f60 100644 --- a/init/do_mounts.c +++ b/init/do_mounts.c @@ -556,6 +556,14 @@ void __init prepare_namespace(void) ssleep(root_delay); } + if (IS_ENABLED(CONFIG_CRAMFS_PHYSMEM) && root_fs_names && + !strcmp(root_fs_names, "cramfs_physmem")) { + int err = do_mount_root("cramfs", "cramfs_physmem", + root_mountflags, root_mount_data); + if (!err) + goto out; + } + /* * wait for the known devices to complete their probing *