From patchwork Tue Apr 7 09:26:50 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 1069 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pg1-f200.google.com (mail-pg1-f200.google.com [209.85.215.200]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id E51E03F032 for ; Tue, 7 Apr 2020 11:27:08 +0200 (CEST) Received: by mail-pg1-f200.google.com with SMTP id 189sf1965474pgb.10 for ; Tue, 07 Apr 2020 02:27:08 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1586251627; cv=pass; d=google.com; s=arc-20160816; b=ydTnV7IR510qrdDHq0ZF07Jl92Y+fxYL9XhJEN2MC4/v+yUlJos/Q/O5jMPeDLT4OZ vQAiS1lrngd4aKhiE5cbUDPadwcMIZ95T4Bdw+jRRO4AsztYjBB2VEaE9byrGWuHQZU5 s0B3G7v6rlcJE4z7U5dDVSmdLYykNBf0ch/F8RaMTQXDoc28qCnY7XLQAbZmE7Ain1CV X0JWcOUZSeSB4eqke2El+Zo/dbt/Fw73pg6QTmlLRockD5elZCUz5BM9CBiYd7/RxHfj 4/BiUfhIRVCMGMIkjJxacmRYL611w7fsrl829dnboEELptz0Pc1czg01xBKXv3DYW8Fo SKTQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:message-id:date:subject:cc:to:from :mime-version:dkim-signature; bh=r+BYziS6/9laUnYW2mOoeZl7p3Q2gRvU/5uDJv4BWTQ=; b=xFZ2hxUBqfbW8wjvdc8CLaL3hLsgDiTqw6kRo7gxkV/fI0uKsEsJ1oIuYjzTK0U9Mk 8AGrfkoLXeEAXzxnqA/Xp9YRWdHumV2UPPoTZQ/WqjdwGuvzCYwpkYxLo87SuGCrFAls VY1kBJ3NLm59bREutUWU+1spX+hK4V1OpJ3gPlto2KgNfZKDcbEsg/1HT2Vaw0A+UX5X gsDUH1xreLhBQ0PJjgVVYcqx/xQHypdAXTZ0LnxnO2gUrpuEHHJ1aHDI6Dcqs8/UjrJY c3WJ+ixA4vWA7XS53cD/3WNJi2hLhh8t9kqNFcCOP8O4XA5MX01shY4fwM4IHBovYywE q1+g== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=YZKDeVRS; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=mime-version:from:to:cc:subject:date:message-id:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=r+BYziS6/9laUnYW2mOoeZl7p3Q2gRvU/5uDJv4BWTQ=; b=f8jGBIbu0ieQjfud5B0FQXUsUGitW7kX8ixQCupOBXC1tCj8tpNhF0jKm6bjTGFKIs uo+zHxpAl8kVTEGIBOiJ3iAHUjTNOpZmh0jft8gNMDmfURFqDiEqQ/kPwog13lBXpxrv Es9sIW3iDdXPZ1cxMBUcpMbkX8T/XW3XygdFE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:to:cc:subject:date:message-id :x-original-sender:x-original-authentication-results:precedence :mailing-list:list-id:x-spam-checked-in-group:list-post:list-help :list-archive:list-unsubscribe; bh=r+BYziS6/9laUnYW2mOoeZl7p3Q2gRvU/5uDJv4BWTQ=; b=oxVRJ+V4j+s8HMQPPK3fp4I3RBu3Jj23jJgKtivYplaibibqvVC6pYj5n+FPaxzZgy oWy977D/UHj9lvKyw5bWUyrgSbS2GSZK+TKOu72Nj6cnV//TrSacDbLngXrgPjQ31a0r 5Nk2QLy+k+BOXdU5lK01A/khZaYhJcmB6P0gep5F/qt9chg8gJ7a7Fufx9/kzx66fvzB RGGhJGlRIe2tETd48QM8eb+TL1oMeW12taQVbOVAlHvhmggOzcTFkOQi+IOX6O84yQKX GG+bCmVVaBl7iIOJbBSfaV1sKkcCRUvltYRRlGoecc+cdSd9GcZIPVfQGsEv2t2GqjdJ /ecQ== X-Gm-Message-State: AGi0PuZ5Wuap+l6/8gocDM5Rvylp7d9WojphirdZZYEjV0/TlzRaeoZs 6G3CqPAu7vxoCbhd4/AnKCPJAv8B X-Google-Smtp-Source: APiQypKUW4RuQmsS76AyWemCstkKGag40CdWfwhC+Wo4OdDvvWrhfChyfXQkvkDJ+w4Ocu7KkEjHPA== X-Received: by 2002:a17:90b:3747:: with SMTP id ne7mr1597597pjb.181.1586251626595; Tue, 07 Apr 2020 02:27:06 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a63:7456:: with SMTP id e22ls151839pgn.7.gmail; Tue, 07 Apr 2020 02:27:06 -0700 (PDT) X-Received: by 2002:aa7:990e:: with SMTP id z14mr1758867pff.274.1586251625996; Tue, 07 Apr 2020 02:27:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586251625; cv=none; d=google.com; s=arc-20160816; b=NsVj95FTNoTvnqDpal9w1nbcixJr2rB8Y0YCRuFaID3becijRhDeLFRS7NVMbkRU8I E645qdXyMkUqUzcopbCSYCOR5MKlwkxHxzQGM5nrpYV3gQgv8v2ycR+1qkKiXevbNBXZ hS+gNVXUyfve0+nA0yIx8grVQ+AgZBqvlBDdLMVNxoO3JSI7SO2dRY/l1KNSfgsV6B6k yv8oiG3rKuzXF0HBRI6AjoGW7RG9YIePuPNVzq8mv+QcbksOiZ4MBE9XzP6VmPEQgjKs +f6g0qSYm6fWC+69LD1hdPSjTZqxgtpuEuL68EEvN6UnGhfmzZX0WXeP3Z4rLjDWvcw0 GfLg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=message-id:date:subject:cc:to:from:dkim-signature; bh=+ff6yYRNZGeeTZ2QZyWmoCGAzfetJ6tTNimPs6fjPvA=; b=ffzCF1IRQqwMojQ8zjANb1r5o7wRJm5lPYql9c7WfsHxSCuySQ8CVmRuxJCuef7RuF 3ghCxAeXQMMpzc5cyjje90xmtH/Xl/dGH2+nEG+7wbHpslUskuBkGFjap6kV7V70SYk/ uE3EzJBpyTE6rykrKKSUSJY2BlPPAy3wgNsKPb7yIKgjlVIbYH82paZcuEextTuJvZ+A LgOuabv2n3AVMmh4K/3U8yHgKWePcmZRO9912i/0C40qyh9tIPlzpYKX0ys7juVCcFcD cyIEOlFQYcX0OHkb/BgHQd5B29ZN/wjOsw9a4LH+xFcDRHUSYAYthksRxaVPnDZ9kcgd i5Gg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=YZKDeVRS; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id s27sor2974823pgo.85.2020.04.07.02.27.05 for (Google Transport Security); Tue, 07 Apr 2020 02:27:05 -0700 (PDT) Received-SPF: pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; X-Received: by 2002:a63:d510:: with SMTP id c16mr1164355pgg.123.1586251625482; Tue, 07 Apr 2020 02:27:05 -0700 (PDT) Received: from localhost.localdomain ([2405:201:c809:c7d5:79b0:3a91:34a5:abd7]) by smtp.gmail.com with ESMTPSA id 66sm13759436pfb.150.2020.04.07.02.26.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Apr 2020 02:27:04 -0700 (PDT) From: Jagan Teki To: pragnesh.patel@sifive.com, rick@andestech.com, u-boot@lists.denx.de Cc: bmeng.cn@gmail.com, sagar.kadam@sifive.com, paul.walmsley@sifive.com, troy.benjegerdes@sifive.com, palmerdabbelt@google.com, anup.patel@wdc.com, atish.patra@wdc.com, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH 1/2] sifive: fu540: Add sample SD gpt partition layout Date: Tue, 7 Apr 2020 14:56:50 +0530 Message-Id: <20200407092651.9636-1-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.17.1 X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=YZKDeVRS; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , This is a sample GPT partition layout for SD card, right now three important partitions are added to make the system bootable. Right now the board doesn't support the environment, so the U-Boot environment and ESP partitions will add in future. partition layout: Part Start LBA End LBA Name Attributes Type GUID Partition GUID 1 0x00000800 0x00000fff "loader1" attrs: 0x0000000000000000 type: 5b193300-fc78-40cd-8002-e86c45580b47 guid: 3b86e786-4b78-4bb2-92ac-7c7b45e73d33 2 0x00001000 0x00002fff "loader2" attrs: 0x0000000000000000 type: 2e54b353-1271-4842-806f-e436d6af6985 guid: c09e2067-3c33-4ceb-993a-fbdc29a6a8cf 3 0x00003000 0x03b9ffde "system" attrs: 0x0000000000000004 type: 0fc63daf-8483-4772-8e79-3d69d8477de4 type: linux guid: 99f4fd58-6e52-4a2b-b5f0-035f5756ad01 Note: - loader1 would be fsbl or spl - loader2 would be U-Boot or U-Boot proper Signed-off-by: Jagan Teki --- Note: On top of https://patchwork.ozlabs.org/cover/1263480/ board/sifive/fu540/Kconfig | 2 ++ include/configs/sifive-fu540.h | 13 +++++++++++++ 2 files changed, 15 insertions(+) diff --git a/board/sifive/fu540/Kconfig b/board/sifive/fu540/Kconfig index 5c67aab96a..43d01bab8d 100644 --- a/board/sifive/fu540/Kconfig +++ b/board/sifive/fu540/Kconfig @@ -32,6 +32,8 @@ config BOARD_SPECIFIC_OPTIONS # dummy imply CMD_EXT4 imply CMD_FAT imply CMD_FS_GENERIC + imply CMD_GPT + imply PARTITION_TYPE_GUID imply CMD_NET imply CMD_PING imply CLK_SIFIVE diff --git a/include/configs/sifive-fu540.h b/include/configs/sifive-fu540.h index ef3ae9b650..189e70d7be 100644 --- a/include/configs/sifive-fu540.h +++ b/include/configs/sifive-fu540.h @@ -47,6 +47,15 @@ #include +#define TYPE_GUID_LOADER1 "5B193300-FC78-40CD-8002-E86C45580B47" +#define TYPE_GUID_LOADER2 "2E54B353-1271-4842-806F-E436D6AF6985" +#define TYPE_GUID_SYSTEM "0FC63DAF-8483-4772-8E79-3D69D8477DE4" + +#define PARTS_DEFAULT \ + "name=loader1,start=1M,size=1M,type=${type_guid_gpt_loader1};" \ + "name=loader2,size=4MB,type=${type_guid_gpt_loader2};" \ + "name=system,size=-,bootable,type=${type_guid_gpt_system};" + #define CONFIG_EXTRA_ENV_SETTINGS \ "fdt_high=0xffffffffffffffff\0" \ "initrd_high=0xffffffffffffffff\0" \ @@ -55,6 +64,10 @@ "scriptaddr=0x88100000\0" \ "pxefile_addr_r=0x88200000\0" \ "ramdisk_addr_r=0x88300000\0" \ + "type_guid_gpt_loader1=" TYPE_GUID_LOADER1 "\0" \ + "type_guid_gpt_loader2=" TYPE_GUID_LOADER2 "\0" \ + "type_guid_gpt_system=" TYPE_GUID_SYSTEM "\0" \ + "partitions=" PARTS_DEFAULT "\0" \ BOOTENV #define CONFIG_PREBOOT \