uboot-tools/mvebu-enable-generic-distro-boot-config.patch

112 lines
3.3 KiB
Diff
Raw Normal View History

2017-09-19 08:30:31 +00:00
From 8de891d0767aafb383b6f533b08a5c0b75b4718b Mon Sep 17 00:00:00 2001
From: Peter Robinson <pbrobinson@gmail.com>
2017-09-19 08:30:31 +00:00
Date: Mon, 18 Sep 2017 15:48:32 +0100
2016-10-31 21:31:18 +00:00
Subject: [PATCH] arm: mvebu: enable generic distro boot config
2016-02-16 10:15:37 +00:00
Switch all of the mvebu boards to support disto generic booting
This will enable Fedora, Debian and other distros to support
mvebu systems easier. Tested on SolidRun ClearFog
Signed-off-by: Dennis Gilmore <dgilmore@redhat.com>
2017-09-19 08:30:31 +00:00
Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
2016-02-16 10:15:37 +00:00
---
2016-08-23 13:16:45 +00:00
include/configs/mv-common.h | 84 +++++++++++++++++++++++++++++++++++++++++++++
2017-09-19 08:30:31 +00:00
1 file changed, 84 insertions(+)
2016-02-16 10:15:37 +00:00
diff --git a/include/configs/mv-common.h b/include/configs/mv-common.h
2017-09-19 08:30:31 +00:00
index 7c2bab2fc6..2819493fca 100644
2016-02-16 10:15:37 +00:00
--- a/include/configs/mv-common.h
+++ b/include/configs/mv-common.h
2017-09-19 08:30:31 +00:00
@@ -130,4 +130,88 @@
#define CONFIG_MTD_PARTITIONS
2016-02-16 10:15:37 +00:00
#endif
+#ifndef CONFIG_SPL_BUILD
+#include <config_distro_defaults.h>
+
+/*
+* 160M RAM (256M minimum minus 64MB heap + 32MB for u-boot, stack, fb, etc.
+* 32M uncompressed kernel, 16M compressed kernel, 1M fdt,
+* 1M script, 1M pxe and the ramdisk at the end.
+*/
+#define SDRAM_OFFSET(x) 0x0##x
+
+#define KERNEL_ADDR_R __stringify(SDRAM_OFFSET(2000000))
+#define FDT_ADDR_R __stringify(SDRAM_OFFSET(3000000))
+#define SCRIPT_ADDR_R __stringify(SDRAM_OFFSET(3100000))
+#define PXEFILE_ADDR_R __stringify(SDRAM_OFFSET(3200000))
+#define RAMDISK_ADDR_R __stringify(SDRAM_OFFSET(3300000))
+
+#define MEM_LAYOUT_ENV_SETTINGS \
+ "bootm_size=0xa000000\0" \
+ "kernel_addr_r=" KERNEL_ADDR_R "\0" \
+ "fdt_addr_r=" FDT_ADDR_R "\0" \
+ "scriptaddr=" SCRIPT_ADDR_R "\0" \
+ "pxefile_addr_r=" PXEFILE_ADDR_R "\0" \
+ "ramdisk_addr_r=" RAMDISK_ADDR_R "\0"
+
+#ifdef CONFIG_MMC
+#define BOOT_TARGET_DEVICES_MMC(func) func(MMC, mmc, 0)
+#else
+#define BOOT_TARGET_DEVICES_MMC(func)
+#endif
+
+#ifdef CONFIG_CMD_SATA
+#define BOOT_TARGET_DEVICES_SATA(func) func(SATA, sata, 0) func(SATA, sata, 1)
+#define CONFIG_PREBOOT "sata init"
+#else
+#define BOOT_TARGET_DEVICES_SATA(func)
+#endif
+
+#ifdef CONFIG_USB_STORAGE
+#define BOOT_TARGET_DEVICES_USB(func) func(USB, usb, 0)
+#else
+#define BOOT_TARGET_DEVICES_USB(func)
+#endif
+
+#define BOOT_TARGET_DEVICES(func) \
+ BOOT_TARGET_DEVICES_MMC(func) \
+ BOOT_TARGET_DEVICES_SATA(func) \
+ BOOT_TARGET_DEVICES_USB(func) \
+ func(PXE, pxe, na)
+
+#include <config_distro_bootcmd.h>
+
+#ifdef CONFIG_USB_KEYBOARD
+#define CONSOLE_STDIN_SETTINGS \
+ "preboot=usb start\0" \
+ "stdin=serial,usbkbd\0"
+#else
+#define CONSOLE_STDIN_SETTINGS \
+ "stdin=serial\0"
+#endif
+
+#ifdef CONFIG_VIDEO
+#define CONSOLE_STDOUT_SETTINGS \
+ "stdout=serial,vga\0" \
+ "stderr=serial,vga\0"
+#else
+#define CONSOLE_STDOUT_SETTINGS \
+ "stdout=serial\0" \
+ "stderr=serial\0"
+#endif
+
+#define CONSOLE_ENV_SETTINGS \
+ CONSOLE_STDIN_SETTINGS \
+ CONSOLE_STDOUT_SETTINGS
+
+#define CONFIG_EXTRA_ENV_SETTINGS \
+ CONSOLE_ENV_SETTINGS \
+ MEM_LAYOUT_ENV_SETTINGS \
+ "fdtfile=" CONFIG_DEFAULT_DEVICE_TREE ".dtb\0" \
+ "console=ttyS0,115200\0" \
+ BOOTENV
+#else /* ifndef CONFIG_SPL_BUILD */
+#define CONFIG_EXTRA_ENV_SETTINGS
+#endif
+
#endif /* _MV_COMMON_H */
--
2017-09-19 08:30:31 +00:00
2.13.5