All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 0/8] arm: socfpga: Move to using distro boot
@ 2017-02-18 20:51 Dalon Westergreen
  2017-02-18 20:51 ` [U-Boot] [PATCH 1/8] arm: socfpga: Add distro boot to socfpga common header Dalon Westergreen
                   ` (7 more replies)
  0 siblings, 8 replies; 20+ messages in thread
From: Dalon Westergreen @ 2017-02-18 20:51 UTC (permalink / raw)
  To: u-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(-)

-- 
2.7.4

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [U-Boot] [PATCH 1/8] arm: socfpga: Add distro boot to socfpga common header
  2017-02-18 20:51 [U-Boot] [PATCH 0/8] arm: socfpga: Move to using distro boot Dalon Westergreen
@ 2017-02-18 20:51 ` Dalon Westergreen
  2017-02-18 21:01   ` Marek Vasut
  2017-02-18 20:51 ` [U-Boot] [PATCH 2/8] arm: socfpga: DE0 use environment in " Dalon Westergreen
                   ` (6 subsequent siblings)
  7 siblings, 1 reply; 20+ messages in thread
From: Dalon Westergreen @ 2017-02-18 20:51 UTC (permalink / raw)
  To: u-boot

This adds a common environment and support for distro boot
in the common socfpga header.

Signed-off-by: Dalon Westergreen <dwesterg@gmail.com>
---
 include/configs/socfpga_common.h | 55 +++++++++++++++++++++++++++++++++++++---
 1 file changed, 51 insertions(+), 4 deletions(-)

diff --git a/include/configs/socfpga_common.h b/include/configs/socfpga_common.h
index 582b04a..2b8be8f 100644
--- a/include/configs/socfpga_common.h
+++ b/include/configs/socfpga_common.h
@@ -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__ */
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [U-Boot] [PATCH 2/8] arm: socfpga: DE0 use environment in common header
  2017-02-18 20:51 [U-Boot] [PATCH 0/8] arm: socfpga: Move to using distro boot Dalon Westergreen
  2017-02-18 20:51 ` [U-Boot] [PATCH 1/8] arm: socfpga: Add distro boot to socfpga common header Dalon Westergreen
@ 2017-02-18 20:51 ` Dalon Westergreen
  2017-02-18 20:51 ` [U-Boot] [PATCH 3/8] arm: socfpga: A5 SoCDK " Dalon Westergreen
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 20+ messages in thread
From: Dalon Westergreen @ 2017-02-18 20:51 UTC (permalink / raw)
  To: u-boot

This 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

Signed-off-by: Dalon Westergreen <dwesterg@gmail.com>
---
 configs/socfpga_de0_nano_soc_defconfig |  3 +++
 include/configs/socfpga_de0_nano_soc.h | 19 -------------------
 2 files changed, 3 insertions(+), 19 deletions(-)

diff --git a/configs/socfpga_de0_nano_soc_defconfig b/configs/socfpga_de0_nano_soc_defconfig
index af41e1e..b122135 100644
--- a/configs/socfpga_de0_nano_soc_defconfig
+++ b/configs/socfpga_de0_nano_soc_defconfig
@@ -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
\ No newline at end of file
diff --git a/include/configs/socfpga_de0_nano_soc.h b/include/configs/socfpga_de0_nano_soc.h
index f655972..4b86df7 100644
--- a/include/configs/socfpga_de0_nano_soc.h
+++ b/include/configs/socfpga_de0_nano_soc.h
@@ -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>
 
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [U-Boot] [PATCH 3/8] arm: socfpga: A5 SoCDK use environment in common header
  2017-02-18 20:51 [U-Boot] [PATCH 0/8] arm: socfpga: Move to using distro boot Dalon Westergreen
  2017-02-18 20:51 ` [U-Boot] [PATCH 1/8] arm: socfpga: Add distro boot to socfpga common header Dalon Westergreen
  2017-02-18 20:51 ` [U-Boot] [PATCH 2/8] arm: socfpga: DE0 use environment in " Dalon Westergreen
@ 2017-02-18 20:51 ` Dalon Westergreen
  2017-02-18 20:58   ` Marek Vasut
  2017-02-18 20:51 ` [U-Boot] [PATCH 4/8] arm: socfpga: C5 " Dalon Westergreen
                   ` (4 subsequent siblings)
  7 siblings, 1 reply; 20+ messages in thread
From: Dalon Westergreen @ 2017-02-18 20:51 UTC (permalink / raw)
  To: u-boot

This 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.

Signed-off-by: Dalon Westergreen <dwesterg@gmail.com>

a5
---
 configs/socfpga_arria5_defconfig       |  3 +++
 include/configs/socfpga_arria5_socdk.h | 31 -------------------------------
 2 files changed, 3 insertions(+), 31 deletions(-)

diff --git a/configs/socfpga_arria5_defconfig b/configs/socfpga_arria5_defconfig
index 43c51fe..c7d7f93 100644
--- a/configs/socfpga_arria5_defconfig
+++ b/configs/socfpga_arria5_defconfig
@@ -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
diff --git a/include/configs/socfpga_arria5_socdk.h b/include/configs/socfpga_arria5_socdk.h
index 9b1f753..7222505 100644
--- a/include/configs/socfpga_arria5_socdk.h
+++ b/include/configs/socfpga_arria5_socdk.h
@@ -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>
 
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [U-Boot] [PATCH 4/8] arm: socfpga: C5 SoCDK use environment in common header
  2017-02-18 20:51 [U-Boot] [PATCH 0/8] arm: socfpga: Move to using distro boot Dalon Westergreen
                   ` (2 preceding siblings ...)
  2017-02-18 20:51 ` [U-Boot] [PATCH 3/8] arm: socfpga: A5 SoCDK " Dalon Westergreen
@ 2017-02-18 20:51 ` Dalon Westergreen
  2017-02-18 20:51 ` [U-Boot] [PATCH 5/8] arm: socfpga: DE1 " Dalon Westergreen
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 20+ messages in thread
From: Dalon Westergreen @ 2017-02-18 20:51 UTC (permalink / raw)
  To: u-boot

This 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.

Signed-off-by: Dalon Westergreen <dwesterg@gmail.com>
---
 configs/socfpga_cyclone5_defconfig       |  3 +++
 include/configs/socfpga_cyclone5_socdk.h | 31 -------------------------------
 2 files changed, 3 insertions(+), 31 deletions(-)

diff --git a/configs/socfpga_cyclone5_defconfig b/configs/socfpga_cyclone5_defconfig
index 8b050b9..c8b8084 100644
--- a/configs/socfpga_cyclone5_defconfig
+++ b/configs/socfpga_cyclone5_defconfig
@@ -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
diff --git a/include/configs/socfpga_cyclone5_socdk.h b/include/configs/socfpga_cyclone5_socdk.h
index 4100ef9..c5dac8f 100644
--- a/include/configs/socfpga_cyclone5_socdk.h
+++ b/include/configs/socfpga_cyclone5_socdk.h
@@ -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>
 
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [U-Boot] [PATCH 5/8] arm: socfpga: DE1 use environment in common header
  2017-02-18 20:51 [U-Boot] [PATCH 0/8] arm: socfpga: Move to using distro boot Dalon Westergreen
                   ` (3 preceding siblings ...)
  2017-02-18 20:51 ` [U-Boot] [PATCH 4/8] arm: socfpga: C5 " Dalon Westergreen
@ 2017-02-18 20:51 ` Dalon Westergreen
  2017-02-18 20:51 ` [U-Boot] [PATCH 6/8] arm: socfpga: SoCKit " Dalon Westergreen
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 20+ messages in thread
From: Dalon Westergreen @ 2017-02-18 20:51 UTC (permalink / raw)
  To: u-boot

This 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.

Signed-off-by: Dalon Westergreen <dwesterg@gmail.com>
---
 configs/socfpga_de1_soc_defconfig |  1 +
 include/configs/socfpga_de1_soc.h | 19 -------------------
 2 files changed, 1 insertion(+), 19 deletions(-)

diff --git a/configs/socfpga_de1_soc_defconfig b/configs/socfpga_de1_soc_defconfig
index 032deef..19ff608 100644
--- a/configs/socfpga_de1_soc_defconfig
+++ b/configs/socfpga_de1_soc_defconfig
@@ -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
diff --git a/include/configs/socfpga_de1_soc.h b/include/configs/socfpga_de1_soc.h
index 2278357..2f31d45 100644
--- a/include/configs/socfpga_de1_soc.h
+++ b/include/configs/socfpga_de1_soc.h
@@ -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>
 
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [U-Boot] [PATCH 6/8] arm: socfpga: SoCKit use environment in common header
  2017-02-18 20:51 [U-Boot] [PATCH 0/8] arm: socfpga: Move to using distro boot Dalon Westergreen
                   ` (4 preceding siblings ...)
  2017-02-18 20:51 ` [U-Boot] [PATCH 5/8] arm: socfpga: DE1 " Dalon Westergreen
@ 2017-02-18 20:51 ` Dalon Westergreen
  2017-02-18 20:51 ` [U-Boot] [PATCH 7/8] arm: socfpga: Socrates " Dalon Westergreen
  2017-02-18 20:51 ` [U-Boot] [PATCH 8/8] arm: socfpga: sr1500 " Dalon Westergreen
  7 siblings, 0 replies; 20+ messages in thread
From: Dalon Westergreen @ 2017-02-18 20:51 UTC (permalink / raw)
  To: u-boot

This 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.

Signed-off-by: Dalon Westergreen <dwesterg@gmail.com>
---
 configs/socfpga_sockit_defconfig |  1 +
 include/configs/socfpga_sockit.h | 27 ---------------------------
 2 files changed, 1 insertion(+), 27 deletions(-)

diff --git a/configs/socfpga_sockit_defconfig b/configs/socfpga_sockit_defconfig
index d0c2bda..bf60783 100644
--- a/configs/socfpga_sockit_defconfig
+++ b/configs/socfpga_sockit_defconfig
@@ -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
diff --git a/include/configs/socfpga_sockit.h b/include/configs/socfpga_sockit.h
index 326310b..4314b34 100644
--- a/include/configs/socfpga_sockit.h
+++ b/include/configs/socfpga_sockit.h
@@ -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>
 
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [U-Boot] [PATCH 7/8] arm: socfpga: Socrates use environment in common header
  2017-02-18 20:51 [U-Boot] [PATCH 0/8] arm: socfpga: Move to using distro boot Dalon Westergreen
                   ` (5 preceding siblings ...)
  2017-02-18 20:51 ` [U-Boot] [PATCH 6/8] arm: socfpga: SoCKit " Dalon Westergreen
@ 2017-02-18 20:51 ` Dalon Westergreen
  2017-02-18 20:51 ` [U-Boot] [PATCH 8/8] arm: socfpga: sr1500 " Dalon Westergreen
  7 siblings, 0 replies; 20+ messages in thread
From: Dalon Westergreen @ 2017-02-18 20:51 UTC (permalink / raw)
  To: u-boot

This 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.

Signed-off-by: Dalon Westergreen <dwesterg@gmail.com>
---
 configs/socfpga_socrates_defconfig |  1 +
 include/configs/socfpga_socrates.h | 25 -------------------------
 2 files changed, 1 insertion(+), 25 deletions(-)

diff --git a/configs/socfpga_socrates_defconfig b/configs/socfpga_socrates_defconfig
index e9276f9..4246ad6 100644
--- a/configs/socfpga_socrates_defconfig
+++ b/configs/socfpga_socrates_defconfig
@@ -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
diff --git a/include/configs/socfpga_socrates.h b/include/configs/socfpga_socrates.h
index 90343b7..b113ddf 100644
--- a/include/configs/socfpga_socrates.h
+++ b/include/configs/socfpga_socrates.h
@@ -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>
 
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [U-Boot] [PATCH 8/8] arm: socfpga: sr1500 use environment in common header
  2017-02-18 20:51 [U-Boot] [PATCH 0/8] arm: socfpga: Move to using distro boot Dalon Westergreen
                   ` (6 preceding siblings ...)
  2017-02-18 20:51 ` [U-Boot] [PATCH 7/8] arm: socfpga: Socrates " Dalon Westergreen
@ 2017-02-18 20:51 ` Dalon Westergreen
  2017-02-18 20:56   ` Marek Vasut
  7 siblings, 1 reply; 20+ messages in thread
From: Dalon Westergreen @ 2017-02-18 20:51 UTC (permalink / raw)
  To: u-boot

This 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.

Signed-off-by: Dalon Westergreen <dwesterg@gmail.com>
---
 configs/socfpga_sr1500_defconfig |  1 +
 include/configs/socfpga_sr1500.h | 27 ---------------------------
 2 files changed, 1 insertion(+), 27 deletions(-)

diff --git a/configs/socfpga_sr1500_defconfig b/configs/socfpga_sr1500_defconfig
index 981600b..b0925ab 100644
--- a/configs/socfpga_sr1500_defconfig
+++ b/configs/socfpga_sr1500_defconfig
@@ -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
diff --git a/include/configs/socfpga_sr1500.h b/include/configs/socfpga_sr1500.h
index f67fafd..d94771c 100644
--- a/include/configs/socfpga_sr1500.h
+++ b/include/configs/socfpga_sr1500.h
@@ -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
 
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [U-Boot] [PATCH 8/8] arm: socfpga: sr1500 use environment in common header
  2017-02-18 20:51 ` [U-Boot] [PATCH 8/8] arm: socfpga: sr1500 " Dalon Westergreen
@ 2017-02-18 20:56   ` Marek Vasut
  2017-02-18 23:31     ` Dalon Westergreen
  0 siblings, 1 reply; 20+ messages in thread
From: Marek Vasut @ 2017-02-18 20:56 UTC (permalink / raw)
  To: u-boot

On 02/18/2017 09:51 PM, Dalon Westergreen wrote:
> This 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.
> 
> Signed-off-by: Dalon Westergreen <dwesterg@gmail.com>
> ---
>  configs/socfpga_sr1500_defconfig |  1 +
>  include/configs/socfpga_sr1500.h | 27 ---------------------------
>  2 files changed, 1 insertion(+), 27 deletions(-)
> 
> diff --git a/configs/socfpga_sr1500_defconfig b/configs/socfpga_sr1500_defconfig
> index 981600b..b0925ab 100644
> --- a/configs/socfpga_sr1500_defconfig
> +++ b/configs/socfpga_sr1500_defconfig
> @@ -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 ?

>  CONFIG_FIT=y
>  CONFIG_SYS_CONSOLE_IS_IN_ENV=y
>  CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE=y
> diff --git a/include/configs/socfpga_sr1500.h b/include/configs/socfpga_sr1500.h
> index f67fafd..d94771c 100644
> --- a/include/configs/socfpga_sr1500.h
> +++ b/include/configs/socfpga_sr1500.h
> @@ -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
>  
> 


-- 
Best regards,
Marek Vasut

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [U-Boot] [PATCH 3/8] arm: socfpga: A5 SoCDK use environment in common header
  2017-02-18 20:51 ` [U-Boot] [PATCH 3/8] arm: socfpga: A5 SoCDK " Dalon Westergreen
@ 2017-02-18 20:58   ` Marek Vasut
  0 siblings, 0 replies; 20+ messages in thread
From: Marek Vasut @ 2017-02-18 20:58 UTC (permalink / raw)
  To: u-boot

On 02/18/2017 09:51 PM, Dalon Westergreen wrote:
> This 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.
> 
> Signed-off-by: Dalon Westergreen <dwesterg@gmail.com>
> 
> a5

  ^^ What's this ? :)

> ---
>  configs/socfpga_arria5_defconfig       |  3 +++
>  include/configs/socfpga_arria5_socdk.h | 31 -------------------------------
>  2 files changed, 3 insertions(+), 31 deletions(-)
> 
> diff --git a/configs/socfpga_arria5_defconfig b/configs/socfpga_arria5_defconfig
> index 43c51fe..c7d7f93 100644
> --- a/configs/socfpga_arria5_defconfig
> +++ b/configs/socfpga_arria5_defconfig
> @@ -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 ;-)

>  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
> diff --git a/include/configs/socfpga_arria5_socdk.h b/include/configs/socfpga_arria5_socdk.h
> index 9b1f753..7222505 100644
> --- a/include/configs/socfpga_arria5_socdk.h
> +++ b/include/configs/socfpga_arria5_socdk.h
> @@ -17,12 +17,6 @@
>  
>  /* Booting Linux */
>  #define CONFIG_BOOTFILE		"zImage"

Is this still needed ? ^

> -#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>
>  
> 


-- 
Best regards,
Marek Vasut

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [U-Boot] [PATCH 1/8] arm: socfpga: Add distro boot to socfpga common header
  2017-02-18 20:51 ` [U-Boot] [PATCH 1/8] arm: socfpga: Add distro boot to socfpga common header Dalon Westergreen
