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
8 OBJCOPY_ARGS
:= -O elf32-xtensa-be
10 OBJCOPY_ARGS
:= -O elf32-xtensa-le
14 export CPPFLAGS_boot.lds
+= -P
-C
15 export KBUILD_AFLAGS
+= -mtext-section-literals
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 \
27 $(obj
)/..
/Image.elf
: $(obj
)/Image.o
$(obj
)/boot.lds
28 $(Q
)$(LD
) $(LDFLAGS
) $(LDFLAGS_vmlinux
) \
32 $(Q
)$(kecho
) ' Kernel: $@ is ready'
34 all Image
: $(obj
)/..
/Image.elf