From patchwork Fri Aug 11 19:22:52 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Pitre X-Patchwork-Id: 109925 Delivered-To: patch@linaro.org Received: by 10.140.95.78 with SMTP id h72csp1340964qge; Fri, 11 Aug 2017 12:32:09 -0700 (PDT) X-Received: by 10.84.237.2 with SMTP id s2mr18529448plk.70.1502479929880; Fri, 11 Aug 2017 12:32:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1502479929; cv=none; d=google.com; s=arc-20160816; b=vgWlmCHvTb2nW5Bk0gSO6z7m8UlNRqTW8Jak7hGZ+9iwoLcGmTa8N51zumyLpXRhRn 9IpcwUuJ2NVJSLbxkzoN3SDGCvf20IDKtyG4hox01uJilmWFjIKMlW7gam4vhzt2fUhd hHHpQ/klqcCg08T8nrsizezBCZmaSMc/xqaYrNEt4zbu83J5hDAVl/BJO0aZHDpAeeaI Zk4VT0szqI5xmLRqyGNX67bUX5C/ZrsDofARbwZ6kWCmMeCJ8+Ee6sKRcMOwNAoKsbcx +YTDeqW3h1ZuAySpUFyGwhdQng97oFyogQjrFYcWUxUA3mFWW7MWl+LvIwwlJ66GNC1m W/Zg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=0PIbmuDYFJ1tbRN1x35uh8SWe7ImlXQXwY26yt0Uwfo=; b=HTO+lbg1PCJgWagp6RL4r3nKXHmEdFXyAebBmTbPC6nUs1g42+HLjmQalnbgeI+JPl 59VODQAFM+5Rqkz9z6ftNLavEonHn9BshLeVAlhp/0Tl2WZzHTcrAVttRAf+q9on97VZ GI9o4aOO+FtfS1iZ4Ht2G3WkpKmf0aPCI8SbanCayEHGqU4aouRm7wW8o2dd1LMV4DJo m00mpNbT+LssatP0Ch4osH+lduz+Fa3+XORdgIMo7GEc0TQuEprE3wFTEF6W7/t62wrx g+XgrDKNUnFYmoChcb66iUCoiSGIR77YzpXliVLqsOqzuU6F6vcxVrTQf7tUXCvbabsW vwoA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@pobox.com header.s=sasl header.b=R2NYSel+; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l62si907543pfa.56.2017.08.11.12.32.09; Fri, 11 Aug 2017 12:32:09 -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=@pobox.com header.s=sasl header.b=R2NYSel+; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753690AbdHKTa7 (ORCPT + 25 others); Fri, 11 Aug 2017 15:30:59 -0400 Received: from pb-smtp2.pobox.com ([64.147.108.71]:59658 "EHLO sasl.smtp.pobox.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753181AbdHKTa5 (ORCPT ); Fri, 11 Aug 2017 15:30:57 -0400 X-Greylist: delayed 474 seconds by postgrey-1.27 at vger.kernel.org; Fri, 11 Aug 2017 15:30:56 EDT Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by pb-smtp2.pobox.com (Postfix) with ESMTP id 3AA05A426B; Fri, 11 Aug 2017 15:23:02 -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=VHSG cnoZBCAQ5jaB4wDrffQDCv4=; b=R2NYSel+FjXWzpetvz6Ct8LFJCDSsjDHYygy K7YU+k/L5pj04mMXyxdekQdGg/9RT8lyxD5bdkBt/yz6nOTBJT3v+wJlEzdSfoeu Wg+YXZD+bLY88ecg1BeDlyThX9V3yp8H0UUHksD/6piwri5DxnTnz+vW0Ckiihmg YQStVZM= Received: from pb-smtp2.nyi.icgroup.com (unknown [127.0.0.1]) by pb-smtp2.pobox.com (Postfix) with ESMTP id 2BCB2A426A; Fri, 11 Aug 2017 15:23:02 -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 5EC21A4262; Fri, 11 Aug 2017 15:23:01 -0400 (EDT) Received: from xanadu.home (xanadu.home [192.168.2.2]) by yoda.home (Postfix) with ESMTP id BD70C2DA06C6; 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 5/5] cramfs: rehabilitate it Date: Fri, 11 Aug 2017 15:22:52 -0400 Message-Id: <20170811192252.19062-6-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: 7D9D4360-7ECA-11E7-BAA9-9D2B0D78B957-78420484!pb-smtp2.pobox.com Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Update documentation, pointer to latest tools, appoint myself as maintainer. Given it's been unloved for so long, I don't expect anyone will protest. Signed-off-by: Nicolas Pitre --- Documentation/filesystems/cramfs.txt | 35 +++++++++++++++++++++++++++++++++++ MAINTAINERS | 4 ++-- fs/cramfs/Kconfig | 9 ++++++--- 3 files changed, 43 insertions(+), 5 deletions(-) -- 2.9.4 diff --git a/Documentation/filesystems/cramfs.txt b/Documentation/filesystems/cramfs.txt index 4006298f67..5955c23bac 100644 --- a/Documentation/filesystems/cramfs.txt +++ b/Documentation/filesystems/cramfs.txt @@ -45,6 +45,41 @@ you can just change the #define in mkcramfs.c, so long as you don't mind the filesystem becoming unreadable to future kernels. +Memory Mapped cramfs image +-------------------------- + +The CRAMFS_PHYSMEM Kconfig option adds support for loading data directly +from a physical linear memory range (usually non volatile memory like Flash) +to cramfs instead of going through the block device layer. This saves some +memory since no intermediate buffering is necessary to hold the data before +decompressing. + +And when data blocks are kept uncompressed and properly aligned, they will +automatically be mapped directly into user space whenever possible providing +eXecute-In-Place (XIP) from ROM of read-only segments. Data segments mapped +read-write (hence they have to be copied to RAM) may still be compressed in +the cramfs image in the same file along with non compressed read-only +segments. Both MMU and no-MMU systems are supported. This is particularly +handy for tiny embedded systems with very tight memory constraints. + +The filesystem type for this feature is "cramfs_physmem" to distinguish it +from the block device (or MTD) based access. The location of the cramfs +image in memory is system dependent. You must know the proper physical +address where the cramfs image is located and specify it using the +physaddr=0x******** mount option (for example: + +$ mount -t cramfs_physmem -o physaddr=0x80100000 none /mnt + + +Tools +----- + +A version of mkcramfs that can take advantage of the latest capabilities +described above can be found here: + +https://github.com/npitre/cramfs-tools + + For /usr/share/magic -------------------- diff --git a/MAINTAINERS b/MAINTAINERS index 44cb004c76..12f8155cfe 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -3612,8 +3612,8 @@ F: drivers/cpuidle/* F: include/linux/cpuidle.h CRAMFS FILESYSTEM -W: http://sourceforge.net/projects/cramfs/ -S: Orphan / Obsolete +M: Nicolas Pitre +S: Maintained F: Documentation/filesystems/cramfs.txt F: fs/cramfs/ diff --git a/fs/cramfs/Kconfig b/fs/cramfs/Kconfig index 5eed4ad2d5..8ed27e41bd 100644 --- a/fs/cramfs/Kconfig +++ b/fs/cramfs/Kconfig @@ -1,5 +1,5 @@ config CRAMFS - tristate "Compressed ROM file system support (cramfs) (OBSOLETE)" + tristate "Compressed ROM file system support (cramfs)" select ZLIB_INFLATE help Saying Y here includes support for CramFs (Compressed ROM File @@ -15,8 +15,11 @@ config CRAMFS cramfs. Note that the root file system (the one containing the directory /) cannot be compiled as a module. - This filesystem is obsoleted by SquashFS, which is much better - in terms of performance and features. + This filesystem is limited in capabilities and performance on + purpose to remain small and low on RAM usage. It is most suitable + for small embedded systems. For a more capable compressed filesystem + you should look at SquashFS which is much better in terms of + performance and features. If unsure, say N.