2024-09-09 08:52:07 +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
|
|
|
|
export CPPFLAGS_boot.lds += -P -C
|
2024-09-09 08:57:42 +00:00
|
|
|
export KBUILD_AFLAGS += -mtext-section-literals
|
2024-09-09 08:52:07 +00:00
|
|
|
|
|
|
|
boot-y := bootstrap.o
|
|
|
|
|
|
|
|
OBJS := $(addprefix $(obj)/,$(boot-y))
|
|
|
|
|
2024-09-09 08:57:42 +00:00
|
|
|
$(obj)/Image.o: vmlinux.bin $(OBJS)
|
|
|
|
$(Q)$(OBJCOPY) $(OBJCOPY_ARGS) -R .comment \
|
|
|
|
--add-section image=vmlinux.bin \
|
2024-09-09 08:52:07 +00:00
|
|
|
--set-section-flags image=contents,alloc,load,load,data \
|
2024-09-09 08:57:42 +00:00
|
|
|
$(OBJS) $@
|
2024-09-09 08:52:07 +00:00
|
|
|
|
2024-09-09 08:57:42 +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'
|
2024-09-09 08:52:07 +00:00
|
|
|
|
2024-09-09 08:57:42 +00:00
|
|
|
zImage: $(obj)/../Image.elf
|