Repository navigation
Conversation
|
paste bootlog. Move the nand patch to generic and sorry but some commit are not acceptable... Also where did you get that user and password? |
Password seems to be a common one used by Nokia/Bell ONUs, I believe it was initially cracked by bruteforcing the passwd hashes |
eaff04a to
ad71e7d
Compare
Ok.
Ok.
I has spilt to multi PR. See the first line.
From Internet. This is the default password of CTC (China Telecom)'s device. But who found this? Hard to know. |
0fe7f5c to
70e26da
Compare
|
|
||
| /** | ||
| * struct spinand_ondie_ecc_conf - private SPI-NAND on-die ECC engine structure | ||
| -- |
There was a problem hiding this comment.
Refresh patches using this command:
make target/linux/refresh -j1 V=sc
|
Since #20482 got merged, I think this patch set just needs to be rebased and then would be ready for merging? This device uses Skyhigh NAND which has built in bad block management so it doesn't use any of the airoha BMT code |
ac5ffc7 to
4be5604
Compare
It's seem like that |
So this PR adds support for the entire XG-x40G family of devices? If they are identical, it might be useful to add alternative names so that they can be found in the firmware selector. |
|
mark. |
|
Nice work. |
Cairongzeng
left a comment
There was a problem hiding this comment.
Suggestion: Please use the exact device model name for the DTS file.
4be5604 to
b02c18c
Compare
|
[ 1.607251] airoha-npu 1e900000.npu: Direct firmware load for airoha/en7581_npu_rv32.bin failed with error -2 |
same issue on Nokia Bell XG-040G-MD |
This is a known issue, rootfs hasnt been mounted yet when the npu driver starts. When it stops appearing that means that it has successfully loaded the firmware. |
|
@hurrian thanks, that matches what I saw on AN7581 as well (driver probes before rootfs/firmware is available). For Nokia Bell XG-040G-MD support I addressed the early Reference: |
1edd8b0 to
78427f7
Compare
| }; | ||
|
|
||
| partition@5240000 { | ||
| label = "flag"; |
There was a problem hiding this comment.
should a boot count script be used to reset the counter in the flag partition?
There was a problem hiding this comment.
The installation in commit message has changed bootcmd. So I think this is uncessaary ?
162b75a to
5c084d8
Compare
For now, I can say YES. It supports all. |
5c084d8 to
25c0146
Compare
25c0146 to
bd257c2
Compare
46ab0ac to
7f69367
Compare
openwrt-ai
left a comment
There was a problem hiding this comment.
Commit checks
5c3de3b"WiP: airoha: an7581: xg-140g-md: more spaces" —WiP:prefix on a commit aimed at merging, and the subject ("more spaces") does not match the diff: this commit addsCONFIG_LEDS_GPIO=yandCONFIG_MTD_VIRT_CONCAT=ytoconfig-6.12and restructures large portions ofan7581-xg-140g-md.dts, alongside whitespace. Please drop theWiP:tag and either rename to reflect the real content or squash intof5e57da.f5e57da"airoha: an7581: add support for Bell XG-140G-MD / XG-040G-MD / XG-140G-TF / XG140G-Y003" — per.github/llm-review-rules.md, a new-device commit must have three sections (Hardware, Flash instructions, MAC address layout). The MAC address layout section is missing. Also: typowhcih-->which; subject spells the fourth variantXG140G-Y003(no hyphen) but the makefile/PR-body useXG-140G-Y003— pick one and align all sites.7f693679"airoha: an7581: xg-140g-md: support upgrade" — subject is fine, but the diff also rewritesplatform_check_imagefor all boards on the subtarget (regressing the existing unconditionalreturn 0behaviour for the EVBs and nokia,valyrian — see inline comment). The body should either describe that broader change or the hunk should be limited to adding the new board.
Generated by Claude Code
| @@ -237,6 +238,7 @@ CONFIG_MTD_UBI_BEB_LIMIT=20 | |||
| CONFIG_MTD_UBI_BLOCK=y | |||
| CONFIG_MTD_UBI_NVMEM=y | |||
| CONFIG_MTD_UBI_WL_THRESHOLD=4096 | |||
| CONFIG_MTD_VIRT_CONCAT=y | |||
There was a problem hiding this comment.
These two kernel-config additions (CONFIG_LEDS_GPIO=y, CONFIG_MTD_VIRT_CONCAT=y) are introduced in commit 5c3de3b "WiP: airoha: an7581: xg-140g-md: more spaces". The subject promises whitespace-only changes but the diff makes real kconfig + DTS structural changes. Please drop the WiP: prefix and squash/rename so the subject describes what actually changes (kconfig enablement for the new board), or fold these hunks into the device-introduction commit (f5e57da).
Also, kmod-leds-gpio is already pulled in via the airoha Makefile DEFAULT_PACKAGES so it is normally =m; making CONFIG_LEDS_GPIO=y here forces it built-in across all an7581 boards. Was that intentional? If you only need it for this device, leaving it as the default =m is enough.
Generated by Claude Code
|
|
||
| led-1 { | ||
| label = "blue:pon"; | ||
| color = <LED_COLOR_ID_BLUE>; |
There was a problem hiding this comment.
label = "blue:pon"; (and red:los, blue:internet, blue:fxs, blue:usb1, blue:usb2 below) is the deprecated <color>:<function> LED label syntax. The node already carries the modern color = <LED_COLOR_ID_BLUE>; + function = LED_FUNCTION_STATUS; properties, so the legacy label line should be removed (this matches what you already did for led_pwr on line 35, where the old label is commented out). Same applies to lines 51, 58, 65, 72, 79.
| led-1 { | |
| label = "blue:pon"; | |
| color = <LED_COLOR_ID_BLUE>; | |
| led-1 { | |
| color = <LED_COLOR_ID_BLUE>; | |
| function = LED_FUNCTION_STATUS; | |
| gpios = <&en7581_pinctrl 18 GPIO_ACTIVE_LOW>; | |
| }; |
Because PON/LOS/INTERNET/FXS/USB1/USB2 all collapse to LED_FUNCTION_STATUS, sysfs will get duplicate *:blue:status names. Consider differentiating with per-LED function-enumerator (or a free-form function = "pon"; / "los"; / "internet"; etc. since there is no matching LED_FUNCTION_* constant for those names — the rule in .github/llm-review-rules.md permits the string fallback).
Generated by Claude Code
| label = "u-boot-env"; | ||
| reg = <0x7c000 0x2000>; | ||
|
|
||
| // nvmem-layout { | ||
| // compatible = "u-boot,env"; | ||
| // }; | ||
| }; |
There was a problem hiding this comment.
Dead/commented code in a freshly added file. Either implement the nvmem-layout (the U-Boot env partition is the natural source for MAC addresses on this device — see also the missing "MAC address layout" section in the commit message) or drop the commented-out block. Same for the /* &mtd_data */ placeholder in the virtual_flash.devices list a few lines below and the // label = "blue:power"; line on line 35.
| label = "u-boot-env"; | |
| reg = <0x7c000 0x2000>; | |
| // nvmem-layout { | |
| // compatible = "u-boot,env"; | |
| // }; | |
| }; | |
| partition@7c000 { | |
| label = "u-boot-env"; | |
| reg = <0x7c000 0x2000>; | |
| }; |
Generated by Claude Code
|
|
||
| port@4 { | ||
| status = "okay"; | ||
| label = "lan4"; |
There was a problem hiding this comment.
No nvmem-cells / mac-address wiring anywhere in this DTS, so every interface (eth0, eth1, the four switch LAN ports) will come up with a kernel-random MAC on every boot. Please add MAC-address handling — typically NVMEM cells pulled from a stable partition (u-boot-env, romfile, or a factory partition) and a nvmem-cells = <&macaddr_xxx_NN>; + nvmem-cell-names = "mac-address"; on &gdm1 and &gdm4 (and per switch port if they should differ).
This is also why the new-device-support rule in .github/llm-review-rules.md requires a "MAC address layout" section in the commit message — the current commit body only covers Hardware + Installation, please add the third section describing where each interface's MAC comes from.
Generated by Claude Code
| DEVICE_ALT1_VENDOR := Bell | ||
| DEVICE_ALT1_MODEL := XG-140G-TF | ||
| DEVICE_ALT2_VENDOR := Bell | ||
| DEVICE_ALT2_MODEL := XG-140G-Y003 |
There was a problem hiding this comment.
nit: cross-file naming inconsistency. The makefile registers the Y003 variant as XG-140G-Y003 (with hyphen between XG and 140G), but the PR title and commit-message subject spell it XG140G-Y003 (no hyphen, see commit f5e57da subject and PR body header). Please align the three spellings — either fix the makefile to XG140G-Y003 or fix the title/commit subject to XG-140G-Y003, whichever matches the silk-printed model name.
Generated by Claude Code
| platform_check_image() { | ||
| local board=$(board_name) | ||
|
|
||
| case "$board" in | ||
| gemtek,w1700k-ubi) | ||
| return 0 | ||
| ;; | ||
| bell,xg-140g-md) | ||
| nand_do_platform_check "$board" "$1" | ||
| return $? | ||
| ;; | ||
| esac | ||
|
|
There was a problem hiding this comment.
After this change platform_check_image returns 1 (with the "not yet supported" message) for every board not listed in the case — including airoha,an7581-evb, airoha,an7581-evb-emmc-eagle, airoha,an7581-evb-emmc-kite, and nokia,valyrian. Previously platform_check_image returned 0 unconditionally, so sysupgrade worked on those boards. The fallback *) nand_do_upgrade "$1" in platform_do_upgrade below becomes unreachable as a side effect.
If the intent is only to add bell,xg-140g-md support, please add the other existing boards to the case (or restore the unconditional return 0 default) so this PR doesn't regress sysupgrade on the EVBs and on nokia,valyrian.
Generated by Claude Code
| model = "Bell XG-140G-MD"; | ||
| compatible = "bell,xg-140g-md", "airoha,an7581", "airoha,en7581"; |
There was a problem hiding this comment.
nit: trailing whitespace ("XG140G-Y003" vs "XG-140G-Y003" aside, this device covers four model variants per the makefile but model here is the single string "Bell XG-140G-MD"). Since the four siblings share GPIO/PCB and the commit message acknowledges they're family-equivalent, consider whether the user-visible model (or the DT compatible) should mention that it's the shared XG-x40G board — at minimum confirm the chosen compatible = "bell,xg-140g-md" is the silk-printed PCB designation and not one of the BOM variants, since DT compatibles are hard to change later.
Generated by Claude Code
7f69367 to
38095b7
Compare
openwrt-ai
left a comment
There was a problem hiding this comment.
Commit checks
9b5f7c8"airoha: an7581: add support for Bell XG-140G-MD / XG-040G-MD / XG-140G-TF / XG140G-Y003" — per.github/llm-review-rules.md, a new-device commit needs three sections (Hardware specification, Flash instructions, MAC address layout). The MAC address layout section is still missing. Also still present: typowhcih-->which; the subject and body spell the fourth variantXG140G-Y003(no hyphen) whiletarget/linux/airoha/image/an7581.mkusesXG-140G-Y003(DEVICE_ALT2_MODEL) — pick one spelling and align all sites.a29ec5b"WiP: airoha: an7581: xg-140g-md: more spaces" — theWiP:prefix should not land in a merge-bound series, and the subject ("more spaces") does not describe the diff: this commit addsCONFIG_MTD_VIRT_CONCAT=ytoconfig-6.12and restructures the flash layout inan7581-xg-140g-md.dts(introducing thevirtual_flashmtd-concat node and moving the kernel/ubi partitions into it). Drop theWiP:tag and either retitle to reflect the real change or squash into9b5f7c8.38095b7"airoha: an7581: xg-140g-md: support upgrade" — the diff also rewritesplatform_check_imagefor the whole subtarget, regressing sysupgrade for the EVB and nokia,valyrian boards (see inline comment). The subject only mentions adding upgrade support for the new board; either describe this broader change or scope the hunk to the new board only.
Generated by Claude Code
|
|
||
| echo "Sysupgrade is not yet supported on $board." | ||
| return 1 |
There was a problem hiding this comment.
This regresses sysupgrade for the other an7581 boards. Previously platform_check_image was an unconditional return 0, so airoha,an7581-evb and nokia,valyrian passed the check and were upgraded via the *) default in platform_do_upgrade. With this rewrite only gemtek,w1700k-ubi and bell,xg-140g-md are handled and every other board now hits return 1 ("Sysupgrade is not yet supported"), so the EVB and nokia,valyrian can no longer be flashed. Add a default case that preserves the old pass-through (e.g. a *) branch returning 0, or nand_do_platform_check), or scope this commit to only add the bell,xg-140g-md case without removing the unconditional pass for the rest.
Generated by Claude Code
This should be easier to read Signed-off-by: Ziyang Huang <[email protected]>
…G-TF / XG140G-Y003
This commit adds support for Bell XG-040G-MD / XG-140G-TF. They use same
PCB whcih has "XG-140G-MD" silk printing, but different BOM. XG140G-Y003
is a costdown version of them.
Hardware
--------
SoC: Airoha AN7581
RAM: TSEMIC TN4G16D3CSER-EK (512MB DDR3 1866MHz)
Flash: SkyHigh S35ML02G300 (256M)
ETH: Airoha AN7581 GbE Switch (eth0: LAN2, LAN3, LAN4)
EcoNet EN8811H 2.5GbE PHY (eth1: LAN1)
PON Phy: EcoNet EN7572AN
SLIC: MaxLinear DXS101 (SLLX3)
USB: USB2.0 x 1
USB3.0 x 1
Installation
------------
1. Connect uart to PC, press enter to login into U-Boot console.
Username: telecomadmin
Password: nE7jA%5m
2. Run the following command to setup bootcmd.
setenv bootcmd 'flash read 0x000c0000 0x880000 ${loadaddr} && bootm'
saveenv
3. Use a TFTP client to PUT "*-squashfs-factory.bin" to "192.168.1.1".
4. Run the following command to flash.
flash erase 0x000c0000 0x02880000
flash write 0x000c0000 ${filesize} ${fileaddr}
5. Reboot.
reset
Signed-off-by: Ziyang Huang <[email protected]>
Signed-off-by: Ziyang Huang <[email protected]>
Signed-off-by: Ziyang Huang <[email protected]>
38095b7 to
b27424f
Compare
openwrt-ai
left a comment
There was a problem hiding this comment.
Commit checks
d1a0ab0"airoha: an7581: add support for Bell XG-140G-MD / XG-040G-MD / XG-140G-TF / XG140G-Y003" — per.github/llm-review-rules.md, a new-device commit must contain three sections (Hardware specification, Flash instructions, MAC address layout). The MAC address layout section is missing. Also: typowhcih->which; the subject/body spell the fourth variantXG140G-Y003(no hyphen) whiletarget/linux/airoha/image/an7581.mkusesXG-140G-Y003— align all sites.f1a2115"WiP: airoha: an7581: xg-140g-md: more spaces" — theWiP:prefix should not land in a merge-bound series, and the subject ("more spaces") does not describe the diff: it addsCONFIG_MTD_VIRT_CONCAT=ytoconfig-6.18and restructures the flash layout inan7581-xg-140g-md.dts(introducing thevirtual_flashmtd-concat node and moving the kernel/ubi partitions into it). Drop theWiP:tag and either retitle to reflect the real change or squash intod1a0ab0.b27424f"airoha: an7581: xg-140g-md: support upgrade" — the diff also rewritesplatform_check_image()for the whole subtarget, regressing sysupgrade for the EVB andnokia,valyrianboards (see inline comment). The subject only mentions adding upgrade support for the new board; either describe this broader change or scope the hunk to the new board only.
Generated by Claude Code
| echo "Sysupgrade is not yet supported on $board." | ||
| return 1 |
There was a problem hiding this comment.
This regresses sysupgrade for the other boards on this subtarget. Previously platform_check_image() unconditionally return 0 and platform_do_upgrade()'s * case ran nand_do_upgrade, so airoha_an7581-evb, -evb-emmc-eagle, -evb-emmc-kite and nokia,valyrian could all sysupgrade. With this new default they now fall through to return 1 here ("Sysupgrade is not yet supported"), breaking those boards.
Consider keeping a permissive default (or an explicit case for the previously-working boards) instead of failing for everything not named here. For example, let unlisted boards keep the prior behaviour:
| echo "Sysupgrade is not yet supported on $board." | |
| return 1 | |
| esac | |
| return 0 | |
| } |
Generated by Claude Code
| }; | ||
|
|
||
| led-1 { | ||
| label = "blue:pon"; |
There was a problem hiding this comment.
The deprecated label = "<color>:<function>"; syntax should be dropped now that color/function are set — led_pwr above (led-0) correctly comments out its label, but led-1 keeps it. Same issue on led-2 ("red:los"), led-3 ("blue:internet"), led-4 ("blue:fxs"), led-5 ("blue:usb1") and led-6 ("blue:usb2"); please remove the label line from each for consistency.
| label = "blue:pon"; | |
| led-1 { |
Generated by Claude Code
| DEVICE_ALT1_VENDOR := Bell | ||
| DEVICE_ALT1_MODEL := XG-140G-TF | ||
| DEVICE_ALT2_VENDOR := Bell | ||
| DEVICE_ALT2_MODEL := XG-140G-Y003 |
There was a problem hiding this comment.
nit: this spells the variant XG-140G-Y003 (with hyphen), but the commit subject and message body write it XG140G-Y003 (no hyphen). Pick one spelling and align the commit subject/body, PR title and this line.
Generated by Claude Code
|
I merged the other PR from #23569. Maybe create an other PR adding some extra features you want like adding the other devices. |
Base on: #20470 #20482 #20483 #20484 #21460
Bell XG-040G-MD/XG-140G-TFuse same PCB whcih hasXG-140G-MDsilk printing, but different BOM.XG140G-Y003is a costdown version of them.Hardware
Installation
Connect uart to PC, press enter to login into U-Boot console.
Username:
telecomadminPassword:
nE7jA%5mRun the following command to setup bootcmd.
Use a TFTP client to PUT
*-squashfs-factory.binto192.168.1.1.Run the following command to flash.
Reboot.