From patchwork Sun Sep 3 15:00:22 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Marek_Beh=C3=BAn?= X-Patchwork-Id: 809308 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; secure) header.d=nic.cz header.i=@nic.cz header.b="ZQhgoZyK"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 3xlbnf0TDCz9t2y for ; Mon, 4 Sep 2017 01:03:02 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id B25B5C21E8C; Sun, 3 Sep 2017 15:01:58 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=-5.0 required=5.0 tests=RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 3BC54C21E1C; Sun, 3 Sep 2017 15:01:36 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 9DAB5C21DBD; Sun, 3 Sep 2017 15:01:33 +0000 (UTC) Received: from mail.nic.cz (mail.nic.cz [217.31.204.67]) by lists.denx.de (Postfix) with ESMTPS id 3BADDC21C4F for ; Sun, 3 Sep 2017 15:01:33 +0000 (UTC) Received: from dellmb.labs.office.nic.cz (unknown [IPv6:2001:1488:fffe:6:8982:ed8c:62b1:c0c8]) by mail.nic.cz (Postfix) with ESMTP id D41D96178F; Sun, 3 Sep 2017 17:01:32 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=nic.cz; s=default; t=1504450892; bh=48fwLr/9X5xIL9VPFdTa/PwcLJCUM1qUs+K7JSOttFk=; h=From:To:Date; b=ZQhgoZyKdUSUxRZVaTzycoaYc+3wSQkkg6WdVFj8K1N9MZjKICRW4nz8FrNwnsdNh HgFYFF//P7N+aJCSU+hI/bdQgT4n/l/6jMkph1XEoHGjmc3qe6WHBuitXMav7NmV1H oLAkgKEddlaATBsOWUDZ6PSsKdBvTXmr++Zm1IPk= From: =?utf-8?q?Marek_Beh=C3=BAn?= To: u-boot@lists.denx.de Date: Sun, 3 Sep 2017 17:00:22 +0200 Message-Id: <20170903150031.18179-1-marek.behun@nic.cz> X-Mailer: git-send-email 2.13.5 MIME-Version: 1.0 X-Virus-Scanned: clamav-milter 0.99.2 at mail X-Virus-Status: Clean Cc: Tomas Hlavacek , Stefan Roese , =?utf-8?q?Andreas_F=C3=A4rber?= Subject: [U-Boot] [PATCH 0/9] Add single-device read-only BTRFS support X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" This is the first version of patches for adding a single-device read-only BTRFS support to U-Boot. Compression (zlib/lzo) is supported. Data checksumming is unimplemented. The code was tested on the Turris Omnia router, where BTRFS is used as the main filesystem from which kernel and device-tree are loaded. The first patch adds the CRC32-C hash routine. The second patch generalizes the ext4fs_devread, reiserfs_devread and zfs_devread functions into one fs_devread and puts it into fs/fs_internal.c. The third patch creates a header variadic-macro.h containing a variadic macro CALL_MACRO_FOR_EACH, which expands to a call to the macro specified by the first argument to all its subsequent arguments. This is used in my code for defining functions to convert the BTRFS data structures to/from CPU/disk format. The fourth patch adds the btrfs_tree.h and ctree.h files containing constants and structures definitions for BTRFS from Linux. The fifth patch adds the code for conversion of BTRFS data structures to/from CPU/disk format. The sixth patch adds the proper BTRFS code. The seventh patch adds U-Boot fs handlers. The eighth patch adds the 'btrsubvol' command to list BTRFS subvolumes. The nineth patch adds CONFIG_CMD_BTRFS into the defconfig for Turris Omnia. Tested-by: Marek Behun Signed-off-by: Marek Behun