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
7 OBJCOPY_ARGS := -O $(if $(CONFIG_CPU_BIG_ENDIAN),elf32-xtensa-be,elf32-xtensa-le)
12 OBJS := $(addprefix $(obj)/,$(boot-y))
13 LIBS := arch/xtensa/boot/lib/lib.a arch/xtensa/lib/lib.a
15 $(obj)/zImage.o: $(obj)/../vmlinux.bin.gz $(OBJS)
16 $(Q)$(OBJCOPY) $(OBJCOPY_ARGS) -R .comment \
17 --add-section image=$< \
18 --set-section-flags image=contents,alloc,load,load,data \
21 $(obj)/zImage.elf: $(obj)/zImage.o $(LIBS)
22 $(Q)$(LD) $(KBUILD_LDFLAGS) \
23 -T $(srctree)/$(obj)/boot.ld \
27 $(obj)/../zImage.redboot: $(obj)/zImage.elf
28 $(Q)$(OBJCOPY) -S -O binary $< $@
29 $(Q)$(kecho) ' Kernel: $@ is ready'
31 all zImage: $(obj)/../zImage.redboot