[LEDE-DEV] [PATCH] cns3xxx: bump SPI partition map kernel size to 2MB

Felix Fietkau nbd at nbd.name
Tue Sep 6 14:56:06 PDT 2016


On 2016-09-06 22:55, Tim Harvey wrote:
> On Tue, Sep 6, 2016 at 1:17 PM, Felix Fietkau <nbd at nbd.name> wrote:
>> On 2016-09-06 18:38, Tim Harvey wrote:
>>> The 4.4 kernel is not easily sized down to below the 1.5MB limit imposed by
>>> the SPI flash MTD partition mapping. Increase this to 2MB where it is for
>>> NOR flash devices. Additionally add a check that ensures the kernel fits
>>> within the 2MB limit.
>> How about using mtdsplit to make this dynamic?
> 
> Felix,
> 
> If this just affects image creation and doesn't require users to
> change their bootloader bootscript or flashing method that would be
> fine. Can you point me to an example target that uses this in what you
> would call a proper way?
Several targets use this, including ar71xx, ath25, lantiq, etc.
What you do is you call the combined partition 'firmware' and make it
cover both the kernel and the rootfs area. When generating images, you
append the rootfs directly after the kernel and use pad-rootfs on the
result.
When booting, the kernel will parse the uImage length and then search
for a rootfs afterwards and create the partitions dynamically. This
should work without any boot loader script changes, since the kernel
offset and format remains the same.

- Felix




More information about the Lede-dev mailing list