summaryrefslogtreecommitdiff
path: root/arch/sandbox/lib/board.c
diff options
context:
space:
mode:
authorWolfgang Denk <wd@denx.de>2012-03-17 21:46:33 +0100
committerWolfgang Denk <wd@denx.de>2012-03-17 21:46:33 +0100
commit6ae38b8c583c61f00c2fe9904cafa81932c7faaf (patch)
tree5a600d4098039983b97b5ba6ff9edf559cb805d5 /arch/sandbox/lib/board.c
parentdf25d49959da75cfaa1e4708669ef550d0000ce6 (diff)
parent9d72e67b79a454dcd6847bcd80c9929e0ec9054d (diff)
downloadolio-uboot-2014.01-6ae38b8c583c61f00c2fe9904cafa81932c7faaf.tar.xz
olio-uboot-2014.01-6ae38b8c583c61f00c2fe9904cafa81932c7faaf.zip
Merge branch 'sandbox' of git://git.denx.de/u-boot-blackfin
* 'sandbox' of git://git.denx.de/u-boot-blackfin: sandbox: mark os_exit as noreturn sandbox: add getopt support sandbox: allow processing before main loop sandbox: add concept of sandbox state sandbox: disable fortification sandbox: u-boot.lds: tweak style sandbox: add get_{tbclk,ticks} sandbox: enable GPIO driver sandbox: gpio: add basic driver for simulating GPIOs sandbox: add flags for open() call sandbox: config: enable fdt and snprintf() options sandbox: fdt: add support for CONFIG_OF_CONTROL sandbox: add lseek helper sandbox: add ifdef protection to os.h sandbox: add required header to os.c sandbox: sort header files in os.c
Diffstat (limited to 'arch/sandbox/lib/board.c')
-rw-r--r--arch/sandbox/lib/board.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/arch/sandbox/lib/board.c b/arch/sandbox/lib/board.c
index b7997e9a7..306d1ec33 100644
--- a/arch/sandbox/lib/board.c
+++ b/arch/sandbox/lib/board.c
@@ -134,6 +134,7 @@ init_fnc_t *init_sequence[] = {
env_init, /* initialize environment */
serial_init, /* serial communications setup */
console_init_f, /* stage 1 init of console */
+ sandbox_early_getopt_check, /* process command line flags (err/help) */
display_banner, /* say that we are here */
#if defined(CONFIG_DISPLAY_CPUINFO)
print_cpuinfo, /* display cpu info (and speed) */
@@ -156,6 +157,14 @@ void board_init_f(ulong bootflag)
memset((void *)gd, 0, sizeof(gd_t));
+#if defined(CONFIG_OF_EMBED)
+ /* Get a pointer to the FDT */
+ gd->fdt_blob = _binary_dt_dtb_start;
+#elif defined(CONFIG_OF_SEPARATE)
+ /* FDT is at end of image */
+ gd->fdt_blob = (void *)(_end_ofs + _TEXT_BASE);
+#endif
+
for (init_fnc_ptr = init_sequence; *init_fnc_ptr; ++init_fnc_ptr) {
if ((*init_fnc_ptr)() != 0)
hang();
@@ -261,6 +270,8 @@ void board_init_r(gd_t *id, ulong dest_addr)
post_run(NULL, POST_RAM | post_bootmode_get(0));
#endif
+ sandbox_main_loop_init();
+
/*
* For now, run the main loop. Later we might let this be done
* in the main program.