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?
Here is an example: https://openwrt.org/toh/asus/rt-ac58u#flash_layout
Can you comment?
Maybe there are article discussion pages, like in wikipedia, but I didn't find how to navigate to them.
jeff
2
Flash layout is critical. Bad information is worse then no information.
I’d suggest the source code for the current release or master, preferably confirmed with device in hand.
What I saw there looks like UBI volume layouts, which is a layer up from the partitioning of the raw flash itself.
Yes, there are technically two layers, but I think two layered horizontal would look clumsy, compared to two vertical tables like I made.
I have changed the layouts. How about now?
I do not know about r/o or how to check it.
"m25p80" is not correct
It was mentioned in the bootlog.
tmomas
6
This is nice to have and appreciated, if you want to invest the time in creating this table:
This should most time be sufficient:

jeff
7
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.
tmomas
9
Then feel free to apply the detailed flash layout table as shown above.
So, what about my question: Is it OK to use my own representation instead of following the sample? Maybe something like pstree output would be better?
jeff
11
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>;
};
};
};