Search code examples
kernelu-boot

How to extract files in uImage?


Here is my problem:

I have a uImage file, which has kernel + dtb + initramfs in it. The initramfs has some proprietary binaries, hence I cannot rebuild it from source. But I need to change the Linux kernel for different reasons.

Hence I thought if following steps would solve my problem:

  1. extract the above uImage file,
  2. replace kernel and dtb files with newly built files,
  3. recreate a newer version of uImage file with new-kernel, new-dtb but old-initramfs.

Is there a tool available to do this? If not, I appreciate any inputs to develop the same.


Solution

  • Try this command:

    mkimage -l kernel.uImage
    

    For details have a look at this link.