Hello. I have noticed there are several devices, which have boot logs available on the page, but flash layout is empty or missing completely.
Does it make sense to edit a page and add flash layout if I only use information from the same device page?
Do I need to use the template every time? I think it's good for multi-layer flash partitions, but the layout where rows correspond to partitions, and columns to data field, would be easier to read.
If I have information but it's not 100% verified, is it better to add it or not? For example if I do not have actual device but I have found bootlogs in some blog post.
Layout of original firmware. It could change between versions, but how do I know it?
Offset should be offset and, along with size, and name are the primary information
Should include if the partition is marked r/o or not
Correspondence of OEM and OpenWrt partition locations, sizes and names should be very clear (both for underlying flash, as well as in this case where the UBI volumes change significantly)
The NOR flash and the NAND flash should be completely separate from each other
LEB, PEB count, at least for me, is "noise"
Be aware that chip types change, as do drivers. Interesting if, for example, chip 1 is "SPI NOR" and chip 2 is "SPI NAND" or the like. "m25p80" is not correct, even for the driver. "jedec,spi-nor" is the current driver.
If you want to prepare a table that is equivalent to that suggested by tmomas in a vertical format on a "personal" page for suggestions (I didn't realize that you were live-editing the device page itself), that would be a good place for comments.
I'd stay away from making factual statements in areas that you may not be familiar with. Be very careful about things like the chips in use, drivers attaching, partitioning, boot sequence, the MTD subsystem in general, how both combined firmware partitions and UBI is handled by the boot loader and the kernel.
But there are a lot of routers, where physical order of partitions is different from mtd order, such as first partition might be listed as mtd5, second as mtd4. Some of those routers don't even have dmesg on stock firmware.
I think it would be valuable for you to gain some understanding on how the MTD subsystem in the Linux kernel works, the "auto-split" patches applied by OpenWrt, as well as the UBI subsystem.
Another valuable source of information on how OpenWrt deals with a specific router is the DTS for the router.
For example, target/linux/ipq40xx/files-4.19/arch/arm/boot/dts/qcom-ipq4018-rt-ac58u.dts contains
flash@0 {
/*
* U-boot looks for "n25q128a11" node,
* if we don't have it, it will spit out the following warning:
* "ipq: fdt fixup unable to find compatible node".
*/
compatible = "jedec,spi-nor";
reg = <0>;
linux,modalias = "m25p80", "mx25l1606e", "n25q128a11";
spi-max-frequency = <24000000>;
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
partition@0 {
label = "SBL1";
reg = <0x00000000 0x00040000>;
read-only;
};
partition@40000 {
label = "MIBIB";
reg = <0x00040000 0x00020000>;
read-only;
};
partition@60000 {
label = "QSEE";
reg = <0x00060000 0x00060000>;
read-only;
};
partition@c0000 {
label = "CDT";
reg = <0x000c0000 0x00010000>;
read-only;
};
partition@d0000 {
label = "DDRPARAMS";
reg = <0x000d0000 0x00010000>;
read-only;
};
partition@e0000 {
label = "APPSBLENV"; /* uboot env*/
reg = <0x000e0000 0x00010000>;
read-only;
};
partition@f0000 {
label = "APPSBL"; /* uboot */
reg = <0x000f0000 0x00080000>;
read-only;
};
partition@170000 {
label = "ART";
reg = <0x00170000 0x00010000>;
read-only;
};
/* 0x00180000 - 0x00200000 unused */
};
};
spi-nand@1 {
compatible = "spi-nand";
reg = <1>;
spi-max-frequency = <24000000>;
/*
* U-boot looks for "spinand,mt29f" node,
* if we don't have it, it will spit out the following warning:
* "ipq: fdt fixup unable to find compatible node".
*/
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
partition@0 {
/*
* TODO: change to label = "ubi" once we drop 4.14.
* also drop the bootargs-append and all the
* userspace CI_UBIPART="UBI_DEV" remains.
*/
label = "UBI_DEV";
reg = <0x00000000 0x08000000>;
};
};
};