Commit 1263ce1f authored by Russell King's avatar Russell King

[ARM] Kernel boot decompressor updates

- use 'Image' target for kernel image to be compressed rather than
  duplicating its generation.
- use .incbin-based generation of ELF objects from binary data rather
  than 'ld'-based generation.
parent e06ef8ac
...@@ -75,6 +75,9 @@ $(obj)/Image: vmlinux FORCE ...@@ -75,6 +75,9 @@ $(obj)/Image: vmlinux FORCE
$(call if_changed,objcopy) $(call if_changed,objcopy)
@echo ' Kernel: $@ is ready' @echo ' Kernel: $@ is ready'
$(obj)/compressed/vmlinux: $(obj)/Image FORCE
$(Q)$(MAKE) $(build)=$(obj)/compressed $@
$(obj)/zImage: $(obj)/compressed/vmlinux FORCE $(obj)/zImage: $(obj)/compressed/vmlinux FORCE
$(call if_changed,objcopy) $(call if_changed,objcopy)
@echo ' Kernel: $@ is ready' @echo ' Kernel: $@ is ready'
...@@ -88,17 +91,15 @@ $(obj)/uImage: $(obj)/zImage FORCE ...@@ -88,17 +91,15 @@ $(obj)/uImage: $(obj)/zImage FORCE
$(call if_changed,uimage) $(call if_changed,uimage)
@echo ' Image $@ is ready' @echo ' Image $@ is ready'
$(obj)/bootp/bootp: $(obj)/zImage initrd FORCE
$(Q)$(MAKE) $(build)=$(obj)/bootp $@
@:
$(obj)/bootpImage: $(obj)/bootp/bootp FORCE $(obj)/bootpImage: $(obj)/bootp/bootp FORCE
$(call if_changed,objcopy) $(call if_changed,objcopy)
@echo ' Kernel: $@ is ready' @echo ' Kernel: $@ is ready'
$(obj)/compressed/vmlinux: vmlinux FORCE .PHONY: initrd FORCE
$(Q)$(MAKE) $(build)=$(obj)/compressed $@
$(obj)/bootp/bootp: $(obj)/zImage initrd FORCE
$(Q)$(MAKE) $(build)=$(obj)/bootp $@
.PHONY: initrd
initrd: initrd:
@test "$(INITRD_PHYS)" != "" || \ @test "$(INITRD_PHYS)" != "" || \
(echo This machine does not support INITRD; exit -1) (echo This machine does not support INITRD; exit -1)
......
...@@ -66,8 +66,8 @@ endif ...@@ -66,8 +66,8 @@ endif
SEDFLAGS = s/TEXT_START/$(ZTEXTADDR)/;s/BSS_START/$(ZBSSADDR)/ SEDFLAGS = s/TEXT_START/$(ZTEXTADDR)/;s/BSS_START/$(ZBSSADDR)/
targets := vmlinux vmlinux.lds piggy piggy.gz piggy.o \ targets := vmlinux vmlinux.lds piggy.gz piggy.o font.o \
font.o head.o $(OBJS) head.o misc.o $(OBJS)
EXTRA_CFLAGS := -fpic EXTRA_CFLAGS := -fpic
EXTRA_AFLAGS := EXTRA_AFLAGS :=
...@@ -89,16 +89,10 @@ $(obj)/vmlinux: $(obj)/vmlinux.lds $(obj)/$(HEAD) $(obj)/piggy.o \ ...@@ -89,16 +89,10 @@ $(obj)/vmlinux: $(obj)/vmlinux.lds $(obj)/$(HEAD) $(obj)/piggy.o \
$(call if_changed,ld) $(call if_changed,ld)
@: @:
$(obj)/piggy.gz: $(obj)/../Image FORCE
$(obj)/piggy: vmlinux FORCE
$(call if_changed,objcopy)
$(obj)/piggy.gz: $(obj)/piggy FORCE
$(call if_changed,gzip) $(call if_changed,gzip)
LDFLAGS_piggy.o := -r -b binary
$(obj)/piggy.o: $(obj)/piggy.gz FORCE $(obj)/piggy.o: $(obj)/piggy.gz FORCE
$(call if_changed,ld)
CFLAGS_font.o := -Dstatic= CFLAGS_font.o := -Dstatic=
$(obj)/font.o: $(FONTC) $(obj)/font.o: $(FONTC)
......
.section .piggydata,#alloc
.globl input_data
input_data:
.incbin "arch/arm/boot/compressed/piggy.gz"
.globl input_data_end
input_data_end:
...@@ -24,9 +24,7 @@ SECTIONS ...@@ -24,9 +24,7 @@ SECTIONS
*(.rodata.*) *(.rodata.*)
*(.glue_7) *(.glue_7)
*(.glue_7t) *(.glue_7t)
input_data = .; *(.piggydata)
arch/arm/boot/compressed/piggy.o
input_data_end = .;
. = ALIGN(4); . = ALIGN(4);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment