From patchwork Tue Nov 28 10:34:37 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Ripard X-Patchwork-Id: 119832 Delivered-To: patch@linaro.org Received: by 10.80.225.132 with SMTP id k4csp2918865edl; Tue, 28 Nov 2017 02:38:39 -0800 (PST) X-Google-Smtp-Source: AGs4zMZ7XdKhbhuBtGRWhV9xrnxIDwYaAAwLhyljoar4gWohmDUaSwDnJ8P679w6al/GKf4RHNpe X-Received: by 10.80.179.248 with SMTP id t53mr1904114edd.267.1511865519162; Tue, 28 Nov 2017 02:38:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511865519; cv=none; d=google.com; s=arc-20160816; b=NOVepjh2rZeD/37AGIdDw9VO3Lz+QuINZeAzj6mgBE9KwhvDri5rMT3MgiiUS48RB8 7CrFnRYgUfgC+JgZXd7vMPtXrfRgmTf8RoAo9m6CgxVqLi0bynWCMpEnRr6dayWf7P+h R4skSY39nC9ixov1oK4ycvta/na9giGVrcTvD+ISbfnu8+l2/jFJ3dOoCVdHaaYHO0Z/ WPRgdkdS1L8D4kt5ynQLiLXx3+2hqYN2olS6AjwH0xa+xYqxvHEkjZ4niNFYDR/6l3HW ggieLRvuR9H1KCzwPfAeHkLVaaG2Mks17giXSeUDKd9M/qvm+KchwQ1opnv5HfL+ISxf i+5A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:cc:message-id:date:to:from :arc-authentication-results; bh=JK07LV5Z3d8C7jEzZTudRy7jfwksWHAb/sibkbbU3vE=; b=Z5M3qernqo1sPWGKZKoLyhBqP1gg09kgYhOd3yGsR5RBtJZVR6Gd95niKF70x/MeNX UHtrhxMG4AKVFSlJhP7rZiXbu5JNEbtkvXI/HmeOoE22uu0B+lf6Xjf7uBMYl2XVsA9E YE0zfJ4ZWPfLaGfczYlInOFVSgL5Lm/eASJ7k828BHNAd66OrGoLZK6ahjusxMRT5GVR dDTD8/Os1bWh9w7m53/Sx4OxOgvONuivVASaOLV20zsdvjm28asxcUUSG4XRrwpjll6r fN9piU1LH9o0L/q91Q0SEsHXfYop1yLzqzEJWXHOc0EtCWREiXOWjUDM9kVv41Qlw6gb 0WFA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de Return-Path: Received: from lists.denx.de (dione.denx.de. [81.169.180.215]) by mx.google.com with ESMTP id h59si4072494edd.454.2017.11.28.02.38.38; Tue, 28 Nov 2017 02:38:39 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) client-ip=81.169.180.215; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by lists.denx.de (Postfix, from userid 105) id C1512C21E32; Tue, 28 Nov 2017 10:37:10 +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=0.0 required=5.0 tests=none 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 CAA3DC21E88; Tue, 28 Nov 2017 10:36:56 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id A1E17C21E40; Tue, 28 Nov 2017 10:34:43 +0000 (UTC) Received: from mail.free-electrons.com (mail.free-electrons.com [62.4.15.54]) by lists.denx.de (Postfix) with ESMTP id 575E6C21E0C for ; Tue, 28 Nov 2017 10:34:43 +0000 (UTC) Received: by mail.free-electrons.com (Postfix, from userid 110) id 9F263203B5; Tue, 28 Nov 2017 11:34:42 +0100 (CET) Received: from localhost (LStLambert-657-1-97-87.w90-63.abo.wanadoo.fr [90.63.216.87]) by mail.free-electrons.com (Postfix) with ESMTPSA id 5BAB420389; Tue, 28 Nov 2017 11:34:42 +0100 (CET) From: Maxime Ripard To: Tom Rini Date: Tue, 28 Nov 2017 11:34:37 +0100 Message-Id: X-Mailer: git-send-email 2.14.3 Cc: Andre Przywara , agraf@suse.de, u-boot@lists.denx.de, Maxime Ripard , Jagan Teki Subject: [U-Boot] [PATCH 0/4] sunxi: Ease eMMC usage and flashing 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: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Hi, Here is a set of patches that have been sitting in some variations for quite some time now. This is mostly to ease the eMMC (and MMC, to some extent) flashing using fastboot that in turn rely on GPT. The Allwinner SoCs need to have the SPL located right in the middle of a traditional GPT, at 8kB. To deal with this, we would basically have two options: - Use the already in-tree solution to move the partition entries to another arbitrary offset in the MMC. - Use a smaller number of partitions entries Both are non-standards, but are dealt with nicely by the regular tools and users (at least on a Linux system). However, the first solution is quite confusing for users (that needs to be aware where the partitions will be), might be less flexible because not all tools will allow to create partitions for things between the GPT main entry and the partition entries, and might confuse tools if such a setup is available. In our case, using the first solution, gdisk will for example refuse to create a partition for the SPL. The second solution though seems to be well handled by all the tools, and just feels the same, except that you end up with a smaller number of partitions. In our case, that number is 56 partitions (16 sectors before the SPL, 1 sector for the protective MBR, 1 sector for the GPT header, and 4 partition entries per sector) instead of 128, which doesn't sound very impractical either. The two first patches deal with that. We then provide a default partitionning scheme. I'd like feedback on that one. I appreciate that having a good default in such a case, but I'd like to have a reasonably simple layout that works good enough to install a distro. I'm a bit short on background on what an EFI partition is supposed to look like, and what a good size would be. I'd really like some input on this. Finally, we enable fastboot flashing to be able to flash a pristine system just by using FEL, fastboot oem format, and then fastboot flash for the various components. Let me know what you think, Maxime Changes from v1: - Changed the boot partition name to ESP - Used default UUID for the rootfs and esp partitions Maxime Ripard (4): part: efi: Add a Kconfig option for the number of partition entries part: efi: Add default number of partition entries for sunxi sunxi: Add default partition scheme fastboot: Enable flashing by default on sunxi cmd/fastboot/Kconfig | 1 + disk/Kconfig | 14 ++++++++++++++ include/configs/sunxi-common.h | 9 +++++++++ include/part_efi.h | 2 +- 4 files changed, 25 insertions(+), 1 deletion(-) base-commit: c253573f3e269fd9a24ee6684d87dd91106018a5