arm: socfpga: update default u-boot environment
v8 cover arm: socfpga: update default u-boot environment
From: Dalon Westergreen <[email protected]>
These patches update the boot and os partition numbers in the default uboot environment for a number of socfpga boards. Per request, common environment configurations have been moved to a shared header.
Changed in v8:
Revert CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION to be 1 per request
Changed in v7:
Changed the bootloader partition to 3 to match the default layout for socfpga. commit 61520ac4d5545cc8d2e1792092e46ab8043d5f36 changed this to 1 which broke a number of socfpga kits. The default sdcard layour places partition 3 at the start of the fpga at +1MB. The partition is of type 0xA2. This is followed by partition 1 (FAT), and partition 2 (RootFS). Partition 1 should be the FAT partition or windows appears not to recognize the sdcard.
Changed in v6:
Changed CONFIG_SYS_MMCSD_FS_BOOT_PARTITION to be 1 for SPL_FAT and 2 for SPL_EXT support. I believe this is the original intent for whomever changed CONFIG_SYS_MMCSD_FS_BOOT_PARTITION to be 2. This allows us to keep the original sdcard layout and support FAT and EXT loading of the u-boot image
Changes in v5:
- Fixed sockit linux devicetree name
- Changed default socfpga.dtb to match board name
- sr1500 -> socfpga_cyclone5_sr1500.dtb
- de1 -> socfpga_cyclone5_de1_soc.dtb
Changes in v4:
- Removed extraneous define in socfpga_common.h
and only use CONFIG_EXTRA_ENV_SETTINGS for
common uboot environment
Changes in v3:
- Corrected error in common default environment
Dalon Westergreen (7):
arm: socfpga: add env settings to common header
arm: socfpga: update de0 nano default environment
arm: socfpga: update cyclone5 socdk default environment
arm: socfpga: update arria5 socdk default environment
arm: socfpga: Update DE1 environment
arm: socfpga: Update SoCKit environment
arm: socfpga: Update sr1500 environment
configs/socfpga_arria5_defconfig | 1 + configs/socfpga_cyclone5_defconfig | 1 + configs/socfpga_de0_nano_soc_defconfig | 3 +-- configs/socfpga_de1_soc_defconfig | 1 + configs/socfpga_sockit_defconfig | 1 + configs/socfpga_sr1500_defconfig | 1 + include/configs/socfpga_arria5_socdk.h | 25 ------------------------ include/configs/socfpga_common.h | 33 +++++++++++++++++++++++++++++++- include/configs/socfpga_cyclone5_socdk.h | 25 ------------------------ include/configs/socfpga_de0_nano_soc.h | 19 +----------------- include/configs/socfpga_de1_soc.h | 19 +----------------- include/configs/socfpga_sockit.h | 27 +------------------------- include/configs/socfpga_sr1500.h | 25 ------------------------ 13 files changed, 41 insertions(+), 140 deletions(-)
Signature · 1 line
2.7.4
PATCH v8 1/7 arm: socfpga: add env settings to common header
From: Dalon Westergreen <[email protected]>
Move repeated environment settings for socfpga boards to a common header.
The default values for the boot partition and the OS filesystem partition have changed and as as result the default uboot environment for socfpga boards needs updating.
Move to using CONFIG_DEFAULT_DEVICE_TREE for setting the default linux devicetree used during linux boot.
--- include/configs/socfpga_common.h | 35 +++++++++++++++++++++++++++++++++-- 1 file changed, 33 insertions(+), 2 deletions(-)
include/configs/socfpga_common.h +33 -2
@@ -312,10 +312,14 @@ unsigned int cm_get_qspi_controller_clk_hz(void);/* SPL SDMMC boot support */ #ifdef CONFIG_SPL_MMC_SUPPORT #if defined(CONFIG_SPL_FAT_SUPPORT ) || defined(CONFIG_SPL_EXT_SUPPORT ) -#define CONFIG_SYS_MMCSD_FS_BOOT_PARTITION 2#define CONFIG_SPL_FS_LOAD_PAYLOAD_NAME "u-boot-dtb.img" +#ifdef CONFIG_SPL_FAT_SUPPORT +#define CONFIG_SYS_MMCSD_FS_BOOT_PARTITION 1 +#else +#define CONFIG_SYS_MMCSD_FS_BOOT_PARTITION 2 +#endif #else -#define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION 1 +#define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION 3#endif #endif
@@ -336,5 +340,32 @@ unsigned int cm_get_qspi_controller_clk_hz(void);* Stack setup */ #define CONFIG_SPL_STACK CONFIG_SYS_INIT_SP_ADDR + +/* Extra Environment */ +#ifndef CONFIG_EXTRA_ENV_SETTINGS +#define CONFIG_EXTRA_ENV_SETTINGS \ + "verify=n\0" \ + "loadaddr=" __stringify(CONFIG_SYS_LOAD_ADDR) "\0" \ + "bootimage=" CONFIG_BOOTFILE "\0" \ + "fdt_addr=100\0" \ + "fdtimage=" CONFIG_DEFAULT_FDT_FILE "\0" \ + "ramboot=setenv bootargs " CONFIG_BOOTARGS ";" \ + "bootm ${loadaddr} - ${fdt_addr}\0" \ + "mmcroot=/dev/mmcblk0p2\0" \ + "mmcboot=setenv bootargs " CONFIG_BOOTARGS \ + " root=${mmcroot} rw rootwait;" \ + "bootz ${loadaddr} - ${fdt_addr}\0" \ + "mmcload=mmc rescan;" \ + "load mmc 0:1 ${loadaddr} ${bootimage};" \ + "load mmc 0:1 ${fdt_addr} ${fdtimage}\0" \ + "qspiload=sf probe && mtdparts default && run ubiload\0" \ + "qspiboot=setenv bootargs " CONFIG_BOOTARGS \ + " ubi.mtd=1,64 root=ubi0:rootfs rw rootfstype=ubifs;"\ + "bootz ${loadaddr} - ${fdt_addr}\0" \ + "ubiload=ubi part UBI && ubifsmount ubi0 && " \ + "ubifsload ${loadaddr} /boot/${bootimage} && " \ + "ubifsload ${fdt_addr} /boot/${fdtimage}\0" + +#endif #endif /* __CONFIG_SOCFPGA_COMMON_H__ */
Signature · 1 line
2.7.4
PATCH v8 1/7 arm: socfpga: add env settings to common header
Quoted 58 lines · Dalon Westergreen
From: Dalon Westergreen <[email protected]>
Move repeated environment settings for socfpga boards to a common header.
The default values for the boot partition and the OS filesystem partition have changed and as as result the default uboot environment for socfpga boards needs updating.
Move to using
CONFIG_DEFAULT_DEVICE_TREEfor setting the default linux devicetree used during linux boot.Signed-off-by Dalon Westergreen <[email protected]>--- include/configs/socfpga_common.h | 35 +++++++++++++++++++++++++++++++++-- 1 file changed, 33 insertions(+), 2 deletions(-)include/configs/socfpga_common.h +21
-2@@ -312,10 +312,14 @@ unsigned int cm_get_qspi_controller_clk_hz(void);/* SPL SDMMC boot support */ #ifdef CONFIG_SPL_MMC_SUPPORT #if defined(CONFIG_SPL_FAT_SUPPORT ) || defined(CONFIG_SPL_EXT_SUPPORT ) -#define CONFIG_SYS_MMCSD_FS_BOOT_PARTITION 2#define CONFIG_SPL_FS_LOAD_PAYLOAD_NAME "u-boot-dtb.img" +#ifdef CONFIG_SPL_FAT_SUPPORT +#define CONFIG_SYS_MMCSD_FS_BOOT_PARTITION 1 +#else +#define CONFIG_SYS_MMCSD_FS_BOOT_PARTITION 2 +#endif #else -#define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION 1 +#define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION 3#endif #endif @@ -336,5 +340,32 @@ unsigned int cm_get_qspi_controller_clk_hz(void);* Stack setup */ #define CONFIG_SPL_STACK CONFIG_SYS_INIT_SP_ADDR + +/* Extra Environment */ +#ifndef CONFIG_EXTRA_ENV_SETTINGS +#define CONFIG_EXTRA_ENV_SETTINGS \ + "verify=n\0" \ + "loadaddr=" __stringify(CONFIG_SYS_LOAD_ADDR) "\0" \ + "bootimage=" CONFIG_BOOTFILE "\0" \ + "fdt_addr=100\0" \ + "fdtimage=" CONFIG_DEFAULT_FDT_FILE "\0" \ + "ramboot=setenv bootargs " CONFIG_BOOTARGS ";" \ + "bootm ${loadaddr} - ${fdt_addr}\0" \ + "mmcroot=/dev/mmcblk0p2\0" \ + "mmcboot=setenv bootargs " CONFIG_BOOTARGS \ + " root=${mmcroot} rw rootwait;" \ + "bootz ${loadaddr} - ${fdt_addr}\0" \
include/configs/socfpga_common.h unsigned int cm_get_qspi_controller_clk_hz(void); · line 367
Quoted 10 lines
include/configs/socfpga_common.h +10
-0+"mmcload=mmc rescan;" \ +"load mmc 0:1 ${loadaddr} ${bootimage};" \ +"load mmc 0:1 ${fdt_addr} ${fdtimage}\0" \ +"qspiload=sf probe && mtdparts default && run ubiload\0" \ +"qspiboot=setenv bootargs " CONFIG_BOOTARGS \ +" ubi.mtd=1,64 root=ubi0:rootfs rw rootfstype=ubifs;" \ +"bootz ${loadaddr} - ${fdt_addr}\0" \ +"ubiload=ubi part UBI && ubifsmount ubi0 && " \ +"ubifsload ${loadaddr} /boot/${bootimage} && " \ +"ubifsload ${fdt_addr} /boot/${fdtimage}\0"
What is the default bootcmd with this environment? Also, keep in mind that it's 2017. Is there any good reason not to default to distro boot?
Alex
PATCH v8 1/7 arm: socfpga: add env settings to common header
Quoted 76 lines · Alexander Graf
Quoted 60 lines · Dalon Westergreen
From: Dalon Westergreen <[email protected]>
Move repeated environment settings for socfpga boards to a common header.
The default values for the boot partition and the OS filesystem partition have changed and as as result the default uboot environment for socfpga boards needs updating.
Move to using??CONFIG_DEFAULT_DEVICE_TREE for setting the default linux devicetree used during linux boot.
Signed-off-by Dalon Westergreen <[email protected]>---
?include/configs/socfpga_common.h| 35 +++++++++++++++++++++++++++++++++-- ? 1 file changed, 33 insertions(+), 2 deletions(-)include/configs/socfpga_common.h +0
-0@@ -312,10 +312,14 @@ unsigned int cm_get_qspi_controller_clk_hz(void);? /* SPL SDMMC boot support */
? #ifdefCONFIG_SPL_MMC_SUPPORT
? #ifdefined(CONFIG_SPL_FAT_SUPPORT)||defined(CONFIG_SPL_EXT_SUPPORT)
-#defineCONFIG_SYS_MMCSD_FS_BOOT_PARTITION2
? #defineCONFIG_SPL_FS_LOAD_PAYLOAD_NAME"u-boot-dtb.img"include/configs/socfpga_common.h +5
-0+#ifdef CONFIG_SPL_FAT_SUPPORT +#define CONFIG_SYS_MMCSD_FS_BOOT_PARTITION 1 +#else +#define CONFIG_SYS_MMCSD_FS_BOOT_PARTITION 2 +#endif ? #else
include/configs/socfpga_common.h +1
-1-#define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION 1 +#define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION 3? #endif
? #endif
??include/configs/socfpga_common.h +0
-0@@ -336,5 +340,32 @@ unsigned int cm_get_qspi_controller_clk_hz(void);???* Stack setup
???*/
? #defineCONFIG_SPL_STACKCONFIG_SYS_INIT_SP_ADDRinclude/configs/socfpga_common.h +15
-0+ +/* Extra Environment */ +#ifndef CONFIG_EXTRA_ENV_SETTINGS +#define CONFIG_EXTRA_ENV_SETTINGS \ + "verify=n\0" \ + "loadaddr=" __stringify(CONFIG_SYS_LOAD_ADDR) "\0" \ + "bootimage=" CONFIG_BOOTFILE "\0" \ + "fdt_addr=100\0" \ + "fdtimage=" CONFIG_DEFAULT_FDT_FILE "\0" \ + "ramboot=setenv bootargs " CONFIG_BOOTARGS ";" \ + "bootm ${loadaddr} - ${fdt_addr}\0" \ + "mmcroot=/dev/mmcblk0p2\0" \ + "mmcboot=setenv bootargs " CONFIG_BOOTARGS \ + " root=${mmcroot} rw rootwait;" \ + "bootz ${loadaddr} - ${fdt_addr}\0" \include/configs/socfpga_common.h unsigned int cm_get_qspi_controller_clk_hz(void); · line 367
Quoted 10 lines
include/configs/socfpga_common.h +10
-0+"mmcload=mmc rescan;" \ +"load mmc 0:1 ${loadaddr} ${bootimage};" \ +"load mmc 0:1 ${fdt_addr} ${fdtimage}\0" \ +"qspiload=sf probe && mtdparts default && run ubiload\0" \ +"qspiboot=setenv bootargs " CONFIG_BOOTARGS \ +" ubi.mtd=1,64 root=ubi0:rootfs rw rootfstype=ubifs;" \ +"bootz ${loadaddr} - ${fdt_addr}\0" \ +"ubiload=ubi part UBI && ubifsmount ubi0 && " \ +"ubifsload ${loadaddr} /boot/${bootimage} && " \ +"ubifsload ${fdt_addr} /boot/${fdtimage}\0" What is the default bootcmd with this environment? Also, keep in mind? that it's 2017. Is there any good reason not to default to distro boot?
Quoted 2 lines
Alex
The default is board dependent, but in general is mmcboot. there is no good reason to not use distro boot. ?Frank Kunz submitted something to that end for one of these boards the other day. ?once the? environment common, we will move to distro boot.
PATCH v8 1/7 arm: socfpga: add env settings to common header
Quoted 75 lines · Dalon Westergreen
Quoted 74 lines · Alexander Graf
Quoted 59 lines · Dalon Westergreen
From: Dalon Westergreen <[email protected]>
Move repeated environment settings for socfpga boards to a common header.
The default values for the boot partition and the OS filesystem partition have changed and as as result the default uboot environment for socfpga boards needs updating.
Move to using
CONFIG_DEFAULT_DEVICE_TREEfor setting the default linux devicetree used during linux boot.Signed-off-by Dalon Westergreen <[email protected]>--- include/configs/socfpga_common.h | 35 +++++++++++++++++++++++++++++++++-- 1 file changed, 33 insertions(+), 2 deletions(-)include/configs/socfpga_common.h +21
-2@@ -312,10 +312,14 @@ unsigned int cm_get_qspi_controller_clk_hz(void);/* SPL SDMMC boot support */ #ifdef CONFIG_SPL_MMC_SUPPORT #if defined(CONFIG_SPL_FAT_SUPPORT ) || defined(CONFIG_SPL_EXT_SUPPORT ) -#define CONFIG_SYS_MMCSD_FS_BOOT_PARTITION 2#define CONFIG_SPL_FS_LOAD_PAYLOAD_NAME "u-boot-dtb.img" +#ifdef CONFIG_SPL_FAT_SUPPORT +#define CONFIG_SYS_MMCSD_FS_BOOT_PARTITION 1 +#else +#define CONFIG_SYS_MMCSD_FS_BOOT_PARTITION 2 +#endif #else -#define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION 1 +#define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION 3#endif #endif @@ -336,5 +340,32 @@ unsigned int cm_get_qspi_controller_clk_hz(void);* Stack setup */ #define CONFIG_SPL_STACK CONFIG_SYS_INIT_SP_ADDR + +/* Extra Environment */ +#ifndef CONFIG_EXTRA_ENV_SETTINGS +#define CONFIG_EXTRA_ENV_SETTINGS \ + "verify=n\0" \ + "loadaddr=" __stringify(CONFIG_SYS_LOAD_ADDR) "\0" \ + "bootimage=" CONFIG_BOOTFILE "\0" \ + "fdt_addr=100\0" \ + "fdtimage=" CONFIG_DEFAULT_FDT_FILE "\0" \ + "ramboot=setenv bootargs " CONFIG_BOOTARGS ";" \ + "bootm ${loadaddr} - ${fdt_addr}\0" \ + "mmcroot=/dev/mmcblk0p2\0" \ + "mmcboot=setenv bootargs " CONFIG_BOOTARGS \ + " root=${mmcroot} rw rootwait;" \ + "bootz ${loadaddr} - ${fdt_addr}\0" \include/configs/socfpga_common.h unsigned int cm_get_qspi_controller_clk_hz(void); · line 367
Quoted 10 lines
include/configs/socfpga_common.h +10
-0+"mmcload=mmc rescan;" \ +"load mmc 0:1 ${loadaddr} ${bootimage};" \ +"load mmc 0:1 ${fdt_addr} ${fdtimage}\0" \ +"qspiload=sf probe && mtdparts default && run ubiload\0" \ +"qspiboot=setenv bootargs " CONFIG_BOOTARGS \ +" ubi.mtd=1,64 root=ubi0:rootfs rw rootfstype=ubifs;" \ +"bootz ${loadaddr} - ${fdt_addr}\0" \ +"ubiload=ubi part UBI && ubifsmount ubi0 && " \ +"ubifsload ${loadaddr} /boot/${bootimage} && " \ +"ubifsload ${fdt_addr} /boot/${fdtimage}\0" What is the default bootcmd with this environment? Also, keep in mind that it's 2017. Is there any good reason not to default to distro boot?
Quoted 6 lines
Quoted 2 lines
Alex
The default is board dependent, but in general is mmcboot. there is no good reason to not use distro boot. Frank Kunz submitted something to that end for one of these boards the other day. once the environment common, we will move to distro boot.
Ok, that sounds like a reasonable plan to me :)
Alex
PATCH v8 2/7 arm: socfpga: update de0 nano default environment
In reply to Dalon WestergreenFrom: Dalon Westergreen <[email protected]>
Remove the default environment as it is now in a common header.
Add the CONFIG_DEFAULT_DEVICE_TREE to the board's defconfig to set the linux devicetree name.
--- configs/socfpga_de0_nano_soc_defconfig | 3 +-- include/configs/socfpga_common.h | 2 +- include/configs/socfpga_de0_nano_soc.h | 19 +------------------ 3 files changed, 3 insertions(+), 21 deletions(-)
configs/socfpga_de0_nano_soc_defconfig +1 -2
@@ -4,6 +4,7 @@ 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_sockit.dtb" CONFIG_FIT=y CONFIG_SYS_CONSOLE_IS_IN_ENV=y CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE=y
@@ -20,7 +21,6 @@ CONFIG_CMD_ASKENV=y CONFIG_CMD_GREPENV=y # CONFIG_CMD_FLASH is not set CONFIG_CMD_MMC=y -CONFIG_CMD_SF=y CONFIG_CMD_SPI=y CONFIG_CMD_I2C=y CONFIG_CMD_USB=y
@@ -35,7 +35,6 @@ CONFIG_CMD_EXT4=y CONFIG_CMD_EXT4_WRITE=y CONFIG_CMD_FAT=y CONFIG_CMD_FS_GENERIC=y -CONFIG_CMD_UBI=y CONFIG_SPL_DM=y CONFIG_DFU_MMC=y CONFIG_DM_GPIO=y
include/configs/socfpga_common.h +1 -1
@@ -319,7 +319,7 @@ unsigned int cm_get_qspi_controller_clk_hz(void);#define CONFIG_SYS_MMCSD_FS_BOOT_PARTITION 2#endif #else -#define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION 3 +#define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION 1#endif #endif
include/configs/socfpga_de0_nano_soc.h +1 -18
@@ -18,7 +18,7 @@#define PHYS_SDRAM_1_SIZE 0x40000000/* 1GiB */ /* Booting Linux */ -#define CONFIG_BOOTFILE "fitImage" +#define CONFIG_BOOTFILE "zImage"#define CONFIG_BOOTARGS "console=ttyS0," __stringify(CONFIG_BAUDRATE)#define CONFIG_BOOTCOMMAND "run mmcload; run mmcboot"#define CONFIG_LOADADDR 0x01000000
@@ -32,23 +32,6 @@#define CONFIG_ENV_IS_IN_MMC -/* Extra Environment */ -#define CONFIG_EXTRA_ENV_SETTINGS \ - "loadaddr=" __stringify(CONFIG_SYS_LOAD_ADDR) "\0" \ - "ramboot=setenv bootargs " CONFIG_BOOTARGS ";" \ - "bootm ${loadaddr} - ${fdt_addr}\0" \ - "bootimage=zImage\0" \ - "fdt_addr=100\0" \ - "fdtimage=socfpga.dtb\0" \ - "bootm ${loadaddr} - ${fdt_addr}\0" \ - "mmcroot=/dev/mmcblk0p2\0" \ - "mmcboot=setenv bootargs " CONFIG_BOOTARGS \ - " root=${mmcroot} rw rootwait;" \ - "bootz ${loadaddr} - ${fdt_addr}\0" \ - "mmcload=mmc rescan;" \ - "load mmc 0:1 ${loadaddr} ${bootimage};" \ - "load mmc 0:1 ${fdt_addr} ${fdtimage}\0" \ -/* The rest of the configuration is shared */ #include <configs/socfpga_common.h>
Signature · 1 line
2.7.4
PATCH v8 2/7 arm: socfpga: update de0 nano default environment
Quoted 29 lines · Dalon Westergreen
From: Dalon Westergreen <[email protected]>
Remove the default environment as it is now in a common header.
Add the
CONFIG_DEFAULT_DEVICE_TREEto the board's defconfig to set the linux devicetree name.Signed-off-by Dalon Westergreen <[email protected]>Acked-by Marek Vasut <[email protected]>--- configs/socfpga_de0_nano_soc_defconfig | 3 +-- include/configs/socfpga_common.h | 2 +- include/configs/socfpga_de0_nano_soc.h | 19 +------------------ 3 files changed, 3 insertions(+), 21 deletions(-)configs/socfpga_de0_nano_soc_defconfig +1
-0@@ -4,6 +4,7 @@ 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_sockit.dtb" CONFIG_FIT=y CONFIG_SYS_CONSOLE_IS_IN_ENV=y CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE=y
configs/socfpga_de0_nano_soc_defconfig CONFIG_CMD_ASKENV=y · line 23
Quoted 4 lines
configs/socfpga_de0_nano_soc_defconfig +0
-1@@ -20,7 +21,6 @@ CONFIG_CMD_ASKENV=y CONFIG_CMD_GREPENV=y # CONFIG_CMD_FLASH is not set CONFIG_CMD_MMC=y -CONFIG_CMD_SF=y
This change is not mentioned in teh change log?
configs/socfpga_de0_nano_soc_defconfig CONFIG_CMD_EXT4=y · line 38
Quoted 8 lines
configs/socfpga_de0_nano_soc_defconfig +0
-1CONFIG_CMD_SPI=y CONFIG_CMD_I2C=y CONFIG_CMD_USB=y@@ -35,7 +35,6 @@ CONFIG_CMD_EXT4=y CONFIG_CMD_EXT4_WRITE=y CONFIG_CMD_FAT=y CONFIG_CMD_FS_GENERIC=y -CONFIG_CMD_UBI=y
Neither is this.
Quoted 21 lines
configs/socfpga_de0_nano_soc_defconfig +0
-0CONFIG_SPL_DM=y CONFIG_DFU_MMC=y CONFIG_DM_GPIO=yinclude/configs/socfpga_common.h +1
-1@@ -319,7 +319,7 @@ unsigned int cm_get_qspi_controller_clk_hz(void);#define CONFIG_SYS_MMCSD_FS_BOOT_PARTITION 2#endif #else -#define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION 3 +#define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION 1#endif #endif include/configs/socfpga_de0_nano_soc.h +0
-0
include/configs/socfpga_de0_nano_soc.h line 23
Quoted 7 lines
include/configs/socfpga_de0_nano_soc.h +1
-1@@ -18,7 +18,7 @@#define PHYS_SDRAM_1_SIZE 0x40000000/* 1GiB */ /* Booting Linux */ -#define CONFIG_BOOTFILE "fitImage" +#define CONFIG_BOOTFILE "zImage"#define CONFIG_BOOTARGS "console=ttyS0," __stringify(CONFIG_BAUDRATE)#define CONFIG_BOOTCOMMAND "run mmcload; run mmcboot"
... oh, I see. So the default boot command is defined per-target rather than generically.
Loading a predefined file name (usually also + initrd file) + dtb file from mmc sounds like something that would be generically useful to boards that want to support legacy boot paths. Take a look at the SCAN_DEV_FOR_EFI define in include/config_distro_bootcmd.h. Something along those lines to replace mmcload/mmcboot should work for you, right?
That way your boot script would search for legacy boot options as well as fancy awesome state-of-the-art extlinux/efi ones.
Alex
PATCH v8 3/7 arm: socfpga: update cyclone5 socdk default environment
In reply to Dalon WestergreenFrom: Dalon Westergreen <[email protected]>
Remove the default environment as it is now in a common header.
Add the CONFIG_DEFAULT_DEVICE_TREE to the board's defconfig to set the linux devicetree name.
--- configs/socfpga_cyclone5_defconfig | 1 + include/configs/socfpga_cyclone5_socdk.h | 25 ------------------------- 2 files changed, 1 insertion(+), 25 deletions(-)
configs/socfpga_cyclone5_defconfig +1 -0
@@ -4,6 +4,7 @@ CONFIG_SYS_MALLOC_F_LEN=0x2000 CONFIG_TARGET_SOCFPGA_CYCLONE5_SOCDK=y CONFIG_SPL_STACK_R_ADDR=0x00800000 CONFIG_DEFAULT_DEVICE_TREE="socfpga_cyclone5_socdk" +CONFIG_DEFAULT_FDT_FILE="socfpga_cyclone5_socdk.dtb" CONFIG_FIT=y CONFIG_SYS_CONSOLE_IS_IN_ENV=y CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE=y
include/configs/socfpga_cyclone5_socdk.h +0 -25
@@ -36,31 +36,6 @@#define CONFIG_ENV_IS_IN_MMC -/* Extra Environment */ -#define CONFIG_EXTRA_ENV_SETTINGS \ - "verify=n\0" \ - "loadaddr=" __stringify(CONFIG_SYS_LOAD_ADDR) "\0" \ - "ramboot=setenv bootargs " CONFIG_BOOTARGS ";" \ - "bootm ${loadaddr} - ${fdt_addr}\0" \ - "bootimage=zImage\0" \ - "fdt_addr=100\0" \ - "fdtimage=socfpga.dtb\0" \ - "bootm ${loadaddr} - ${fdt_addr}\0" \ - "mmcroot=/dev/mmcblk0p2\0" \ - "mmcboot=setenv bootargs " CONFIG_BOOTARGS \ - " root=${mmcroot} rw rootwait;" \ - "bootz ${loadaddr} - ${fdt_addr}\0" \ - "mmcload=mmc rescan;" \ - "load mmc 0:1 ${loadaddr} ${bootimage};" \ - "load mmc 0:1 ${fdt_addr} ${fdtimage}\0" \ - "qspiload=sf probe && mtdparts default && run ubiload\0" \ - "qspiboot=setenv bootargs " CONFIG_BOOTARGS \ - " ubi.mtd=1,64 root=ubi0:rootfs rw rootfstype=ubifs;"\ - "bootz ${loadaddr} - ${fdt_addr}\0" \ - "ubiload=ubi part UBI && ubifsmount ubi0 && " \ - "ubifsload ${loadaddr} /boot/${bootimage} && " \ - "ubifsload ${fdt_addr} /boot/${fdtimage}\0" -/* The rest of the configuration is shared */ #include <configs/socfpga_common.h>
Signature · 1 line
2.7.4
PATCH v8 4/7 arm: socfpga: update arria5 socdk default environment
In reply to Dalon WestergreenFrom: Dalon Westergreen <[email protected]>
Remove the default environment as it is now in a common header.
Add the CONFIG_DEFAULT_DEVICE_TREE to the board's defconfig to set the linux devicetree name.
--- configs/socfpga_arria5_defconfig | 1 + include/configs/socfpga_arria5_socdk.h | 25 ------------------------- 2 files changed, 1 insertion(+), 25 deletions(-)
configs/socfpga_arria5_defconfig +1 -0
@@ -4,6 +4,7 @@ CONFIG_SYS_MALLOC_F_LEN=0x2000 CONFIG_TARGET_SOCFPGA_ARRIA5_SOCDK=y CONFIG_SPL_STACK_R_ADDR=0x00800000 CONFIG_DEFAULT_DEVICE_TREE="socfpga_arria5_socdk" +CONFIG_DEFAULT_FDT_FILE="socfpga_arria5_socdk.dtb" CONFIG_FIT=y CONFIG_SYS_CONSOLE_IS_IN_ENV=y CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE=y
include/configs/socfpga_arria5_socdk.h +0 -25
@@ -36,31 +36,6 @@#define CONFIG_ENV_IS_IN_MMC -/* Extra Environment */ -#define CONFIG_EXTRA_ENV_SETTINGS \ - "verify=n\0" \ - "loadaddr=" __stringify(CONFIG_SYS_LOAD_ADDR) "\0" \ - "ramboot=setenv bootargs " CONFIG_BOOTARGS ";" \ - "bootm ${loadaddr} - ${fdt_addr}\0" \ - "bootimage=zImage\0" \ - "fdt_addr=100\0" \ - "fdtimage=socfpga.dtb\0" \ - "bootm ${loadaddr} - ${fdt_addr}\0" \ - "mmcroot=/dev/mmcblk0p2\0" \ - "mmcboot=setenv bootargs " CONFIG_BOOTARGS \ - " root=${mmcroot} rw rootwait;" \ - "bootz ${loadaddr} - ${fdt_addr}\0" \ - "mmcload=mmc rescan;" \ - "load mmc 0:1 ${loadaddr} ${bootimage};" \ - "load mmc 0:1 ${fdt_addr} ${fdtimage}\0" \ - "qspiload=sf probe && mtdparts default && run ubiload\0" \ - "qspiboot=setenv bootargs " CONFIG_BOOTARGS \ - " ubi.mtd=1,64 root=ubi0:rootfs rw rootfstype=ubifs;"\ - "bootz ${loadaddr} - ${fdt_addr}\0" \ - "ubiload=ubi part UBI && ubifsmount ubi0 && " \ - "ubifsload ${loadaddr} /boot/${bootimage} && " \ - "ubifsload ${fdt_addr} /boot/${fdtimage}\0" -/* The rest of the configuration is shared */ #include <configs/socfpga_common.h>
Signature · 1 line
2.7.4
PATCH v8 5/7 arm: socfpga: Update DE1 environment
In reply to Dalon WestergreenFrom: Dalon Westergreen <[email protected]>
Remove the default environment as it is now in a common header.
Add the CONFIG_DEFAULT_DEVICE_TREE to the board's defconfig to set the linux devicetree name.
--- configs/socfpga_de1_soc_defconfig | 1 + include/configs/socfpga_de1_soc.h | 19 +------------------ 2 files changed, 2 insertions(+), 18 deletions(-)
configs/socfpga_de1_soc_defconfig +1 -0
@@ -6,6 +6,7 @@ CONFIG_TARGET_SOCFPGA_TERASIC_DE1_SOC=y CONFIG_SPL_STACK_R_ADDR=0x00800000 CONFIG_SPL_YMODEM_SUPPORT=y CONFIG_DEFAULT_DEVICE_TREE="socfpga_cyclone5_de1_soc" +CONFIG_DEFAULT_FDT_FILE="socfpga_cyclone5_de1_soc.dtb" CONFIG_FIT=y CONFIG_SYS_CONSOLE_IS_IN_ENV=y CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE=y
include/configs/socfpga_de1_soc.h +1 -18
@@ -18,7 +18,7 @@#define PHYS_SDRAM_1_SIZE 0x40000000/* 1GiB */ /* Booting Linux */ -#define CONFIG_BOOTFILE "fitImage" +#define CONFIG_BOOTFILE "zImage"#define CONFIG_BOOTARGS "console=ttyS0," __stringify(CONFIG_BAUDRATE)#define CONFIG_BOOTCOMMAND "run mmcload; run mmcboot"#define CONFIG_LOADADDR 0x01000000
@@ -32,23 +32,6 @@#define CONFIG_ENV_IS_IN_MMC -/* Extra Environment */ -#define CONFIG_EXTRA_ENV_SETTINGS \ - "loadaddr=" __stringify(CONFIG_SYS_LOAD_ADDR) "\0" \ - "ramboot=setenv bootargs " CONFIG_BOOTARGS ";" \ - "bootm ${loadaddr} - ${fdtaddr}\0" \ - "bootimage=zImage\0" \ - "fdtaddr=100\0" \ - "fdtimage=socfpga.dtb\0" \ - "bootm ${loadaddr} - ${fdtaddr}\0" \ - "mmcroot=/dev/mmcblk0p2\0" \ - "mmcboot=setenv bootargs " CONFIG_BOOTARGS \ - " root=${mmcroot} rw rootwait;" \ - "bootz ${loadaddr} - ${fdtaddr}\0" \ - "mmcload=mmc rescan;" \ - "load mmc 0:1 ${loadaddr} ${bootimage};" \ - "load mmc 0:1 ${fdtaddr} ${fdtimage}\0" \ -/* The rest of the configuration is shared */ #include <configs/socfpga_common.h>
Signature · 1 line
2.7.4
PATCH v8 5/7 arm: socfpga: Update DE1 environment
Quoted 33 lines · Dalon Westergreen
From: Dalon Westergreen <[email protected]>
Remove the default environment as it is now in a common header.
Add the
CONFIG_DEFAULT_DEVICE_TREEto the board's defconfig to set the linux devicetree name.Signed-off-by Dalon Westergreen <[email protected]>Acked-by Marek Vasut <[email protected]>Acked-by Dinh Nguyen <[email protected]>--- configs/socfpga_de1_soc_defconfig | 1 + include/configs/socfpga_de1_soc.h | 19 +------------------ 2 files changed, 2 insertions(+), 18 deletions(-)configs/socfpga_de1_soc_defconfig +1
-0@@ -6,6 +6,7 @@ CONFIG_TARGET_SOCFPGA_TERASIC_DE1_SOC=y CONFIG_SPL_STACK_R_ADDR=0x00800000 CONFIG_SPL_YMODEM_SUPPORT=y CONFIG_DEFAULT_DEVICE_TREE="socfpga_cyclone5_de1_soc" +CONFIG_DEFAULT_FDT_FILE="socfpga_cyclone5_de1_soc.dtb" CONFIG_FIT=y CONFIG_SYS_CONSOLE_IS_IN_ENV=y CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE=yinclude/configs/socfpga_de1_soc.h +0
-0
include/configs/socfpga_de1_soc.h line 21
Quoted 5 lines
include/configs/socfpga_de1_soc.h +1
-1@@ -18,7 +18,7 @@#define PHYS_SDRAM_1_SIZE 0x40000000/* 1GiB */ /* Booting Linux */ -#define CONFIG_BOOTFILE "fitImage" +#define CONFIG_BOOTFILE "zImage"
ok, here you're confusing me. I thought the point of having the crude, hacky mmcload/mmcboot in bootcmd was because you want to be legacy compatible. If you're changing the bootfile name, that point is moot.
So at this point, why not just switch to distro boot and extlinux.conf / efi altogether?
Alex
Westergreen
PATCH v8 5/7 arm: socfpga: Update DE1 environment
Quoted 47 lines · Alexander Graf
Quoted 39 lines · Dalon Westergreen
From: Dalon Westergreen <[email protected]>
Remove the default environment as it is now in a common header.
Add the
CONFIG_DEFAULT_DEVICE_TREEto the board's defconfig to set the linux devicetree name.Signed-off-by Dalon Westergreen <[email protected]>Acked-by Marek Vasut <[email protected]>Acked-by Dinh Nguyen <[email protected]>---
? configs/socfpga_de1_soc_defconfig |??1 +
?include/configs/socfpga_de1_soc.h| 19 +------------------ ? 2 files changed, 2 insertions(+), 18 deletions(-)configs/socfpga_de1_soc_defconfig +0
-0@@ -6,6 +6,7 @@ CONFIG_TARGET_SOCFPGA_TERASIC_DE1_SOC=y?
CONFIG_SPL_STACK_R_ADDR=0x00800000
?CONFIG_SPL_YMODEM_SUPPORT=y
?CONFIG_DEFAULT_DEVICE_TREE="socfpga_cyclone5_de1_soc" +CONFIG_DEFAULT_FDT_FILE="socfpga_cyclone5_de1_soc.dtb" ?CONFIG_FIT=y
?CONFIG_SYS_CONSOLE_IS_IN_ENV=y
?CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE=yinclude/configs/socfpga_de1_soc.h +0
-0@@ -18,7 +18,7 @@? #define
PHYS_SDRAM_1_SIZE0x40000000/* 1GiB */
??
? /* Booting Linux */include/configs/socfpga_de1_soc.h line 21
Quoted 2 lines
include/configs/socfpga_de1_soc.h +1
-1-#define CONFIG_BOOTFILE "fitImage" +#define CONFIG_BOOTFILE "zImage"ok, here you're confusing me. I thought the point of having the crude,? hacky mmcload/mmcboot in bootcmd was because you want to be legacy? compatible. If you're changing the bootfile name, that point is moot.
Quoted 3 lines
So at this point, why not just switch to distro boot and extlinux.conf /? efi altogether?
Bootfile was never used in the environment, neither have any of the kits by default been using fitimages. When the environment was moved to a common one i setting the bootfile def to match what was actually used. ?moving to distro boot is in the works and i will look at SCAN_DEV_FOR_EFI for legacy support.
thanks,
dalon
Quoted 3 lines
Alex
PATCH v8 6/7 arm: socfpga: Update SoCKit environment
In reply to Dalon WestergreenFrom: Dalon Westergreen <[email protected]>
Remove the default environment as it is now in a common header.
Add the CONFIG_DEFAULT_DEVICE_TREE to the board's defconfig to set the linux devicetree name.
--- configs/socfpga_sockit_defconfig | 1 + include/configs/socfpga_sockit.h | 27 +-------------------------- 2 files changed, 2 insertions(+), 26 deletions(-)
configs/socfpga_sockit_defconfig +1 -0
@@ -4,6 +4,7 @@ CONFIG_SYS_MALLOC_F_LEN=0x2000 CONFIG_TARGET_SOCFPGA_TERASIC_SOCKIT=y CONFIG_SPL_STACK_R_ADDR=0x00800000 CONFIG_DEFAULT_DEVICE_TREE="socfpga_cyclone5_sockit" +CONFIG_DEFAULT_FDT_FILE="socfpga_cyclone5_sockit.dtb" CONFIG_FIT=y CONFIG_SYS_CONSOLE_IS_IN_ENV=y CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE=y
include/configs/socfpga_sockit.h +1 -26
@@ -18,7 +18,7 @@#define PHYS_SDRAM_1_SIZE 0x40000000/* 1GiB on SoCDK */ /* Booting Linux */ -#define CONFIG_BOOTFILE "fitImage" +#define CONFIG_BOOTFILE "zImage"#define CONFIG_BOOTARGS "console=ttyS0," __stringify(CONFIG_BAUDRATE)#define CONFIG_BOOTCOMMAND "run mmcload; run mmcboot"#define CONFIG_LOADADDR 0x01000000
@@ -32,31 +32,6 @@#define CONFIG_ENV_IS_IN_MMC -/* Extra Environment */ -#define CONFIG_EXTRA_ENV_SETTINGS \ - "verify=n\0" \ - "loadaddr=" __stringify(CONFIG_SYS_LOAD_ADDR) "\0" \ - "ramboot=setenv bootargs " CONFIG_BOOTARGS ";" \ - "bootm ${loadaddr} - ${fdt_addr}\0" \ - "bootimage=zImage\0" \ - "fdt_addr=100\0" \ - "fdtimage=socfpga.dtb\0" \ - "bootm ${loadaddr} - ${fdt_addr}\0" \ - "mmcroot=/dev/mmcblk0p2\0" \ - "mmcboot=setenv bootargs " CONFIG_BOOTARGS \ - " root=${mmcroot} rw rootwait;" \ - "bootz ${loadaddr} - ${fdt_addr}\0" \ - "mmcload=mmc rescan;" \ - "load mmc 0:1 ${loadaddr} ${bootimage};" \ - "load mmc 0:1 ${fdt_addr} ${fdtimage}\0" \ - "qspiload=sf probe && mtdparts default && run ubiload\0" \ - "qspiboot=setenv bootargs " CONFIG_BOOTARGS \ - " ubi.mtd=1,64 root=ubi0:rootfs rw rootfstype=ubifs;"\ - "bootz ${loadaddr} - ${fdt_addr}\0" \ - "ubiload=ubi part UBI && ubifsmount ubi0 && " \ - "ubifsload ${loadaddr} /boot/${bootimage} && " \ - "ubifsload ${fdt_addr} /boot/${fdtimage}\0" -/* The rest of the configuration is shared */ #include <configs/socfpga_common.h>
Signature · 1 line
2.7.4
PATCH v8 7/7 arm: socfpga: Update sr1500 environment
In reply to Dalon WestergreenFrom: Dalon Westergreen <[email protected]>
Remove the default environment as it is now in a common header.
Add the CONFIG_DEFAULT_DEVICE_TREE to the board's defconfig to set the linux devicetree name.
--- configs/socfpga_sr1500_defconfig | 1 + include/configs/socfpga_sr1500.h | 25 ------------------------- 2 files changed, 1 insertion(+), 25 deletions(-)
configs/socfpga_sr1500_defconfig +1 -0
@@ -4,6 +4,7 @@ CONFIG_SYS_MALLOC_F_LEN=0x2000 CONFIG_TARGET_SOCFPGA_SR1500=y CONFIG_SPL_STACK_R_ADDR=0x00800000 CONFIG_DEFAULT_DEVICE_TREE="socfpga_cyclone5_sr1500" +CONFIG_DEFAULT_FDT_FILE="socfpga_cyclone5_sr1500.dtb" CONFIG_FIT=y CONFIG_SYS_CONSOLE_IS_IN_ENV=y CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE=y
include/configs/socfpga_sr1500.h +0 -25
@@ -32,31 +32,6 @@#define CONFIG_PHY_MARVELL #define PHY_ANEG_TIMEOUT 8000 -#define CONFIG_EXTRA_ENV_SETTINGS \ - "verify=n\0" \ - "loadaddr=" __stringify(CONFIG_SYS_LOAD_ADDR) "\0" \ - "ramboot=setenv bootargs " CONFIG_BOOTARGS ";" \ - "bootm ${loadaddr} - ${fdt_addr}\0" \ - "bootimage=zImage\0" \ - "fdt_addr=100\0" \ - "fdtimage=socfpga.dtb\0" \ - "fsloadcmd=ext2load\0" \ - "bootm ${loadaddr} - ${fdt_addr}\0" \ - "mmcroot=/dev/mmcblk0p2\0" \ - "mmcboot=setenv bootargs " CONFIG_BOOTARGS \ - " root=${mmcroot} rw rootwait;" \ - "bootz ${loadaddr} - ${fdt_addr}\0" \ - "mmcload=mmc rescan;" \ - "load mmc 0:1 ${loadaddr} ${bootimage};" \ - "load mmc 0:1 ${fdt_addr} ${fdtimage}\0" \ - "qspiload=sf probe && mtdparts default && run ubiload\0" \ - "qspiboot=setenv bootargs " CONFIG_BOOTARGS \ - " ubi.mtd=1,64 root=ubi0:rootfs rw rootfstype=ubifs;"\ - "bootz ${loadaddr} - ${fdt_addr}\0" \ - "ubiload=ubi part UBI && ubifsmount ubi0 && " \ - "ubifsload ${loadaddr} /boot/${bootimage} && " \ - "ubifsload ${fdt_addr} /boot/${fdtimage}\0" -/* Environment */ #define CONFIG_ENV_IS_IN_SPI_FLASH
Signature · 1 line
2.7.4