Commit ad0e4639545b0928a3673114962ee1f3e56402d7
1 parent
1992dbfdb9
Exists in
v2017.01-smarct4x
and in
40 other branches
sandbox: Provide a build option to avoid using SDL
Some machines do not have SDL libraries installed, and it is still useful to build sandbox without LCD/keyboard support. Add an option for this, used as follows: make sandbox_config all NO_SDL=1 Signed-off-by: Simon Glass <sjg@chromium.org>
Showing 2 changed files with 20 additions and 2 deletions Side-by-side Diff
arch/sandbox/config.mk
... | ... | @@ -18,4 +18,10 @@ |
18 | 18 | $(PLATFORM_LIBS) -Wl,-Map -Wl,u-boot.map |
19 | 19 | |
20 | 20 | CONFIG_ARCH_DEVICE_TREE := sandbox |
21 | + | |
22 | +# Define this to avoid linking with SDL, which requires SDL libraries | |
23 | +# This can solve 'sdl-config: Command not found' errors | |
24 | +ifneq ($(NO_SDL),) | |
25 | +PLATFORM_CPPFLAGS += -DSANDBOX_NO_SDL | |
26 | +endif |
include/configs/sandbox.h
... | ... | @@ -140,8 +140,6 @@ |
140 | 140 | #define CONFIG_CROS_EC |
141 | 141 | #define CONFIG_CMD_CROS_EC |
142 | 142 | #define CONFIG_CROS_EC_SANDBOX |
143 | -#define CONFIG_KEYBOARD | |
144 | -#define CONFIG_CROS_EC_KEYB | |
145 | 143 | #define CONFIG_ARCH_EARLY_INIT_R |
146 | 144 | #define CONFIG_BOARD_LATE_INIT |
147 | 145 | |
148 | 146 | |
... | ... | @@ -149,7 +147,12 @@ |
149 | 147 | #define CONFIG_SOUND_SANDBOX |
150 | 148 | #define CONFIG_CMD_SOUND |
151 | 149 | |
150 | +#ifndef SANDBOX_NO_SDL | |
152 | 151 | #define CONFIG_SANDBOX_SDL |
152 | +#endif | |
153 | + | |
154 | +/* LCD and keyboard require SDL support */ | |
155 | +#ifdef CONFIG_SANDBOX_SDL | |
153 | 156 | #define CONFIG_LCD |
154 | 157 | #define CONFIG_VIDEO_SANDBOX_SDL |
155 | 158 | #define CONFIG_CMD_BMP |
156 | 159 | |
... | ... | @@ -158,9 +161,18 @@ |
158 | 161 | #define CONFIG_SYS_CONSOLE_IS_IN_ENV |
159 | 162 | #define LCD_BPP LCD_COLOR16 |
160 | 163 | |
164 | +#define CONFIG_CROS_EC_KEYB | |
165 | +#define CONFIG_KEYBOARD | |
166 | + | |
161 | 167 | #define CONFIG_EXTRA_ENV_SETTINGS "stdin=serial,cros-ec-keyb\0" \ |
162 | 168 | "stdout=serial,lcd\0" \ |
163 | 169 | "stderr=serial,lcd\0" |
170 | +#else | |
171 | + | |
172 | +#define CONFIG_EXTRA_ENV_SETTINGS "stdin=serial\0" \ | |
173 | + "stdout=serial,lcd\0" \ | |
174 | + "stderr=serial,lcd\0" | |
175 | +#endif | |
164 | 176 | |
165 | 177 | #define CONFIG_GZIP_COMPRESSED |
166 | 178 | #define CONFIG_BZIP2 |