* [PATCH v2 1/3] sifive: fu540: Add sample SD gpt partition layout
@ 2020-04-20 13:37 Jagan Teki
2020-04-20 13:37 ` [PATCH v2 2/3] sifive: fu540: Add U-Boot proper sector start Jagan Teki
` (3 more replies)
0 siblings, 4 replies; 13+ messages in thread
From: Jagan Teki @ 2020-04-20 13:37 UTC (permalink / raw)
To: u-boot
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 <jagan@amarulasolutions.com>
---
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 <config_distro_bootcmd.h>
+#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 \
--
2.17.1
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH v2 2/3] sifive: fu540: Add U-Boot proper sector start
2020-04-20 13:37 [PATCH v2 1/3] sifive: fu540: Add sample SD gpt partition layout Jagan Teki
@ 2020-04-20 13:37 ` Jagan Teki
2020-04-29 13:58 ` Bin Meng
2020-04-29 14:30 ` Pragnesh Patel
2020-04-20 13:37 ` [PATCH v2 3/3] doc: sifive: fu540: Document Boot from MMC Jagan Teki
` (2 subsequent siblings)
3 siblings, 2 replies; 13+ messages in thread
From: Jagan Teki @ 2020-04-20 13:37 UTC (permalink / raw)
To: u-boot
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 <jagan@amarulasolutions.com>
---
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).
--
2.17.1
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH v2 3/3] doc: sifive: fu540: Document Boot from MMC
2020-04-20 13:37 [PATCH v2 1/3] sifive: fu540: Add sample SD gpt partition layout Jagan Teki
2020-04-20 13:37 ` [PATCH v2 2/3] sifive: fu540: Add U-Boot proper sector start Jagan Teki
@ 2020-04-20 13:37 ` Jagan Teki
2020-04-29 13:56 ` Bin Meng
2020-04-29 15:47 ` Pragnesh Patel
2020-04-29 13:53 ` [PATCH v2 1/3] sifive: fu540: Add sample SD gpt partition layout Pragnesh Patel
2020-04-29 13:54 ` Bin Meng
3 siblings, 2 replies; 13+ messages in thread
From: Jagan Teki @ 2020-04-20 13:37 UTC (permalink / raw)
To: u-boot
Document the Booting from MMC steps.
Detailed information about partitioning, flashing and etc.
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
---
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.
--
2.17.1
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH v2 1/3] sifive: fu540: Add sample SD gpt partition layout
2020-04-20 13:37 [PATCH v2 1/3] sifive: fu540: Add sample SD gpt partition layout Jagan Teki
2020-04-20 13:37 ` [PATCH v2 2/3] sifive: fu540: Add U-Boot proper sector start Jagan Teki
2020-04-20 13:37 ` [PATCH v2 3/3] doc: sifive: fu540: Document Boot from MMC Jagan Teki
@ 2020-04-29 13:53 ` Pragnesh Patel
2020-04-29 13:54 ` Bin Meng
3 siblings, 0 replies; 13+ messages in thread
From: Pragnesh Patel @ 2020-04-29 13:53 UTC (permalink / raw)
To: u-boot
Hi Jagan,
>-----Original Message-----
>From: Jagan Teki <jagan@amarulasolutions.com>
>Sent: 20 April 2020 19:08
>To: Pragnesh Patel <pragnesh.patel@sifive.com>; rick at andestech.com; u-
>boot at lists.denx.de
>Cc: bmeng.cn at gmail.com; Sagar Kadam <sagar.kadam@sifive.com>; Paul
>Walmsley <paul.walmsley@sifive.com>; Troy Benjegerdes
><troy.benjegerdes@sifive.com>; palmerdabbelt at google.com;
>anup.patel at wdc.com; atish.patra at wdc.com; linux-
>amarula at amarulasolutions.com; Jagan Teki <jagan@amarulasolutions.com>
>Subject: [PATCH v2 1/3] sifive: fu540: Add sample SD gpt partition layout
>
>[External Email] Do not click links or attachments unless you recognize the
>sender and know the content is safe
>
>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 <jagan@amarulasolutions.com>
>---
>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 <config_distro_bootcmd.h>
>
>+#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" \
Reviewed-by: Pragnesh Patel <pragnesh.patel@sifive.com>
> BOOTENV
>
> #define CONFIG_PREBOOT \
>--
>2.17.1
^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH v2 1/3] sifive: fu540: Add sample SD gpt partition layout
2020-04-20 13:37 [PATCH v2 1/3] sifive: fu540: Add sample SD gpt partition layout Jagan Teki
` (2 preceding siblings ...)
2020-04-29 13:53 ` [PATCH v2 1/3] sifive: fu540: Add sample SD gpt partition layout Pragnesh Patel
@ 2020-04-29 13:54 ` Bin Meng
3 siblings, 0 replies; 13+ messages in thread
From: Bin Meng @ 2020-04-29 13:54 UTC (permalink / raw)
To: u-boot
On Mon, Apr 20, 2020 at 9:37 PM Jagan Teki <jagan@amarulasolutions.com> wrote:
>
> 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 <jagan@amarulasolutions.com>
> ---
> 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(+)
>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH v2 3/3] doc: sifive: fu540: Document Boot from MMC
2020-04-20 13:37 ` [PATCH v2 3/3] doc: sifive: fu540: Document Boot from MMC Jagan Teki
@ 2020-04-29 13:56 ` Bin Meng
2020-04-29 15:47 ` Pragnesh Patel
1 sibling, 0 replies; 13+ messages in thread
From: Bin Meng @ 2020-04-29 13:56 UTC (permalink / raw)
To: u-boot
On Mon, Apr 20, 2020 at 9:37 PM Jagan Teki <jagan@amarulasolutions.com> wrote:
>
> Document the Booting from MMC steps.
>
> Detailed information about partitioning, flashing and etc.
>
> Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
> ---
> Changes for v2:
> - new patch
>
> doc/board/sifive/fu540.rst | 28 ++++++++++++++++++++++++++++
> 1 file changed, 28 insertions(+)
>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH v2 2/3] sifive: fu540: Add U-Boot proper sector start
2020-04-20 13:37 ` [PATCH v2 2/3] sifive: fu540: Add U-Boot proper sector start Jagan Teki
@ 2020-04-29 13:58 ` Bin Meng
2020-04-29 14:04 ` Pragnesh Patel
2020-04-29 14:30 ` Pragnesh Patel
1 sibling, 1 reply; 13+ messages in thread
From: Bin Meng @ 2020-04-29 13:58 UTC (permalink / raw)
To: u-boot
Hi Jagan,
On Mon, Apr 20, 2020 at 9:37 PM Jagan Teki <jagan@amarulasolutions.com> wrote:
>
> 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 <jagan@amarulasolutions.com>
> ---
> 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).
> --
It looks my comments in v1 patch is not addressed?
Regards,
Bin
^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH v2 2/3] sifive: fu540: Add U-Boot proper sector start
2020-04-29 13:58 ` Bin Meng
@ 2020-04-29 14:04 ` Pragnesh Patel
2020-04-29 14:37 ` Bin Meng
0 siblings, 1 reply; 13+ messages in thread
From: Pragnesh Patel @ 2020-04-29 14:04 UTC (permalink / raw)
To: u-boot
Hi Bin,
>-----Original Message-----
>From: Bin Meng <bmeng.cn@gmail.com>
>Sent: 29 April 2020 19:28
>To: Jagan Teki <jagan@amarulasolutions.com>
>Cc: Pragnesh Patel <pragnesh.patel@sifive.com>; Rick Chen
><rick@andestech.com>; U-Boot Mailing List <u-boot@lists.denx.de>; Sagar
>Kadam <sagar.kadam@sifive.com>; Paul Walmsley
><paul.walmsley@sifive.com>; Troy Benjegerdes
><troy.benjegerdes@sifive.com>; Palmer Dabbelt
><palmerdabbelt@google.com>; Anup Patel <anup.patel@wdc.com>; Atish
>Patra <atish.patra@wdc.com>; linux-amarula <linux-
>amarula at amarulasolutions.com>
>Subject: Re: [PATCH v2 2/3] sifive: fu540: Add U-Boot proper sector start
>
>[External Email] Do not click links or attachments unless you recognize the
>sender and know the content is safe
>
>Hi Jagan,
>
>On Mon, Apr 20, 2020 at 9:37 PM Jagan Teki <jagan@amarulasolutions.com>
>wrote:
>>
>> 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 <jagan@amarulasolutions.com>
>> ---
>> 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).
>> --
>
>It looks my comments in v1 patch is not addressed?
@Bin Meng I did not see any comment from your side, please help me if I was wrong.
>
>Regards,
>Bin
^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH v2 2/3] sifive: fu540: Add U-Boot proper sector start
2020-04-20 13:37 ` [PATCH v2 2/3] sifive: fu540: Add U-Boot proper sector start Jagan Teki
2020-04-29 13:58 ` Bin Meng
@ 2020-04-29 14:30 ` Pragnesh Patel
1 sibling, 0 replies; 13+ messages in thread
From: Pragnesh Patel @ 2020-04-29 14:30 UTC (permalink / raw)
To: u-boot
>-----Original Message-----
>From: Jagan Teki <jagan@amarulasolutions.com>
>Sent: 20 April 2020 19:08
>To: Pragnesh Patel <pragnesh.patel@sifive.com>; rick at andestech.com; u-
>boot at lists.denx.de
>Cc: bmeng.cn at gmail.com; Sagar Kadam <sagar.kadam@sifive.com>; Paul
>Walmsley <paul.walmsley@sifive.com>; Troy Benjegerdes
><troy.benjegerdes@sifive.com>; palmerdabbelt at google.com;
>anup.patel at wdc.com; atish.patra at wdc.com; linux-
>amarula at amarulasolutions.com; Jagan Teki <jagan@amarulasolutions.com>
>Subject: [PATCH v2 2/3] sifive: fu540: Add U-Boot proper sector start
>
>[External Email] Do not click links or attachments unless you recognize the
>sender and know the content is safe
>
>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 <jagan@amarulasolutions.com>
>---
>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).
>--
>2.17.1
Reviewed-by: Pragnesh Patel <pragnesh.patel@sifive.com>
^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH v2 2/3] sifive: fu540: Add U-Boot proper sector start
2020-04-29 14:04 ` Pragnesh Patel
@ 2020-04-29 14:37 ` Bin Meng
0 siblings, 0 replies; 13+ messages in thread
From: Bin Meng @ 2020-04-29 14:37 UTC (permalink / raw)
To: u-boot
Hi Pragnesh,
On Wed, Apr 29, 2020 at 10:04 PM Pragnesh Patel
<pragnesh.patel@sifive.com> wrote:
>
> Hi Bin,
>
> >-----Original Message-----
> >From: Bin Meng <bmeng.cn@gmail.com>
> >Sent: 29 April 2020 19:28
> >To: Jagan Teki <jagan@amarulasolutions.com>
> >Cc: Pragnesh Patel <pragnesh.patel@sifive.com>; Rick Chen
> ><rick@andestech.com>; U-Boot Mailing List <u-boot@lists.denx.de>; Sagar
> >Kadam <sagar.kadam@sifive.com>; Paul Walmsley
> ><paul.walmsley@sifive.com>; Troy Benjegerdes
> ><troy.benjegerdes@sifive.com>; Palmer Dabbelt
> ><palmerdabbelt@google.com>; Anup Patel <anup.patel@wdc.com>; Atish
> >Patra <atish.patra@wdc.com>; linux-amarula <linux-
> >amarula at amarulasolutions.com>
> >Subject: Re: [PATCH v2 2/3] sifive: fu540: Add U-Boot proper sector start
> >
> >[External Email] Do not click links or attachments unless you recognize the
> >sender and know the content is safe
> >
> >Hi Jagan,
> >
> >On Mon, Apr 20, 2020 at 9:37 PM Jagan Teki <jagan@amarulasolutions.com>
> >wrote:
> >>
> >> 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 <jagan@amarulasolutions.com>
> >> ---
> >> 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).
> >> --
> >
> >It looks my comments in v1 patch is not addressed?
>
> @Bin Meng I did not see any comment from your side, please help me if I was wrong.
Sorry, I was referring to another patch which is similar to this one:
https://lists.denx.de/pipermail/u-boot/2020-April/407627.html
Regards,
Bin
^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH v2 3/3] doc: sifive: fu540: Document Boot from MMC
2020-04-20 13:37 ` [PATCH v2 3/3] doc: sifive: fu540: Document Boot from MMC Jagan Teki
2020-04-29 13:56 ` Bin Meng
@ 2020-04-29 15:47 ` Pragnesh Patel
2020-04-29 15:56 ` Jagan Teki
1 sibling, 1 reply; 13+ messages in thread
From: Pragnesh Patel @ 2020-04-29 15:47 UTC (permalink / raw)
To: u-boot
Hi Jagan,
>-----Original Message-----
>From: Jagan Teki <jagan@amarulasolutions.com>
>Sent: 20 April 2020 19:08
>To: Pragnesh Patel <pragnesh.patel@sifive.com>; rick at andestech.com; u-
>boot at lists.denx.de
>Cc: bmeng.cn at gmail.com; Sagar Kadam <sagar.kadam@sifive.com>; Paul
>Walmsley <paul.walmsley@sifive.com>; Troy Benjegerdes
><troy.benjegerdes@sifive.com>; palmerdabbelt at google.com;
>anup.patel at wdc.com; atish.patra at wdc.com; linux-
>amarula at amarulasolutions.com; Jagan Teki <jagan@amarulasolutions.com>
>Subject: [PATCH v2 3/3] doc: sifive: fu540: Document Boot from MMC
>
>[External Email] Do not click links or attachments unless you recognize the
>sender and know the content is safe
>
>Document the Booting from MMC steps.
>
>Detailed information about partitioning, flashing and etc.
>
>Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
>---
>Changes for v2:
>- new patch
>
> doc/board/sifive/fu540.rst | 28 ++++++++++++++++++++++++++++
> 1 file changed, 28 insertions(+)
>
This changes is not on top of https://patchwork.ozlabs.org/project/uboot/patch/20200329170538.25449-18-pragnesh.patel at sifive.com/
this.
If you don't mind, I will incorporate your changes in my v7 series which has a complete description for FSBL and SPL.
>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.
>--
>2.17.1
^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH v2 3/3] doc: sifive: fu540: Document Boot from MMC
2020-04-29 15:47 ` Pragnesh Patel
@ 2020-04-29 15:56 ` Jagan Teki
2020-04-29 16:02 ` Pragnesh Patel
0 siblings, 1 reply; 13+ messages in thread
From: Jagan Teki @ 2020-04-29 15:56 UTC (permalink / raw)
To: u-boot
On Wed, Apr 29, 2020 at 9:17 PM Pragnesh Patel
<pragnesh.patel@sifive.com> wrote:
>
> Hi Jagan,
>
> >-----Original Message-----
> >From: Jagan Teki <jagan@amarulasolutions.com>
> >Sent: 20 April 2020 19:08
> >To: Pragnesh Patel <pragnesh.patel@sifive.com>; rick at andestech.com; u-
> >boot at lists.denx.de
> >Cc: bmeng.cn at gmail.com; Sagar Kadam <sagar.kadam@sifive.com>; Paul
> >Walmsley <paul.walmsley@sifive.com>; Troy Benjegerdes
> ><troy.benjegerdes@sifive.com>; palmerdabbelt at google.com;
> >anup.patel at wdc.com; atish.patra at wdc.com; linux-
> >amarula at amarulasolutions.com; Jagan Teki <jagan@amarulasolutions.com>
> >Subject: [PATCH v2 3/3] doc: sifive: fu540: Document Boot from MMC
> >
> >[External Email] Do not click links or attachments unless you recognize the
> >sender and know the content is safe
> >
> >Document the Booting from MMC steps.
> >
> >Detailed information about partitioning, flashing and etc.
> >
> >Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
> >---
> >Changes for v2:
> >- new patch
> >
> > doc/board/sifive/fu540.rst | 28 ++++++++++++++++++++++++++++
> > 1 file changed, 28 insertions(+)
> >
>
> This changes is not on top of https://patchwork.ozlabs.org/project/uboot/patch/20200329170538.25449-18-pragnesh.patel at sifive.com/
> this.
>
> If you don't mind, I will incorporate your changes in my v7 series which has a complete description for FSBL and SPL.
Better take it in a patch where you enable SPL MMC. and have another
patch before that with existing FSBL availability. This way changes
look easy to understand.
Jagan.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH v2 3/3] doc: sifive: fu540: Document Boot from MMC
2020-04-29 15:56 ` Jagan Teki
@ 2020-04-29 16:02 ` Pragnesh Patel
0 siblings, 0 replies; 13+ messages in thread
From: Pragnesh Patel @ 2020-04-29 16:02 UTC (permalink / raw)
To: u-boot
Hi Jagan,
>-----Original Message-----
>From: Jagan Teki <jagan@amarulasolutions.com>
>Sent: 29 April 2020 21:26
>To: Pragnesh Patel <pragnesh.patel@sifive.com>
>Cc: rick at andestech.com; u-boot at lists.denx.de; bmeng.cn at gmail.com; Sagar
>Kadam <sagar.kadam@sifive.com>; Paul Walmsley
><paul.walmsley@sifive.com>; Troy Benjegerdes
><troy.benjegerdes@sifive.com>; palmerdabbelt at google.com;
>anup.patel at wdc.com; atish.patra at wdc.com; linux-
>amarula at amarulasolutions.com
>Subject: Re: [PATCH v2 3/3] doc: sifive: fu540: Document Boot from MMC
>
>[External Email] Do not click links or attachments unless you recognize the
>sender and know the content is safe
>
>On Wed, Apr 29, 2020 at 9:17 PM Pragnesh Patel
><pragnesh.patel@sifive.com> wrote:
>>
>> Hi Jagan,
>>
>> >-----Original Message-----
>> >From: Jagan Teki <jagan@amarulasolutions.com>
>> >Sent: 20 April 2020 19:08
>> >To: Pragnesh Patel <pragnesh.patel@sifive.com>; rick at andestech.com;
>> >u- boot at lists.denx.de
>> >Cc: bmeng.cn at gmail.com; Sagar Kadam <sagar.kadam@sifive.com>; Paul
>> >Walmsley <paul.walmsley@sifive.com>; Troy Benjegerdes
>> ><troy.benjegerdes@sifive.com>; palmerdabbelt at google.com;
>> >anup.patel at wdc.com; atish.patra at wdc.com; linux-
>> >amarula at amarulasolutions.com; Jagan Teki
><jagan@amarulasolutions.com>
>> >Subject: [PATCH v2 3/3] doc: sifive: fu540: Document Boot from MMC
>> >
>> >[External Email] Do not click links or attachments unless you
>> >recognize the sender and know the content is safe
>> >
>> >Document the Booting from MMC steps.
>> >
>> >Detailed information about partitioning, flashing and etc.
>> >
>> >Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
>> >---
>> >Changes for v2:
>> >- new patch
>> >
>> > doc/board/sifive/fu540.rst | 28 ++++++++++++++++++++++++++++
>> > 1 file changed, 28 insertions(+)
>> >
>>
>> This changes is not on top of
>> https://patchwork.ozlabs.org/project/uboot/patch/20200329170538.25449-
>> 18-pragnesh.patel at sifive.com/
>> this.
>>
>> If you don't mind, I will incorporate your changes in my v7 series which has a
>complete description for FSBL and SPL.
>
>Better take it in a patch where you enable SPL MMC. and have another patch
>before that with existing FSBL availability. This way changes look easy to
>understand.
Nice suggestion, I will incorporate this changes in my v7 series and also add your
Signed-off-by.
Can you please drop this patch in v3.
>
>Jagan.
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2020-04-29 16:02 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-04-20 13:37 [PATCH v2 1/3] sifive: fu540: Add sample SD gpt partition layout Jagan Teki
2020-04-20 13:37 ` [PATCH v2 2/3] sifive: fu540: Add U-Boot proper sector start Jagan Teki
2020-04-29 13:58 ` Bin Meng
2020-04-29 14:04 ` Pragnesh Patel
2020-04-29 14:37 ` Bin Meng
2020-04-29 14:30 ` Pragnesh Patel
2020-04-20 13:37 ` [PATCH v2 3/3] doc: sifive: fu540: Document Boot from MMC Jagan Teki
2020-04-29 13:56 ` Bin Meng
2020-04-29 15:47 ` Pragnesh Patel
2020-04-29 15:56 ` Jagan Teki
2020-04-29 16:02 ` Pragnesh Patel
2020-04-29 13:53 ` [PATCH v2 1/3] sifive: fu540: Add sample SD gpt partition layout Pragnesh Patel
2020-04-29 13:54 ` Bin Meng
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox