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

Changes in v4:
 - Move env back to immediately after MBR 
Changes in v3:
 - fix errors in 1/8 patch
Changes in v2:
 - Remove unneeded CONFIG_BOOTFILE and fdt_addr
 - Cleanup of socfpga_common.h
 - Fixed dtb names for de1, sr1500, and arria5 boards

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   | 32 --------------------
 include/configs/socfpga_common.h         | 52 +++++++++++++++++++++++++++++---
 include/configs/socfpga_cyclone5_socdk.h | 32 --------------------
 include/configs/socfpga_de0_nano_soc.h   | 20 ------------
 include/configs/socfpga_de1_soc.h        | 20 ------------
 include/configs/socfpga_sockit.h         | 28 -----------------
 include/configs/socfpga_socrates.h       | 26 ----------------
 include/configs/socfpga_sr1500.h         | 28 -----------------
 15 files changed, 61 insertions(+), 190 deletions(-)

-- 
2.7.4

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

* [U-Boot] [PATCH v4 1/8] arm: socfpga: Add distro boot to socfpga common header
  2017-02-19 20:20 [U-Boot] [PATCH v4 0/8] arm: socfpga: Move to using distro boot Dalon Westergreen
@ 2017-02-19 20:20 ` Dalon Westergreen
  2017-02-19 20:35   ` Marek Vasut
  2017-03-05 10:42   ` Frank Kunz
  2017-02-19 20:20 ` [U-Boot] [PATCH v4 2/8] arm: socfpga: DE0 use environment in " Dalon Westergreen
                   ` (6 subsequent siblings)
  7 siblings, 2 replies; 14+ messages in thread
From: Dalon Westergreen @ 2017-02-19 20:20 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>
Acked-by: Marek Vasut <marex@denx.de>

--
Changes in v4:
 - Move env back to being right after the MBR
Changes in v3:
 - fix spacing between asterix
 - remove verify=n as a default setting

Changes in v2:
 - Remove unneeded CONFIG_BOOTFILE and fdt_addr
 - cleanup spacing in MMC env size
---
 include/configs/socfpga_common.h | 52 ++++++++++++++++++++++++++++++++++++----
 1 file changed, 48 insertions(+), 4 deletions(-)

diff --git a/include/configs/socfpga_common.h b/include/configs/socfpga_common.h
index 582b04a..55e0bf9 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		512 /* just after the MBR */
 #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,41 @@ 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 \
+	"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] 14+ messages in thread

* [U-Boot] [PATCH v4 2/8] arm: socfpga: DE0 use environment in common header
  2017-02-19 20:20 [U-Boot] [PATCH v4 0/8] arm: socfpga: Move to using distro boot Dalon Westergreen
  2017-02-19 20:20 ` [U-Boot] [PATCH v4 1/8] arm: socfpga: Add distro boot to socfpga common header Dalon Westergreen
@ 2017-02-19 20:20 ` Dalon Westergreen
  2017-02-19 20:20 ` [U-Boot] [PATCH v4 3/8] arm: socfpga: A5 SoCDK " Dalon Westergreen
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 14+ messages in thread
From: Dalon Westergreen @ 2017-02-19 20:20 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>
Acked-by: Marek Vasut <marex@denx.de>

--
Changes in v2:
 - Remove unneeded CONFIG_BOOTFILE
---
 configs/socfpga_de0_nano_soc_defconfig |  3 +++
 include/configs/socfpga_de0_nano_soc.h | 20 --------------------
 2 files changed, 3 insertions(+), 20 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..dd5933d 100644
