瀏覽代碼

odroid-c2: Enable distro boot

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>
Andreas Färber 8 年之前
父節點
當前提交
70b8bd7d3b
共有 4 個文件被更改,包括 17 次插入1 次删除
  1. 1 0
      Kconfig
  2. 0 1
      configs/odroid-c2_defconfig
  3. 14 0
      include/configs/meson-gxbb-common.h
  4. 2 0
      include/configs/odroid-c2.h

+ 1 - 0
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

+ 0 - 1
configs/odroid-c2_defconfig

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

+ 14 - 0
include/configs/meson-gxbb-common.h

@@ -39,4 +39,18 @@
 
 #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 */

+ 2 - 0
include/configs/odroid-c2.h

@@ -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 */