]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blame - arch/xtensa/boot/boot-elf/Makefile
xtensa: clean up bootable image build targets
[mirror_ubuntu-artful-kernel.git] / arch / xtensa / boot / boot-elf / Makefile
CommitLineData
4bedea94
CZ
1#
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.
5#
6
4bedea94
CZ
7ifeq ($(BIG_ENDIAN),1)
8OBJCOPY_ARGS := -O elf32-xtensa-be
9else
10OBJCOPY_ARGS := -O elf32-xtensa-le
11endif
12
13export OBJCOPY_ARGS
36dffadb 14export CPPFLAGS_boot.lds += -P -C
e85e335f 15export KBUILD_AFLAGS += -mtext-section-literals
4bedea94
CZ
16
17boot-y := bootstrap.o
18
19OBJS := $(addprefix $(obj)/,$(boot-y))
20
3f5ec298
MF
21$(obj)/Image.o: vmlinux.bin $(OBJS)
22 $(Q)$(OBJCOPY) $(OBJCOPY_ARGS) -R .comment \
23 --add-section image=vmlinux.bin \
4bedea94 24 --set-section-flags image=contents,alloc,load,load,data \
3f5ec298 25 $(OBJS) $@
4bedea94 26
3f5ec298
MF
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'
4bedea94 33
9a736fcb 34all Image: $(obj)/../Image.elf