--- a/include/configs/socfpga_de0_nano_soc.h
+++ b/include/configs/socfpga_de0_nano_soc.h
@@ -16,9 +16,6 @@
 #define PHYS_SDRAM_1_SIZE		0x40000000	/* 1GiB */
 
 /* 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 +27,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] 14+ messages in thread

* [U-Boot] [PATCH v4 3/8] arm: socfpga: A5 SoCDK use environment in common header
  2017-02-19 20:20 [U-Boot] [PATCH v4 0/8] arm: socfpga: Move to using distro boot Dalon Westergreen
  2017-02-19 20:20 ` [U-Boot] [PATCH v4 1/8] arm: socfpga: Add distro boot to socfpga common header Dalon Westergreen
  2017-02-19 20:20 ` [U-Boot] [PATCH v4 2/8] arm: socfpga: DE0 use environment in " Dalon Westergreen
@ 2017-02-19 20:20 ` Dalon Westergreen
  2017-02-19 20:21 ` [U-Boot] [PATCH v4 4/8] arm: socfpga: C5 " Dalon Westergreen
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 14+ messages in thread
From: Dalon Westergreen @ 2017-02-19 20:20 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>
Acked-by: Marek Vasut <marex@denx.de>

--
Changes in v2:
 - Remove unneeded CONFIG_BOOTFILE
 - Fix dtb name
---
 configs/socfpga_arria5_defconfig       |  3 +++
 include/configs/socfpga_arria5_socdk.h | 32 --------------------------------
 2 files changed, 3 insertions(+), 32 deletions(-)

diff --git a/configs/socfpga_arria5_defconfig b/configs/socfpga_arria5_defconfig
index 43c51fe..a49f6fa 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_arria5_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
+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..b60d007 100644
--- a/include/configs/socfpga_arria5_socdk.h
+++ b/include/configs/socfpga_arria5_socdk.h
@@ -16,13 +16,6 @@
 #define PHYS_SDRAM_1_SIZE		0x40000000	/* 1GiB on SoCDK */
 
 /* 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 +27,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] 14+ messages in thread

* [U-Boot] [PATCH v4 4/8] arm: socfpga: C5 SoCDK use environment in common header
  2017-02-19 20:20 [U-Boot] [PATCH v4 0/8] arm: socfpga: Move to using distro boot Dalon Westergreen
                   ` (2 preceding siblings ...)
  2017-02-19 20:20 ` [U-Boot] [PATCH v4 3/8] arm: socfpga: A5 SoCDK " Dalon Westergreen
@ 2017-02-19 20:21 ` Dalon Westergreen
  2017-02-19 20:21 ` [U-Boot] [PATCH v4 5/8] arm: socfpga: DE1 " Dalon Westergreen
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 14+ messages in thread
From: Dalon Westergreen @ 2017-02-19 20:21 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>
Acked-by: Marek Vasut <marex@denx.de>

--
Changes in v2:
 - Remove unneeded CONFIG_BOOTFILE
---
 configs/socfpga_cyclone5_defconfig       |  3 +++
 include/configs/socfpga_cyclone5_socdk.h | 32 --------------------------------
 2 files changed, 3 insertions(+), 32 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..dfe4980 100644
--- a/include/configs/socfpga_cyclone5_socdk.h
+++ b/include/configs/socfpga_cyclone5_socdk.h
@@ -16,13 +16,6 @@
 #define PHYS_SDRAM_1_SIZE		0x40000000	/* 1GiB on SoCDK */
 
 /* 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 +27,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] 14+ messages in thread

* [U-Boot] [PATCH v4 5/8] arm: socfpga: DE1 use environment in common header
  2017-02-19 20:20 [U-Boot] [PATCH v4 0/8] arm: socfpga: Move to using distro boot Dalon Westergreen
                   ` (3 preceding siblings ...)
  2017-02-19 20:21 ` [U-Boot] [PATCH v4 4/8] arm: socfpga: C5 " Dalon Westergreen
@ 2017-02-19 20:21 ` Dalon Westergreen
  2017-02-19 20:21 ` [U-Boot] [PATCH v4 6/8] arm: socfpga: SoCKit " Dalon Westergreen
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 14+ messages in thread
From: Dalon Westergreen @ 2017-02-19 20:21 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 set devicetree to socfpga_cyclone5_de1_soc.dtb.

Signed-off-by: Dalon Westergreen <dwesterg@gmail.com>
Acked-by: Marek Vasut <marex@denx.de>

--
Changes in V2:
 - Remove unneeded CONFIG_BOOTFILE
 - set devicetree name to match socfpga_{fpga model}_{board model}.dts
   pattern
---
 configs/socfpga_de1_soc_defconfig |  1 +
 include/configs/socfpga_de1_soc.h | 20 --------------------
 2 files changed, 1 insertion(+), 20 deletions(-)

diff --git a/configs/socfpga_de1_soc_defconfig b/configs/socfpga_de1_soc_defconfig
index 032deef..d78e8a1 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_cyclone5_de1_soc.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..a7ab1fe 100644
--- a/include/configs/socfpga_de1_soc.h
+++ b/include/configs/socfpga_de1_soc.h
@@ -16,9 +16,6 @@
 #define PHYS_SDRAM_1_SIZE		0x40000000	/* 1GiB */
 
 /* 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 +27,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] 14+ messages in thread

* [U-Boot] [PATCH v4 6/8] arm: socfpga: SoCKit use environment in common header
  2017-02-19 20:20 [U-Boot] [PATCH v4 0/8] arm: socfpga: Move to using distro boot Dalon Westergreen
                   ` (4 preceding siblings ...)
  2017-02-19 20:21 ` [U-Boot] [PATCH v4 5/8] arm: socfpga: DE1 " Dalon Westergreen
@ 2017-02-19 20:21 ` Dalon Westergreen
  2017-02-19 20:21 ` [U-Boot] [PATCH v4 7/8] arm: socfpga: Socrates " Dalon Westergreen
  2017-02-19 20:21 ` [U-Boot] [PATCH v4 8/8] arm: socfpga: sr1500 " Dalon Westergreen
  7 siblings, 0 replies; 14+ messages in thread
From: Dalon Westergreen @ 2017-02-19 20:21 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>
Acked-by: Marek Vasut <marex@denx.de>

--
Changes in v2:
 - Remove unneeded CONFIG_BOOTFILE
---
 configs/socfpga_sockit_defconfig |  1 +
 include/configs/socfpga_sockit.h | 28 ----------------------------
 2 files changed, 1 insertion(+), 28 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..c9fc5c9 100644
--- a/include/configs/socfpga_sockit.h
+++ b/include/configs/socfpga_sockit.h
@@ -16,9 +16,6 @@
 #define PHYS_SDRAM_1_SIZE		0x40000000	/* 1GiB on SoCDK */
 
 /* 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 +27,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] 14+ messages in thread

* [U-Boot] [PATCH v4 7/8] arm: socfpga: Socrates use environment in common header
  2017-02-19 20:20 [U-Boot] [PATCH v4 0/8] arm: socfpga: Move to using distro boot Dalon Westergreen
                   ` (5 preceding siblings ...)
  2017-02-19 20:21 ` [U-Boot] [PATCH v4 6/8] arm: socfpga: SoCKit " Dalon Westergreen
@ 2017-02-19 20:21 ` Dalon Westergreen
  2017-02-19 20:21 ` [U-Boot] [PATCH v4 8/8] arm: socfpga: sr1500 " Dalon Westergreen
  7 siblings, 0 replies; 14+ messages in thread
From: Dalon Westergreen @ 2017-02-19 20:21 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>
Acked-by: Marek Vasut <marex@denx.de>

--
Changes in v2:
 - Remove unneeded CONFIG_BOOTFILE
---
 configs/socfpga_socrates_defconfig |  1 +
 include/configs/socfpga_socrates.h | 26 --------------------------
 2 files changed, 1 insertion(+), 26 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..5dc9298 100644
--- a/include/configs/socfpga_socrates.h
+++ b/include/configs/socfpga_socrates.h
@@ -16,9 +16,6 @@
 #define PHYS_SDRAM_1_SIZE		0x40000000	/* 1GiB on SoCrates */
 
 /* 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 +27,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] 14+ messages in thread

* [U-Boot] [PATCH v4 8/8] arm: socfpga: sr1500 use environment in common header
  2017-02-19 20:20 [U-Boot] [PATCH v4 0/8] arm: socfpga: Move to using distro boot Dalon Westergreen
                   ` (6 preceding siblings ...)
  2017-02-19 20:21 ` [U-Boot] [PATCH v4 7/8] arm: socfpga: Socrates " Dalon Westergreen
@ 2017-02-19 20:21 ` Dalon Westergreen
  2017-02-20  6:29   ` Stefan Roese
  7 siblings, 1 reply; 14+ messages in thread
From: Dalon Westergreen @ 2017-02-19 20:21 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 set to socfpga_cyclone5_sr1500.dtb.

Signed-off-by: Dalon Westergreen <dwesterg@gmail.com>
Acked-by: Marek Vasut <marex@denx.de>

--
Changes in v2:
 - Remove unneeded CONFIG_BOOTFILE
 - set devicetree name to match socfpga_{fpga model}_{board model}.dts
   pattern
---
 configs/socfpga_sr1500_defconfig |  1 +
 include/configs/socfpga_sr1500.h | 28 ----------------------------
 2 files changed, 1 insertion(+), 28 deletions(-)

diff --git a/configs/socfpga_sr1500_defconfig b/configs/socfpga_sr1500_defconfig
index 981600b..ac1ed53 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_cyclone5_sr1500.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..64e1595 100644
--- a/include/configs/socfpga_sr1500.h
+++ b/include/configs/socfpga_sr1500.h
@@ -16,9 +16,6 @@
 #define PHYS_SDRAM_1_SIZE		0x40000000	/* 1GiB on SR1500 */
 
 /* 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 +25,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] 14+ messages in thread

* [U-Boot] [PATCH v4 1/8] arm: socfpga: Add distro boot to socfpga common header
  2017-02-19 20:20 ` [U-Boot] [PATCH v4 1/8] arm: socfpga: Add distro boot to socfpga common header Dalon Westergreen
@ 2017-02-19 20:35   ` Marek Vasut
  2017-02-19 20:44     ` Dalon Westergreen
  2017-03-05 10:42   ` Frank Kunz
  1 sibling, 1 reply; 14+ messages in thread
From: Marek Vasut @ 2017-02-19 20:35 UTC (permalink / raw)
  To: u-boot

On 02/19/2017 09:20 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>
> Acked-by: Marek Vasut <marex@denx.de>
> 
> --
> Changes in v4:
>  - Move env back to being right after the MBR
> Changes in v3:
>  - fix spacing between asterix
>  - remove verify=n as a default setting
> 
> Changes in v2:
>  - Remove unneeded CONFIG_BOOTFILE and fdt_addr
>  - cleanup spacing in MMC env size
> ---
>  include/configs/socfpga_common.h | 52 ++++++++++++++++++++++++++++++++++++----
>  1 file changed, 48 insertions(+), 4 deletions(-)
> 
> diff --git a/include/configs/socfpga_common.h b/include/configs/socfpga_common.h
> index 582b04a..55e0bf9 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		512 /* just after the MBR */
>  #endif

