@@ -8,3 +8,4 @@
obj-y += cache.o
obj-$(CONFIG_CMD_BOOTM) += bootm.o
obj-y += libgcc.o
+obj-y += misc.o
new file mode 100644
@@ -0,0 +1,16 @@
+/*
+ * Copyright (C) 2015 Thomas Chou <thomas@wytron.com.tw>
+ *
+ * SPDX-License-Identifier: GPL-2.0+
+ */
+
+#include <common.h>
+
+DECLARE_GLOBAL_DATA_PTR;
+
+int misc_init_r(void)
+{
+ setenv_addr("fdt_blob", gd->fdt_blob);
+
+ return 0;
+}
@@ -15,6 +15,7 @@
#include "../board/altera/nios2-generic/custom_fpga.h" /* fpga parameters */
#define CONFIG_BOARD_NAME "nios2-generic" /* custom board name */
#define CONFIG_BOARD_EARLY_INIT_F /* enable early board-spec. init */
+#define CONFIG_MISC_INIT_R
#define CONFIG_DISPLAY_CPUINFO
#define CONFIG_DISPLAY_BOARDINFO_LATE
#define CONFIG_SYS_NIOS_SYSID_BASE CONFIG_SYS_SYSID_BASE
Export fdt_blob to the environment variable. So that we may use it to boot Linux. Signed-off-by: Thomas Chou <thomas@wytron.com.tw> --- arch/nios2/lib/Makefile | 1 + arch/nios2/lib/misc.c | 16 ++++++++++++++++ include/configs/nios2-generic.h | 1 + 3 files changed, 18 insertions(+) create mode 100644 arch/nios2/lib/misc.c