arm: socfpga: Enable EFI support for DE0-nano-SoC disto boot
cover arm: socfpga: Enable EFI support for DE0-nano-SoC disto boot
This enables EFI support for DE0-nano-SoC distro boot.
The patches will apply on top of Dalon Westergreens "[PATCH v3 0/8] arm: socfpga: Move to using distro boot" series.
Tested on openSUSE openSUSE Tumbleweed ARM JeOS image.
Frank Kunz (2):
arm: socfpga: Enable abort for DE-nano-SoC SPL uboot load from MMC
arm: socfpga: Enable part command and EFI partition support for
DE0-nano-SoC
configs/socfpga_de0_nano_soc_defconfig | 7 ++++--- include/configs/socfpga_de0_nano_soc.h | 2 ++ 2 files changed, 6 insertions(+), 3 deletions(-)
--
2.11.0
PATCH 1/2 arm: socfpga: Enable abort for DE-nano-SoC SPL uboot load from MMC
This allows the SPL to scan the MMC for a valid uboot image on a second sector location defined by CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR when the default location "CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR + first partition offset" does not contain a valid uboot image.
---
:100644 100644 dd5933d43c... bd3e83ddea... M include/configs/socfpga_de0_nano_soc.h
include/configs/socfpga_de0_nano_soc.h | 2 ++ 1 file changed, 2 insertions(+)
include/configs/socfpga_de0_nano_soc.h +2 -0
@@ -12,6 +12,8 @@#define CONFIG_FAT_WRITE #define CONFIG_HW_WATCHDOG +#define CONFIG_SPL_ABORT_ON_RAW_IMAGE +/* Memory configurations */ #define PHYS_SDRAM_1_SIZE 0x40000000/* 1GiB */
Signature · 1 line
2.11.0
PATCH 1/2 arm: socfpga: Enable abort for DE-nano-SoC SPL uboot load from MMC
Quoted 17 lines · Frank Kunz
This allows the SPL to scan the MMC for a valid uboot image on a second sector location defined by
CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTORwhen the default location "CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR+ first partition offset" does not contain a valid uboot image.Signed-off-by Frank Kunz <[email protected]>---
:100644 100644dd5933d43c...bd3e83ddea... Minclude/configs/socfpga_de0_nano_soc.hinclude/configs/socfpga_de0_nano_soc.h | 2 ++ 1 file changed, 2 insertions(+)include/configs/socfpga_de0_nano_soc.h +0
-0
include/configs/socfpga_de0_nano_soc.h line 19
Quoted 8 lines
include/configs/socfpga_de0_nano_soc.h +2
-0@@ -12,6 +12,8 @@#define CONFIG_FAT_WRITE #define CONFIG_HW_WATCHDOG +#define CONFIG_SPL_ABORT_ON_RAW_IMAGE +/* Memory configurations */ #define PHYS_SDRAM_1_SIZE 0x40000000/* 1GiB */
This looks like a horrid hack , didn't Dalon add support into U-Boot SPL to scan all partitions for the final u-boot image ?
PATCH 1/2 arm: socfpga: Enable abort for DE-nano-SoC SPL uboot load from MMC
Quoted 23 lines · Marek Vasut
Quoted 22 lines · Frank Kunz
This allows the SPL to scan the MMC for a valid uboot image on a second sector location defined by
CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTORwhen the default location "CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR+ first partition offset" does not contain a valid uboot image.Signed-off-by Frank Kunz <[email protected]>---
:100644 100644dd5933d43c...bd3e83ddea... Minclude/configs/socfpga_de0_nano_soc.h
include/configs/socfpga_de0_nano_soc.h | 2 ++1 file changed, 2 insertions(+)include/configs/socfpga_de0_nano_soc.h +0
-0@@ -12,6 +12,8 @@ #define CONFIG_FAT_WRITE #define CONFIG_HW_WATCHDOG
Quoted 8 lines
include/configs/socfpga_de0_nano_soc.h line 19
Quoted 6 lines
include/configs/socfpga_de0_nano_soc.h +2
-0+#define CONFIG_SPL_ABORT_ON_RAW_IMAGE + /* Memory configurations */ #define PHYS_SDRAM_1_SIZE 0x40000000 /* 1GiB */This looks like a horrid hack , didn't Dalon add support into U-Boot SPL to scan all partitions for the final u-boot image ?
I did. The 0xA2 partition can be located on any partition number now. I believe Frank places the SPL image at a 64KB offset from the start of the sdcard to skip the MBR/GPT. But per our previous debate, it is not my favored implementation as it relies on the bootrom to load the SPL once.
Also, i mentioned before that i would like to hold off on this patch set and let Ley Foon et al finish the A10 stuff.
--dalon
Quoted 4 lines
_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/listinfo/u-boot
PATCH 1/2 arm: socfpga: Enable abort for DE-nano-SoC SPL uboot load from MMC
Quoted 33 lines · Dalon Westergreen
Quoted 23 lines · Marek Vasut
Quoted 22 lines · Frank Kunz
This allows the SPL to scan the MMC for a valid uboot image on a second sector location defined by
CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTORwhen the default location "CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR+ first partition offset" does not contain a valid uboot image.Signed-off-by Frank Kunz <[email protected]>---
:100644 100644dd5933d43c...bd3e83ddea... Minclude/configs/socfpga_de0_nano_soc.hinclude/configs/socfpga_de0_nano_soc.h | 2 ++ 1 file changed, 2 insertions(+)include/configs/socfpga_de0_nano_soc.h +0
-0@@ -12,6 +12,8 @@#define CONFIG_FAT_WRITE #define CONFIG_HW_WATCHDOG Quoted 8 lines
include/configs/socfpga_de0_nano_soc.h line 19
Quoted 6 lines
include/configs/socfpga_de0_nano_soc.h +2
-0+#define CONFIG_SPL_ABORT_ON_RAW_IMAGE +/* Memory configurations */ #define PHYS_SDRAM_1_SIZE 0x40000000/* 1GiB */ This looks like a horrid hack , didn't Dalon add support into U-Boot SPL to scan all partitions for the final u-boot image ?
Quoted 7 lines
I did. The
0xA2partition can be located on any partition number now. I believe Frank places the SPL image at a 64KB offset from the start of the sdcard to skip the MBR/GPT. But per our previous debate, it is not my favored implementation as it relies on the bootrom to load the SPL once.Also, i mentioned before that i would like to hold off on this patch set and let Ley Foon et al finish the A10 stuff.
OK, although I think the A10 will take a bit longer, so there's no point in blocking this simple(r) patchset ... just don't wind up in deadlock ...
PATCH 1/2 arm: socfpga: Enable abort for DE-nano-SoC SPL uboot load from MMC
In reply to Dalon WestergreenAm 05.03.2017 um 18:36 schrieb Dalon Westergreen:
Quoted 33 lines · Marek Vasut
Quoted 23 lines · Frank Kunz
Quoted 22 lines
This allows the SPL to scan the MMC for a valid uboot image on a second sector location defined by
CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTORwhen the default location "CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR+ first partition offset" does not contain a valid uboot image.Signed-off-by Frank Kunz <[email protected]>---
:100644 100644dd5933d43c...bd3e83ddea... Minclude/configs/socfpga_de0_nano_soc.hinclude/configs/socfpga_de0_nano_soc.h | 2 ++ 1 file changed, 2 insertions(+)include/configs/socfpga_de0_nano_soc.h +0
-0@@ -12,6 +12,8 @@#define CONFIG_FAT_WRITE #define CONFIG_HW_WATCHDOG Quoted 8 lines
include/configs/socfpga_de0_nano_soc.h line 19
Quoted 6 lines
include/configs/socfpga_de0_nano_soc.h +2
-0+#define CONFIG_SPL_ABORT_ON_RAW_IMAGE +/* Memory configurations */ #define PHYS_SDRAM_1_SIZE 0x40000000/* 1GiB */ This looks like a horrid hack , didn't Dalon add support into U-Boot SPL to scan all partitions for the final u-boot image ?
Quoted 4 lines
I did. The
0xA2partition can be located on any partition number now. I believe Frank places the SPL image at a 64KB offset from the start of the sdcard to skip the MBR/GPT. But per our previous debate, it is not my favored implementation as it relies on the bootrom to load the SPL once.
I put the u-boot at 4x64kiB (sector 0x200) offset on the sdcard. With CONFIG_SPL_ABORT_ON_RAW_IMAGE config enabled the spl scans first for the configured partition in the partition table as implemented by Dalon, if that fails it tries to find the u-boot at sector 0x200 (as configured by CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR). Without that config the spl endless retries to find u-boot in the configured partition, which is not there when using GPT.
Quoted 11 lines
Also, i mentioned before that i would like to hold off on this patch set and let Ley Foon et al finish the A10 stuff.
--dalon
Quoted 4 lines
_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/listinfo/u-boot
PATCH 2/2 arm: socfpga: Enable part command and EFI partition support for DE0-nano-SoC
In reply to Frank KunzThose features are used by distro boot with efi boot.
---
:100644 100644 b122135690... c22b54b48d... M configs/socfpga_de0_nano_soc_defconfig
configs/socfpga_de0_nano_soc_defconfig | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
configs/socfpga_de0_nano_soc_defconfig +4 -3
@@ -4,11 +4,11 @@ CONFIG_SYS_MALLOC_F_LEN=0x2000 CONFIG_TARGET_SOCFPGA_TERASIC_DE0_NANO=y CONFIG_SPL_STACK_R_ADDR=0x00800000 CONFIG_DEFAULT_DEVICE_TREE="socfpga_cyclone5_de0_nano_soc" -CONFIG_DEFAULT_FDT_FILE="socfpga_cyclone5_de0_nano_soc.dtb" CONFIG_FIT=y CONFIG_SYS_CONSOLE_IS_IN_ENV=y CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE=y CONFIG_SYS_CONSOLE_ENV_OVERWRITE=y +CONFIG_DEFAULT_FDT_FILE="socfpga_cyclone5_de0_nano_soc.dtb" CONFIG_VERSION_VARIABLE=y # CONFIG_DISPLAY_BOARDINFO is not set CONFIG_SPL=y
@@ -21,6 +21,7 @@ CONFIG_CMD_ASKENV=y CONFIG_CMD_GREPENV=y # CONFIG_CMD_FLASH is not set CONFIG_CMD_MMC=y +CONFIG_CMD_PART=y CONFIG_CMD_SF=y CONFIG_CMD_SPI=y CONFIG_CMD_I2C=y
@@ -37,6 +38,8 @@ CONFIG_CMD_EXT4_WRITE=y CONFIG_CMD_FAT=y CONFIG_CMD_FS_GENERIC=y CONFIG_CMD_UBI=y +CONFIG_EFI_PARTITION=y +# CONFIG_SPL_EFI_PARTITION is not set CONFIG_SPL_DM=y CONFIG_DFU_MMC=y CONFIG_DM_GPIO=y
@@ -59,5 +62,3 @@ CONFIG_G_DNL_MANUFACTURER="terasic" CONFIG_G_DNL_VENDOR_NUM=0x0525 CONFIG_G_DNL_PRODUCT_NUM=0xa4a5 CONFIG_USE_TINY_PRINTF=y -CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION_TYPE=y -CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION_TYPE=0xa2
Signature · 1 line
2.11.0
PATCH 2/2 arm: socfpga: Enable part command and EFI partition support for DE0-nano-SoC
Quoted 13 lines · Frank Kunz
Those features are used by distro boot with efi boot.
Signed-off-by Frank Kunz <[email protected]>---
:100644 100644b122135690...c22b54b48d... M configs/socfpga_de0_nano_soc_defconfigconfigs/socfpga_de0_nano_soc_defconfig | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)configs/socfpga_de0_nano_soc_defconfig +0
-0
configs/socfpga_de0_nano_soc_defconfig CONFIG_SYS_MALLOC_F_LEN=0x2000 · line 11
Quoted 9 lines
configs/socfpga_de0_nano_soc_defconfig +1
-1@@ -4,11 +4,11 @@ CONFIG_SYS_MALLOC_F_LEN=0x2000 CONFIG_TARGET_SOCFPGA_TERASIC_DE0_NANO=y CONFIG_SPL_STACK_R_ADDR=0x00800000 CONFIG_DEFAULT_DEVICE_TREE="socfpga_cyclone5_de0_nano_soc" -CONFIG_DEFAULT_FDT_FILE="socfpga_cyclone5_de0_nano_soc.dtb" CONFIG_FIT=y CONFIG_SYS_CONSOLE_IS_IN_ENV=y CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE=y CONFIG_SYS_CONSOLE_ENV_OVERWRITE=y +CONFIG_DEFAULT_FDT_FILE="socfpga_cyclone5_de0_nano_soc.dtb"
Is this move needed ? (no, it's not)
Quoted 21 lines
configs/socfpga_de0_nano_soc_defconfig +3
-0CONFIG_VERSION_VARIABLE=y # CONFIG_DISPLAY_BOARDINFO is not set CONFIG_SPL=y@@ -21,6 +21,7 @@ CONFIG_CMD_ASKENV=y CONFIG_CMD_GREPENV=y # CONFIG_CMD_FLASH is not set CONFIG_CMD_MMC=y +CONFIG_CMD_PART=y CONFIG_CMD_SF=y CONFIG_CMD_SPI=y CONFIG_CMD_I2C=y@@ -37,6 +38,8 @@ CONFIG_CMD_EXT4_WRITE=y CONFIG_CMD_FAT=y CONFIG_CMD_FS_GENERIC=y CONFIG_CMD_UBI=y +CONFIG_EFI_PARTITION=y +# CONFIG_SPL_EFI_PARTITION is not set CONFIG_SPL_DM=y CONFIG_DFU_MMC=y CONFIG_DM_GPIO=y
configs/socfpga_de0_nano_soc_defconfig CONFIG_G_DNL_MANUFACTURER="terasic" · line 63
Quoted 5 lines
configs/socfpga_de0_nano_soc_defconfig +0
-2@@ -59,5 +62,3 @@ CONFIG_G_DNL_MANUFACTURER="terasic" CONFIG_G_DNL_VENDOR_NUM=0x0525 CONFIG_G_DNL_PRODUCT_NUM=0xa4a5 CONFIG_USE_TINY_PRINTF=y -CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION_TYPE=y -CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION_TYPE=0xa2
+CC Dalon ...
Quoted 2 lines
\ No newline at end of file
PATCH 2/2 arm: socfpga: Enable part command and EFI partition support for DE0-nano-SoC
Am 05.03.2017 um 18:17 schrieb Marek Vasut:
Quoted 19 lines · Frank Kunz
Quoted 18 lines
Those features are used by distro boot with efi boot.
Signed-off-by Frank Kunz <[email protected]>---
:100644 100644b122135690...c22b54b48d... M
configs/socfpga_de0_nano_soc_defconfigconfigs/socfpga_de0_nano_soc_defconfig | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)configs/socfpga_de0_nano_soc_defconfig +0
-0@@ -4,11 +4,11 @@ CONFIG_SYS_MALLOC_F_LEN=0x2000 CONFIG_TARGET_SOCFPGA_TERASIC_DE0_NANO=y CONFIG_SPL_STACK_R_ADDR=0x00800000 CONFIG_DEFAULT_DEVICE_TREE="socfpga_cyclone5_de0_nano_soc"
Quoted 8 lines
configs/socfpga_de0_nano_soc_defconfig CONFIG_SYS_MALLOC_F_LEN=0x2000 · line 11
Quoted 6 lines
configs/socfpga_de0_nano_soc_defconfig +1
-1-CONFIG_DEFAULT_FDT_FILE="socfpga_cyclone5_de0_nano_soc.dtb" CONFIG_FIT=y CONFIG_SYS_CONSOLE_IS_IN_ENV=y CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE=y CONFIG_SYS_CONSOLE_ENV_OVERWRITE=y +CONFIG_DEFAULT_FDT_FILE="socfpga_cyclone5_de0_nano_soc.dtb"Is this move needed ? (no, it's not)
It is not needed, but "make savedefconfig" decided to do that. I do not know how to overcome it.
Quoted 21 lines
Quoted 21 lines
configs/socfpga_de0_nano_soc_defconfig +3
-0CONFIG_VERSION_VARIABLE=y # CONFIG_DISPLAY_BOARDINFO is not set CONFIG_SPL=y@@ -21,6 +21,7 @@ CONFIG_CMD_ASKENV=y CONFIG_CMD_GREPENV=y # CONFIG_CMD_FLASH is not set CONFIG_CMD_MMC=y +CONFIG_CMD_PART=y CONFIG_CMD_SF=y CONFIG_CMD_SPI=y CONFIG_CMD_I2C=y@@ -37,6 +38,8 @@ CONFIG_CMD_EXT4_WRITE=y CONFIG_CMD_FAT=y CONFIG_CMD_FS_GENERIC=y CONFIG_CMD_UBI=y +CONFIG_EFI_PARTITION=y +# CONFIG_SPL_EFI_PARTITION is not set CONFIG_SPL_DM=y CONFIG_DFU_MMC=y CONFIG_DM_GPIO=y
Quoted 8 lines
configs/socfpga_de0_nano_soc_defconfig CONFIG_G_DNL_MANUFACTURER="terasic" · line 63
Quoted 6 lines
configs/socfpga_de0_nano_soc_defconfig +0
-2@@ -59,5 +62,3 @@ CONFIG_G_DNL_MANUFACTURER="terasic" CONFIG_G_DNL_VENDOR_NUM=0x0525 CONFIG_G_DNL_PRODUCT_NUM=0xa4a5 CONFIG_USE_TINY_PRINTF=y -CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION_TYPE=y -CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION_TYPE=0xa2+CC Dalon ...
Similar case here. "make savedefconfig" found that those two parameters are already set by arch/arm/mach-socfpga/Kconfig and decided to remove them here, I guess.
Quoted 5 lines
Quoted 3 lines
\ No newline at end of file
PATCH 2/2 arm: socfpga: Enable part command and EFI partition support for DE0-nano-SoC
Quoted 29 lines · Frank Kunz
Am 05.03.2017 um 18:17 schrieb Marek Vasut:
Quoted 19 lines · Frank Kunz
Quoted 18 lines
Those features are used by distro boot with efi boot.
Signed-off-by Frank Kunz <[email protected]>---
:100644 100644b122135690...c22b54b48d... M
configs/socfpga_de0_nano_soc_defconfigconfigs/socfpga_de0_nano_soc_defconfig | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)configs/socfpga_de0_nano_soc_defconfig +0
-0@@ -4,11 +4,11 @@ CONFIG_SYS_MALLOC_F_LEN=0x2000 CONFIG_TARGET_SOCFPGA_TERASIC_DE0_NANO=y CONFIG_SPL_STACK_R_ADDR=0x00800000 CONFIG_DEFAULT_DEVICE_TREE="socfpga_cyclone5_de0_nano_soc"Quoted 8 lines
configs/socfpga_de0_nano_soc_defconfig CONFIG_SYS_MALLOC_F_LEN=0x2000 · line 11
Quoted 6 lines
configs/socfpga_de0_nano_soc_defconfig +1
-1-CONFIG_DEFAULT_FDT_FILE="socfpga_cyclone5_de0_nano_soc.dtb" CONFIG_FIT=y CONFIG_SYS_CONSOLE_IS_IN_ENV=y CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE=y CONFIG_SYS_CONSOLE_ENV_OVERWRITE=y +CONFIG_DEFAULT_FDT_FILE="socfpga_cyclone5_de0_nano_soc.dtb"Is this move needed ? (no, it's not)
Quoted 2 lines
It is not needed, but "make savedefconfig" decided to do that. I do not know how to overcome it.
Try git checkout -p to selectively clear bits from the changes. Or git add -p ...
Quoted 40 lines
Quoted 21 lines
Quoted 21 lines
configs/socfpga_de0_nano_soc_defconfig +3
-0CONFIG_VERSION_VARIABLE=y # CONFIG_DISPLAY_BOARDINFO is not set CONFIG_SPL=y@@ -21,6 +21,7 @@ CONFIG_CMD_ASKENV=y CONFIG_CMD_GREPENV=y # CONFIG_CMD_FLASH is not set CONFIG_CMD_MMC=y +CONFIG_CMD_PART=y CONFIG_CMD_SF=y CONFIG_CMD_SPI=y CONFIG_CMD_I2C=y@@ -37,6 +38,8 @@ CONFIG_CMD_EXT4_WRITE=y CONFIG_CMD_FAT=y CONFIG_CMD_FS_GENERIC=y CONFIG_CMD_UBI=y +CONFIG_EFI_PARTITION=y +# CONFIG_SPL_EFI_PARTITION is not set CONFIG_SPL_DM=y CONFIG_DFU_MMC=y CONFIG_DM_GPIO=yQuoted 8 lines
configs/socfpga_de0_nano_soc_defconfig CONFIG_G_DNL_MANUFACTURER="terasic" · line 63
Quoted 6 lines
configs/socfpga_de0_nano_soc_defconfig +0
-2@@ -59,5 +62,3 @@ CONFIG_G_DNL_MANUFACTURER="terasic" CONFIG_G_DNL_VENDOR_NUM=0x0525 CONFIG_G_DNL_PRODUCT_NUM=0xa4a5 CONFIG_USE_TINY_PRINTF=y -CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION_TYPE=y -CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION_TYPE=0xa2+CC Dalon ...
Similar case here. "make savedefconfig" found that those two parameters are already set by
arch/arm/mach-socfpga/Kconfigand decided to remove them here, I guess.Quoted 5 lines
Quoted 3 lines
\ No newline at end of file