aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/arm/boot/compressed/Makefile2
-rw-r--r--arch/arm/boot/compressed/head.S18
2 files changed, 16 insertions, 4 deletions
diff --git a/arch/arm/boot/compressed/Makefile b/arch/arm/boot/compressed/Makefile
index 0c6852d93506..79b5c62746df 100644
--- a/arch/arm/boot/compressed/Makefile
+++ b/arch/arm/boot/compressed/Makefile
@@ -98,8 +98,6 @@ endif
98ccflags-y := -fpic -fno-builtin 98ccflags-y := -fpic -fno-builtin
99asflags-y := -Wa,-march=all 99asflags-y := -Wa,-march=all
100 100
101# Provide size of uncompressed kernel to the decompressor via a linker symbol.
102LDFLAGS_vmlinux = --defsym _image_size=$(shell stat -c "%s" $(obj)/../Image)
103# Supply ZRELADDR to the decompressor via a linker symbol. 101# Supply ZRELADDR to the decompressor via a linker symbol.
104ifneq ($(CONFIG_AUTO_ZRELADDR),y) 102ifneq ($(CONFIG_AUTO_ZRELADDR),y)
105LDFLAGS_vmlinux += --defsym zreladdr=$(ZRELADDR) 103LDFLAGS_vmlinux += --defsym zreladdr=$(ZRELADDR)
diff --git a/arch/arm/boot/compressed/head.S b/arch/arm/boot/compressed/head.S
index d1fd1cfca9c2..b541217bd040 100644
--- a/arch/arm/boot/compressed/head.S
+++ b/arch/arm/boot/compressed/head.S
@@ -187,7 +187,7 @@ not_angel:
187 bl cache_on 187 bl cache_on
188 188
189restart: adr r0, LC0 189restart: adr r0, LC0
190 ldmia r0, {r1, r2, r3, r6, r9, r11, r12} 190 ldmia r0, {r1, r2, r3, r6, r10, r11, r12}
191 ldr sp, [r0, #28] 191 ldr sp, [r0, #28]
192 192
193 /* 193 /*
@@ -196,6 +196,20 @@ restart: adr r0, LC0
196 */ 196 */
197 sub r0, r0, r1 @ calculate the delta offset 197 sub r0, r0, r1 @ calculate the delta offset
198 add r6, r6, r0 @ _edata 198 add r6, r6, r0 @ _edata
199 add r10, r10, r0 @ inflated kernel size location
200
201 /*
202 * The kernel build system appends the size of the
203 * decompressed kernel at the end of the compressed data
204 * in little-endian form.
205 */
206 ldrb r9, [r10, #0]
207 ldrb lr, [r10, #1]
208 orr r9, r9, lr, lsl #8
209 ldrb lr, [r10, #2]
210 ldrb r10, [r10, #3]
211 orr r9, r9, lr, lsl #16
212 orr r9, r9, r10, lsl #24
199 213
200#ifndef CONFIG_ZBOOT_ROM 214#ifndef CONFIG_ZBOOT_ROM
201 /* malloc space is above the relocated stack (64k max) */ 215 /* malloc space is above the relocated stack (64k max) */
@@ -355,7 +369,7 @@ LC0: .word LC0 @ r1
355 .word __bss_start @ r2 369 .word __bss_start @ r2
356 .word _end @ r3 370 .word _end @ r3
357 .word _edata @ r6 371 .word _edata @ r6
358 .word _image_size @ r9 372 .word input_data_end - 4 @ r10 (inflated size location)
359 .word _got_start @ r11 373 .word _got_start @ r11
360 .word _got_end @ ip 374 .word _got_end @ ip
361 .word user_stack_end @ sp 375 .word user_stack_end @ sp