From patchwork Tue Dec 5 15:56:40 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Ripard X-Patchwork-Id: 120707 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp5918633qgn; Tue, 5 Dec 2017 07:59:13 -0800 (PST) X-Google-Smtp-Source: AGs4zMajTp/dvGICFtGgBaL0eJ2vPzmqQL7WD4USb8avVwl5LlEYD6Uc8X3UnoCCrx+1bhEBg+ex X-Received: by 10.80.169.134 with SMTP id n6mr36654633edc.44.1512489553400; Tue, 05 Dec 2017 07:59:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1512489553; cv=none; d=google.com; s=arc-20160816; b=oVMSVR6HUBDVbwj6hT9GwAJhq3aaoS8cQutEvmlnYD8XLKaLYeNKQsmdGfvmpOGXWv aBKDwaAn6qXa8L1zlm9kBMLUcBbi0u1SDVFfel7JhjsLcF2Drc5yBTjidHeim++Fm2w4 URzNFaYYsvsG3lyETHl6sHastmWdY431qP7/m6rxBJGLFUw7tAyhG+rsRuDbUaARqajB LRJ8ijgEl1gKtptj3eNGCi+LWGUh9vDKktWHGPTRjvCUoPSjexzQRTRx31GX9OMLi4jV mY9CYuvcBW+f6OuVnhOrOGaq5DpYl/AUCVoTVqB1gNQzc3QodGyezuxINRzUxaeQJfSY P++w== 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:references:in-reply-to:references :in-reply-to:message-id:date:to:from:arc-authentication-results; bh=KqXnjOUodix/hZ1e4vC0RyjP2rxQlI79LpdJ9JLK7+w=; b=jxXWBsN4BLG8h4eu2ky2uJNbRjMc2k7REKAdMRgnNmvhUw+Tqtu7t1cQhAekejmon1 GyUNWFmuCN0IRoQcyg/t4712RXvrDuFOmGoCueBwseEbjIqgJiuWiO7M9xbFcNG1CEW8 XjGGqXtvyszCLACH0+3KhRcubxtpSAH1khWBWXqWddPkZa7f/mtEKmoULww8L4NAOgil i8kNzYPAAdl7cpWkowyr4vV3A45Ou0mC8qC9DW2ddvkZeSXpZm5wYfHNp0Gu9BIvLJg2 ZNDCMUEkk2PRqX6fmY8kQAMzE2D5kvR41SeJP5DsTVZvmJ/SKbcL99k5twHbH7wH/w8A m6bw== 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 z15si460679eda.491.2017.12.05.07.59.13; Tue, 05 Dec 2017 07:59:13 -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 00225C220A4; Tue, 5 Dec 2017 15:57:52 +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 4AA91C21FEB; Tue, 5 Dec 2017 15:57:49 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id B80E9C21F89; Tue, 5 Dec 2017 15:57:07 +0000 (UTC) Received: from mail.free-electrons.com (mail.free-electrons.com [62.4.15.54]) by lists.denx.de (Postfix) with ESMTP id 7E32EC21FD0 for ; Tue, 5 Dec 2017 15:57:03 +0000 (UTC) Received: by mail.free-electrons.com (Postfix, from userid 110) id BFEB82055A; Tue, 5 Dec 2017 16:57:02 +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 04717207B1; Tue, 5 Dec 2017 16:56:45 +0100 (CET) From: Maxime Ripard To: Tom Rini Date: Tue, 5 Dec 2017 16:56:40 +0100 Message-Id: <03c9617e8dc759633a3300d8d16c13648d06d891.1512489372.git-series.maxime.ripard@free-electrons.com> X-Mailer: git-send-email 2.14.3 In-Reply-To: References: In-Reply-To: References: Cc: Andre Przywara , agraf@suse.de, u-boot@lists.denx.de, Maxime Ripard , Jagan Teki Subject: [U-Boot] [PATCH v2 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 Reviewed-by: Andre Przywara --- include/configs/sunxi-common.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h index 4391a8cbc824..786155f1e15e 100644 --- a/include/configs/sunxi-common.h +++ b/include/configs/sunxi-common.h @@ -493,6 +493,20 @@ extern int soft_i2c_gpio_scl; #define SUNXI_MTDPARTS_DEFAULT #endif +#define PARTS_DEFAULT \ + "name=loader1,start=8k,size=32k,uuid=${uuid_gpt_loader1};" \ + "name=loader2,size=984k,uuid=${uuid_gpt_loader2};" \ + "name=esp,size=128M,bootable,uuid=${uuid_gpt_esp};" \ + "name=system,size=-,uuid=${uuid_gpt_system};" + +#define UUID_GPT_ESP "c12a7328-f81f-11d2-ba4b-00a0c93ec93b" + +#ifdef CONFIG_ARM64 +#define UUID_GPT_SYSTEM "b921b045-1df0-41c3-af44-4c6f280d3fae" +#else +#define UUID_GPT_SYSTEM "69dad710-2ce4-4e3c-b16c-21a1d49abed3" +#endif + #define CONSOLE_ENV_SETTINGS \ CONSOLE_STDIN_SETTINGS \ CONSOLE_STDOUT_SETTINGS @@ -511,6 +525,9 @@ extern int soft_i2c_gpio_scl; "console=ttyS0,115200\0" \ SUNXI_MTDIDS_DEFAULT \ SUNXI_MTDPARTS_DEFAULT \ + "uuid_gpt_esp=" UUID_GPT_ESP "\0" \ + "uuid_gpt_system=" UUID_GPT_SYSTEM "\0" \ + "partitions=" PARTS_DEFAULT "\0" \ BOOTCMD_SUNXI_COMPAT \ BOOTENV