WIP FPC-III support
[linux/fpc-iii.git] / arch / xtensa / boot / boot-elf / Makefile
blobf7c775d530125fd6429e0c0640e7e14ee59e15fc
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.
7 ifeq ($(BIG_ENDIAN),1)
8 OBJCOPY_ARGS := -O elf32-xtensa-be
9 else
10 OBJCOPY_ARGS := -O elf32-xtensa-le
11 endif
13 export OBJCOPY_ARGS
14 export CPPFLAGS_boot.lds += -P -C
15 export KBUILD_AFLAGS += -mtext-section-literals
17 boot-y := bootstrap.o
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 \
26 $(OBJS) $@
28 $(obj)/../Image.elf: $(obj)/Image.o $(obj)/boot.lds
29 $(Q)$(LD) $(KBUILD_LDFLAGS) \
30 -T $(obj)/boot.lds \
31 --build-id=none \
32 -o $@ $(obj)/Image.o
33 $(Q)$(kecho) ' Kernel: $@ is ready'
35 all Image: $(obj)/../Image.elf