pi-gadget icon indicating copy to clipboard operation
pi-gadget copied to clipboard

Increase boot partition size to accommodate compression changes

Open jawn-smith opened this issue 2 years ago • 4 comments

We had a discussion today about leaving space for organic growth of the initrd and the fact that changing compression sizes has led to larger initrd images.

jawn-smith avatar Mar 22 '22 18:03 jawn-smith

This looks good to me but is there somewhere (other than a t-shirt) we could put the formula used for calculating the size?

murraybd avatar Mar 22 '22 18:03 murraybd

How about right here?

In [1]: fudge_factor = 2

In [2]: num_copies = 2

In [3]: kernel_size = 10

In [4]: initrd_size = 57

In [5]: other_boot_assets = 23

In [6]: boot_size = fudge_factor * (num_copies * ( kernel_size + initrd_size +other_boot_assets))

In [7]: boot_size
Out[7]: 360

Then rounding up to a nicer number we landed on 384. Some more detail:

flash-kernel always ensures there are two sets of boot assets, one with normal file paths and one with a .bak appended to each file path. This is the reason for the num_copies variable.

initrd_size and kernel_size are taken from kernel 5.15.0-1003-raspi

The "other boot assets" include things like start.elf, uboot, piboot, etc.

I have requested a review from waveform80 as I believe some of this might change in the future, like removing uboot altogether.

jawn-smith avatar Mar 22 '22 18:03 jawn-smith

Dave and I had an offline conversation during which we decided to bump this to 512.

jawn-smith avatar Mar 30 '22 14:03 jawn-smith

Is this now redundant with the classic-redesign branch?

waveform80 avatar Oct 06 '22 21:10 waveform80

Yup, this was resolved with classic-redesign getting merged; closing

waveform80 avatar Jun 21 '24 14:06 waveform80