linux-parisc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Compressed kernels currently won't boot
@ 2019-07-31 16:44 James Bottomley
  2019-07-31 17:30 ` Sven Schnelle
  2019-07-31 19:57 ` Helge Deller
  0 siblings, 2 replies; 17+ messages in thread
From: James Bottomley @ 2019-07-31 16:44 UTC (permalink / raw)
  To: Parisc List

I noticed this trying to test out compressed kernel booting.  The
problem is that a compressed kernel is divided into two pieces, one of
which starts at 0x000e0000 and is the bootstrap code which is
uncompressed into 0x00100000 and the rest of which is the real
compressed kernel which is loaded above the end of the current
decompressed size of the entire kernel.  palo decompresses the head and
jumps to it and it then decompresses the rest of the kernel into place.
 This means that the first part of the compressed image can't be larger
than 0x20000 == 131072 because otherwise it will be loaded into an area
that decompression will alter.

The problem is that a change was introduced by 

commit 34c201ae49fe9e0bf3b389da5869d810f201c740
Author: Helge Deller <deller@gmx.de>
Date:   Mon Oct 15 22:14:01 2018 +0200

    parisc: Include compressed vmlinux file in vmlinuz boot kernel
 

Which moved the compressed vmlinux from the second segment to the
first, which is what makes it too big for me.  This patch reverting
that piece allows me to boot again.

James

---

diff --git a/arch/parisc/boot/compressed/vmlinux.lds.S b/arch/parisc/boot/compressed/vmlinux.lds.S
index bfd7872739a3..5841aa373c03 100644
--- a/arch/parisc/boot/compressed/vmlinux.lds.S
+++ b/arch/parisc/boot/compressed/vmlinux.lds.S
@@ -42,12 +42,6 @@ SECTIONS
 #endif
 	_startcode_end = .;
 
-	/* vmlinux.bin.gz is here */
-	. = ALIGN(8);
-	.rodata.compressed : {
-		*(.rodata.compressed)
-	}
-
 	/* bootloader code and data starts behind area of extracted kernel */
 	. = (SZ_end - SZparisc_kernel_start + KERNEL_BINARY_TEXT_START);
 
@@ -73,6 +67,12 @@ SECTIONS
 		*(.rodata.*)
 		_erodata = . ;
 	}
+	/* vmlinux.bin.gz is here */
+	. = ALIGN(8);
+	.rodata.compressed : {
+		*(.rodata.compressed)
+	}
+
 	. = ALIGN(8);
 	.bss : {
 		_bss = . ;

^ permalink raw reply related	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2019-08-01  8:10 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-31 16:44 Compressed kernels currently won't boot James Bottomley
2019-07-31 17:30 ` Sven Schnelle
2019-07-31 17:50   ` James Bottomley
2019-07-31 19:40     ` James Bottomley
2019-07-31 19:44       ` Sven Schnelle
2019-07-31 19:46         ` Helge Deller
2019-07-31 19:56           ` James Bottomley
2019-07-31 20:19             ` Helge Deller
2019-07-31 20:49               ` James Bottomley
2019-07-31 21:44                 ` Helge Deller
2019-08-01  1:37                   ` James Bottomley
2019-07-31 21:01         ` James Bottomley
2019-07-31 21:08           ` Sven Schnelle
2019-07-31 21:13             ` Helge Deller
2019-07-31 21:51               ` Helge Deller
2019-08-01  8:10                 ` Sven Schnelle
2019-07-31 19:57 ` Helge Deller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).