2005-06-24 05:01:12 +00: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-12 21:14:17 +00:00
|
|
|
export CPPFLAGS_boot.lds += -P -C
|
2012-12-03 11:01:43 +00:00
|
|
|
export KBUILD_AFLAGS += -mtext-section-literals
|
2005-06-24 05:01:12 +00:00
|
|
|
|
|
|
|
boot-y := bootstrap.o
|
|
|
|
|
|
|
|
OBJS := $(addprefix $(obj)/,$(boot-y))
|
|
|
|
|
2012-11-05 05:10:00 +00:00
|
|
|
$(obj)/Image.o: vmlinux.bin $(OBJS)
|
|
|
|
$(Q)$(OBJCOPY) $(OBJCOPY_ARGS) -R .comment \
|
|
|
|
--add-section image=vmlinux.bin \
|
2005-06-24 05:01:12 +00:00
|
|
|
--set-section-flags image=contents,alloc,load,load,data \
|
2012-11-05 05:10:00 +00:00
|
|
|
$(OBJS) $@
|
2005-06-24 05:01:12 +00:00
|
|
|
|
2012-11-05 05:10:00 +00: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 05:01:12 +00:00
|
|
|
|
2012-11-05 05:10:00 +00:00
|
|
|
zImage: $(obj)/../Image.elf
|