From: Dalon Westergreen <dwesterg@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2 1/8] arm: socfpga: Add distro boot to socfpga common header
Date: Sat, 18 Feb 2017 17:52:00 -0800 [thread overview]
Message-ID: <1487469127-10479-2-git-send-email-dwesterg@gmail.com> (raw)
In-Reply-To: <1487469127-10479-1-git-send-email-dwesterg@gmail.com>
This adds a common environment and support for distro boot
in the common socfpga header.
Signed-off-by: Dalon Westergreen <dwesterg@gmail.com>
--
Changes in V2:
- Remove unneeded CONFIG_BOOTFILE and fdt_addr
- cleanup spacing in MMC env size
---
include/configs/socfpga_common.h | 53 +++++++++++++++++++++++++++++++++++++---
1 file changed, 49 insertions(+), 4 deletions(-)
diff --git a/include/configs/socfpga_common.h b/include/configs/socfpga_common.h
index 582b04a..e76bee0 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,42 @@ 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" \
+ "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
next prev parent reply other threads:[~2017-02-19 1:52 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-19 1:51 [U-Boot] [PATCH v2 0/8] arm: socfpga: Move to using distro boot Dalon Westergreen
2017-02-19 1:52 ` Dalon Westergreen [this message]
2017-02-19 2:28 ` [U-Boot] [PATCH v2 1/8] arm: socfpga: Add distro boot to socfpga common header Marek Vasut
2017-02-19 3:22 ` Dalon Westergreen
2017-02-19 10:31 ` Marek Vasut
2017-02-19 1:52 ` [U-Boot] [PATCH v2 2/8] arm: socfpga: DE0 use environment in " Dalon Westergreen
2017-02-19 1:52 ` [U-Boot] [PATCH v2 3/8] arm: socfpga: A5 SoCDK " Dalon Westergreen
2017-02-19 1:52 ` [U-Boot] [PATCH v2 4/8] arm: socfpga: C5 " Dalon Westergreen
2017-02-19 1:52 ` [U-Boot] [PATCH v2 5/8] arm: socfpga: DE1 " Dalon Westergreen
2017-02-19 1:52 ` [U-Boot] [PATCH v2 6/8] arm: socfpga: SoCKit " Dalon Westergreen
2017-02-19 1:52 ` [U-Boot] [PATCH v2 7/8] arm: socfpga: Socrates " Dalon Westergreen
2017-02-19 1:52 ` [U-Boot] [PATCH v2 8/8] arm: socfpga: sr1500 " Dalon Westergreen
2017-02-19 2:29 ` [U-Boot] [PATCH v2 0/8] arm: socfpga: Move to using distro boot Marek Vasut
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1487469127-10479-2-git-send-email-dwesterg@gmail.com \
--to=dwesterg@gmail.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.