@ 2017-02-18 21:01   ` Marek Vasut
  2017-02-18 23:29     ` Dalon Westergreen
  0 siblings, 1 reply; 20+ messages in thread
From: Marek Vasut @ 2017-02-18 21:01 UTC (permalink / raw)
  To: u-boot

On 02/18/2017 09:51 PM, Dalon Westergreen wrote:
> This adds a common environment and support for distro boot
> in the common socfpga header.
> 
> Signed-off-by: Dalon Westergreen <dwesterg@gmail.com>
> ---
>  include/configs/socfpga_common.h | 55 +++++++++++++++++++++++++++++++++++++---
>  1 file changed, 51 insertions(+), 4 deletions(-)
> 
> diff --git a/include/configs/socfpga_common.h b/include/configs/socfpga_common.h
> index 582b04a..2b8be8f 100644
> --- a/include/configs/socfpga_common.h
> +++ b/include/configs/socfpga_common.h
> @@ -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 */

Space around the asterisk . Btw this probably broke some existing
configurations ...

>  #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" \

Is this needed ?

> +	"bootimage=" CONFIG_BOOTFILE "\0" \
> +	"fdt_addr=100\0" \

Move this to like 0x200000 at least.

> +	"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 ?

> +	"scriptaddr=0x02100000\0" \
> +	"pxefile_addr_r=0x02200000\0" \
> +	"ramdisk_addr_r=0x02300000\0" \
> +	BOOTENV
> +
> +#endif
> +#endif
> +
>  #endif	/* __CONFIG_SOCFPGA_COMMON_H__ */
> 


-- 
Best regards,
Marek Vasut

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [U-Boot] [PATCH 1/8] arm: socfpga: Add distro boot to socfpga common header
  2017-02-18 21:01   ` Marek Vasut
@ 2017-02-18 23:29     ` Dalon Westergreen
  2017-02-19  0:37       ` Marek Vasut
  0 siblings, 1 reply; 20+ messages in thread
From: Dalon Westergreen @ 2017-02-18 23:29 UTC (permalink / raw)
  To: u-boot

On Sat, 2017-02-18 at 22:01 +0100, Marek Vasut wrote:
> On 02/18/2017 09:51 PM, Dalon Westergreen wrote:
> > 
> > This adds a common environment and support for distro boot
> > in the common socfpga header.
> > 
> > Signed-off-by: Dalon Westergreen <dwesterg@gmail.com>
> > ---
> > ?include/configs/socfpga_common.h | 55
> > +++++++++++++++++++++++++++++++++++++---
> > ?1 file changed, 51 insertions(+), 4 deletions(-)
> > 
> > diff --git a/include/configs/socfpga_common.h
> > b/include/configs/socfpga_common.h
> > index 582b04a..2b8be8f 100644
> > --- a/include/configs/socfpga_common.h
> > +++ b/include/configs/socfpga_common.h
> > @@ -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 */
> 
> 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.

> 
> > 
> > ?#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" \
> 
> Is this needed ?
No
> 
> > 
> > +	"bootimage=" CONFIG_BOOTFILE "\0" \
> > +	"fdt_addr=100\0" \
> 
> Move this to like 0x200000 at least.
I think i will just remove it too, i dont believe it us used for
distro boot.
> 
> > 
> > +	"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

> > 
> > +	"scriptaddr=0x02100000\0" \
> > +	"pxefile_addr_r=0x02200000\0" \
> > +	"ramdisk_addr_r=0x02300000\0" \
> > +	BOOTENV
> > +
> > +#endif
> > +#endif
> > +
> > ?#endif	/* __CONFIG_SOCFPGA_COMMON_H__ */
> > 
> 
> 

Thanks,
Dalon

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [U-Boot] [PATCH 8/8] arm: socfpga: sr1500 use environment in common header
  2017-02-18 20:56   ` Marek Vasut
@ 2017-02-18 23:31     ` Dalon Westergreen
  2017-02-19  0:33       ` Marek Vasut
  0 siblings, 1 reply; 20+ messages in thread
From: Dalon Westergreen @ 2017-02-18 23:31 UTC (permalink / raw)
  To: u-boot

