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
18 targets
+= $(boot-y
) boot.lds
20 OBJS
:= $(addprefix $(obj
)/,$(boot-y
))
22 $(obj
)/Image.o
: $(obj
)/..
/vmlinux.bin
$(OBJS
)
23 $(Q
)$(OBJCOPY
) $(OBJCOPY_ARGS
) -R .comment \
24 --add-section image
=$< \
25 --set-section-flags image
=contents
,alloc
,load
,load
,data \
28 $(obj
)/..
/Image.elf
: $(obj
)/Image.o
$(obj
)/boot.lds
29 $(Q
)$(LD
) $(KBUILD_LDFLAGS
) \
33 $(Q
)$(kecho
) ' Kernel: $@ is ready'
35 all Image
: $(obj
)/..
/Image.elf