arm: socfpga: Move to using distro boot
cover arm: socfpga: Move to using distro boot
This series adds support to the common socfpga header for distro boot and moves the DE0/1, Socrates, C5/A5 SoCDK, and SoCKIT kits to use the common environment.
Where available, the default devicetree is set to the devicetree for the board available in the kernel source. If none is available in the kernel source, the devicetree is set to the name previously used in the board header file.
Dalon Westergreen (8):
arm: socfpga: Add distro boot to socfpga common header
arm: socfpga: DE0 use environment in common header
arm: socfpga: A5 SoCDK use environment in common header
arm: socfpga: C5 SoCDK use environment in common header
arm: socfpga: DE1 use environment in common header
arm: socfpga: SoCKit use environment in common header
arm: socfpga: Socrates use environment in common header
arm: socfpga: sr1500 use environment in common header
configs/socfpga_arria5_defconfig | 3 ++ configs/socfpga_cyclone5_defconfig | 3 ++ configs/socfpga_de0_nano_soc_defconfig | 3 ++ configs/socfpga_de1_soc_defconfig | 1 + configs/socfpga_sockit_defconfig | 1 + configs/socfpga_socrates_defconfig | 1 + configs/socfpga_sr1500_defconfig | 1 + include/configs/socfpga_arria5_socdk.h | 31 ------------------ include/configs/socfpga_common.h | 55 +++++++++++++++++++++++++++++--- include/configs/socfpga_cyclone5_socdk.h | 31 ------------------ include/configs/socfpga_de0_nano_soc.h | 19 ----------- include/configs/socfpga_de1_soc.h | 19 ----------- include/configs/socfpga_sockit.h | 27 ---------------- include/configs/socfpga_socrates.h | 25 --------------- include/configs/socfpga_sr1500.h | 27 ---------------- 15 files changed, 64 insertions(+), 183 deletions(-)
Signature · 1 line
2.7.4
PATCH 1/8 arm: socfpga: Add distro boot to socfpga common header
This adds a common environment and support for distro boot in the common socfpga header.
--- include/configs/socfpga_common.h | 55 +++++++++++++++++++++++++++++++++++++--- 1 file changed, 51 insertions(+), 4 deletions(-)
include/configs/socfpga_common.h +51 -4
@@ -67,6 +67,9 @@#define CONFIG_SYS_HOSTNAME CONFIG_SYS_BOARD#endif +#define CONFIG_CMD_PXE +#define CONFIG_MENU +/* * Cache */
@@ -245,13 +248,13 @@ unsigned int cm_get_qspi_controller_clk_hz(void);* U-Boot environment */ #if !defined(CONFIG_ENV_SIZE ) -#define CONFIG_ENV_SIZE 4096 +#define CONFIG_ENV_SIZE (8*1024)#endif /* Environment for SDMMC boot */ #if defined(CONFIG_ENV_IS_IN_MMC ) && !defined(CONFIG_ENV_OFFSET ) -#define CONFIG_SYS_MMC_ENV_DEV 0/* device 0 */ -#define CONFIG_ENV_OFFSET 512/* just after the MBR */ +#define CONFIG_SYS_MMC_ENV_DEV 0/* device 0 */ +#define CONFIG_ENV_OFFSET (34*512)/* just after the GPT */ #endif /* Environment for QSPI boot */
@@ -308,8 +311,12 @@ 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" +#define CONFIG_SYS_MMCSD_FS_BOOT_PARTITION 1 +#endif +#else +#ifndef CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION +#define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION 1#endif #endif
@@ -331,4 +338,44 @@ unsigned int cm_get_qspi_controller_clk_hz(void);*/ #define CONFIG_SPL_STACK CONFIG_SYS_INIT_SP_ADDR +/* Extra Environment */ +#ifndef CONFIG_SPL_BUILD +#include <config_distro_defaults.h> + +#ifdef CONFIG_CMD_PXE +#define BOOT_TARGET_DEVICES_PXE (func) func(PXE, pxe, na) +#else +#define BOOT_TARGET_DEVICES_PXE (func) +#endif + +#ifdef CONFIG_CMD_MMC +#define BOOT_TARGET_DEVICES_MMC (func) func(MMC, mmc, 0) +#else +#define BOOT_TARGET_DEVICES_MMC (func) +#endif + +#define BOOT_TARGET_DEVICES (func) \ + BOOT_TARGET_DEVICES_MMC(func) \ + BOOT_TARGET_DEVICES_PXE(func) \ + func(DHCP, dhcp, na) + +#include <config_distro_bootcmd.h> + +#ifndef CONFIG_EXTRA_ENV_SETTINGS +#define CONFIG_EXTRA_ENV_SETTINGS \ + "verify=n\0" \ + "bootimage=" CONFIG_BOOTFILE "\0" \ + "fdt_addr=100\0" \ + "fdtfile=" CONFIG_DEFAULT_FDT_FILE "\0" \ + "bootm_size=0xa000000\0" \ + "kernel_addr_r="__stringify(CONFIG_SYS_LOAD_ADDR)"\0" \ + "fdt_addr_r=0x02000000\0" \ + "scriptaddr=0x02100000\0" \ + "pxefile_addr_r=0x02200000\0" \ + "ramdisk_addr_r=0x02300000\0" \ + BOOTENV + +#endif +#endif +#endif /* __CONFIG_SOCFPGA_COMMON_H__ */
Signature · 1 line
2.7.4
PATCH 1/8 arm: socfpga: Add distro boot to socfpga common header
Quoted 26 lines · Dalon Westergreen
This adds a common environment and support for distro boot in the common socfpga header.
Signed-off-by Dalon Westergreen <[email protected]>--- include/configs/socfpga_common.h | 55 +++++++++++++++++++++++++++++++++++++--- 1 file changed, 51 insertions(+), 4 deletions(-)include/configs/socfpga_common.h +3
-0@@ -67,6 +67,9 @@#define CONFIG_SYS_HOSTNAME CONFIG_SYS_BOARD#endif +#define CONFIG_CMD_PXE +#define CONFIG_MENU +/* * Cache */ @@ -245,13 +248,13 @@ unsigned int cm_get_qspi_controller_clk_hz(void);* U-Boot environment */ #if !defined(CONFIG_ENV_SIZE )
include/configs/socfpga_common.h unsigned int cm_get_qspi_controller_clk_hz(void); · line 257
Quoted 10 lines
include/configs/socfpga_common.h +3
-3-#define CONFIG_ENV_SIZE 4096 +#define CONFIG_ENV_SIZE (8*1024)#endif /* Environment for SDMMC boot */ #if defined(CONFIG_ENV_IS_IN_MMC ) && !defined(CONFIG_ENV_OFFSET ) -#define CONFIG_SYS_MMC_ENV_DEV 0/* device 0 */ -#define CONFIG_ENV_OFFSET 512/* just after the MBR */ +#define CONFIG_SYS_MMC_ENV_DEV 0/* device 0 */ +#define CONFIG_ENV_OFFSET (34*512)/* just after the GPT */
Space around the asterisk . Btw this probably broke some existing configurations ...
Quoted 37 lines
include/configs/socfpga_common.h +21
-1#endif /* Environment for QSPI boot */ @@ -308,8 +311,12 @@ 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" +#define CONFIG_SYS_MMCSD_FS_BOOT_PARTITION 1 +#endif +#else +#ifndef CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION +#define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION 1#endif #endif @@ -331,4 +338,44 @@ unsigned int cm_get_qspi_controller_clk_hz(void);*/ #define CONFIG_SPL_STACK CONFIG_SYS_INIT_SP_ADDR +/* Extra Environment */ +#ifndef CONFIG_SPL_BUILD +#include <config_distro_defaults.h> + +#ifdef CONFIG_CMD_PXE +#define BOOT_TARGET_DEVICES_PXE (func) func(PXE, pxe, na) +#else +#define BOOT_TARGET_DEVICES_PXE (func) +#endif + +#ifdef CONFIG_CMD_MMC +#define BOOT_TARGET_DEVICES_MMC (func) func(MMC, mmc, 0) +#else +#define BOOT_TARGET_DEVICES_MMC (func) +#endif +
include/configs/socfpga_common.h unsigned int cm_get_qspi_controller_clk_hz(void); · line 366
Quoted 10 lines
include/configs/socfpga_common.h +10
-0+#define BOOT_TARGET_DEVICES (func) \ + BOOT_TARGET_DEVICES_MMC(func) \ + BOOT_TARGET_DEVICES_PXE(func) \ + func(DHCP, dhcp, na) + +#include <config_distro_bootcmd.h> + +#ifndef CONFIG_EXTRA_ENV_SETTINGS +#define CONFIG_EXTRA_ENV_SETTINGS \ + "verify=n\0" \
Is this needed ?
include/configs/socfpga_common.h unsigned int cm_get_qspi_controller_clk_hz(void); · line 368
Quoted 2 lines
include/configs/socfpga_common.h +2
-0+"bootimage=" CONFIG_BOOTFILE "\0" \ +"fdt_addr=100\0" \
Move this to like 0x200000 at least.
include/configs/socfpga_common.h unsigned int cm_get_qspi_controller_clk_hz(void); · line 372
Quoted 4 lines
include/configs/socfpga_common.h +4
-0+"fdtfile=" CONFIG_DEFAULT_FDT_FILE "\0" \ +"bootm_size=0xa000000\0" \ + "kernel_addr_r="__stringify(CONFIG_SYS_LOAD_ADDR)"\0" \ +"fdt_addr_r=0x02000000\0" \
Hmmmm , what's the relationship between this and fdt_addr ?
Quoted 10 lines
include/configs/socfpga_common.h +8
-0+"scriptaddr=0x02100000\0" \ +"pxefile_addr_r=0x02200000\0" \ +"ramdisk_addr_r=0x02300000\0" \ + BOOTENV + +#endif +#endif +#endif /* __CONFIG_SOCFPGA_COMMON_H__ */
Signature · 2 lines
Best regards, Marek Vasut
PATCH 1/8 arm: socfpga: Add distro boot to socfpga common header
Quoted 37 lines · Marek Vasut
Quoted 36 lines · Dalon Westergreen
This adds a common environment and support for distro boot in the common socfpga header.
Signed-off-by Dalon Westergreen <[email protected]>---
?include/configs/socfpga_common.h | 55
+++++++++++++++++++++++++++++++++++++---
?1 file changed, 51 insertions(+), 4 deletions(-)include/configs/socfpga_common.h +0
-0@@ -67,6 +67,9 @@?#define
CONFIG_SYS_HOSTNAMECONFIG_SYS_BOARD
?#endif
?include/configs/socfpga_common.h +3
-0+#define CONFIG_CMD_PXE +#define CONFIG_MENU +?/*
? * Cache
? */include/configs/socfpga_common.h +0
-0@@ -245,13 +248,13 @@ unsigned int cm_get_qspi_controller_clk_hz(void);? * U-Boot environment
? */
?#if !defined(CONFIG_ENV_SIZE)include/configs/socfpga_common.h +1
-1-#define CONFIG_ENV_SIZE 4096 +#define CONFIG_ENV_SIZE (8*1024)?#endif
?
?/* Environment for SDMMC boot */
?#ifdefined(CONFIG_ENV_IS_IN_MMC)&& !defined(CONFIG_ENV_OFFSET)
-#defineCONFIG_SYS_MMC_ENV_DEV0 /* device 0 */
Quoted 8 lines
Quoted 5 lines
-#define
CONFIG_ENV_OFFSET512 /* just after the MBR
*/
+#defineCONFIG_SYS_MMC_ENV_DEV0 /* device 0
*/
+#defineCONFIG_ENV_OFFSET(34*512)/* just after the GPT */Space around the asterisk . Btw this probably broke some existing configurations ...
It may, but it is unavoidable as the env needs to be larger for distro boot.
Quoted 43 lines
Quoted 43 lines
?#endif
?
?/* Environment for QSPI boot */include/configs/socfpga_common.h +0
-0@@ -308,8 +311,12 @@ 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+#define CONFIG_SYS_MMCSD_FS_BOOT_PARTITION 1 +#endif +#else +#ifndef CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION +#define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION 1?#endif
?#endif
?include/configs/socfpga_common.h +0
-0@@ -331,4 +338,44 @@ unsigned int cm_get_qspi_controller_clk_hz(void);? */
?#defineCONFIG_SPL_STACKCONFIG_SYS_INIT_SP_ADDR
?include/configs/socfpga_common.h +20
-0+/* Extra Environment */ +#ifndef CONFIG_SPL_BUILD +#include <config_distro_defaults.h> + +#ifdef CONFIG_CMD_PXE +#define BOOT_TARGET_DEVICES_PXE (func) func(PXE, pxe, na) +#else +#define BOOT_TARGET_DEVICES_PXE (func) +#endif + +#ifdef CONFIG_CMD_MMC +#define BOOT_TARGET_DEVICES_MMC (func) func(MMC, mmc, 0) +#else +#define BOOT_TARGET_DEVICES_MMC (func) +#endif + +#define BOOT_TARGET_DEVICES (func) \ + BOOT_TARGET_DEVICES_MMC(func) \ + BOOT_TARGET_DEVICES_PXE(func) \ + func(DHCP, dhcp, na)
Quoted 8 lines
include/configs/socfpga_common.h unsigned int cm_get_qspi_controller_clk_hz(void); · line 366
Quoted 6 lines
include/configs/socfpga_common.h +6
-0+ +#include <config_distro_bootcmd.h> + +#ifndef CONFIG_EXTRA_ENV_SETTINGS +#define CONFIG_EXTRA_ENV_SETTINGS \ + "verify=n\0" \Is this needed ?
No
Quoted 6 lines
include/configs/socfpga_common.h unsigned int cm_get_qspi_controller_clk_hz(void); · line 368
Quoted 4 lines
include/configs/socfpga_common.h +2
-0+"bootimage=" CONFIG_BOOTFILE "\0" \ +"fdt_addr=100\0" \Move this to like
0x200000at least.
I think i will just remove it too, i dont believe it us used for distro boot.
Quoted 8 lines
include/configs/socfpga_common.h unsigned int cm_get_qspi_controller_clk_hz(void); · line 372
Quoted 6 lines
include/configs/socfpga_common.h +4
-0+"fdtfile=" CONFIG_DEFAULT_FDT_FILE "\0" \ +"bootm_size=0xa000000\0" \ + "kernel_addr_r="__stringify(CONFIG_SYS_LOAD_ADDR)"\0" \ +"fdt_addr_r=0x02000000\0" \Hmmmm , what's the relationship between this and
fdt_addr?
unrelated, as before i think it better just to remove fdt_addr
Quoted 13 lines
Quoted 11 lines
include/configs/socfpga_common.h +8
-0+"scriptaddr=0x02100000\0" \ +"pxefile_addr_r=0x02200000\0" \ +"ramdisk_addr_r=0x02300000\0" \ + BOOTENV + +#endif +#endif +?#endif /*
__CONFIG_SOCFPGA_COMMON_H__*/
Thanks,
Dalon
PATCH 1/8 arm: socfpga: Add distro boot to socfpga common header
Quoted 47 lines · Dalon Westergreen
Quoted 34 lines · Marek Vasut
Quoted 33 lines · Dalon Westergreen
This adds a common environment and support for distro boot in the common socfpga header.
Signed-off-by Dalon Westergreen <[email protected]>--- include/configs/socfpga_common.h | 55 +++++++++++++++++++++++++++++++++++++--- 1 file changed, 51 insertions(+), 4 deletions(-)include/configs/socfpga_common.h +4
-1@@ -67,6 +67,9 @@#define CONFIG_SYS_HOSTNAME CONFIG_SYS_BOARD#endif +#define CONFIG_CMD_PXE +#define CONFIG_MENU +/* * Cache */ @@ -245,13 +248,13 @@ unsigned int cm_get_qspi_controller_clk_hz(void);* U-Boot environment */ #if !defined(CONFIG_ENV_SIZE ) -#define CONFIG_ENV_SIZE 4096 +#define CONFIG_ENV_SIZE (8*1024)#endif Quoted 11 lines
include/configs/socfpga_common.h unsigned int cm_get_qspi_controller_clk_hz(void); · line 257
Quoted 8 lines
include/configs/socfpga_common.h +2
-2/* Environment for SDMMC boot */ #if defined(CONFIG_ENV_IS_IN_MMC ) && !defined(CONFIG_ENV_OFFSET ) -#define CONFIG_SYS_MMC_ENV_DEV 0/* device 0 */ -#define CONFIG_ENV_OFFSET 512/* just after the MBR */ +#define CONFIG_SYS_MMC_ENV_DEV 0/* device 0 */ +#define CONFIG_ENV_OFFSET (34*512)/* just after the GPT */ Space around the asterisk . Btw this probably broke some existing configurations ...
Quoted 2 lines
It may, but it is unavoidable as the env needs to be larger for distro boot.
I'm really not impressed ... sigh.
Quoted 50 lines
Quoted 42 lines
Quoted 42 lines
include/configs/socfpga_common.h +0
-0#endif /* Environment for QSPI boot */
include/configs/socfpga_common.h +25
-1@@ -308,8 +311,12 @@ 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" +#define CONFIG_SYS_MMCSD_FS_BOOT_PARTITION 1 +#endif +#else +#ifndef CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION +#define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION 1#endif #endif @@ -331,4 +338,44 @@ unsigned int cm_get_qspi_controller_clk_hz(void);*/ #define CONFIG_SPL_STACK CONFIG_SYS_INIT_SP_ADDR +/* Extra Environment */ +#ifndef CONFIG_SPL_BUILD +#include <config_distro_defaults.h> + +#ifdef CONFIG_CMD_PXE +#define BOOT_TARGET_DEVICES_PXE (func) func(PXE, pxe, na) +#else +#define BOOT_TARGET_DEVICES_PXE (func) +#endif + +#ifdef CONFIG_CMD_MMC +#define BOOT_TARGET_DEVICES_MMC (func) func(MMC, mmc, 0) +#else +#define BOOT_TARGET_DEVICES_MMC (func) +#endif + +#define BOOT_TARGET_DEVICES (func) \ + BOOT_TARGET_DEVICES_MMC(func) \ + BOOT_TARGET_DEVICES_PXE(func) \ + func(DHCP, dhcp, na)Quoted 8 lines
include/configs/socfpga_common.h unsigned int cm_get_qspi_controller_clk_hz(void); · line 366
Quoted 6 lines
include/configs/socfpga_common.h +6
-0+ +#include <config_distro_bootcmd.h> + +#ifndef CONFIG_EXTRA_ENV_SETTINGS +#define CONFIG_EXTRA_ENV_SETTINGS \ + "verify=n\0" \Is this needed ?
Quoted 1 line
No
OK
Quoted 7 lines
Quoted 5 lines
include/configs/socfpga_common.h unsigned int cm_get_qspi_controller_clk_hz(void); · line 368
Quoted 3 lines
include/configs/socfpga_common.h +2
-0+"bootimage=" CONFIG_BOOTFILE "\0" \ +"fdt_addr=100\0" \Move this to like
0x200000at least.I think i will just remove it too, i dont believe it us used for distro boot.
:)
Quoted 9 lines
Quoted 7 lines
include/configs/socfpga_common.h unsigned int cm_get_qspi_controller_clk_hz(void); · line 372
Quoted 5 lines
include/configs/socfpga_common.h +4
-0+"fdtfile=" CONFIG_DEFAULT_FDT_FILE "\0" \ +"bootm_size=0xa000000\0" \ + "kernel_addr_r="__stringify(CONFIG_SYS_LOAD_ADDR)"\0" \ +"fdt_addr_r=0x02000000\0" \Hmmmm , what's the relationship between this and
fdt_addr?unrelated, as before i think it better just to remove
fdt_addr
Good
Quoted 17 lines
Quoted 13 lines
include/configs/socfpga_common.h unsigned int cm_get_qspi_controller_clk_hz(void); · line 381
Quoted 11 lines
include/configs/socfpga_common.h +8
-0+"scriptaddr=0x02100000\0" \ +"pxefile_addr_r=0x02200000\0" \ +"ramdisk_addr_r=0x02300000\0" \ + BOOTENV + +#endif +#endif +#endif /* __CONFIG_SOCFPGA_COMMON_H__ */ Thanks,
Dalon
Signature · 2 lines
Best regards, Marek Vasut
PATCH 1/8 arm: socfpga: Add distro boot to socfpga common header
Quoted 54 lines · Marek Vasut
Quoted 53 lines · Dalon Westergreen
Quoted 50 lines · Marek Vasut
Quoted 38 lines · Dalon Westergreen
This adds a common environment and support for distro boot in the common socfpga header.
Signed-off-by Dalon Westergreen <[email protected]>---
?include/configs/socfpga_common.h | 55
+++++++++++++++++++++++++++++++++++++---
?1 file changed, 51 insertions(+), 4 deletions(-)include/configs/socfpga_common.h +0
-0@@ -67,6 +67,9 @@?#define
CONFIG_SYS_HOSTNAMECONFIG_SYS_BOARD
?#endif
?include/configs/socfpga_common.h +3
-0+#define CONFIG_CMD_PXE +#define CONFIG_MENU +?/*
? * Cache
? */include/configs/socfpga_common.h +0
-0@@ -245,13 +248,13 @@ unsigned int cm_get_qspi_controller_clk_hz(void);? * U-Boot environment
? */
?#if !defined(CONFIG_ENV_SIZE)include/configs/socfpga_common.h +1
-1-#define CONFIG_ENV_SIZE 4096 +#define CONFIG_ENV_SIZE (8*1024)?#endif
?
?/* Environment for SDMMC boot */
?#ifdefined(CONFIG_ENV_IS_IN_MMC)&& !defined(CONFIG_ENV_OFFSET)include/configs/socfpga_common.h +0
-2-#define CONFIG_SYS_MMC_ENV_DEV 0/* device 0 */ -#define CONFIG_ENV_OFFSET 512/* just after the Quoted 7 lines
MBR
*/
+#defineCONFIG_SYS_MMC_ENV_DEV0 /*
device 0
*/
+#defineCONFIG_ENV_OFFSET(34*512)/* just after the GPT
*/Space around the asterisk . Btw this probably broke some existing configurations ...
Quoted 4 lines
Quoted 2 lines
It may, but it is unavoidable as the env needs to be larger for distro boot.
I'm really not impressed ... sigh.
I actually dont believe this will cause much of an issue. the env is placed immediately after the partition table. ?I know this size fits between the table and the typical location of the first partition without issue.
--dalon
Quoted 107 lines
Quoted 53 lines
Quoted 45 lines
Quoted 45 lines
?#endif
?
?/* Environment for QSPI boot */include/configs/socfpga_common.h +0
-0@@ -308,8 +311,12 @@ 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+#define CONFIG_SYS_MMCSD_FS_BOOT_PARTITION 1 +#endif +#else +#ifndef CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION +#define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION 1?#endif
?#endif
?include/configs/socfpga_common.h +0
-0@@ -331,4 +338,44 @@ unsigned int cm_get_qspi_controller_clk_hz(void);? */
?#defineCONFIG_SPL_STACKCONFIG_SYS_INIT_SP_ADDR
?include/configs/socfpga_common.h +20
-0+/* Extra Environment */ +#ifndef CONFIG_SPL_BUILD +#include <config_distro_defaults.h> + +#ifdef CONFIG_CMD_PXE +#define BOOT_TARGET_DEVICES_PXE (func) func(PXE, pxe, na) +#else +#define BOOT_TARGET_DEVICES_PXE (func) +#endif + +#ifdef CONFIG_CMD_MMC +#define BOOT_TARGET_DEVICES_MMC (func) func(MMC, mmc, 0) +#else +#define BOOT_TARGET_DEVICES_MMC (func) +#endif + +#define BOOT_TARGET_DEVICES (func) \ + BOOT_TARGET_DEVICES_MMC(func) \ + BOOT_TARGET_DEVICES_PXE(func) \ + func(DHCP, dhcp, na)Quoted 8 lines
include/configs/socfpga_common.h unsigned int cm_get_qspi_controller_clk_hz(void); · line 366
Quoted 6 lines
include/configs/socfpga_common.h +6
-0+ +#include <config_distro_bootcmd.h> + +#ifndef CONFIG_EXTRA_ENV_SETTINGS +#define CONFIG_EXTRA_ENV_SETTINGS \ + "verify=n\0" \Is this needed ?
Quoted 1 line
No
OK
Quoted 10 lines
Quoted 8 lines
include/configs/socfpga_common.h unsigned int cm_get_qspi_controller_clk_hz(void); · line 368
Quoted 6 lines
include/configs/socfpga_common.h +2
-0+"bootimage=" CONFIG_BOOTFILE "\0" \ +"fdt_addr=100\0" \Move this to like
0x200000at least.I think i will just remove it too, i dont believe it us used for distro boot.
:)
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 8 lines
Quoted 6 lines
include/configs/socfpga_common.h unsigned int cm_get_qspi_controller_clk_hz(void); · line 372
Quoted 4 lines
include/configs/socfpga_common.h +4
-0+"fdtfile=" CONFIG_DEFAULT_FDT_FILE "\0" \ +"bootm_size=0xa000000\0" \ + "kernel_addr_r="__stringify(CONFIG_SYS_LOAD_ADDR)"\0" \ +"fdt_addr_r=0x02000000\0" \Hmmmm , what's the relationship between this and
fdt_addr?unrelated, as before i think it better just to remove
fdt_addrGood
Quoted 20 lines
Quoted 4 lines
Quoted 4 lines
Quoted 12 lines
Quoted 10 lines
include/configs/socfpga_common.h +8
-0+"scriptaddr=0x02100000\0" \ +"pxefile_addr_r=0x02200000\0" \ +"ramdisk_addr_r=0x02300000\0" \ + BOOTENV + +#endif +#endif +?#endif /*
__CONFIG_SOCFPGA_COMMON_H__*/Thanks,
Dalon
PATCH 1/8 arm: socfpga: Add distro boot to socfpga common header
Quoted 55 lines · Dalon Westergreen
Quoted 54 lines · Marek Vasut
Quoted 53 lines · Dalon Westergreen
Quoted 50 lines · Marek Vasut
Quoted 38 lines · Dalon Westergreen
This adds a common environment and support for distro boot in the common socfpga header.
Signed-off-by Dalon Westergreen <[email protected]>--- include/configs/socfpga_common.h | 55 +++++++++++++++++++++++++++++++++++++--- 1 file changed, 51 insertions(+), 4 deletions(-)include/configs/socfpga_common.h +4
-3@@ -67,6 +67,9 @@#define CONFIG_SYS_HOSTNAME CONFIG_SYS_BOARD#endif +#define CONFIG_CMD_PXE +#define CONFIG_MENU +/* * Cache */ @@ -245,13 +248,13 @@ unsigned int cm_get_qspi_controller_clk_hz(void);* U-Boot environment */ #if !defined(CONFIG_ENV_SIZE ) -#define CONFIG_ENV_SIZE 4096 +#define CONFIG_ENV_SIZE (8*1024)#endif /* Environment for SDMMC boot */ #if defined(CONFIG_ENV_IS_IN_MMC ) && !defined(CONFIG_ENV_OFFSET ) -#define CONFIG_SYS_MMC_ENV_DEV 0/* device 0 */ -#define CONFIG_ENV_OFFSET 512/* just after the Quoted 7 lines
MBR
*/
+#defineCONFIG_SYS_MMC_ENV_DEV0 /*
device 0
*/
+#defineCONFIG_ENV_OFFSET(34*512)/* just after the GPT
*/Space around the asterisk . Btw this probably broke some existing configurations ...
Quoted 9 lines
Quoted 4 lines
Quoted 2 lines
It may, but it is unavoidable as the env needs to be larger for distro boot.
I'm really not impressed ... sigh.
I actually dont believe this will cause much of an issue. the env is placed immediately after the partition table. I know this size fits between the table and the typical location of the first partition without issue.
My rant is more about breaking already running setups, but let's see if someone actually complains.
Signature · 2 lines
Best regards, Marek Vasut
PATCH 1/8 arm: socfpga: Add distro boot to socfpga common header
In reply to Dalon WestergreenHi!
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
?/* Environment for SDMMC boot */
?#ifdefined(CONFIG_ENV_IS_IN_MMC)&& !defined(CONFIG_ENV_OFFSET)(quoted diff) +0
-2-#define CONFIG_SYS_MMC_ENV_DEV 0 /* device 0 */ -#define CONFIG_ENV_OFFSET 512 /* just after theMBR
*/
+#defineCONFIG_SYS_MMC_ENV_DEV0 /*
device 0
*/
+#defineCONFIG_ENV_OFFSET(34*512)/* just after the GPT
*/
...
Quoted 3 lines
I actually dont believe this will cause much of an issue. the env is placed immediately after the partition table. ?I know this size fits between the table and the typical location of the first partition without issue.
Hmm. It is not immediately after partition table (==MBR), it is at sector 34. Now, by changing size you already break the setups, so moving it back to sector 1 does not help much, but can you explain?
Pavel
Signature · 9 lines
(english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 181 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170219/af737bde/attachment.sig>
PATCH 1/8 arm: socfpga: Add distro boot to socfpga common header
Quoted 23 lines · Pavel Machek
Hi!
Quoted 19 lines
Quoted 19 lines
Quoted 19 lines
Quoted 19 lines
Quoted 19 lines
?/* Environment for SDMMC boot */
?#ifdefined(CONFIG_ENV_IS_IN_MMC)&& !defined(CONFIG_ENV_OFFSET)
-#defineCONFIG_SYS_MMC_ENV_DEV0 /* device 0
*/
-#defineCONFIG_ENV_OFFSET512 /* just after
the
MBR
*/
+#defineCONFIG_SYS_MMC_ENV_DEV0 /*
device 0
*/
+#defineCONFIG_ENV_OFFSET(34*512)/* just after the
GPT
*/...
Quoted 1 line
Quoted 7 lines
Quoted 3 lines
I actually dont believe this will cause much of an issue. the env is placed immediately after the partition table. ?I know this size fits between the table and the typical location of the first partition without issue.
Hmm. It is not immediately after partition table (==MBR), it is at sector 34. Now, by changing size you already break the setups, so moving it back to sector 1 does not help much, but can you explain?
Sorry, you are right. Frank had moved it after the GPT in his patchset and i had just copied that. ?i will update this to be immediately after the mbr as it was before.
--dalon
Quoted 2 lines
Pavel
PATCH 2/8 arm: socfpga: DE0 use environment in common header
In reply to Dalon WestergreenThis removes the default environment from the de0 headers and instead uses the common environment provided in socfpga_common.h which now uses distro boot.
In addition to the above, add support to boot from the custom a2 type partition
--- configs/socfpga_de0_nano_soc_defconfig | 3 +++ include/configs/socfpga_de0_nano_soc.h | 19 ------------------- 2 files changed, 3 insertions(+), 19 deletions(-)
configs/socfpga_de0_nano_soc_defconfig +3 -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_nano_soc.dtb" CONFIG_FIT=y CONFIG_SYS_CONSOLE_IS_IN_ENV=y CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE=y
@@ -58,3 +59,5 @@ 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
include/configs/socfpga_de0_nano_soc.h +0 -19
@@ -17,8 +17,6 @@/* Booting Linux */ #define CONFIG_BOOTFILE "fitImage" -#define CONFIG_BOOTARGS "console=ttyS0," __stringify(CONFIG_BAUDRATE) -#define CONFIG_BOOTCOMMAND "run mmcload; run mmcboot"#define CONFIG_LOADADDR 0x01000000#define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR
@@ -30,23 +28,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 3/8 arm: socfpga: A5 SoCDK use environment in common header
In reply to Dalon WestergreenThis removes the default environment from the A5 socdk headers and instead uses the common environment provided in socfpga_common.h which now uses distro boot.
Add support to boot from the custom a2 type partition.
Change default devicetree name to match devicetree name in upstream kernel source.
a5
--- configs/socfpga_arria5_defconfig | 3 +++ include/configs/socfpga_arria5_socdk.h | 31 ------------------------------- 2 files changed, 3 insertions(+), 31 deletions(-)
configs/socfpga_arria5_defconfig +3 -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_arria10_socdk_sdmmc.dtb" CONFIG_FIT=y CONFIG_SYS_CONSOLE_IS_IN_ENV=y CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE=y
@@ -64,3 +65,5 @@ CONFIG_G_DNL_MANUFACTURER="altera" CONFIG_G_DNL_VENDOR_NUM=0x0525 CONFIG_G_DNL_PRODUCT_NUM=0xa4a5 CONFIG_USE_TINY_PRINTF=y +ONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION_TYPE=y +CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION_TYPE=0xa2
include/configs/socfpga_arria5_socdk.h +0 -31
@@ -17,12 +17,6 @@/* Booting Linux */ #define CONFIG_BOOTFILE "zImage" -#define CONFIG_BOOTARGS "console=ttyS0," __stringify(CONFIG_BAUDRATE) -#ifdef CONFIG_SOCFPGA_VIRTUAL_TARGET -#define CONFIG_BOOTCOMMAND "run ramboot" -#else -#define CONFIG_BOOTCOMMAND "run mmcload; run mmcboot" -#endif #define CONFIG_LOADADDR 0x01000000#define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR
@@ -34,31 +28,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 3/8 arm: socfpga: A5 SoCDK use environment in common header
Quoted 4 lines · Dalon Westergreen
This removes the default environment from the A5 socdk headers and instead uses the common environment provided in
socfpga_common.hwhich now uses distro boot.
Quoted 8 lines
Add support to boot from the custom a2 type partition.
Change default devicetree name to match devicetree name in upstream kernel source.
Signed-off-by Dalon Westergreen <[email protected]>a5
^^ What's this ? :)
Quoted 10 lines
--- configs/socfpga_arria5_defconfig | 3 +++ include/configs/socfpga_arria5_socdk.h | 31 ------------------------------- 2 files changed, 3 insertions(+), 31 deletions(-)configs/socfpga_arria5_defconfig +0
-0
configs/socfpga_arria5_defconfig CONFIG_SYS_MALLOC_F_LEN=0x2000 · line 7
Quoted 4 lines
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_arria10_socdk_sdmmc.dtb"
This is A5 SoCDK , not A10 ;-)
Quoted 14 lines
configs/socfpga_arria5_defconfig +2
-0CONFIG_FIT=y CONFIG_SYS_CONSOLE_IS_IN_ENV=y CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE=y@@ -64,3 +65,5 @@ CONFIG_G_DNL_MANUFACTURER="altera" CONFIG_G_DNL_VENDOR_NUM=0x0525 CONFIG_G_DNL_PRODUCT_NUM=0xa4a5 CONFIG_USE_TINY_PRINTF=y +ONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION_TYPE=y +CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION_TYPE=0xa2include/configs/socfpga_arria5_socdk.h +0
-0
include/configs/socfpga_arria5_socdk.h line 19
Quoted 3 lines
include/configs/socfpga_arria5_socdk.h +0
-0@@ -17,12 +17,6 @@/* Booting Linux */ #define CONFIG_BOOTFILE "zImage"
Is this still needed ? ^
Quoted 42 lines
include/configs/socfpga_arria5_socdk.h +0
-31-#define CONFIG_BOOTARGS "console=ttyS0," __stringify(CONFIG_BAUDRATE) -#ifdef CONFIG_SOCFPGA_VIRTUAL_TARGET -#define CONFIG_BOOTCOMMAND "run ramboot" -#else -#define CONFIG_BOOTCOMMAND "run mmcload; run mmcboot" -#endif #define CONFIG_LOADADDR 0x01000000#define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR@@ -34,31 +28,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 · 2 lines
Best regards, Marek Vasut
PATCH 4/8 arm: socfpga: C5 SoCDK use environment in common header
In reply to Dalon WestergreenThis removes the default environment from the C5 SoCDK headers and instead uses the common environment provided in socfpga_common.h which now uses distro boot.
In addition to the above, add support to boot from the custom a2 type partition.
Change default devicetree name to match devicetree name in upstream kernel source.
--- configs/socfpga_cyclone5_defconfig | 3 +++ include/configs/socfpga_cyclone5_socdk.h | 31 ------------------------------- 2 files changed, 3 insertions(+), 31 deletions(-)
configs/socfpga_cyclone5_defconfig +3 -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
@@ -64,3 +65,5 @@ CONFIG_G_DNL_MANUFACTURER="altera" 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
include/configs/socfpga_cyclone5_socdk.h +0 -31
@@ -17,12 +17,6 @@/* Booting Linux */ #define CONFIG_BOOTFILE "zImage" -#define CONFIG_BOOTARGS "console=ttyS0," __stringify(CONFIG_BAUDRATE) -#ifdef CONFIG_SOCFPGA_VIRTUAL_TARGET -#define CONFIG_BOOTCOMMAND "run ramboot" -#else -#define CONFIG_BOOTCOMMAND "run mmcload; run mmcboot" -#endif #define CONFIG_LOADADDR 0x01000000#define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR
@@ -34,31 +28,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 5/8 arm: socfpga: DE1 use environment in common header
In reply to Dalon WestergreenThis removes the default environment from the de1 headers and instead uses the common environment provided in socfpga_common.h which now uses distro boot.
This board does not have a devicetree in the upstream kernel source so leave the default devicetree name socfpga.dtb.
--- configs/socfpga_de1_soc_defconfig | 1 + include/configs/socfpga_de1_soc.h | 19 ------------------- 2 files changed, 1 insertion(+), 19 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.dtb" CONFIG_FIT=y CONFIG_SYS_CONSOLE_IS_IN_ENV=y CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE=y
include/configs/socfpga_de1_soc.h +0 -19
@@ -17,8 +17,6 @@/* Booting Linux */ #define CONFIG_BOOTFILE "fitImage" -#define CONFIG_BOOTARGS "console=ttyS0," __stringify(CONFIG_BAUDRATE) -#define CONFIG_BOOTCOMMAND "run mmcload; run mmcboot"#define CONFIG_LOADADDR 0x01000000#define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR
@@ -30,23 +28,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 6/8 arm: socfpga: SoCKit use environment in common header
In reply to Dalon WestergreenThis removes the default environment from the SoCKit headers and instead uses the common environment provided in socfpga_common.h which now uses distro boot.
Change default devicetree name to match devicetree name in upstream kernel source.
--- configs/socfpga_sockit_defconfig | 1 + include/configs/socfpga_sockit.h | 27 --------------------------- 2 files changed, 1 insertion(+), 27 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 +0 -27
@@ -17,8 +17,6 @@/* Booting Linux */ #define CONFIG_BOOTFILE "fitImage" -#define CONFIG_BOOTARGS "console=ttyS0," __stringify(CONFIG_BAUDRATE) -#define CONFIG_BOOTCOMMAND "run mmcload; run mmcboot"#define CONFIG_LOADADDR 0x01000000#define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR
@@ -30,31 +28,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 7/8 arm: socfpga: Socrates use environment in common header
In reply to Dalon WestergreenThis removes the default environment from the socrates headers and instead uses the common environment provided in socfpga_common.h which now uses distro boot.
Change default devicetree name to match devicetree name in upstream kernel source.
--- configs/socfpga_socrates_defconfig | 1 + include/configs/socfpga_socrates.h | 25 ------------------------- 2 files changed, 1 insertion(+), 25 deletions(-)
configs/socfpga_socrates_defconfig +1 -0
@@ -4,6 +4,7 @@ CONFIG_SYS_MALLOC_F_LEN=0x2000 CONFIG_TARGET_SOCFPGA_EBV_SOCRATES=y CONFIG_SPL_STACK_R_ADDR=0x00800000 CONFIG_DEFAULT_DEVICE_TREE="socfpga_cyclone5_socrates" +CONFIG_DEFAULT_FDT_FILE="socfpga_cyclone5_socrates.dtb" CONFIG_FIT=y CONFIG_SYS_CONSOLE_IS_IN_ENV=y CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE=y
include/configs/socfpga_socrates.h +0 -25
@@ -17,8 +17,6 @@/* Booting Linux */ #define CONFIG_BOOTFILE "zImage" -#define CONFIG_BOOTARGS "console=ttyS0," __stringify(CONFIG_BAUDRATE) -#define CONFIG_BOOTCOMMAND "run mmcload; run mmcboot"#define CONFIG_LOADADDR 0x01000000#define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR
@@ -30,29 +28,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" \ - "qspiroot=/dev/mtdblock0\0" \ - "qspirootfstype=jffs2\0" \ - "qspiboot=setenv bootargs " CONFIG_BOOTARGS \ - " root=${qspiroot} rw rootfstype=${qspirootfstype};"\ - "bootm ${loadaddr} - ${fdt_addr}\0" -/* The rest of the configuration is shared */ #include <configs/socfpga_common.h>
Signature · 1 line
2.7.4
PATCH 8/8 arm: socfpga: sr1500 use environment in common header
In reply to Dalon WestergreenThis removes the default environment from the sr1500 header and instead uses the common environment provided in socfpga_common.h which now uses distro boot.
This board has no upstream devicetree in the kernel source, so leave the default devicetree name socfpga.dtb.
--- configs/socfpga_sr1500_defconfig | 1 + include/configs/socfpga_sr1500.h | 27 --------------------------- 2 files changed, 1 insertion(+), 27 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.dtb" CONFIG_FIT=y CONFIG_SYS_CONSOLE_IS_IN_ENV=y CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE=y
include/configs/socfpga_sr1500.h +0 -27
@@ -17,8 +17,6 @@/* Booting Linux */ #define CONFIG_BOOTFILE "uImage" -#define CONFIG_BOOTARGS "console=ttyS0," __stringify(CONFIG_BAUDRATE) -#define CONFIG_BOOTCOMMAND "run mmcload; run mmcboot"#define CONFIG_LOADADDR 0x01000000#define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR
@@ -28,31 +26,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
PATCH 8/8 arm: socfpga: sr1500 use environment in common header
Quoted 18 lines · Dalon Westergreen
This removes the default environment from the sr1500 header and instead uses the common environment provided in
socfpga_common.hwhich now uses distro boot.This board has no upstream devicetree in the kernel source, so leave the default devicetree name socfpga.dtb.
Signed-off-by Dalon Westergreen <[email protected]>--- configs/socfpga_sr1500_defconfig | 1 + include/configs/socfpga_sr1500.h | 27 --------------------------- 2 files changed, 1 insertion(+), 27 deletions(-)configs/socfpga_sr1500_defconfig +0
-0
configs/socfpga_sr1500_defconfig CONFIG_SYS_MALLOC_F_LEN=0x2000 · line 7
Quoted 4 lines
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.dtb"
Shouldn't this be socfpga_cyclone5_sr1500.dtb too ?
Quoted 49 lines
configs/socfpga_sr1500_defconfig +0
-0CONFIG_FIT=y CONFIG_SYS_CONSOLE_IS_IN_ENV=y CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE=yinclude/configs/socfpga_sr1500.h +0
-27@@ -17,8 +17,6 @@/* Booting Linux */ #define CONFIG_BOOTFILE "uImage" -#define CONFIG_BOOTARGS "console=ttyS0," __stringify(CONFIG_BAUDRATE) -#define CONFIG_BOOTCOMMAND "run mmcload; run mmcboot"#define CONFIG_LOADADDR 0x01000000#define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR@@ -28,31 +26,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 · 2 lines
Best regards, Marek Vasut
PATCH 8/8 arm: socfpga: sr1500 use environment in common header
Quoted 15 lines · Marek Vasut
Quoted 14 lines · Dalon Westergreen
This removes the default environment from the sr1500 header and instead uses the common environment provided in
socfpga_common.hwhich now uses distro boot.This board has no upstream devicetree in the kernel source, so leave the default devicetree name socfpga.dtb.
Signed-off-by Dalon Westergreen <[email protected]>---
?configs/socfpga_sr1500_defconfig |??1 + ?include/configs/socfpga_sr1500.h | 27 --------------------------- ?2 files changed, 1 insertion(+), 27 deletions(-)
Quoted 12 lines
Quoted 10 lines
configs/socfpga_sr1500_defconfig +0
-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.dtb"
Shouldn't this be socfpga_cyclone5_sr1500.dtb too ?
We discussed this before, my thought was to leave the dtb name as it was before where there was no mainlined device tree in the linux kernel source. ?CONFIG_DEFAULT_FDT_FILE is specifically the kernel devicetree used for linux boot and is unrelated to the dtb for uboot.
--dalon
Quoted 55 lines
Quoted 53 lines
?CONFIG_FIT=y
?CONFIG_SYS_CONSOLE_IS_IN_ENV=y
?CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE=yinclude/configs/socfpga_sr1500.h +0
-0@@ -17,8 +17,6 @@?
?/* Booting Linux */
?#defineCONFIG_BOOTFILE"uImage"
-#defineCONFIG_BOOTARGS"console=ttyS0,"__stringify(CONFIG_BAUDRATE)
-#defineCONFIG_BOOTCOMMAND"run mmcload; run mmcboot"
?#defineCONFIG_LOADADDR0x01000000
?#defineCONFIG_SYS_LOAD_ADDRCONFIG_LOADADDR
?include/configs/socfpga_sr1500.h +0
-0@@ -28,31 +26,6 @@?#define
CONFIG_PHY_MARVELL
?#definePHY_ANEG_TIMEOUT8000
?include/configs/socfpga_sr1500.h +0
-25-#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 */
?#defineCONFIG_ENV_IS_IN_SPI_FLASH
?
PATCH 8/8 arm: socfpga: sr1500 use environment in common header
Quoted 28 lines · Dalon Westergreen
Quoted 15 lines · Marek Vasut
Quoted 14 lines · Dalon Westergreen
This removes the default environment from the sr1500 header and instead uses the common environment provided in
socfpga_common.hwhich now uses distro boot.This board has no upstream devicetree in the kernel source, so leave the default devicetree name socfpga.dtb.
Signed-off-by Dalon Westergreen <[email protected]>--- configs/socfpga_sr1500_defconfig | 1 + include/configs/socfpga_sr1500.h | 27 --------------------------- 2 files changed, 1 insertion(+), 27 deletions(-)Quoted 12 lines
configs/socfpga_sr1500_defconfig CONFIG_SYS_MALLOC_F_LEN=0x2000 · line 7
Quoted 10 lines
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.dtb"Shouldn't this be socfpga_cyclone5_sr1500.dtb too ?
Quoted 5 lines
We discussed this before, my thought was to leave the dtb name as it was before where there was no mainlined device tree in the linux kernel source.
CONFIG_DEFAULT_FDT_FILEis specifically the kernel devicetree used for linux boot and is unrelated to the dtb for uboot.
Well yeah, then again, all the DTs for socfpga are in the form socfpga_{fpga model}_{board model}.dts , so for this board, it would be socfpga_cyclone5_sr1500.dtb . Also, the U-Boot DT is in that form already ... I guess Stefan has some DT for this board stashed somewhere, so he should be able to tell what the name in reality is.
[...]
Signature · 2 lines
Best regards, Marek Vasut