On Sat, 2017-02-18 at 21:56 +0100, Marek Vasut wrote:
> On 02/18/2017 09:51 PM, Dalon Westergreen wrote:
> > 
> > This 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.
> > 
> > Signed-off-by: Dalon Westergreen <dwesterg@gmail.com>
> > ---
> > ?configs/socfpga_sr1500_defconfig |??1 +
> > ?include/configs/socfpga_sr1500.h | 27 ---------------------------
> > ?2 files changed, 1 insertion(+), 27 deletions(-)
> > 
> > diff --git a/configs/socfpga_sr1500_defconfig
> > b/configs/socfpga_sr1500_defconfig
> > index 981600b..b0925ab 100644
> > --- a/configs/socfpga_sr1500_defconfig
> > +++ b/configs/socfpga_sr1500_defconfig
> > @@ -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
> 
> > 
> > ?CONFIG_FIT=y
> > ?CONFIG_SYS_CONSOLE_IS_IN_ENV=y
> > ?CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE=y
> > diff --git a/include/configs/socfpga_sr1500.h
> > b/include/configs/socfpga_sr1500.h
> > index f67fafd..d94771c 100644
> > --- a/include/configs/socfpga_sr1500.h
> > +++ b/include/configs/socfpga_sr1500.h
> > @@ -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
> > ?
> > 
> 
> 

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [U-Boot] [PATCH 8/8] arm: socfpga: sr1500 use environment in common header
  2017-02-18 23:31     ` Dalon Westergreen
@ 2017-02-19  0:33       ` Marek Vasut
  0 siblings, 0 replies; 20+ messages in thread
From: Marek Vasut @ 2017-02-19  0:33 UTC (permalink / raw)
  To: u-boot

On 02/19/2017 12:31 AM, Dalon Westergreen wrote:
> On Sat, 2017-02-18 at 21:56 +0100, Marek Vasut wrote:
>> On 02/18/2017 09:51 PM, Dalon Westergreen wrote:
>>>
>>> This 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.
>>>
>>> Signed-off-by: Dalon Westergreen <dwesterg@gmail.com>
>>> ---
>>>  configs/socfpga_sr1500_defconfig |  1 +
>>>  include/configs/socfpga_sr1500.h | 27 ---------------------------
>>>  2 files changed, 1 insertion(+), 27 deletions(-)
>>>
>>> diff --git a/configs/socfpga_sr1500_defconfig
>>> b/configs/socfpga_sr1500_defconfig
>>> index 981600b..b0925ab 100644
>>> --- a/configs/socfpga_sr1500_defconfig
>>> +++ b/configs/socfpga_sr1500_defconfig
>>> @@ -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.

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.

[...]

-- 
Best regards,
Marek Vasut

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [U-Boot] [PATCH 1/8] arm: socfpga: Add distro boot to socfpga common header
  2017-02-18 23:29     ` Dalon Westergreen
@ 2017-02-19  0:37       ` Marek Vasut
  2017-02-19  1:10         ` Dalon Westergreen
  0 siblings, 1 reply; 20+ messages in thread
From: Marek Vasut @ 2017-02-19  0:37 UTC (permalink / raw)
  To: u-boot

On 02/19/2017 12:29 AM, Dalon Westergreen wrote:
> On Sat, 2017-02-18 at 22:01 +0100, Marek Vasut wrote:
>> On 02/18/2017 09:51 PM, Dalon Westergreen wrote:
>>>
>>> This adds a common environment and support for distro boot
>>> in the common socfpga header.
>>>
>>> Signed-off-by: Dalon Westergreen <dwesterg@gmail.com>
>>> ---
>>>  include/configs/socfpga_common.h | 55
>>> +++++++++++++++++++++++++++++++++++++---
>>>  1 file changed, 51 insertions(+), 4 deletions(-)
>>>
>>> diff --git a/include/configs/socfpga_common.h
>>> b/include/configs/socfpga_common.h
>>> index 582b04a..2b8be8f 100644
>>> --- a/include/configs/socfpga_common.h
>>> +++ b/include/configs/socfpga_common.h
>>> @@ -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 */
>>
>> 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.

I'm really not impressed ... sigh.

>>>
>>>  #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" \
>>
>> Is this needed ?
> No

OK

>>>
>>> +	"bootimage=" CONFIG_BOOTFILE "\0" \
>>> +	"fdt_addr=100\0" \
>>
>> Move this to like 0x200000 at least.
> I think i will just remove it too, i dont believe it us used for
> distro boot.

:)

>>>
>>> +	"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

>>>
>>> +	"scriptaddr=0x02100000\0" \
>>> +	"pxefile_addr_r=0x02200000\0" \
>>> +	"ramdisk_addr_r=0x02300000\0" \
>>> +	BOOTENV
>>> +
>>> +#endif
>>> +#endif
>>> +
>>>  #endif	/* __CONFIG_SOCFPGA_COMMON_H__ */
>>>
>>
>>
> 
> Thanks,
> Dalon
> 


-- 
Best regards,
Marek Vasut

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [U-Boot] [PATCH 1/8] arm: socfpga: Add distro boot to socfpga common header
  2017-02-19  0:37       ` Marek Vasut
