Skip to contentSkip to conversation

linux: support uncompressed kernel

PATCH New Alexander Egorenkov 3 participants 5 messages Mar 24, 2021 – Mar 29, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 linux: support uncompressed kernel

Enables to build an uncompressed Linux kernel.

---
 linux/Config.in | 3 +++
 linux/linux.mk  | 1 +
 2 files changed, 4 insertions(+)
linux/Config.in +3 -0
index 3370162faa..c09f70c4ac 100644
@@ -329,6 +329,9 @@ config BR2_LINUX_KERNEL_XZ
 config BR2_LINUX_KERNEL_ZSTD
 	bool "zstd compression"
 
+config BR2_LINUX_KERNEL_UNCOMPRESSED
+	bool "uncompressed"
+
 endchoice
 
 config BR2_LINUX_KERNEL_IMAGE_TARGET_NAME
linux/linux.mk +1 -0
index 5e4b319cf1..1457228eb9 100644
@@ -111,6 +111,7 @@ LINUX_COMPRESSION_OPT_$(BR2_LINUX_KERNEL_LZMA) += CONFIG_KERNEL_LZMA
 LINUX_COMPRESSION_OPT_$(BR2_LINUX_KERNEL_LZO) += CONFIG_KERNEL_LZO
 LINUX_COMPRESSION_OPT_$(BR2_LINUX_KERNEL_XZ) += CONFIG_KERNEL_XZ
 LINUX_COMPRESSION_OPT_$(BR2_LINUX_KERNEL_ZSTD) += CONFIG_KERNEL_ZSTD
+LINUX_COMPRESSION_OPT_$(BR2_LINUX_KERNEL_UNCOMPRESSED) += CONFIG_KERNEL_UNCOMPRESSED
 
 ifeq ($(BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL),y)
 LINUX_DEPENDENCIES += host-openssl
Signature · 1 line
2.26.3
#1 lore raw

PATCH 1/1 linux: support uncompressed kernel

Quoted 14 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Alexander" == Alexander Egorenkov <[email protected]> writes:

Enables to build an uncompressed Linux kernel.

---
 linux/Config.in | 3 +++
 linux/linux.mk  | 1 +
 2 files changed, 4 insertions(+)
linux/Config.in +0 -0
index 3370162faa..c09f70c4ac 100644

linux/Config.in config BR2_LINUX_KERNEL_XZ · line 333

Quoted 5 lines
linux/Config.in +2 -0
@@ -329,6 +329,9 @@ config BR2_LINUX_KERNEL_XZ
 config BR2_LINUX_KERNEL_ZSTD
 	bool "zstd compression"
 
+config BR2_LINUX_KERNEL_UNCOMPRESSED
+	bool "uncompressed"

It looks like this is a s390-specific option:

commit 89b5202e81df9f0f0f0a11cf8c78bc8bfdc52a21

Author: Vasily Gorbik <[email protected]>
Date:   Wed Jun 13 00:00:25 2018 +0200

s390/decompressor: support uncompressed kernel

So it should depend on BR2_s390x.

Quoted 23 lines
linux/Config.in +1 -0
+
 endchoice
 
 config BR2_LINUX_KERNEL_IMAGE_TARGET_NAME
linux/linux.mk +1 -0
index 5e4b319cf1..1457228eb9 100644
@@ -111,6 +111,7 @@ LINUX_COMPRESSION_OPT_$(BR2_LINUX_KERNEL_LZMA) += CONFIG_KERNEL_LZMA
 LINUX_COMPRESSION_OPT_$(BR2_LINUX_KERNEL_LZO) += CONFIG_KERNEL_LZO
 LINUX_COMPRESSION_OPT_$(BR2_LINUX_KERNEL_XZ) += CONFIG_KERNEL_XZ
 LINUX_COMPRESSION_OPT_$(BR2_LINUX_KERNEL_ZSTD) += CONFIG_KERNEL_ZSTD
+LINUX_COMPRESSION_OPT_$(BR2_LINUX_KERNEL_UNCOMPRESSED) += CONFIG_KERNEL_UNCOMPRESSED
 
 ifeq ($(BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL),y)
 LINUX_DEPENDENCIES += host-openssl
Signature · 6 lines
2.26.3

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 1 line
Bye, Peter Korsgaard
#2 lore raw

PATCH 1/1 linux: support uncompressed kernel

Quoted 10 lines · On Fri, 26 Mar 2021 23:59:20 +0100 Peter Korsgaard <[email protected]> wrote:

It looks like this is a s390-specific option:

commit 89b5202e81df9f0f0f0a11cf8c78bc8bfdc52a21

Author: Vasily Gorbik <[email protected]>
Date:   Wed Jun 13 00:00:25 2018 +0200

s390/decompressor: support uncompressed kernel

So it should depend on BR2_s390x.

This is true... but in fact also applies to our other compression options. For example, if you enable BR2_LINUX_KERNEL_LZMA on arm64, it does nothing, because this is not supported on arm64.

Or if you use BR2_LINUX_KERNEL_ZSTD, it will only work on mips and x86, none of the other CPU architectures support that.

And of course, since this is changing from one version of the kernel to another, we can't really add such dependencies in Buildroot. I've done so for the uncompressed/s390 case because it felt a bit "special", but in the general case, it doesn't work :-/

The only way would be some kind of build-time verification that the option was really taken into account, to at least abort the build if the option doesn't do anything.

Thomas

Signature · 3 lines
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#3 lore raw

PATCH 1/1 linux: support uncompressed kernel

In reply to Alexander Egorenkov
Quoted 7 lines · On Wed, 24 Mar 2021 12:45:22 +0100 Alexander Egorenkov…

Enables to build an uncompressed Linux kernel.

---
 linux/Config.in | 3 +++
 linux/linux.mk  | 1 +
 2 files changed, 4 insertions(+)

I have applied, after making the option conditional on BR2_s390x, as suggested by Peter. Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#4 lore raw

PATCH 1/1 linux: support uncompressed kernel

Quoted 11 lines · Thomas Petazzoni
Quoted 7 lines · On Wed, 24 Mar 2021 12:45:22 +0100 Alexander Egorenkov…

Enables to build an uncompressed Linux kernel.

---
 linux/Config.in | 3 +++
 linux/linux.mk  | 1 +
 2 files changed, 4 insertions(+)
Quoted 8 lines

I have applied, after making the option conditional on BR2_s390x, as suggested by Peter. Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

Thank you very much

Regards
Alex