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 \ From patchwork Mon Apr 20 13:37:34 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 1093 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pj1-f70.google.com (mail-pj1-f70.google.com [209.85.216.70]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 5B8DC3F086 for ; Mon, 20 Apr 2020 15:37:54 +0200 (CEST) Received: by mail-pj1-f70.google.com with SMTP id z22sf11309917pjt.0 for ; Mon, 20 Apr 2020 06:37:54 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1587389872; cv=pass; d=google.com; s=arc-20160816; b=CZ3Pmauad+Q7k3n0NvXP4cUrcTBuKCQoyXmAphygnMQ+6BR6dz1cnx7/euqhM5tDvD SYDlJjBrxGUrpjt4/7m/s/9DnzggFkSqqVvBim8OPUol+DVIDayVq8+emJwtMdSfXNo5 Tnf2x9U+j5/+1++uhb9SE2/3LIeSOfQ+ITrvc5svZ1z7v/U9TQcO8Jmkms8nUSbL4W2n z/bGWyGPrx+7+P3hyYPCqk2lAWrXCoiqkcr50E9Y6iAbklGdeYv0kgvEIyUf84TWSAsG 2XxyvPSBoQEI3TA8yr1MIWUkNWcPF1C/RGjGw4Sh0p8c3PGQ2yUEPquBrSh7GJqNhowY Mhkw== 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:references:in-reply-to:message-id:date :subject:cc:to:from:mime-version:dkim-signature; bh=J7Pcvp+A39PO5Mi1eJ/jgTt8NEdos5DAgMv66MW3xpo=; b=Xvq0gW7QiiT2mmRXiiPHS1VmP/ZZNoys50QciYpJAKlcA/CkxLr8VGZt2PwFIHiv8E Zs2GVgSq2FZrd2X+zKAw4D1a8yw84viikv8XhV4RvhZq7NDvdsf9xRWoU7dGUpXXk1rb 6hlhSJLo69iMHP2MKg38etyE0KQib0sh0JR4EJhyUKBtIzYW9qtEMy+hURwx0i0tZEEE Xv/sVbzOOtW3JXB8Eqs2YCf37/EH+j8ynT5E+7KzANOpv+pT8U5jEiv7lhC3b9fSl9Ah QUF0+Bb7W8B9gjowcmcEoUiUvzQ32/MeOCOpBEGfuQCuSXD1K2rB5zJlpgulK5zO+j3Q Cklg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=gjpEsqtW; 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:in-reply-to :references:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=J7Pcvp+A39PO5Mi1eJ/jgTt8NEdos5DAgMv66MW3xpo=; b=OzDOsQViLF5guZVcqUfwd/1ueQ/1xQdr8HIgsb9sRnCn6Nc6X4jHYZtSw+sIuJbfxU ydD2g1dEizEAtupZJuJhhZj2RtZf6gm1GYWBFmnMpxAhArY1teRFNfxeUQjFbnjk8AvP 2bIbl6yd+9cu+vy/CYjajV5O7xbtrHhxshhsc= 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 :in-reply-to:references: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=J7Pcvp+A39PO5Mi1eJ/jgTt8NEdos5DAgMv66MW3xpo=; b=LBJVJmQYABv6M2Jm6bVSn6fnlbdmMOsWyv2XjaWmGhhn017Ip2TKHgZnsEVzw5Wan9 yk2AyHbbRFlUDs6Re2AHe7qN6yVDrk0SBZnxaf7xIH36JtQV05dGym9ApoxNqT7QhMIT W9j3mLEXXZHAK02TaeLm6/eqGjPJOoiEJ4+5VD7hyA6Ywfze0rV5EaEQmtCt7YwJgIAy Z5vWi6PfxA0C+Ov5MEbL7EmeQSdD6qBzGMOR+Rdh/3HLRYepW9aasftgQEdmV2NNYj7c yk33sXq7FiHlyx53PsnI6QtzOp9i21PZrrrzIyORxUUkMjGOWJSfWdCX7w9XbXj04D63 6DUA== X-Gm-Message-State: AGi0PuahaC4xR4kRmMm+XR0V5fM9stJeuzaNWe69RDpq1SO2z87jrhPL SRDdtKBL+dtwGSD2Cjp653ePWFpN X-Google-Smtp-Source: APiQypI7mqaov12aRoBUJea8GNFnYUDQNdkumRY72h3ErLdiU6YkVYDuIdq7/D3QgevpfXMULnRc8w== X-Received: by 2002:a63:cf0f:: with SMTP id j15mr16921408pgg.225.1587389872745; Mon, 20 Apr 2020 06:37:52 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:902:a701:: with SMTP id w1ls9897509plq.7.gmail; Mon, 20 Apr 2020 06:37:52 -0700 (PDT) X-Received: by 2002:a17:90b:19c1:: with SMTP id nm1mr5163425pjb.73.1587389872330; Mon, 20 Apr 2020 06:37:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587389872; cv=none; d=google.com; s=arc-20160816; b=QN9cYrzk+zzyA1ydJeaJMW5Myih+yiHZq1JcI+fKx9Dhs+OyWEXKGd/aO30ktCreqJ 1nt/n9aXLOFuE2SOO627QRmI6ZIZr1eupW30MlxVSiNWU5U9K383XmpfjeAfBLv1N09r uR3M/oMOta83P72NB1lY+/RST5O0bhgnJyAlUeTqH910WZLYcj0sBHNxbw5G6PgW9Bg4 mE7AUPGf+o0ikDS6JLNfZ78P41us4MKRiOodMO+2iAQ+xSW8xEqIbTkRFYTJJVfdI16A U4x1L8vdtJYUbl//Pxvaag3bqqGkqbX22ZRwu3QB0zmx3XnAqvN3Qnb4S2Xh2LjUUmQ0 jwIg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=7Cv7ewbP7gGL1TwoUIGaI5MnVSUtsXJAzU6nNHb+1u8=; b=s+27JB24zjfBMWYuKE+oBrZsC7smbynFEvH1csCKhGTKoJmefgi3QTKakaxqgz76K0 kl2kDpY7AIdWUBfyDSQNlxh2qEo+cVH3QSTt6eEEX9v5NSTU5dIZuMFNjnw6FPgGu+es xpJc3I6HLy4ifU/mSWQESDh4BFGQvC4mGQSfvV7pHwyd8RoseF0yH8sCLTTpWFKTCcok vQ4Ww6OSZ5sRF5fvODz3AH5v1r4LtT9ps7pJNZdz4hZjhs9urkuRsQKEpoxRkebVXJAR jhKdwfegPcDGLjTNEsdEPBjrWmtQtl9XQuptLov7M99sAsBZB5t/jmAkEAEkVR7BCSB0 3aaQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=gjpEsqtW; 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 e12sor603410pfj.19.2020.04.20.06.37.51 for (Google Transport Security); Mon, 20 Apr 2020 06:37:51 -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:a62:864b:: with SMTP id x72mr5092081pfd.305.1587389871607; Mon, 20 Apr 2020 06:37:51 -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.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Apr 2020 06:37:50 -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 2/3] sifive: fu540: Add U-Boot proper sector start Date: Mon, 20 Apr 2020 19:07:34 +0530 Message-Id: <20200420133735.23599-2-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200420133735.23599-1-jagan@amarulasolutions.com> References: <20200420133735.23599-1-jagan@amarulasolutions.com> X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=gjpEsqtW; 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: , Add U-Boot proper sector start offset for SiFive FU540. This value is based on the partition layout supported by SiFive FU540. u-boot.itb need to write on this specific offset so-that the SPL will retrieve it from here and load. Signed-off-by: Jagan Teki Reviewed-by: Pragnesh Patel --- Changes for v2: - none common/spl/Kconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/common/spl/Kconfig b/common/spl/Kconfig index 07eee56219..1ebb30344a 100644 --- a/common/spl/Kconfig +++ b/common/spl/Kconfig @@ -308,7 +308,7 @@ config SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR ARCH_MX6 || ARCH_MX7 || \ ARCH_ROCKCHIP || ARCH_MVEBU || ARCH_SOCFPGA || \ ARCH_AT91 || ARCH_ZYNQ || ARCH_KEYSTONE || OMAP34XX || \ - OMAP44XX || OMAP54XX || AM33XX || AM43XX + OMAP44XX || OMAP54XX || AM33XX || AM43XX || TARGET_SIFIVE_FU540 help Use sector number for specifying U-Boot location on MMC/SD in raw mode. @@ -325,6 +325,7 @@ config SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR default 0x300 if ARCH_ZYNQ || ARCH_KEYSTONE || OMAP34XX || OMAP44XX || \ OMAP54XX || AM33XX || AM43XX || ARCH_K3 default 0x4000 if ARCH_ROCKCHIP + default 0x822 if TARGET_SIFIVE_FU540 help Address on the MMC to load U-Boot from, when the MMC is being used in raw mode. Units: MMC sectors (1 sector = 512 bytes). From patchwork Mon Apr 20 13:37:35 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 1094 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-oi1-f197.google.com (mail-oi1-f197.google.com [209.85.167.197]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 6BB9A3F086 for ; Mon, 20 Apr 2020 15:37:58 +0200 (CEST) Received: by mail-oi1-f197.google.com with SMTP id 191sf9224621oii.7 for ; Mon, 20 Apr 2020 06:37:58 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1587389876; cv=pass; d=google.com; s=arc-20160816; b=EyioCtun1Sn7iqNUf9we924v3UUTg6FXNQHrlyzWaTQhZNAF2DfNdTDbX+0CD3F0ct FDVU6sGZK44QQgP96DnIdG5nWXFgI0ashuOBFQ8x4ds/m5KQpPIGCt/j87OK1fFai1gU rbxThW3hve/VIZHmGafGkMiqKbBRw7HAp+sJNhXVeu8gigpTMThJMGL08wJ3AunWqBDq lHEY/RQQ4d543oicUrMeBnT4BefVOr7nVuV0dwzhb+S7TeqV46ReJdHKV+/yaTmp1kCS DQK7Vg/fP0uydgYb0x8OCB395fC+HaU6oBScrkr8C67P3bps+KYpLbD00W0XAo/KkWyO vr3w== 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:references:in-reply-to:message-id:date :subject:cc:to:from:mime-version:dkim-signature; bh=7TC82cYX+uiNtrteHqtIKmyoyZMbPwQbzMWEsJPuVYk=; b=J5BCx8AMesW/fE3Yg9Yvsixg0hazRc1WdarPRqBbdvkTur6jRM52+wXj9El6dS0ZmN 6N3c1O6t2Q7+NN75HePpYuVUxev6RnpSbggaeTPxXDnYkLaU2gH5jEoBx4fl7mpFgX3U m1nvbaylge5+oP04zI28jUxqQQgCqTn4xlVQgKTaXYRPo4OV6d2R8uhG1w/76j7aZkSm dt9ezDwfyXnESNJgOjd9sasaGhsfGSlVWEWXa13jnzjVscOD0dxiJCHoV1Ujb+FfeiQo e8hB7rzKtgYkCCnWaQ8h+PAahqII9JbeCVDYH7i2XMEQZ3jC/CgBFbCcs/6EfLuCmn3b RQqg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=TctLYu2R; 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:in-reply-to :references:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=7TC82cYX+uiNtrteHqtIKmyoyZMbPwQbzMWEsJPuVYk=; b=FNHolfOc+ERDFI0HkZlWsACLveXnsdYvIr2q7nmjLLd8eTEvobb6JMqMTN2WZ6a+1b VKBMAeQwqMDEdiRvSqVroBLkb4NGtHE/4CnQir2bOZ8Rj9h2KL9JXx1vYc6jjNpu1Nug gfkpULr0KKv94+R6tCj7WHz+MdbeQ6EHAzNtQ= 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 :in-reply-to:references: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=7TC82cYX+uiNtrteHqtIKmyoyZMbPwQbzMWEsJPuVYk=; b=XEckpYpNCRmaTzP6aX4gdNjliQQiTm1Cia40KzLya7oS5BxYOV1xKCH6wz58XBYpko 3zK1VQu/dhfMbAF50oR2JxIYLfKAG10DDqnfCV4aGpDZ9SQlj1CrdtjIsOZcwNz5YONZ aG64r2kTWzyhDgrtZX7bZ0zRKpOeFqKoDo253qHrrfWyFaGOHE5jwAyaqjALU5Lyd1o6 8etQ9s9xSwsTqgCCoJQjwee2xtgigdOgwaOUd6lyXY2+5tI5+n3XgE5i5VAIjjmtb/Id kg9xqwJOblx479Jl+JBbi1HTJEy+alP9iG0uD3fUfQ+gVSF9+IRzkBtxr6CTrOz1EwHa /x5A== X-Gm-Message-State: AGi0PuZUSijt4MdcDe9rFkqX0mca84zrQy3QgXgsdElw/lq5qfg47I8V e2T3muc0qpCq17HIiRZfVpX0mMG+ X-Google-Smtp-Source: APiQypIX81UURRABYS6F7W71gXw+uQNUDXa9I7Uq28QDUbvy4T1ef2JDQavZidR3tyVOcGWyPKZgpA== X-Received: by 2002:a9d:4113:: with SMTP id o19mr796122ote.354.1587389876475; Mon, 20 Apr 2020 06:37:56 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a9d:75cd:: with SMTP id c13ls2001309otl.10.gmail; Mon, 20 Apr 2020 06:37:56 -0700 (PDT) X-Received: by 2002:a05:6830:1c65:: with SMTP id s5mr9397923otg.60.1587389875947; Mon, 20 Apr 2020 06:37:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587389875; cv=none; d=google.com; s=arc-20160816; b=FeBnPrZXThlbOgK5pBpDceGJpcDudFtQ1PRkVawy84i5G6yHoIEWJ2T+L4FGGIySwU YtSedvF2RIkgsyoBbPn4dpPofcRkOKfnDCMliKaE6Zak7jbJx2d8t/gsT/f41gpt2jCH /yJyJSzS3EfbZelIQxpKLie7m5RwK4BIg9xEMEaJRrlEMAbPxTLztB2+5XSMkLkhIvz+ a32U12pVBUcGSeQEPltqKYQ3i/CZvA51UJ3Jgm4JEsLJ3TGfFzZHIOTnuLocg0JgjSnR B65bERoNiqq6Aih0yM+uSt7w22KSv29AR36R3vCeNnmsnYGj3KiGrAqJp96xAeDy40/e 04KA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=J01CQ2lFYcleYA3BcrSX/MjqGjH7PzVAlLtgecU+S8k=; b=w10FlqfmjcZiFnG9nPQjo34YbTPw4ZRp0GN+bA0OwnfuwPEmLwFIBt5BN0C7q6YYwj UAn8p2H825nO2aNdCwbdh/4rMGO5+b985y1sufdh3JAtWod7nrsKnMCMLXdIKMRC3sPg MIFl1IH4CADkGqgS4vvhjBxe3xWvVj0GMRkxf4uTNyBPzHBpE7gepyvn807V4GM6hqa2 Ixo+j/fpW82z7ijFz3BqLS0Jekn67FX0vlD6NZlx3TPZiNnEC9WEjycBxNgFVfde3b0z oSBNDV3qwZaWSq1tzSRw+V1/WSRzNDxkPp4aI3vkJbP5WREnATeInb3E4er4mG8Ze2e5 7AOg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=TctLYu2R; 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 4sor723313oii.114.2020.04.20.06.37.55 for (Google Transport Security); Mon, 20 Apr 2020 06:37:55 -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:8d02:: with SMTP id c2mr18912761pjo.113.1587389875653; Mon, 20 Apr 2020 06:37:55 -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.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Apr 2020 06:37:55 -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 3/3] doc: sifive: fu540: Document Boot from MMC Date: Mon, 20 Apr 2020 19:07:35 +0530 Message-Id: <20200420133735.23599-3-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200420133735.23599-1-jagan@amarulasolutions.com> References: <20200420133735.23599-1-jagan@amarulasolutions.com> X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=TctLYu2R; 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: , Document the Booting from MMC steps. Detailed information about partitioning, flashing and etc. Signed-off-by: Jagan Teki Reviewed-by: Bin Meng --- Changes for v2: - new patch doc/board/sifive/fu540.rst | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/doc/board/sifive/fu540.rst b/doc/board/sifive/fu540.rst index 3937222c6c..691ef232e2 100644 --- a/doc/board/sifive/fu540.rst +++ b/doc/board/sifive/fu540.rst @@ -363,3 +363,31 @@ load uImage. Please press Enter to activate this console. / # + +Booting from MMC +---------------- + +Use steps from "Building" section for building the U-Boot + +Format the SD card (make sure the disk has GPT, otherwise use gdisk to switch) + +.. code-block:: none + + # sudo sgdisk --clear \ + > --set-alignment=2 \ + > --new=1:34:2081 --change-name=1:loader1 --typecode=1:5B193300-FC78-40CD-8002-E86C45580B47 \ + > --new=2:2082:10273 --change-name=2:loader2 --typecode=2:2E54B353-1271-4842-806F-E436D6AF6985 \ + > --new=3:10274: --change-name=3:rootfs --typecode=3:0FC63DAF-8483-4772-8E79-3D69D8477DE4 \ + > /dev/sda + +Program the SD card + +.. code-block:: none + + sudo dd if=spl/u-boot-spl.bin of=/dev/sda seek=34 + sudo dd if=u-boot.itb of=/dev/sda seek=2082 + sync + +Change DIP switches MSEL[3:0] are set to 1011 + +Insert the SD card and power up the board.