From patchwork Mon Apr 20 13:37:33 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 1092 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pf1-f200.google.com (mail-pf1-f200.google.com [209.85.210.200]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id ECA053F086 for ; Mon, 20 Apr 2020 15:37:50 +0200 (CEST) Received: by mail-pf1-f200.google.com with SMTP id q142sf9738066pfc.21 for ; Mon, 20 Apr 2020 06:37:50 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1587389869; cv=pass; d=google.com; s=arc-20160816; b=UbdkTMTugCGD7Zlu7NxOU2yCQq8eQac+B+cEug2F///9GIcRrW95Prz9Xqjcpa5nvs +OMGsIVIFoyye49mMiFQZjiwn64TIHzQAG1ATLLppeFLhUGLGidtp65o8k9svmK1FzYs hQdT47uNlNjVjY6aonRW2U++DA0OrAj72lkZxV5c1i/GcaCYgggMLybI1+rOybuThMQE MP9UzuxNTsH3V/A3PQQQY6OVA56xgTRZmSnAOUQ11Ru855MKnuSQ40nSOjnvc/QmrTND GeGCvJK8NFsmEPurwmRq1OPzwgbVPagTK/fbJxV3rmhUxaQT0eh9owGr9mtd41rahLZO mNgA== 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=IzaN4lYsFLpu4itgQaJE+qz+Xqr+I0UDR+IojEQLIJY=; b=tIG62IKBNe1nor1K1wtZYpDV1cV9Qgj9nbPc2uAw6olSKFj/gGWz9j6jHmI9LuH9uX R3qfhgS5B1a7vCpvWHdnr6IfSnRhxz0+vIjz9f1fBhixHRuyX72Nula809g+BE8uCX7q FM25l0AQbyUFVAeYKlQTcylmHJa0FY7x7mB32SUkgfqdE93pDCsXqJJXOpkpqcZkH0oi MBBmrWdtsZhqrxMonhpylmIgekwm+30aNJsXRWmaI6sX/KLVNUpufYkVxqEihxladTjC /2qp9zid0KXib8U4qBnoCQ7DvZlHuulAwy4//WHR1d32FAs74Gtx/CYX+rduwmfzaMmm Guwg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=PHGi0E5j; 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=IzaN4lYsFLpu4itgQaJE+qz+Xqr+I0UDR+IojEQLIJY=; b=rCwhn2M0zD3p8aAm4Pf9Cqe9TiGbTGs21TmKBBDrOBSkOOms5kuvphtlJ9j1yTC7pV GUd2EolygLzo4AeypG1mGz9/3Q0buFGXBh8KlVWqQMltpOb18rFiAzFEcPixovdmrgUg QiI0iyLgiAtIQ1R2jmalaGGWCRwETKsZK9hjU= 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=IzaN4lYsFLpu4itgQaJE+qz+Xqr+I0UDR+IojEQLIJY=; b=LFS7M9y9z3fIIC0W9vOmeGzt5PtHJw44mj++mXogInqvsZyIyjw1zK09NqCJA7PvlQ SYHqGreV0tD0ylcRUt4k7rIYs1vED6i5OmPpeh0rAsa+/o4a8h8dHJn4/sgLweJG/x73 BsZULxY3o120JlJ4NISPbn2dfbnSPPu1wJJWOIMTyq6Z4OMPEa2TJC+FN1NAoRMEPaHB XSrKoemUWVxJE3qSq/AmAbjpiJqjXMyqizhRanckDfJdTcuInae0gfJNYEhJUkTNluzN fwSrCh7ggnTXFB9u9mdqEoaTV4dRzd3UsN5huuKzGWK53xPyQsfONTy1i/hWDH1RHV0n uMsQ== X-Gm-Message-State: AGi0PuaWdV6zr92GjdVe+fRfYaqTkUcSI12311xiS8ySbofRpzOFUWbu l7trBYFtcnTsDVplCJakvsvbqLk+ X-Google-Smtp-Source: APiQypLR1Mv98LMB4JuVE33FfC0EkwdQeiSU+Chs2qfOEVhpDSy3Ml5HGrWdz0BPXOyzM4tpT6gctg== X-Received: by 2002:a17:90a:fd0c:: with SMTP id cv12mr13205355pjb.95.1587389868765; Mon, 20 Apr 2020 06:37:48 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:90a:c713:: with SMTP id o19ls12790724pjt.1.gmail; Mon, 20 Apr 2020 06:37:48 -0700 (PDT) X-Received: by 2002:a17:90b:1a87:: with SMTP id ng7mr14351338pjb.84.1587389868330; Mon, 20 Apr 2020 06:37:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587389868; cv=none; d=google.com; s=arc-20160816; b=pMuD8YUDwvLU0PoWM1aQpxH9xw2qpbBgRrx5jN4VAvcWxE1P66QKhUi5ZyvlA+YcOv mPvqam2m5kbHdVLtcPYruzyC6coSMyxOyIHcftltqhEQAPVAdWDkAxpGqICsCOlidZsI tZcH/D6KUOuRD5yeYPm5RWEVDCqDVd5aNBYEe19co8Ua8UqohuafIPgogHAYDlnPfzLd uZXcY7w1nqkeezP+dAT/p0ibW9Mpomq44v4bYRtDJlprjj9HBnYmxmDgtcwGdGomzKFI Ev1CFk4SOceZ5NMapZBMq2vF0XEgiXIYJvqcqTbTWG7ZddsxtWgu76n8/f+rXfvSphIZ 0XzQ== 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=XXBFhtHcKoj9NF6s5ziI9dzZkh8usCOB2SMnNYJ36l8=; b=X6VsFuGulax2ZIMl6bYd+S+YiAQqwTvaYz4na6P6bsh7cQIUE/ThBDaepJiUSnRXZD hGpwNXiUijg/5nejc1QhM3/t1M3nQo2tfdUtJFZTrrP4Wbsj3q3Lk6ndXQQLvTebgcNW JYlxLhwMDC4W+O/zUUTnVoNZchayQ2CA+d8r47KPaRbKSbWWqE5cggej+nAtHCdnYSEo isc4yaDEK73HDIasOajmxXT74LH6KMsEc9xMaeM3vUWEyxJVSAnqw51HQExg6ET4ee2c AWgvNrHbtUxXHiqtKw99TGqjkuYargi7gnnjIbEhmYeHGfB5vBo5f9jFt/f5Jua8ATV0 hePA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=PHGi0E5j; 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 v6sor1416937pjs.36.2020.04.20.06.37.47 for (Google Transport Security); Mon, 20 Apr 2020 06:37:47 -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:a17:90a:648d:: with SMTP id h13mr22717917pjj.12.1587389867454; Mon, 20 Apr 2020 06:37:47 -0700 (PDT) Received: from localhost.localdomain ([2405:201:c809:c7d5:7ddc:e17b:a9b3:404]) by smtp.gmail.com with ESMTPSA id 141sm1118976pfz.171.2020.04.20.06.37.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Apr 2020 06:37:46 -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 v2 1/3] sifive: fu540: Add sample SD gpt partition layout Date: Mon, 20 Apr 2020 19:07:33 +0530 Message-Id: <20200420133735.23599-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=PHGi0E5j; 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. partition layout: Part Start LBA End LBA Name Attributes Type GUID Partition GUID 1 0x00000022 0x00000821 "loader1" attrs: 0x0000000000000000 type: 5b193300-fc78-40cd-8002-e86c45580b47 guid: cbcbef44-e627-42bc-b134-93b6f3784b8c 2 0x00000822 0x00002821 "loader2" attrs: 0x0000000000000000 type: 2e54b353-1271-4842-806f-e436d6af6985 guid: f54eba28-d8de-4852-978d-1a673777e2ae 3 0x00002822 0x00020821 "rootfs" attrs: 0x0000000000000004 type: 0fc63daf-8483-4772-8e79-3d69d8477de4 type: linux guid: 9561df46-8d55-4799-a83b-cfee9ef6ff93 Note: - loader1 would be fsbl or spl - loader2 would be U-Boot or U-Boot proper Signed-off-by: Jagan Teki Reviewed-by: Pragnesh Patel Reviewed-by: Bin Meng --- Changes for v2: - update the partition table 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..72c841eb9b 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=17K,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 \