You could've just dropped this part then ;-)

IMO the series is fine, let's see what others have to say ...

-- 
Best regards,
Marek Vasut

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

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

On Sun, 2017-02-19 at 21:35 +0100, Marek Vasut wrote:
> On 02/19/2017 09:20 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>
> > Acked-by: Marek Vasut <marex@denx.de>
> > 
> > --
> > Changes in v4:
> > ?- Move env back to being right after the MBR
> > Changes in v3:
> > ?- fix spacing between asterix
> > ?- remove verify=n as a default setting
> > 
> > Changes in v2:
> > ?- Remove unneeded CONFIG_BOOTFILE and fdt_addr
> > ?- cleanup spacing in MMC env size
> > ---
> > ?include/configs/socfpga_common.h | 52 ++++++++++++++++++++++++++++++++++++-
> > ---
> > ?1 file changed, 48 insertions(+), 4 deletions(-)
> > 
> > diff --git a/include/configs/socfpga_common.h
> > b/include/configs/socfpga_common.h
> > index 582b04a..55e0bf9 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		512 /* just after the MBR */
> > ?#endif
> 
> You could've just dropped this part then ;-)
> 
> IMO the series is fine, let's see what others have to say ...
> 
im still a bit of a git novice... :)

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

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

On 02/19/2017 09:44 PM, Dalon Westergreen wrote:
> On Sun, 2017-02-19 at 21:35 +0100, Marek Vasut wrote:
>> On 02/19/2017 09:20 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>
>>> Acked-by: Marek Vasut <marex@denx.de>
>>>
>>> --
>>> Changes in v4:
>>>  - Move env back to being right after the MBR
>>> Changes in v3:
>>>  - fix spacing between asterix
>>>  - remove verify=n as a default setting
>>>
>>> Changes in v2:
>>>  - Remove unneeded CONFIG_BOOTFILE and fdt_addr
>>>  - cleanup spacing in MMC env size
>>> ---
>>>  include/configs/socfpga_common.h | 52 ++++++++++++++++++++++++++++++++++++-
>>> ---
>>>  1 file changed, 48 insertions(+), 4 deletions(-)
>>>
>>> diff --git a/include/configs/socfpga_common.h
>>> b/include/configs/socfpga_common.h
>>> index 582b04a..55e0bf9 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		512 /* just after the MBR */
>>>  #endif
>>
>> You could've just dropped this part then ;-)
>>
>> IMO the series is fine, let's see what others have to say ...
>>
> im still a bit of a git novice... :)
> 

