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
|
|
|
|
|
2005-06-30 17:58:59 +08:00
|
|
|
LD_ARGS = -T $(srctree)/$(obj)/boot.ld
|
2005-06-24 13:01:12 +08:00
|
|
|
|
|
|
|
boot-y := bootstrap.o
|
|
|
|
|
|
|
|
OBJS := $(addprefix $(obj)/,$(boot-y))
|
2005-06-30 17:58:59 +08:00
|
|
|
LIBS := arch/xtensa/boot/lib/lib.a arch/xtensa/lib/lib.a
|
2005-06-24 13:01:12 +08:00
|
|
|
|
2007-10-15 04:21:35 +08:00
|
|
|
LIBGCC := $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name)
|
2005-06-24 13:01:12 +08:00
|
|
|
|
2012-11-05 13:10:00 +08:00
|
|
|
$(obj)/zImage.o: vmlinux.bin.gz $(OBJS)
|
|
|
|
$(Q)$(OBJCOPY) $(OBJCOPY_ARGS) -R .comment \
|
|
|
|
--add-section image=vmlinux.bin.gz \
|
|
|
|
--set-section-flags image=contents,alloc,load,load,data \
|
|
|
|
$(OBJS) $@
|
2012-09-17 09:44:49 +08:00
|
|
|
|
2012-11-05 13:10:00 +08:00
|
|
|
$(obj)/zImage.elf: $(obj)/zImage.o $(LIBS)
|
|
|
|
$(Q)$(LD) $(LD_ARGS) -o $@ $^ -L/xtensa-elf/lib $(LIBGCC)
|
2012-09-17 09:44:49 +08:00
|
|
|
|
2012-11-05 13:10:00 +08:00
|
|
|
$(obj)/../zImage.redboot: $(obj)/zImage.elf
|
|
|
|
$(Q)$(OBJCOPY) -S -O binary $< $@
|
|
|
|
$(Q)$(kecho) ' Kernel: $@ is ready'
|
|
|
|
|
|
|
|
zImage: $(obj)/../zImage.redboot
|