Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost
[cris-mirror.git] / arch / xtensa / boot / boot-elf / Makefile
blob52147198135635b7c9d6e98d01dda95e7f59e755
2 # This file is subject to the terms and conditions of the GNU General Public
3 # License. See the file "COPYING" in the main directory of this archive
4 # for more details.
7 ifeq ($(BIG_ENDIAN),1)
8 OBJCOPY_ARGS := -O elf32-xtensa-be
9 else
10 OBJCOPY_ARGS := -O elf32-xtensa-le
11 endif
13 export OBJCOPY_ARGS
14 export CPPFLAGS_boot.lds += -P -C
15 export KBUILD_AFLAGS += -mtext-section-literals
17 boot-y := bootstrap.o
19 OBJS := $(addprefix $(obj)/,$(boot-y))
21 $(obj)/Image.o: vmlinux.bin $(OBJS)
22 $(Q)$(OBJCOPY) $(OBJCOPY_ARGS) -R .comment \
23 --add-section image=vmlinux.bin \
24 --set-section-flags image=contents,alloc,load,load,data \
25 $(OBJS) $@
27 $(obj)/../Image.elf: $(obj)/Image.o $(obj)/boot.lds
28 $(Q)$(LD) $(LDFLAGS) $(LDFLAGS_vmlinux) \
29 -T $(obj)/boot.lds \
30 --build-id=none \
31 -o $@ $(obj)/Image.o
32 $(Q)$(kecho) ' Kernel: $@ is ready'
34 all Image: $(obj)/../Image.elf