pengutronix / genimage

tool to generate multiple filesystem and flash images from a tree
GNU General Public License v2.0
308 stars 110 forks source link

How to use compressed rootfs with this tool? #115

Closed nmcain closed 4 years ago

nmcain commented 4 years ago

I am using the PC x86_64 Buildroot defconfig, with the following CFG configuration for genimage:

image efi-part.vfat {
  vfat {
    file startup.nsh {
      image = "efi-part/startup.nsh"
    }
    file EFI {
      image = "efi-part/EFI"
    }
    file bzImage {
      image = "bzImage"
    }
  }
  size = 16777216
}

image disk.img {
  hdimage {
    gpt = true
  }

  partition boot {
    image = "efi-part.vfat"
    partition-type-uuid = c12a7328-f81f-11d2-ba4b-00a0c93ec93b
    offset = 32768
    size = 16777216
    bootable = true
  }

  partition root {
    partition-type-uuid = 44479540-f297-41b2-9af7-d131d5f0458a
    partition-uuid = UUID_TMP
    image = "rootfs.ext2"
    offset = 16809984
  }
}

the file in question, rootfs.ext2 is set to a size of 500mb (I would love to decrease the size somehow) However, I either want to compress the image or find some way of decreasing the size automatically. I attempted to use rootfs.ext2.xz, however it went into a kernel panic immediately.

michaelolbrich commented 4 years ago

You can't just compress the rootfs. Linux can't boot from that. It your rootfs.ext2 full? Maybe you can adjust the size in Buildroot. The Buildroot mailing list is probably a better place for this question. There is nothing genimage can do here.

nmcain commented 4 years ago

Genimage won't support a tar archive for Rootfs?

On Tue, Aug 11, 2020, 11:41 PM Michael Olbrich notifications@github.com wrote:

Closed #115 https://github.com/pengutronix/genimage/issues/115.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/pengutronix/genimage/issues/115#event-3646214123, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEOTEHHBN5AXFSLKGFMFLYDSAI2PZANCNFSM4P3ZHPYQ .

michaelolbrich commented 4 years ago

I don't understand the question. You can put anything in a partition with genimage, including a tar archive. But that doesn't mean the Linux kernel can actually boot with it.