Message ID | 20210227220514.2544592-1-foss@volatilesystems.org |
---|---|
State | Superseded, archived |
Headers | show |
Series | uboot-envtools: add support for GS108T v3 & GS110TPP v1 | expand |
Hi Stijn On Sat, 2021-02-27 at 23:05 +0100, Stijn Segers wrote: > The Netgear GS108T v3 and its GS110TPP v1 sibling apparently label > their u-boot environment parition 'bdinfo' instead of 'u-boot-env'. Alternatively, the u-boot data partition could also just be renamed to 'u-boot-env', to match naming on other devices. Then, uboot-envtools appears to work without further modification. Best, Sander
Hi! Op zondag 28 februari 2021 om 10u19 schreef Sander Vanheule <sander@svanheule.net>: > Hi Stijn > > On Sat, 2021-02-27 at 23:05 +0100, Stijn Segers wrote: >> The Netgear GS108T v3 and its GS110TPP v1 sibling apparently label >> their u-boot environment parition 'bdinfo' instead of 'u-boot-env'. > > Alternatively, the u-boot data partition could also just be renamed to > 'u-boot-env', to match naming on other devices. Then, uboot-envtools > appears to work without further modification. I don't know what is best practice when it comes the partition names. Is this something one is supposed to copy from the OEM image? Since those namings only influence behaviour within OpenWrt I suppose one could name them however one sees fit. I can change the naming in the DTS, but a separate entry would be needed either way, since the second u-boot partition of the GS108T v3 / GS110TPP v1 has different settings than the already existing matches (see second patch). So we might as well just stick with the DTS as it is now. Thoughts? Stijn > > Best, > Sander > > >
Stijn Segers <foss@volatilesystems.org> writes: > Op zondag 28 februari 2021 om 10u19 schreef Sander Vanheule > <sander@svanheule.net>: >> Hi Stijn >> On Sat, 2021-02-27 at 23:05 +0100, Stijn Segers wrote: >>> The Netgear GS108T v3 and its GS110TPP v1 sibling apparently label >>> their u-boot environment parition 'bdinfo' instead of 'u-boot-env'. >> Alternatively, the u-boot data partition could also just be renamed >> to >> 'u-boot-env', to match naming on other devices. Then, uboot-envtools >> appears to work without further modification. > > I don't know what is best practice when it comes the partition > names. Is this something one is supposed to copy from the OEM image? > Since those namings only influence behaviour within OpenWrt I suppose > one could name them however one sees fit. > > I can change the naming in the DTS, but a separate entry would be > needed either way, since the second u-boot partition of the GS108T v3 > / GS110TPP v1 has different settings than the already existing matches > (see second patch). So we might as well just stick with the DTS as it > is now. > > Thoughts? I believe all(?) the realtek devices from all vendors use the same partition names in stock firmware and u-boot. I would prefer that we kept as close as possible to those names as well, to avoid unnecessary confusion. But if we divert, like for the 'u-boot-env' partition, then we should at least use the same name for all the devices. ZyXEL GS1900-10HP U-Boot: RTL838x# flshow =============== FLASH Partition Layout =============== Index Name Size Address ------------------------------------------------------ 0 LOADER 0x40000 0xb4000000-0xb403ffff 1 BDINFO 0x10000 0xb4040000-0xb404ffff 2 SYSINFO 0x10000 0xb4050000-0xb405ffff 3 JFFS2_CFG 0x100000 0xb4060000-0xb415ffff 4 JFFS2_LOG 0x100000 0xb4160000-0xb425ffff 5 RUNTIME1 0x6d0000 0xb4260000-0xb492ffff 6 RUNTIME2 0x6d0000 0xb4930000-0xb4ffffff ====================================================== ZyXEL GS1900-10HP OEM firmware (from bootlog without 'quiet'): Creating 7 MTD partitions on "Total SPI FLASH": 0x00000000-0x00040000 : "LOADER" 0x00040000-0x00050000 : "BDINFO" 0x00050000-0x00060000 : "SYSINFO" 0x00060000-0x00160000 : "JFFS2 CFG" 0x00160000-0x00260000 : "JFFS2 LOG" 0x00260000-0x00930000 : "RUNTIME" 0x00930000-0x01000000 : "RUNTIME2" Netgear GS108Tv3 U-Boot: RTL838x# flshow =============== FLASH Partition Layout =============== Index Name Size Address ------------------------------------------------------ 0 LOADER 0xe0000 0xb4000000-0xb40dffff 1 BDINFO 0x10000 0xb40e0000-0xb40effff 2 SYSINFO 0x10000 0xb40f0000-0xb40fffff 3 JFFS2_CFG 0x100000 0xb4100000-0xb41fffff 4 JFFS2_LOG 0x100000 0xb4200000-0xb42fffff 5 RUNTIME1 0xe80000 0xb4300000-0xb517ffff 6 RUNTIME2 0xe80000 0xb5180000-0xb5ffffff ====================================================== Netgear GS108Tv3 OEM firmware (from show tech-support). This is how it is displayed - I assume mtd3 and mtd4 are named like the ZyXEL, with the firmware confusing itself with those space chars: ------------------ MTD Information ------------------ mtd0: 0xbd000000-0xbd0dffff "LOADER" mtd1: 0xbd0e0000-0xbd0effff "BDINFO" mtd2: 0xbd0f0000-0xbd0fffff "SYSINFO" mtd3: 0xbd100000-0xbd1fffff "JFFS2 mtd4: 0xbd200000-0xbd2fffff "JFFS2 mtd5: 0xbd300000-0xbe17ffff "RUNTIME" mtd6: 0xbe180000-0xbeffffff "RUNTIME2" Anyway, the names are pretty consistent acreoss vendors here. OpenWrt should alsow be consistent, whether we decide on 'bdinfo' or 'u-boot-env'. Bjørn
Hi Bjørn, Op zondag 28 februari 2021 om 17u03 schreef Bjørn Mork <bjorn@mork.no>: > Stijn Segers <foss@volatilesystems.org> writes: >> Op zondag 28 februari 2021 om 10u19 schreef Sander Vanheule >> <sander@svanheule.net>: >>> Hi Stijn >>> On Sat, 2021-02-27 at 23:05 +0100, Stijn Segers wrote: >>>> The Netgear GS108T v3 and its GS110TPP v1 sibling apparently >>>> label >>>> their u-boot environment parition 'bdinfo' instead of >>>> 'u-boot-env'. >>> Alternatively, the u-boot data partition could also just be renamed >>> to >>> 'u-boot-env', to match naming on other devices. Then, >>> uboot-envtools >>> appears to work without further modification. >> >> I don't know what is best practice when it comes the partition >> names. Is this something one is supposed to copy from the OEM image? >> Since those namings only influence behaviour within OpenWrt I >> suppose >> one could name them however one sees fit. >> >> I can change the naming in the DTS, but a separate entry would be >> needed either way, since the second u-boot partition of the GS108T >> v3 >> / GS110TPP v1 has different settings than the already existing >> matches >> (see second patch). So we might as well just stick with the DTS as >> it >> is now. >> >> Thoughts? > > I believe all(?) the realtek devices from all vendors use the same > partition names in stock firmware and u-boot. I would prefer that we > kept as close as possible to those names as well, to avoid unnecessary > confusion. But if we divert, like for the 'u-boot-env' partition, > then > we should at least use the same name for all the devices. > > > ZyXEL GS1900-10HP U-Boot: > > RTL838x# flshow > =============== FLASH Partition Layout =============== > Index Name Size Address > ------------------------------------------------------ > 0 LOADER 0x40000 0xb4000000-0xb403ffff > 1 BDINFO 0x10000 0xb4040000-0xb404ffff > 2 SYSINFO 0x10000 0xb4050000-0xb405ffff > 3 JFFS2_CFG 0x100000 0xb4060000-0xb415ffff > 4 JFFS2_LOG 0x100000 0xb4160000-0xb425ffff > 5 RUNTIME1 0x6d0000 0xb4260000-0xb492ffff > 6 RUNTIME2 0x6d0000 0xb4930000-0xb4ffffff > ====================================================== > > ZyXEL GS1900-10HP OEM firmware (from bootlog without 'quiet'): > > > Creating 7 MTD partitions on "Total SPI FLASH": > 0x00000000-0x00040000 : "LOADER" > 0x00040000-0x00050000 : "BDINFO" > 0x00050000-0x00060000 : "SYSINFO" > 0x00060000-0x00160000 : "JFFS2 CFG" > 0x00160000-0x00260000 : "JFFS2 LOG" > 0x00260000-0x00930000 : "RUNTIME" > 0x00930000-0x01000000 : "RUNTIME2" > > > Netgear GS108Tv3 U-Boot: > > RTL838x# flshow > =============== FLASH Partition Layout =============== > Index Name Size Address > ------------------------------------------------------ > 0 LOADER 0xe0000 0xb4000000-0xb40dffff > 1 BDINFO 0x10000 0xb40e0000-0xb40effff > 2 SYSINFO 0x10000 0xb40f0000-0xb40fffff > 3 JFFS2_CFG 0x100000 0xb4100000-0xb41fffff > 4 JFFS2_LOG 0x100000 0xb4200000-0xb42fffff > 5 RUNTIME1 0xe80000 0xb4300000-0xb517ffff > 6 RUNTIME2 0xe80000 0xb5180000-0xb5ffffff > ====================================================== > > > Netgear GS108Tv3 OEM firmware (from show tech-support). This is how > it > is displayed - I assume mtd3 and mtd4 are named like the ZyXEL, with > the > firmware confusing itself with those space chars: > > > ------------------ MTD Information ------------------ > > mtd0: 0xbd000000-0xbd0dffff "LOADER" > mtd1: 0xbd0e0000-0xbd0effff "BDINFO" > mtd2: 0xbd0f0000-0xbd0fffff "SYSINFO" > mtd3: 0xbd100000-0xbd1fffff "JFFS2 > mtd4: 0xbd200000-0xbd2fffff "JFFS2 > mtd5: 0xbd300000-0xbe17ffff "RUNTIME" > mtd6: 0xbe180000-0xbeffffff "RUNTIME2" > > > > > Anyway, the names are pretty consistent acreoss vendors here. OpenWrt > should alsow be consistent, whether we decide on 'bdinfo' or > 'u-boot-env'. > Thanks for sharing, I'll send in a patch to modify the Netgear DTSI. A quick git grep shows close to 500 hits for u-boot-env, and a meagre 14 for bdinfo. I think that picture is pretty clear. Cheers Stijn > > Bjørn > > _______________________________________________ > openwrt-devel mailing list > openwrt-devel@lists.openwrt.org > https://lists.openwrt.org/mailman/listinfo/openwrt-devel
diff --git a/package/boot/uboot-envtools/files/realtek b/package/boot/uboot-envtools/files/realtek index 9573e8944f..966c8509c8 100644 --- a/package/boot/uboot-envtools/files/realtek +++ b/package/boot/uboot-envtools/files/realtek @@ -18,6 +18,12 @@ zyxel,gs1900-10hp) [ -n "$idx" ] && \ ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x400" "0x10000" ;; +netgear,gs108t-v3|\ +netgear,gs110tpp-v1) + idx="$(find_mtd_index bdinfo)" + [ -n "$idx" ] && \ + ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x10000" "0x10000" + ;; *) idx="$(find_mtd_index u-boot-env)" [ -n "$idx" ] && \
The Netgear GS108T v3 and its GS110TPP v1 sibling apparently label their u-boot environment parition 'bdinfo' instead of 'u-boot-env'. Signed-off-by: Stijn Segers <foss@volatilesystems.org> --- package/boot/uboot-envtools/files/realtek | 6 ++++++ 1 file changed, 6 insertions(+)