I use git send-email --annotate to inspect my patches before submission.

-- 
Best regards,
Marek Vasut

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

* [U-Boot] [PATCH v4 8/8] arm: socfpga: sr1500 use environment in common header
  2017-02-19 20:21 ` [U-Boot] [PATCH v4 8/8] arm: socfpga: sr1500 " Dalon Westergreen
@ 2017-02-20  6:29   ` Stefan Roese
  0 siblings, 0 replies; 14+ messages in thread
From: Stefan Roese @ 2017-02-20  6:29 UTC (permalink / raw)
  To: u-boot

On 19.02.2017 21:21, 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 set to socfpga_cyclone5_sr1500.dtb.
>
> Signed-off-by: Dalon Westergreen <dwesterg@gmail.com>
> Acked-by: Marek Vasut <marex@denx.de>
>
> --
> Changes in v2:
>  - Remove unneeded CONFIG_BOOTFILE
>  - set devicetree name to match socfpga_{fpga model}_{board model}.dts
>    pattern
> ---
>  configs/socfpga_sr1500_defconfig |  1 +
>  include/configs/socfpga_sr1500.h | 28 ----------------------------
>  2 files changed, 1 insertion(+), 28 deletions(-)
>
> diff --git a/configs/socfpga_sr1500_defconfig b/configs/socfpga_sr1500_defconfig
> index 981600b..ac1ed53 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_cyclone5_sr1500.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..64e1595 100644
> --- a/include/configs/socfpga_sr1500.h
> +++ b/include/configs/socfpga_sr1500.h
> @@ -16,9 +16,6 @@
>  #define PHYS_SDRAM_1_SIZE		0x40000000	/* 1GiB on SR1500 */
>
>  /* 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 +25,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

Acked-by: Stefan Roese <sr@denx.de>

Thanks,
Stefan

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

* [U-Boot] [PATCH v4 1/8] arm: socfpga: Add distro boot to socfpga common header
  2017-02-19 20:20 ` [U-Boot] [PATCH v4 1/8] arm: socfpga: Add distro boot to socfpga common header Dalon Westergreen
  2017-02-19 20:35   ` Marek Vasut
@ 2017-03-05 10:42   ` Frank Kunz
  1 sibling, 0 replies; 14+ messages in thread
From: Frank Kunz @ 2017-03-05 10:42 UTC (permalink / raw)
  To: u-boot

Am 19.02.2017 um 21:20 schrieb Dalon Westergreen:
> This adds a common environment and support for distro boot
> in the common socfpga header.
> 
> Signed-off-by: Dalon Westergreen <dwesterg@gmail.com>
> Acked-by: Marek Vasut <marex@denx.de>
> 
> --
> Changes in v4:
>  - Move env back to being right after the MBR
> Changes in v3:
>  - fix spacing between asterix
>  - remove verify=n as a default setting
> 
> Changes in v2:
>  - Remove unneeded CONFIG_BOOTFILE and fdt_addr
>  - cleanup spacing in MMC env size
> ---
>  include/configs/socfpga_common.h | 52 ++++++++++++++++++++++++++++++++++++----
>  1 file changed, 48 insertions(+), 4 deletions(-)
> 
> diff --git a/include/configs/socfpga_common.h b/include/configs/socfpga_common.h
> index 582b04a..55e0bf9 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		512 /* just after the MBR */

