Makefile (bbcf9cd1576752ebe8d618ad8c6500b7e262ffac) | Makefile (3ec8a5b33deacdeca4bef24fb15498a975e875ba) |
---|---|
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 7ifeq ($(BIG_ENDIAN),1) 8OBJCOPY_ARGS := -O elf32-xtensa-be 9else 10OBJCOPY_ARGS := -O elf32-xtensa-le 11endif 12 13export OBJCOPY_ARGS 14export CPPFLAGS_boot.lds += -P -C 15export KBUILD_AFLAGS += -mtext-section-literals 16 17boot-y := bootstrap.o | 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 7ifeq ($(BIG_ENDIAN),1) 8OBJCOPY_ARGS := -O elf32-xtensa-be 9else 10OBJCOPY_ARGS := -O elf32-xtensa-le 11endif 12 13export OBJCOPY_ARGS 14export CPPFLAGS_boot.lds += -P -C 15export KBUILD_AFLAGS += -mtext-section-literals 16 17boot-y := bootstrap.o |
18targets += $(boot-y) boot.lds | |
19 20OBJS := $(addprefix $(obj)/,$(boot-y)) 21 | 18 19OBJS := $(addprefix $(obj)/,$(boot-y)) 20 |
22$(obj)/Image.o: $(obj)/../vmlinux.bin $(OBJS) | 21$(obj)/Image.o: vmlinux.bin $(OBJS) |
23 $(Q)$(OBJCOPY) $(OBJCOPY_ARGS) -R .comment \ | 22 $(Q)$(OBJCOPY) $(OBJCOPY_ARGS) -R .comment \ |
24 --add-section image=$< \ | 23 --add-section image=vmlinux.bin \ |
25 --set-section-flags image=contents,alloc,load,load,data \ 26 $(OBJS) $@ 27 28$(obj)/../Image.elf: $(obj)/Image.o $(obj)/boot.lds | 24 --set-section-flags image=contents,alloc,load,load,data \ 25 $(OBJS) $@ 26 27$(obj)/../Image.elf: $(obj)/Image.o $(obj)/boot.lds |
29 $(Q)$(LD) $(KBUILD_LDFLAGS) $(LDFLAGS_vmlinux) \ | 28 $(Q)$(LD) $(KBUILD_LDFLAGS) \ |
30 -T $(obj)/boot.lds \ 31 --build-id=none \ 32 -o $@ $(obj)/Image.o 33 $(Q)$(kecho) ' Kernel: $@ is ready' 34 35all Image: $(obj)/../Image.elf | 29 -T $(obj)/boot.lds \ 30 --build-id=none \ 31 -o $@ $(obj)/Image.o 32 $(Q)$(kecho) ' Kernel: $@ is ready' 33 34all Image: $(obj)/../Image.elf |