From patchwork Wed Nov 15 10:11:50 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Ripard X-Patchwork-Id: 838133 X-Patchwork-Delegate: trini@ti.com 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=) Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 3ycKxH2dcHz9s0g for ; Wed, 15 Nov 2017 21:14:43 +1100 (AEDT) Received: by lists.denx.de (Postfix, from userid 105) id 0796CC21C29; Wed, 15 Nov 2017 10:13:22 +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 5B3F2C21DA5; Wed, 15 Nov 2017 10:12:47 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 64297C21DB9; Wed, 15 Nov 2017 10:12:20 +0000 (UTC) Received: from mail.free-electrons.com (mail.free-electrons.com [62.4.15.54]) by lists.denx.de (Postfix) with ESMTP id 3F80FC21D80 for ; Wed, 15 Nov 2017 10:12:16 +0000 (UTC) Received: by mail.free-electrons.com (Postfix, from userid 110) id 3347B2037B; Wed, 15 Nov 2017 11:12:15 +0100 (CET) Received: from localhost (unknown [185.94.189.188]) by mail.free-electrons.com (Postfix) with ESMTPSA id 16C7D20DD4; Wed, 15 Nov 2017 11:11:55 +0100 (CET) From: Maxime Ripard To: Tom Rini Date: Wed, 15 Nov 2017 11:11:50 +0100 Message-Id: <20171115101151.11382-4-maxime.ripard@free-electrons.com> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20171115101151.11382-1-maxime.ripard@free-electrons.com> References: <20171115101151.11382-1-maxime.ripard@free-electrons.com> Cc: Andre Przywara , agraf@suse.de, u-boot@lists.denx.de, Maxime Ripard , Jagan Teki Subject: [U-Boot] [PATCH 3/4] sunxi: Add default partition scheme 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" The partitions variable is especially useful to create a partition table from U-Boot, either directly from the U-Boot shell, or through flashing tools like fastboot and its oem format command. This is especially useful on devices with an eMMC you can't take out to flash from another system, and booting a Linux system first to flash our system then is not really practical. Signed-off-by: Maxime Ripard --- include/configs/sunxi-common.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h index 4391a8cbc824..11da6ccfbf54 100644 --- a/include/configs/sunxi-common.h +++ b/include/configs/sunxi-common.h @@ -493,6 +493,12 @@ extern int soft_i2c_gpio_scl; #define SUNXI_MTDPARTS_DEFAULT #endif +#define PARTS_DEFAULT \ + "name=loader1,start=8k,size=32k;" \ + "name=loader2,size=984k;" \ + "name=boot,size=128M,bootable;" \ + "name=system,size=-;" + #define CONSOLE_ENV_SETTINGS \ CONSOLE_STDIN_SETTINGS \ CONSOLE_STDOUT_SETTINGS @@ -511,6 +517,7 @@ extern int soft_i2c_gpio_scl; "console=ttyS0,115200\0" \ SUNXI_MTDIDS_DEFAULT \ SUNXI_MTDPARTS_DEFAULT \ + "partitions=" PARTS_DEFAULT "\0" \ BOOTCMD_SUNXI_COMPAT \ BOOTENV