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)
9 CPPFLAGS_boot.lds += -P -C
10 KBUILD_AFLAGS += -mtext-section-literals
13 targets += $(boot-y) boot.lds
15 OBJS := $(addprefix $(obj)/,$(boot-y))
17 $(obj)/Image.o: $(obj)/../vmlinux.bin $(OBJS)
18 $(Q)$(OBJCOPY) $(OBJCOPY_ARGS) -R .comment \
19 --add-section image=$< \
20 --set-section-flags image=contents,alloc,load,load,data \
23 $(obj)/../Image.elf: $(obj)/Image.o $(obj)/boot.lds
24 $(Q)$(LD) $(KBUILD_LDFLAGS) \
28 $(Q)$(kecho) ' Kernel: $@ is ready'
30 all Image: $(obj)/../Image.elf