@ 2017-02-19  1:10         ` Dalon Westergreen
  2017-02-19  2:26           ` Marek Vasut
  2017-02-19 19:45           ` Pavel Machek
  0 siblings, 2 replies; 20+ messages in thread
From: Dalon Westergreen @ 2017-02-19  1:10 UTC (permalink / raw)
  To: u-boot

On Sun, 2017-02-19 at 01:37 +0100, Marek Vasut wrote:
> On 02/19/2017 12:29 AM, Dalon Westergreen wrote:
> > 
> > On Sat, 2017-02-18 at 22:01 +0100, Marek Vasut wrote:
> > > 
> > > On 02/18/2017 09:51 PM, Dalon Westergreen wrote:
> > > > 
> > > > 
> > > > This adds a common environment and support for distro boot
> > > > in the common socfpga header.
> > > > 
> > > > Signed-off-by: Dalon Westergreen <dwesterg@gmail.com>
> > > > ---
> > > > ?include/configs/socfpga_common.h | 55
> > > > +++++++++++++++++++++++++++++++++++++---
> > > > ?1 file changed, 51 insertions(+), 4 deletions(-)
> > > > 
> > > > diff --git a/include/configs/socfpga_common.h
> > > > b/include/configs/socfpga_common.h
> > > > index 582b04a..2b8be8f 100644
> > > > --- a/include/configs/socfpga_common.h
> > > > +++ b/include/configs/socfpga_common.h
> > > > @@ -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
> > > > */
> > > 
> > > 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.
> 
> 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

> > 
> > > 
> > > > 
> > > > 
> > > > ?#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" \
> > > 
> > > Is this needed ?
> > No
> 
> OK
> 
> > 
> > > 
> > > > 
> > > > 
> > > > +	"bootimage=" CONFIG_BOOTFILE "\0" \
> > > > +	"fdt_addr=100\0" \
> > > 
> > > Move this to like 0x200000 at least.
> > I think i will just remove it too, i dont believe it us used for
> > distro boot.
> 
> :)
> 
> > 
> > > 
> > > > 
> > > > 
> > > > +	"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
> 
> > 
> > > 
> > > > 
> > > > 
> > > > +	"scriptaddr=0x02100000\0" \
> > > > +	"pxefile_addr_r=0x02200000\0" \
> > > > +	"ramdisk_addr_r=0x02300000\0" \
> > > > +	BOOTENV
> > > > +
> > > > +#endif
> > > > +#endif
> > > > +
> > > > ?#endif	/* __CONFIG_SOCFPGA_COMMON_H__ */
> > > > 
> > > 
> > > 
> > 
> > Thanks,
> > Dalon
> > 
> 
> 

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [U-Boot] [PATCH 1/8] arm: socfpga: Add distro boot to socfpga common header
  2017-02-19  1:10         ` Dalon Westergreen
@ 2017-02-19  2:26           ` Marek Vasut
  2017-02-19 19:45           ` Pavel Machek
  1 sibling, 0 replies; 20+ messages in thread
From: Marek Vasut @ 2017-02-19  2:26 UTC (permalink / raw)
  To: u-boot

