aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2011-10-03 19:26:50 +0000
committerWolfgang Denk <wd@denx.de>2011-10-17 23:56:59 +0200
commit86eb49b3e596baa688bea5ef678e951e964845a3 (patch)
treef764460dce92e46dea7a17c27ea6e21836babbf7 /Makefile
parent9d2cb8e8e6a3650613eab95c1b30023e81beb15c (diff)
downloadu-boot-86eb49b3e596baa688bea5ef678e951e964845a3.zip
u-boot-86eb49b3e596baa688bea5ef678e951e964845a3.tar.gz
u-boot-86eb49b3e596baa688bea5ef678e951e964845a3.tar.bz2
sandbox: Makefile changes to build sandbox architecture
At this point U-Boot will build and run on x86 under Linux. The idea is to define a new architecture called 'sandbox', alongside ARM and x86. This runs natively on Linux to suit the host machine. All hardware access is either omitted or emulated. The purpose of this system is to test the bulk of the non-hardware-specific U-Boot code. We can mock the SPI flash, GPIOs, UART and keyboard, then test that U-Boot behaves as we wish. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile8
1 files changed, 8 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index a0cafbd..1c49f30 100644
--- a/Makefile
+++ b/Makefile
@@ -403,12 +403,20 @@ $(obj)u-boot.ubl: $(obj)u-boot-nand.bin
$(obj)tools/mkimage -n $(UBL_CONFIG) -T ublimage \
-e $(CONFIG_SYS_TEXT_BASE) -d $< $@
+ifeq ($(CONFIG_SANDBOX),y)
+GEN_UBOOT = \
+ cd $(LNDIR) && $(CC) $(SYMS) -T $(obj)u-boot.lds \
+ -Wl,--start-group $(__LIBS) -Wl,--end-group \
+ $(PLATFORM_LIBS) -Wl,-Map -Wl,u-boot.map -o u-boot
+else
GEN_UBOOT = \
UNDEF_SYM=`$(OBJDUMP) -x $(LIBBOARD) $(LIBS) | \
sed -n -e 's/.*\($(SYM_PREFIX)__u_boot_cmd_.*\)/-u\1/p'|sort|uniq`;\
cd $(LNDIR) && $(LD) $(LDFLAGS) $(LDFLAGS_$(@F)) $$UNDEF_SYM $(__OBJS) \
--start-group $(__LIBS) --end-group $(PLATFORM_LIBS) \
-Map u-boot.map -o u-boot
+endif
+
$(obj)u-boot: depend \
$(SUBDIRS) $(OBJS) $(LIBBOARD) $(LIBS) $(LDSCRIPT) $(obj)u-boot.lds
$(GEN_UBOOT)