| .. | .. |
|---|
| 9 | 9 | |
|---|
| 10 | 10 | |
|---|
| 11 | 11 | # KBUILD_CFLAGS used when building rest of boot (takes effect recursively) |
|---|
| 12 | | -KBUILD_CFLAGS += -fno-builtin -Iarch/$(ARCH)/boot/include |
|---|
| 13 | | -HOSTFLAGS += -Iarch/$(ARCH)/boot/include |
|---|
| 12 | +KBUILD_CFLAGS += -fno-builtin |
|---|
| 14 | 13 | |
|---|
| 15 | 14 | BIG_ENDIAN := $(shell echo __XTENSA_EB__ | $(CC) -E - | grep -v "\#") |
|---|
| 16 | 15 | |
|---|
| 17 | | -export ccflags-y |
|---|
| 18 | 16 | export BIG_ENDIAN |
|---|
| 19 | 17 | |
|---|
| 20 | 18 | subdir-y := lib |
|---|
| 19 | +targets += vmlinux.bin vmlinux.bin.gz |
|---|
| 20 | +targets += uImage xipImage |
|---|
| 21 | 21 | |
|---|
| 22 | 22 | # Subdirs for the boot loader(s) |
|---|
| 23 | 23 | |
|---|
| .. | .. |
|---|
| 29 | 29 | Image: boot-elf |
|---|
| 30 | 30 | zImage: boot-redboot |
|---|
| 31 | 31 | uImage: $(obj)/uImage |
|---|
| 32 | +xipImage: $(obj)/xipImage |
|---|
| 32 | 33 | |
|---|
| 33 | 34 | boot-elf boot-redboot: $(addprefix $(obj)/,$(subdir-y)) |
|---|
| 34 | 35 | $(Q)$(MAKE) $(build)=$(obj)/$@ $(MAKECMDGOALS) |
|---|
| 35 | 36 | |
|---|
| 36 | 37 | OBJCOPYFLAGS = --strip-all -R .comment -R .notes -O binary |
|---|
| 37 | 38 | |
|---|
| 38 | | -vmlinux.bin: vmlinux FORCE |
|---|
| 39 | +$(obj)/vmlinux.bin: vmlinux FORCE |
|---|
| 39 | 40 | $(call if_changed,objcopy) |
|---|
| 40 | 41 | |
|---|
| 41 | | -vmlinux.bin.gz: vmlinux.bin FORCE |
|---|
| 42 | +$(obj)/vmlinux.bin.gz: $(obj)/vmlinux.bin FORCE |
|---|
| 42 | 43 | $(call if_changed,gzip) |
|---|
| 43 | 44 | |
|---|
| 44 | | -boot-elf: vmlinux.bin |
|---|
| 45 | | -boot-redboot: vmlinux.bin.gz |
|---|
| 45 | +boot-elf: $(obj)/vmlinux.bin |
|---|
| 46 | +boot-redboot: $(obj)/vmlinux.bin.gz |
|---|
| 46 | 47 | |
|---|
| 47 | 48 | UIMAGE_LOADADDR = $(CONFIG_KERNEL_LOAD_ADDRESS) |
|---|
| 48 | 49 | UIMAGE_COMPRESSION = gzip |
|---|
| 49 | 50 | |
|---|
| 50 | | -$(obj)/uImage: vmlinux.bin.gz FORCE |
|---|
| 51 | +$(obj)/uImage: $(obj)/vmlinux.bin.gz FORCE |
|---|
| 51 | 52 | $(call if_changed,uimage) |
|---|
| 52 | 53 | $(Q)$(kecho) ' Kernel: $@ is ready' |
|---|
| 54 | + |
|---|
| 55 | +$(obj)/xipImage: vmlinux FORCE |
|---|
| 56 | + $(call if_changed,objcopy) |
|---|
| 57 | + $(Q)$(kecho) ' Kernel: $@ is ready' |
|---|