2005-06-24 13:01:12 +08:00
|
|
|
#
|
|
|
|
# This file is subject to the terms and conditions of the GNU General Public
|
|
|
|
# License. See the file "COPYING" in the main directory of this archive
|
|
|
|
# for more details.
|
|
|
|
#
|
|
|
|
|
|
|
|
ifeq ($(BIG_ENDIAN),1)
|
|
|
|
OBJCOPY_ARGS := -O elf32-xtensa-be
|
|
|
|
else
|
|
|
|
OBJCOPY_ARGS := -O elf32-xtensa-le
|
|
|
|
endif
|
|
|
|
|
|
|
|
export OBJCOPY_ARGS
|
2008-02-13 05:14:17 +08:00
|
|
|
export CPPFLAGS_boot.lds += -P -C
|
2012-12-03 19:01:43 +08:00
|
|
|
export KBUILD_AFLAGS += -mtext-section-literals
|
2005-06-24 13:01:12 +08:00
|
|
|
|
|
|
|
boot-y := bootstrap.o
|
|
|
|
|
|
|
|
OBJS := $(addprefix $(obj)/,$(boot-y))
|
|
|
|
|
2012-11-05 13:10:00 +08:00
|
|
|
$(obj)/Image.o: vmlinux.bin $(OBJS)
|
|
|
|
$(Q)$(OBJCOPY) $(OBJCOPY_ARGS) -R .comment \
|
|
|
|
--add-section image=vmlinux.bin \
|
2005-06-24 13:01:12 +08:00
|
|
|
--set-section-flags image=contents,alloc,load,load,data \
|
2012-11-05 13:10:00 +08:00
|
|
|
$(OBJS) $@
|
2005-06-24 13:01:12 +08:00
|
|
|
|
2012-11-05 13:10:00 +08:00
|
|
|
$(obj)/../Image.elf: $(obj)/Image.o $(obj)/boot.lds
|
|
|
|
$(Q)$(LD) $(LDFLAGS) $(LDFLAGS_vmlinux) \
|
|
|
|
-T $(obj)/boot.lds \
|
|
|
|
--build-id=none \
|
|
|
|
-o $@ $(obj)/Image.o
|
|
|
|
$(Q)$(kecho) ' Kernel: $@ is ready'
|
2005-06-24 13:01:12 +08:00
|
|
|
|
2012-11-05 13:10:00 +08:00
|
|
|
zImage: $(obj)/../Image.elf
|