New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ipq806x:TP-Link C2600: fix MAC address fetching for eth ports #4485
Conversation
The partitions that have compatible property set are skipped by mtd if they are not contained inside partitions property and this breaks fetching MAC address from "default-mac" partition. Fix this by defining all the partitions inside partitions property with compatible = "fixed-partitions" as nvmem requires the standard partitions scheme to work correctly. Fixes: FS#3945 Signed-off-by: Filip Matijević <filip.matijevic.pz@gmail.com> Reviewed-by: Ansuel Smith <ansuelsmth@gmail.com>
@adschm i think we can safely merge this |
PR tested and working as expected. Thanks! |
I will test and merge this with commit message adjustments later tonight. |
The only other device in ipq806x that does not have enclosing partitions node is db149. I wonder whether we should change this one too for consistency? |
Yes, I think we should. Also consider that this scheme is what we should
use in general as other are not supported (quoting the discussion on the
kernel mailing list when I proposed the nvmem changes)
Il Lun 30 Ago 2021, 00:42 Adrian Schmutzler ***@***.***> ha
scritto:
… The only other device in ipq806x that does not have enclosing partitions
node is db149. I wonder whether we should change this one too for
consistency?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#4485 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AE2ZMQWSFUW7CELX5Y6IOCTT7KZVBANCNFSM5C7DBF4A>
.
|
Would somebody be able to prepare a patch and test? |
prepare is ok... testing... i think nobody have a db149 dev board |
This issue also impacts the in-progress mpc85xx-based Aerohive HiveAP 370 (https://paste.c-net.org/ShroudPlank) and HiveAP 330, which both lack an enclosing: ...
|
We actually need to enclose the whole section of partitions in a `partitions { ... }` because we need to assign it a `compatible = "fixed-partitions";`; otherwise it won't be registered when bringing up MTD, as per these links: - https://forum.openwrt.org/t/tp-link-c2600-missing-default-mac-mtd-partition-in-snapshot/103945/6 - openwrt#4485
This patch adds support for the Aerohive HiveAP 370. It is very similar to the HiveAP-330. Specifications: * SoC: QorIQ P1020 e500v2 @ 800MHz * RAM: 512 MB * Flash: 1024 MB NAND flash * WiFi: Atheros QCA9890 (5 GHz) and AR9590 (2.4 GHz) * Ethernet: 2 x 1000Base-T (PoE) * LED: One combined activity LED (orange/white/off) * UART: 9600,8,N,1 RJ45 console Installation: * Installation via console serial tftp over ethernet + Connect to the RJ45-based serial console port (see https://openwrt.org/docs/techref/hardware/port.serial) + Use miniterm/putty etc to connect 9600,8,N,1 (miniterm.py /dev/ttyS0 --raw --eol CR) + Power AP370 with PoE or 12V DC barrel jack + Hit space to interupt the boot process + Enter uboot password AhNf?d@ta06 or administrator + Enter the following commands to boot from tftp image: dhcp; setenv serverip <TFTP server IPv4 address>; tftpboot 0x1000000 openwrt-mpc85xx-p1020-aerohive_hiveap-370-initramfs-kernel.bin; tftpboot 0x6000000 openwrt-mpc85xx-p1020-aerohive_hiveap-370-squashfs-fdt.bin; setenv owrt_boot_a 'nand read 0x6000000 0x00520000 0x40000\; nand read 0x1000000 0x560000 0x02000000\; bootm 0x1000000 - 0x6000000\;' saveenv; bootm 0x1000000 - 0x6000000; + Once booted, patch your u-boot installation so that it runs `owrt_boot_a` on boot by doing: . /lib/upgrade/patch-aerohive-uboot.sh; patch_aerohive_hiveap_370_uboot; + Finally, wget or scp over the sysupgrade file under /tmp, and sysupgrade with: sysupgrade -v /tmp/openwrt-mpc85xx-p1020-aerohive_hiveap-370-squashfs-sysupgrade.bin Notes: * The initial format of the ubi filesystem will take a long time, so please be patient. * A/B partitioning functionality has been dropped: both copies of U-boot run `owrt_boot_a` to boot. * There is no 'official' way to possible to revert to the original firmware, but this should be of no concern, as the device is EoL on the original FW: https://aerohive-www-cdn.aerohive.com/wp-content/uploads/Aerohive_EOS-EOL_AP370-AP390.pdf * The kernel partition contains a shimmed dtb to allow for the use of sysupgrade-tar. * The MAC address is pulled from NAND flash using nvmem We actually need to enclose the whole section of partitions in a `partitions { ... }` because we need to assign it a `compatible = "fixed-partitions";`; otherwise it won't be registered when bringing up MTD, as per these links: + https://forum.openwrt.org/t/tp-link-c2600-missing-default-mac-mtd-partition-in-snapshot/103945/6 + openwrt#4485 Signed-off-by: Martin Kennedy <hurricos@gmail.com>
The partitions that have compatible property set are skipped by mtd if
they are not contained inside partitions property and this breaks
fetching MAC address from "default-mac" partition.
Fix this by defining all the partitions inside partitions property with
compatible = "fixed-partitions" as nvmem requires the standard
partitions scheme to work correctly.
Fixes: FS#3945
Signed-off-by: Filip Matijević filip.matijevic.pz@gmail.com
Reviewed-by: Ansuel Smith ansuelsmth@gmail.com