]> git.ipfire.org Git - people/ms/u-boot.git/commitdiff
odroid-c2: Enable distro boot
authorAndreas Färber <afaerber@suse.de>
Sun, 15 Jan 2017 19:22:30 +0000 (20:22 +0100)
committerTom Rini <trini@konsulko.com>
Fri, 20 Jan 2017 20:38:02 +0000 (15:38 -0500)
Use the generic "distro" boot framework to enable automatic DHCP boot.
MMC and USB are not yet implemented, so this is the only boot option.

The fdt and kernel addresses are adopted from downstream; ramdisk and
scriptaddr addresses were chosen arbitrarily.

Signed-off-by: Andreas Färber <afaerber@suse.de>
Reviewed-by: Alexander Graf <agraf@suse.de>
Kconfig
configs/odroid-c2_defconfig
include/configs/meson-gxbb-common.h
include/configs/odroid-c2.h

diff --git a/Kconfig b/Kconfig
index 39a4d938d864734b5bc2ad2212937b8da5709e53..cb19ce6f8752876b8adae85cc8eeb489c873ea1f 100644 (file)
--- a/Kconfig
+++ b/Kconfig
@@ -57,6 +57,7 @@ config DISTRO_DEFAULTS
        bool "Select defaults suitable for booting general purpose Linux distributions"
        default y if ARCH_SUNXI || TEGRA
        default y if ARCH_LS2080A
+       default y if ARCH_MESON
        default y if ARCH_ROCKCHIP
        default n
        select CMD_BOOTZ if ARM && !ARM64
index 7d0b2b1835c75956ba544c616dbe63f35585c00f..119ab0703815a774c683fa4762d755e603daf5cb 100644 (file)
@@ -13,7 +13,6 @@ CONFIG_HUSH_PARSER=y
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_LOADS is not set
 # CONFIG_CMD_FPGA is not set
-# CONFIG_CMD_SOURCE is not set
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_OF_CONTROL=y
 CONFIG_NET_RANDOM_ETHADDR=y
index ab62cff7caa5f55603a06079e51c5c1b44d1b069..17e81b4540c869e39a23ad7d1a28ae7a886cae93 100644 (file)
 
 #include <config_distro_defaults.h>
 
+#define BOOT_TARGET_DEVICES(func) \
+       func(DHCP, dhcp, na)
+
+#include <config_distro_bootcmd.h>
+
+#define CONFIG_EXTRA_ENV_SETTINGS \
+       "fdt_addr_r=0x01000000\0" \
+       "scriptaddr=0x1f000000\0" \
+       "kernel_addr_r=0x01080000\0" \
+       "pxefile_addr_r=0x01080000\0" \
+       "ramdisk_addr_r=0x10000000\0" \
+       MESON_FDTFILE_SETTING \
+       BOOTENV
+
 #endif /* __MESON_GXBB_COMMON_CONFIG_H */
index eb41818ed77d5d393b7a495db9559177c59d1b65..48f4a685492ec27f4cfeb4f3e03b3271cdc4f306 100644 (file)
@@ -14,6 +14,8 @@
 #define CONFIG_CONS_INDEX              0
 #define CONFIG_BAUDRATE                        115200
 
+#define MESON_FDTFILE_SETTING "fdtfile=amlogic/meson-gxbb-odroidc2.dtb\0"
+
 #include <configs/meson-gxbb-common.h>
 
 #endif /* __CONFIG_H */