On 02/19/2017 02:10 AM, Dalon Westergreen wrote:
> On Sun, 2017-02-19 at 01:37 +0100, Marek Vasut wrote:
>> On 02/19/2017 12:29 AM, Dalon Westergreen wrote:
>>>
>>> On Sat, 2017-02-18 at 22:01 +0100, Marek Vasut wrote:
>>>>
>>>> On 02/18/2017 09:51 PM, Dalon Westergreen wrote:
>>>>>
>>>>>
>>>>> This adds a common environment and support for distro boot
>>>>> in the common socfpga header.
>>>>>
>>>>> Signed-off-by: Dalon Westergreen <dwesterg@gmail.com>
>>>>> ---
>>>>>  include/configs/socfpga_common.h | 55
>>>>> +++++++++++++++++++++++++++++++++++++---
>>>>>  1 file changed, 51 insertions(+), 4 deletions(-)
>>>>>
>>>>> diff --git a/include/configs/socfpga_common.h
>>>>> b/include/configs/socfpga_common.h
>>>>> index 582b04a..2b8be8f 100644
>>>>> --- a/include/configs/socfpga_common.h
>>>>> +++ b/include/configs/socfpga_common.h
>>>>> @@ -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
>>>>> */
>>>>
>>>> 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.
>>
>> 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.


-- 
Best regards,
Marek Vasut

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [U-Boot] [PATCH 1/8] arm: socfpga: Add distro boot to socfpga common header
  2017-02-19  1:10         ` Dalon Westergreen
  2017-02-19  2:26           ` Marek Vasut
@ 2017-02-19 19:45           ` Pavel Machek
  2017-02-19 19:59             ` Dalon Westergreen
  1 sibling, 1 reply; 20+ messages in thread
From: Pavel Machek @ 2017-02-19 19:45 UTC (permalink / raw)
  To: u-boot

Hi!

> > > > > ?/* 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
> > > > > */
...
> 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
-- 
(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>

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [U-Boot] [PATCH 1/8] arm: socfpga: Add distro boot to socfpga common header
  2017-02-19 19:45           ` Pavel Machek
@ 2017-02-19 19:59             ` Dalon Westergreen
  0 siblings, 0 replies; 20+ messages in thread
From: Dalon Westergreen @ 2017-02-19 19:59 UTC (permalink / raw)
  To: u-boot

On Sun, 2017-02-19 at 20:45 +0100, Pavel Machek wrote:
> Hi!
> 
> > 
> > > 
> > > > 
> > > > > 
> > > > > > 
> > > > > > ?/* 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
> > > > > > */
> ...
> > 
> > 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

> 
> 									Pavel

^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2017-02-19 19:59 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-18 20:51 [U-Boot] [PATCH 0/8] arm: socfpga: Move to using distro boot Dalon Westergreen
2017-02-18 20:51 ` [U-Boot] [PATCH 1/8] arm: socfpga: Add distro boot to socfpga common header Dalon Westergreen
2017-02-18 21:01   ` Marek Vasut
2017-02-18 23:29     ` Dalon Westergreen
2017-02-19  0:37       ` Marek Vasut
2017-02-19  1:10         ` Dalon Westergreen
2017-02-19  2:26           ` Marek Vasut
2017-02-19 19:45           ` Pavel Machek
2017-02-19 19:59             ` Dalon Westergreen
2017-02-18 20:51 ` [U-Boot] [PATCH 2/8] arm: socfpga: DE0 use environment in " Dalon Westergreen
2017-02-18 20:51 ` [U-Boot] [PATCH 3/8] arm: socfpga: A5 SoCDK " Dalon Westergreen
2017-02-18 20:58   ` Marek Vasut
2017-02-18 20:51 ` [U-Boot] [PATCH 4/8] arm: socfpga: C5 " Dalon Westergreen
2017-02-18 20:51 ` [U-Boot] [PATCH 5/8] arm: socfpga: DE1 " Dalon Westergreen
2017-02-18 20:51 ` [U-Boot] [PATCH 6/8] arm: socfpga: SoCKit " Dalon Westergreen
2017-02-18 20:51 ` [U-Boot] [PATCH 7/8] arm: socfpga: Socrates " Dalon Westergreen
2017-02-18 20:51 ` [U-Boot] [PATCH 8/8] arm: socfpga: sr1500 " Dalon Westergreen
2017-02-18 20:56   ` Marek Vasut
2017-02-18 23:31     ` Dalon Westergreen
2017-02-19  0:33       ` Marek Vasut

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.