That will cause a conflict on distributions that use GPT. I added
DE0-nano-SoC to openSUSE by using EFI boot which uses GPT. There this
will fail.

>  #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,41 @@ 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 \
> +	"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__ */
> 

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

end of thread, other threads:[~2017-03-05 10:42 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-19 20:20 [U-Boot] [PATCH v4 0/8] arm: socfpga: Move to using distro boot Dalon Westergreen
2017-02-19 20:20 ` [U-Boot] [PATCH v4 1/8] arm: socfpga: Add distro boot to socfpga common header Dalon Westergreen
2017-02-19 20:35   ` Marek Vasut
2017-02-19 20:44     ` Dalon Westergreen
2017-02-19 20:49       ` Marek Vasut
2017-03-05 10:42   ` Frank Kunz
2017-02-19 20:20 ` [U-Boot] [PATCH v4 2/8] arm: socfpga: DE0 use environment in " Dalon Westergreen
2017-02-19 20:20 ` [U-Boot] [PATCH v4 3/8] arm: socfpga: A5 SoCDK " Dalon Westergreen
2017-02-19 20:21 ` [U-Boot] [PATCH v4 4/8] arm: socfpga: C5 " Dalon Westergreen
2017-02-19 20:21 ` [U-Boot] [PATCH v4 5/8] arm: socfpga: DE1 " Dalon Westergreen
2017-02-19 20:21 ` [U-Boot] [PATCH v4 6/8] arm: socfpga: SoCKit " Dalon Westergreen
2017-02-19 20:21 ` [U-Boot] [PATCH v4 7/8] arm: socfpga: Socrates " Dalon Westergreen
2017-02-19 20:21 ` [U-Boot] [PATCH v4 8/8] arm: socfpga: sr1500 " Dalon Westergreen
2017-02-20  6:29   ` Stefan Roese

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.