amouiche / qnap_mtd_resize_for_bullseye

Script for resizing MTD partitions on a QNAP device in order to be able to upgrade from buster to bullseye
GNU General Public License v2.0
54 stars 11 forks source link

using device tree #49

Open graemev opened 1 year ago

graemev commented 1 year ago

In Partitionning_details.md it says:

- if `/etc/flash-kernel/dtbs/`content is modified or erased for some reasons (new install ?) the u-boot setup and the kernel MTD usage will not be synchronized and the device will fail to boot.
- cmdline only "patch/override" the MTD partitions information. If the original DTB file provided by Debian is updated for some reasons (driver fixes), the kernel will still continue to use those fixes.

But I note during a flash-kernel it says:

~# flash-kernel 
kirkwood-qnap: machine: QNAP TS419 family
Using DTB: kirkwood-ts419-6281.dtb
Installing /usr/lib/linux-image-5.10.0-25-marvell/kirkwood-ts419-6281.dtb into /boot/dtbs/5.10.0-25-marvell/./kirkwood-ts419-6281.dtb
Taking backup of kirkwood-ts419-6281.dtb.
Installing new kirkwood-ts419-6281.dtb.

So the source of the DTB is /usr/lib/linux-image-5.10.0-25-marvell

And in the file: /etc/flash-kernel/dtbs/README.dtbs is says:


DTB files installed in this directory will be used in preference to
the ones shipped with the kernel.

Which suggests to me that we could simply use a (local) DTB. ?

Then, rather than shuffling around all the bits of flash, we could simply run flash-kernel**

(** still need to resize NAS_Config ...mind you it's unclear we still need NAS_Config)