Buildroot doesn't generate compressed Kernel image

Related searches

I've successfully used buildroot (v. 2019.05) to built u-boot and Kernel and was able to boot it together.

The problem is that, even though I selected Kernel compression mode to gzip, all I get is the uncompressed Image file.

In the output directory (and Linux as well) there is only Image file, while there should be Image.gz.

How to generate Image.gz from / instead of Image?

On arm64, Linux does not support self-extracting compression. It relies on the boot loader to do that.

The Linux build system does have an Image.gz (and Image.bz2 etc.) target, but it does nothing more than calling gzip on Image (compare this with zImage, which adds a self-extractor).

Since it is easy to do the compression outside of the kernel build system, and since there are so many different compressors possible, Buildroot doesn't provide options for them. However, it is possible to select a custom image name (BR2_LINUX_KERNEL_IMAGE_TARGET_CUSTOM) and then set BR2_LINUX_KERNEL_IMAGE_TARGET_NAME to Image.gz. Alternatively, you can do the compression in a post-build script.

Remember to make sure that the bootloader is able to decompress with that algorithm.

mode:doc; -*- // vim: set syntax=asciidoc: == Buildroot quick start , Also, it doesn't have the correct permissions (e.g. setuid for the busybox binary). Therefore, this directory *should not be used on your target*. Instead, you� Buildroot is a set of Makefiles and patches that simplifies and automates the process of building a complete and bootable Linux environment for an embedded system, while using cross-compilation to allow building for multiple target platforms on a single Linux-based development system.

According to the Linux package configuration tool:

This selection will just ensure that the correct host tools are built. The actual compression for the kernel should be selected in the kernel configuration menu.

Make sure you select the compression option using make linux-menuconfig too.

The Buildroot user manual , Also, it doesn't have the correct permissions (e.g. setuid for the busybox binary). It does not remove the files installed by this package from the target root� Buildroot is a tool that simplifies and automates the process ofbuilding a complete Linux system for an embedded system, usingcross-compilation. In order to achieve this, Buildroot is able to generate across-compilation toolchain, a root filesystem, a Linux kernel imageand a bootloader for your target.

In buildroot, besides selecting the compression mechanism you can also select the output format for the kernel image (uImage, zImage, vmlinux ...).

You should find on of those in your output/images/ or in the build directory of your kernel.

When using U-boot you probably want to use the uImage or the zImage. See this question. Both of them will be compressed if selected in the kernel configuration (CONFIG_KERNEL_GZIP).

During boot the uncompressed size of the kernel is logged in the beginning. You can compare it to the size on your filesystem.

## Booting kernel from Legacy Image at 10000000 ...
   Image Name:   Linux-4.14.73-ltsi
   Created:      2019-05-14  11:55:16 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    4684016 Bytes = 4.5 MiB
   Load Address: 00008000
   Entry Point:  00008000
...

[PDF] Using Buildroot for real projects, In the generated root filesystem, Buildroot doesn't track which source package installed what. You need to do complete rebuilds for a clean root filesystem after � Since it is easy to do the compression outside of the kernel build system, and since there are so many different compressors possible, Buildroot doesn't provide options for them. However, it is possible to select a custom image name (BR2_LINUX_KERNEL_IMAGE_TARGET_CUSTOM) and then set BR2_LINUX_KERNEL_IMAGE_TARGET_NAME to Image.gz. Alternatively, you can do the compression in a post-build script.

Buildroot doesn't run as root and doesn't want to , I am not sure to undrestand(from the directories description in Buildroot manual):. Buildroot, a tool for generating a kernel and root filesystem, is executed on� Buildroot is the right combination of “powerful” and “easy to use.” It provides a lot of automation so that your build process can Just Work, freeing you up for doing the interesting parts of embedded Linux development. In this article: We’ll download Buildroot and start the build using just six commands.

Buildroot doesn't generate compressed Kernel image, On arm64, Linux does not support self-extracting compression. It relies on the boot loader to do that. The Linux build system does have an� What is Buildroot ? (2/2) I It is designed with simplicity in mind I Standard languages used, relatively lightweight infrastructure. I Very easy to add packages or customize the build system behaviour. I It is best-suited for small to medium-sized embedded systems I In the generated root lesystem, Buildroot doesn’t track which source package

As it doesn't make sense to use apt on a Buildroot system, the Buildroot menu doesn't offer that. In short, if you start with a package system ( apt , yum , zypper or whatever), then stay with that system.

Comments
  • Thanks that was exactly this. I took the Image file generated by the buildroot (well Kernel to be precise) and used a command gzip Image to get the Image.gz and simply set compression = "gzip" in my *.its file. Was much simpler than I thought, thanks.
  • Thanks, but for some reason "Kernel compression mode" is not visible in "General setup" in my kernel config.
  • Thanks, I search for CONFIG_KERNEL_GZIP and it's an option for "Kernel compression mode" - but this choice is not visible in my kernel config. I have enabled gzip in buildroot menuconfig and then in the buildroot directory I do make linux-menuconfig and I don't see "Kernel compression mode" under "General setup". This option depends on HAVE_KERNEL_GZIP, but I don't know how / why it's not set. Do you know why I don't see "Kernel compression mode"?