Chris Zankel | 4bedea9 | 2005-06-23 22:01:12 -0700 | [diff] [blame] | 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 | |
Chris Zankel | 4bedea9 | 2005-06-23 22:01:12 -0700 | [diff] [blame] | 7 | ifeq ($(BIG_ENDIAN),1) |
| 8 | OBJCOPY_ARGS := -O elf32-xtensa-be |
| 9 | else |
| 10 | OBJCOPY_ARGS := -O elf32-xtensa-le |
| 11 | endif |
| 12 | |
| 13 | export OBJCOPY_ARGS |
Chris Zankel | 36dffad | 2008-02-12 13:14:17 -0800 | [diff] [blame] | 14 | export CPPFLAGS_boot.lds += -P -C |
Chris Zankel | 4bedea9 | 2005-06-23 22:01:12 -0700 | [diff] [blame] | 15 | |
| 16 | boot-y := bootstrap.o |
| 17 | |
| 18 | OBJS := $(addprefix $(obj)/,$(boot-y)) |
| 19 | |
Max Filippov | 3f5ec29 | 2012-11-05 09:10:00 +0400 | [diff] [blame] | 20 | $(obj)/Image.o: vmlinux.bin $(OBJS) |
| 21 | $(Q)$(OBJCOPY) $(OBJCOPY_ARGS) -R .comment \ |
| 22 | --add-section image=vmlinux.bin \ |
Chris Zankel | 4bedea9 | 2005-06-23 22:01:12 -0700 | [diff] [blame] | 23 | --set-section-flags image=contents,alloc,load,load,data \ |
Max Filippov | 3f5ec29 | 2012-11-05 09:10:00 +0400 | [diff] [blame] | 24 | $(OBJS) $@ |
Chris Zankel | 4bedea9 | 2005-06-23 22:01:12 -0700 | [diff] [blame] | 25 | |
Max Filippov | 3f5ec29 | 2012-11-05 09:10:00 +0400 | [diff] [blame] | 26 | $(obj)/../Image.elf: $(obj)/Image.o $(obj)/boot.lds |
| 27 | $(Q)$(LD) $(LDFLAGS) $(LDFLAGS_vmlinux) \ |
| 28 | -T $(obj)/boot.lds \ |
| 29 | --build-id=none \ |
| 30 | -o $@ $(obj)/Image.o |
| 31 | $(Q)$(kecho) ' Kernel: $@ is ready' |
Chris Zankel | 4bedea9 | 2005-06-23 22:01:12 -0700 | [diff] [blame] | 32 | |
Max Filippov | 3f5ec29 | 2012-11-05 09:10:00 +0400 | [diff] [blame] | 33 | zImage: $(obj)/../Image.elf |