diff --git a/arch/sandbox/cpu/start.c b/arch/sandbox/cpu/start.c index aad3b8b14758b1cd3926119dbf7157a0bbdd2d52..5289291bc82f41f44a5813ad60cf530d0a8e653b 100644 --- a/arch/sandbox/cpu/start.c +++ b/arch/sandbox/cpu/start.c @@ -6,6 +6,7 @@ #include #include #include +#include #include #include @@ -218,6 +219,7 @@ SANDBOX_CMDLINE_OPT_SHORT(terminal, 't', 1, int main(int argc, char *argv[]) { struct sandbox_state *state; + gd_t data; int ret; ret = state_init(); @@ -236,6 +238,9 @@ int main(int argc, char *argv[]) if (state->ram_buf_rm && state->ram_buf_fname) os_unlink(state->ram_buf_fname); + memset(&data, '\0', sizeof(data)); + gd = &data; + /* Do pre- and post-relocation init */ board_init_f(0); diff --git a/arch/sandbox/include/asm/config.h b/arch/sandbox/include/asm/config.h index 6c1bff99c2bf3ced2ae666c8023f70e6cdc0adc3..ec7729eb4ccbf44a5d74e0c220c22e46897208ae 100644 --- a/arch/sandbox/include/asm/config.h +++ b/arch/sandbox/include/asm/config.h @@ -7,7 +7,6 @@ #ifndef _ASM_CONFIG_H_ #define _ASM_CONFIG_H_ -#define CONFIG_SYS_GENERIC_GLOBAL_DATA #define CONFIG_SANDBOX_ARCH /* Used by drivers/spi/sandbox_spi.c and arch/sandbox/include/asm/state.h */