Zum Inhalt springen
Inhalt
NokiaAktueller Aufbau nicht bestätigt

Nokia XG-040G-MD

OpenWrt ToH

1 × 2.5 GbE · 3 × GbE · 512 MB RAM — Prüfen Sie die Revision auf dem Typenschild, das passende Image und den Wiederherstellungsweg.

Quelle snapshot 2026-11-07

OpenWrt-Kompatibilität

Identischer Name bedeutet nicht notwendigerweise identisches Hardware. Stellen Sie Revision, Flash-Medium und Kapazität vor dem Kauf oder der Installation sicher. Kompatibilitäts- und Firmware-Links aus dem Import wurden nicht unabhängig überprüft.

Hardware

Technische Daten

SoC-Familie
Unbekannt
CPU-Kerne
4
CPU-Uhr
1200 MHz
Drahtlos
Unbekannt
Gigabit Ethernet
3
2.5 GbE
1
USB
1x 2.0, 1x 3.0
Bootloader
U-Boot
Stromversorgung
12 VDC, 1A via barrel
Abmessungen und Gewicht
Unbekannt
Original-Quelleneintrag · alle Felder erhalten

Bevor Sie wählen

OpenWrt-Kompatibilität

Aktueller Aufbau nicht bestätigt
Veröffentlichung in der Quellenliste
snapshot
Erste unterstützte Freigabe
Unbekannt
Hardware-Revision
Revision nicht spezifiziert

Ein offizieller ToH-Eintrag legt Katalogeinschluss fest. Aktuelle Release-Builds, Snapshots und Installationsbedingungen werden separat erfasst; EOL oder unvollständige Build-Verifikation versteckt das Gerät nicht.

Aktuelle Builds geprüft: 2026-11-07

Der ToH-Aufzeichnung fehlen genügend Firmware-Identitätsinformationen, um einen aktuellen Build zu bestätigen. Dies stellt nicht sicher, dass das Gerät nicht unterstützt wird.

Einbaubedingungen · Installationspfad nicht überprüft

Ein offizieller Build legt keinen Installationspfad von Ihrem aktuellen OEM-Firmware aus. Prüfen Sie die genaue Revision, den Bootloader und die Voraussetzungen vor dem Kauf oder der Installation.

Offizielle Baubeweise

Der ToH-Aufzeichnung fehlen genügend Firmware-Identitätsinformationen, um einen aktuellen Build zu bestätigen. Dies stellt nicht sicher, dass das Gerät nicht unterstützt wird.

Quellenbezogene Einschränkungen
[ "XG-PON" ]

Folgen den offiziellen Gerätebezogenen Anweisungen und Prüfsummenanleitungen. GeeksMeta überprüft die Bilder nicht und führt die Installationsschritte nicht aus.

OpenWrt installieren

Unvollständige Anleitung. Die dokumentierten Schritte decken den Ablauf nur teilweise ab.

Passen Sie die Revision an und lesen Sie zuerst den Status der Anleitung. Bewahren Sie den Wiederherstellungs-Port und die Eingabebedingungen auf Ihrem Computer auf, bevor Sie entscheiden, ob Sie ein Bild schreiben.

Nokia XG-040G-MD: OpenWrt-Unterstützung und Installation

Quellen und Offline-Beweise

Auszüge werden lokal mit diesem Gerät gespeichert. Eine lesbare Quelle überprüft keinen Installationspfad; Informationen auf Modellebene gelten nicht für jede Hardware-Revision.

Einige Quellen gesammelt; Überprüfung bleibt unvollständig · Kontrolliert: 2026-11-13

RAM · Verifiziert · Informationen auf Modellebene

512 MB
- RAM : 512 MiB DDR4 (ESMT M16U4G16256A-QLB)
Quelle verknüpft ↧

Flash-Komponenten · Verifiziert · Informationen auf Modellebene

256 MB NAND
- Flash : SPI-NAND 256 MiB (SkyHigh ML02G300WHI00)
Quelle verknüpft ↧

CPU/SoC · Verifiziert · Exakte Hardware-Revision

Airoha AN7581DT
{"CPU":"Airoha AN7581DT"}
Quelle verknüpft ↧

CPU-Kerne · Verifiziert · Exakte Hardware-Revision

4
{"CPU Cores_numcores":"4"}
Quelle verknüpft ↧

CPU-Uhr · Verifiziert · Exakte Hardware-Revision

1200 MHz
{"CPU MHz":"1200"}
Quelle verknüpft ↧

RAM · Verifiziert · Exakte Hardware-Revision

512 MB
{"RAM MB":"512"}
Quelle verknüpft ↧

Bootloader · Verifiziert · Exakte Hardware-Revision

U-Boot
{"Bootloader":"U-Boot"}
Quelle verknüpft ↧

Stromversorgung · Verifiziert · Exakte Hardware-Revision

12 VDC, 1A via barrel
{"Power Supply":"12 VDC, 1A via barrel"}
Quelle verknüpft ↧

Serielle Konsole · Verifiziert · Exakte Hardware-Revision

Yes
{"Serial":"Yes"}
Quelle verknüpft ↧

Serielle Einstellungen · Verifiziert · Exakte Hardware-Revision

115200 / 8N1
{"Serial connection parameters":"115200 / 8N1"}
Quelle verknüpft ↧

Laufende Spannung · Verifiziert · Exakte Hardware-Revision

3.3
{"Serial connection voltage":"3.3"}
Quelle verknüpft ↧
Suchverlauf
  • "Nokia" "Valyrian" (product images OR photos OR exterior)
  • "Nokia" "Valyrian" (OpenWrt OR firmware OR teardown) site:youtube.com/watch
  • "Nokia" "XG-040G-MD" (teardown OR 拆机 OR disassembly OR review)
  • "Nokia" "XG-040G-MD" (product images OR photos OR exterior)
  • "Nokia" "XG-040G-MD" (photos OR rear OR front OR PCB OR hardware)
  • "Nokia" "XG-040G-MD" (review OR teardown OR disassembly OR installation OR 拆机 OR 刷机) -site:openwrt.org -site:github.com
  • "Nokia" "XG-040G-MF" (photos OR rear OR front OR PCB OR hardware)
  • "Nokia" "XG-040G-MF" (review OR teardown OR disassembly OR installation OR 拆机 OR 刷机) -site:openwrt.org -site:github.com
  • "Nokia" "Valyrian" (product OR images OR photos OR характеристики)
  • "Nokia" "Valyrian" (teardown OR 拆解 OR 刷机 OR spec OR manual) -site:github.com -site:openwrt.org
  • "Nokia" "Valyrian" (review OR setup OR installation OR recovery) site:youtube.com/watch
  • "Nokia" "XG-040G-MD" (product OR images OR photos OR характеристики)
  • "Nokia" "XG-040G-MD" (teardown OR 拆解 OR 刷机 OR spec OR manual) -site:github.com -site:openwrt.org
  • "Nokia" "XG-040G-MD" (review OR setup OR installation OR recovery) site:youtube.com/watch
  • "Nokia" "XG-040G-MF" (product OR images OR photos OR характеристики)
  • "Nokia" "XG-040G-MF" (teardown OR 拆解 OR 刷机 OR spec OR manual) -site:github.com -site:openwrt.org
  • "Nokia" "XG-040G-MD" (specifications OR firmware OR OpenWrt OR recovery)
OpenWrt ToH: Nokia XG-040G-MD · Ursprünglich snapshot

Offizielle Dokumentation · Gebündelt snapshot

Ursprüngliche Quelle URL: https://openwrt.org/toh.json ↗

Lizenz: Lizenz nicht geprüft

Offline-Auszug

{
  "deviceId": "nokia:nokia_xg-040g-md",
  "brand": "Nokia",
  "model": "XG-040G-MD",
  "version": null,
  "hardware": {
    "cpu": "Airoha AN7581DT",
    "chipsetKey": null,
    "cores": 4.0,
    "clockMhz": 1200.0,
    "ramMb": 512.0,
    "ramRaw": "512",
    "flash": [
      {
        "capacityMb": 256.0,
        "type": "nand"
      }
    ],
    "ethernetPorts": {
      "fastEthernet": null,
      "gbe": 3.0,
      "gbe2_5": 1.0,
      "gbe5": null,
      "gbe10": null
    },
    "wifiGeneration": null,
    "wifi2_4": "-",
    "wifi5": "-",
    "wifi6": "-",
    "wifiChipsets": [
      "-"
    ],
    "wifiDriver": [
      "none"
    ],
    "modem": "GPON",
    "usb": [
      "1x 2.0",
      "1x 3.0"
    ],
    "bootloader": "U-Boot"
  },
  "support": {
    "currentRelease": "snapshot",
    "sinceRelease": null,
    "installationMethods": [
      "see devicepage"
    ],
    "recoveryMethods": [
      "see devicepage"
    ],
    "unsupportedFunctions": [
      "XG-PON"
    ],
    "installationWarnings": null,
    "recoveryWarnings": null
  }
}

SHA-256 7244828c75389871f260e624e2778ebd6c3c68447672fee74d5aa33a69ceef5f

OpenWrt ToH · Nokia XG-040G-MD · Gesammelt

Offizielle Dokumentation · Browser-Erfassung · Kontrolliert: 2026-11-11

Ursprüngliche Quelle URL: https://openwrt.org/toh.json ↗

Lizenz: CC BY-SA 4.0 ↗

Offline-Auszug

{"Device ID":"nokia:nokia_xg-040g-md"}
{"Bootloader":"U-Boot"}
{"Brand":"Nokia"}
{"CPU":"Airoha AN7581DT"}
{"CPU Cores_numcores":"4"}
{"CPU MHz":"1200"}
{"Device Page":"toh:nokia:xg-040g-md"}
{"Ethernet 100M ports":"-"}
{"Ethernet 1Gbit ports":"3"}
{"Ethernet 2.5Gbit ports":"1"}
{"Flash MB":["256NAND"]}
{"Model":"XG-040G-MD"}
{"Power Supply":"12 VDC, 1A via barrel"}
{"RAM MB":"512"}
{"Serial":"Yes"}
{"Serial connection parameters":"115200 / 8N1"}
{"Serial connection voltage":"3.3"}
{"Supported Current Rel":"snapshot"}
{"Supported Since Commit":"https://git.openwrt.org/?p=openwrt/openwrt.git;a=commit;h=a6ecb09985fa7c14bae1c1bad7d42495737bc0ba"}
{"USB ports":["1x 2.0","1x 3.0"]}
{"WLAN 2.4GHz":"-"}
{"WLAN 5.0GHz":"-"}
{"WLAN 6.0GHz":"-"}

SHA-256 42e364a4e75601e621f192ee4a9c47a3439a23e9fc3a2c5a4bd6e30cb3e3ef3b

让20块 的诺基亚贝尔XG-040G-MD 2.5G光猫 an7581 512M内存 256M nand 瞬间变高大上的openwrt 扩容内存2G 刷机 – 数码罗记 · Gesammelt

Gemeinschaftsdebatte · Browser-Erfassung · Kontrolliert: 2026-11-13

Ursprüngliche Quelle URL: https://godsun.pro/blog/xg-040g-md.html ↗

Lizenz: Lizenz nicht geprüft

Offline-Auszug

让20块 的诺基亚贝尔XG-040G-MD 2.5G光猫 an7581 512M内存 256M nand 瞬间变高大上的openwrt 扩容内存2G 刷机
28 9 月, 2025
路由器

👁 6619

下面信息来自 恩山大神所发 我只是收集管理做笔记!

开操作笔记

超级用户:CMCCAdmin
超级密码:aDm8H%MdA
移到定制版的超级密码 回复光猫后都一样。

登录后进入光猫设置界面在家庭存储功能中把FTP SMA 这两个功能打开(这一步非常重要)

在超级用户的状态下访问 http://192.168.1.1/system.cgi?telnet 开启telnet功能

使用 telnet 协议连接光猫 通过普通用户登录(光猫背面铭牌处useradmin 密码每台机不一样看标签 注意大小写)后以 su user_ftp(有些光猫可能为su useradmin_ftp  取决于光猫背面铭牌处的信息) 身份登录 ,密码和普通账户密码相同
输入su获取root权限

$
$su user_ftp
su: unknown user user_ftp   这里提示的就是这个用户名不对
$su useradmin_ftp           这是正确的下面会提示输入密码 还是标签的用户密码 输入完就是#了 
Password: 
#

 

修改SN(必须三条都修改)
ritool set YPSerialNum NBEL5A01B711 (要修改的SN)
ritool set MfrID NBEL (要修改的SN的前四位,应该是厂商代码)
ritool set G984Serial 5A01B711 修改的SN的8位)
修改MAC
ritool set MACAddress 3c:bd:69:6b:6d:7a (修改MAC地址为3c:bd:69:6b:6d:7a)
修改root密码
cfgcli -s InternetGatewayDevice.DeviceInfo.X_CT-COM_ServiceManage.SuPassword aDm8H%MdA (修改ro

[…]

修改设备基本信息
ritool set MfrID HWTC (将生产厂家标识NBEL 改为HWTC)
ritool set Mnemonic G-140W-ME (设备型号改为G-140W-ME)
恢复出厂设置
cfgcli -r

重启设备
reboot 或 reset

开启EPON和GPON自适应(待验证)
cfgcli -s InternetGatewayDevice.X_ASB_COM_PON_MODE.EnableAutoPon true

查看当前连接数
cat /proc/sys/net/netfilter/nf_conntrack_count
查看最大值连接数
cat /proc/sys/net/netfilter/nf_conntrack_max

修改最大值连接线(推荐300000)
vi nf_conntrack_max

查看系统
查看所有设置:ritool dump
查看内存:cat /proc/meminfo
查看当前挂载分区:cat /proc/mounts
硬件中断统计:cat /proc/interrupts
查看负载:cat /proc/loadavg
                  cat /proc/stat
驱动程序设备ID: cat /proc/devices

常用配置网页:
选择省份界面 http://192.168.1.1/opid_setting.cgi
固件升级路径:http://192.168.1.1/upgrade.cgi
插件配置卸载路径:http://192.168.1.1/upgrade_plugin.cgi?
Upnp功能开启:http://192.168.1.1/upnp.cgi?
usb备份、恢复:http://192.168.1.1/usb.cgi?backup
TR069 RMS平台认证:http://192.168.1.1/tr69.cgi
AWIFI激活管理平台:http://192.168.1.1/awifi_config.cgi
设备码等信息查看:http://192.168.1.1/bucpe.cgi
设定password密码:http://192.168.1.1/gpon_config.cgi
设定LAN端IPV6: http://192.168.1.1/lan_cu.cgi
配置文件查看:http://192.168.1.1/dumpdatamodel.cgi

图片欣赏

信息标签 没WIFI的 XG-PON OUN 12V-1A 10Gpon

侧边2个USB口 一个USB3一个2

很标准的接口, DC 12V,一个开关,1个2.5G 3个千兆

下面系统状态图片

这个拿回来是注册过的需要按reset 重置

重置后

需要当猫使用的 大部分地区只需要填入 loid 注册码 保存,然后 新建一个 连接 做 光猫拨号或桥接即可!

简单看一下 系统发你去和其他信息

上面代码需要弄什么复制什么

192.168.1.1/dumpdatamodel.cgi
#cat /proc/mtd
top
拆机看看

顺手改了1G RAM

NAND有256M刷OP也勉强够用了

刷机

今天2025.10.1大佬已经放出来刷机包和 uboot了。在此感谢大佬无私奉献!

大佬链接 https://nwrt.kuroneko.host/flashdocs/XG-040G-MD.html

刷入的图片欣赏

这个改了1G

这个改了2G

下面我用大佬的固件自己刷一次机, 由于大佬用的是拆机的接ttl刷的我懒得 拆换个方法

直接开启telnet 基本上 啥也能干了!

这个uboot 主要就是写入 mtd0 的 bootloader 。 完整512K 我们直接dd 写入把! 怎么把 文件传到路由呢。 那当然找个U盘放进去。。 也可以顺便备份一下 全盘数据 那怕挂壁了也能恢复!但可能就要编程器!

废话不多说 主要写入 uboot即可 进入ubootweb刷入固件了! 和其他路由都一样

首先第一步 你看上面 先开启 telent 然后登录

省的你们找 我复制下来。

懒得拆机的就开启 telent 和一个U盘

已开启直接把下载的tcboot.bin 放到U盘的根目录或者你能找到的目录,最好是 fat32或ext4之类的格式 U盘不需要大 大于1M即可(不备份的话))!没有自己想办法 搞个读卡器之类的用内存卡。

既然开启了 telent 就用 终端登录 telent

这里MobaXterm_Personal_或 SecureCRT 选择 telnet 协议 地址猫的, 完了输入刚开启telent的用户名 密码, 如果多次错误限制5分钟,直接重启再进。! 用过 linux的都知道, 账号是显示,密码是没显示 自己觉得 没输错就回车! 或者粘贴 回车! 不行多练几次!

因为刷机过于简单 多几句废话 刷机需谨慎 刷砖了不要找我!

刷uboot 其实就是写入 开头的 分区mtd0 bootloader这个分区,所以 方法有很多种 ,

但这里 我用dd 写入

写入前一般最好是清除一下分区。

进入U盘 我的U盘格式化成SANXIN了 下面操作都是在 这里!

根据自己U盘目录进入!

做一个 全0XFF的512kb文件来覆盖 一下 mtd0分区 以防万一!

yes $'377' | head -c 524288 > all_ff.bin

然后写入 all_ff.bin覆盖 mtd0分区的 bootloader

dd if=all_ff.bin of=/dev/mtd0 bs=4k

然后正式写入 uboot 文件不改命是 tcboot.bin 如果改了 你就按你改的来修改指令

dd if=tcboot.bin of=/dev/mtd0 bs=4k conv=notrunc

对这图有没有报错,认真检查 错了估计就砖的!一样 在下一步

md5sum /dev/mtd0 && md5sum tcboot.bin

当然为了安全起见 还是做了最好的查验!对比一下md5.

PS: 有此人nand 有坏道在前面的 刷入 ubooot后对比 md5和写入前的不一样 大概率就是这个可能,md5不对的大概率启动不了,恢复原来的。或更换nand 再刷!

如果已经刷死 救起来也不难 拆机接上TTL 然后看 救砖一步步来 我没救过就不写了。。 找其他吧

下面引用大佬的写的

需要用的上去大佬博客看 https://nwrt.kuroneko.host/flashdocs/XG-040G-MD.html#%F0%9F%94%84-%E5%88%B7%E5%9B%9E%E5%8E%9F%E5%8E%82

以上所有操作都是进入了 U盘的目录下!!! 不然你就在指令输入所以绝对路径!

都没问题了 拔电,再通电1秒钟左右捅rest 长按,大概几秒会

[…]

也就是不用设置IP 但我习惯就设置,你们懒的可以试试看实在不行再设置。)

到了 webui 就选入估计刷即可, 大概分来钟uboot的web应该还是在砖的 不用管刷新一下 应该见到 登录 页面了

刷机固件和uboot 大佬网站有,但看是挂的 度娘盘 我转挂这边把方便下,

这是改了1G内存的 原版的话512M使用率应该高点

内存可以硬改 1G 和2G 应该 ddr4 单晶 颗粒 都通用吧 。我换镁光D8cjx,晶存 海力士的都可以, 规格合适就行。

内存可以找个不要的机顶盒看 一般S905L3的 双颗粒 都是 单1G的内存 有动手可以自己改。

固件下载

https://p.godsun.pro/%E8%B7%AF%E7%94%B1%E5%99%A8/%E5%85%89%E7%8C%AB/XG-040G-MD

需要登录直接 github登录即可!

!!! 再此 感谢大神 今天是10月1 国庆中秋快乐!!

有什疑问和错误可以留言。。

2026-10-15 更新:刷 QWRT 后 PON 能用了(R26.10.14 / 内核 6.18.51)

重点先说:这一版 PON 是活的 —— 刷完它还是台光猫,LOID / 注册码填进去就能注册拨号,不用像以前刷 OpenWrt 那样只能当个路由器、光猫功能直接丢掉(前面还得再挂一台猫才能上网)。下面几个页面直接上图,不多解释:

系统状态:Nokia XG-040G-MD (UBI),QWRT R26.10.14 / LuCI openwrt-25.12,内核 6.18.51,ARMv8 四核(CpuMark 18721);lan1 跑 2.5GbE、lan2 跑 1GbE;内存 1.69 / 1.89 GiB(89%),overlay 只用 1.07 MiB / 184.68 MiB
PON 配置:线路 LINE0(pon0)在、XG-PON OMCI(omci0)在 —— LOID 和 LOID 密码填这一页就是当光猫用;EPON OAM 段留空;下面还能把 bosa 板级数据(UBI 256 KiB)直接上传写进 NAND
硬件身份:PON 序列号 NBELB45F9FD6、板载 MAC 50:3d:7f

SHA-256 96972bc14a20cc08159d4dd39c3cb2a0bcd9ed4b4145b8002558a98c38d320cf

airoha: add support for Nokia XG-040G-MD · Gesammelt

Offizielle Dokumentation · Lokale Git-Eingabe · Kontrolliert: 2026-11-13

Ursprüngliche Quelle URL: https://github.com/openwrt/openwrt/commit/a6ecb09985fa7c14bae1c1bad7d42495737bc0ba ↗

Verfasser: Mikhail Zhilkin

Lizenz: Lizenz nicht geprüft

Offline-Auszug

airoha: add support for Nokia XG-040G-MD

This commit adds support for Nokia XG-040G-MD XG-PON ONU.

Specification
-------------
- SoC       : Airoha AN7581DT Quad-core ARM Cortex-A53 1.2 GHz
- RAM       : 512 MiB DDR4 (ESMT M16U4G16256A-QLB)
- Flash     : SPI-NAND 256 MiB (SkyHigh ML02G300WHI00)
- WLAN      : -
- Ethernet  : 1x 2500 Mbps (LAN1, Airoha EN8811HN)
              3x 10/100/1000 Mbps (LAN2-LAN4, Airoha AN7581 SoC switch)
- XG-PON    : ECONET EN7572AN, SLIC: MaxLinear PEF32001VSV12
- USB       : 1x USB 3.0 (with power control via gpio)
              1x USB 2.0 (with power control via gpio)
- Buttons   : Reset
- LEDs      : 1x Power (green, gpio-controlled)
              1x WAN (green, gpio-controlled)
              1x WAN (red, gpio-controlled)
              4x LAN (green, gpio-controlled)
              2x USB (green)
- Power     : 12 VDC, 1 A

Unsupported functions and limitations
-------------------------------------
1. XG-PON won't be available after installing OpenWrt.

Installation (stock layout, UART)
---------------------------------
1. Attach UART and run picocom:
   picocom -b 115200 --send-cmd "sb -vv" /dev/ttyUSB0
2. Interrupt boot process by pressing Enter key to enter u-boot
   Username: telecomadmin
   Password: nE7jA%5m
3. Start download firmware via ymodem protocol (via UART):
   loady 0x85000000
4. Press Ctrl + A then Ctrl + S in the picocom terminal (if you are using
   a different terminal, please refer to the documentation) to start
   upload OpenWrt initramfs image using ymodem protocol. Enter local path
   to the OpenWrt initramfs image and press Enter.
5. Load OpenWrt initramfs image from the memory:
   bootm 0x85000000
5. Sysupgrade with OpenWrt sysupgrade image

Alternative for the p.3-4. Load and boot OpenWrt initramfs from tftp IP
192.168.1.254:
   tftpboot 0x85000000 192.168.1.254:openwrt-initramfs-uImage.itb
   bootm 0x85000000
I was unable to download the file without errors, the bootloader network
driver is very unstable. Perhaps you will be more fortunate.

Backup and installation (stock layout, without UART)
----------------------------------------------------
1. Unplug Fiber
2. Make ONU Reset
3. Navigate: http://192.168.1.1
   Username: CMCCAdmin
   Password: aDm8H%MdA
4. Go to Apps -> Home Storage -> FTP and check Enable FTP
5. Go to Apps -> Home Storage -> SAMBA Sharing and check Enable Samba
6. Visit the following URL to open Telnet:
   http://192.168.1.1/system.cgi?telnet
7. Telnet account login:
   Username: user
   Password: <see ONU label>
8. Get root privileges:
   su user_ftp
   Password: <see ONU label>
9. Copy 'squashfs-factory-kernel.bin', 'squashfs-factory-rootfs.bin' and
   'OpenWrt.mtd2.u-boot-env.bin' (backup of 'u-boot-env' partition from
   the another Nokia XG-040G-MD with OpenWrt installed)
9. Attach USB flash drive and check the new dir in /mnt:
   ls /mnt
10. Change current dir to the flash drive (change D to your flash drive
   label):
   cd /mnt/D
11. Make backup:
   for i in 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16; \
   do cat /dev/mtd$i | gzip -9 > mtd$i.bin.gz; done
12. Check image sizes:
   ls -l | awk '{if(NR>1) {$5=sprintf("0x%x", $5); print}}'
13. Write images:
   mtd_debug erase /dev/mtd0 0x60000 0x20000
   mtd_debug write /dev/mtd0 0x60000 0x20000 OpenWrt.mtd2.u-boot-env.bin
   mtd_debug erase /dev/mtd14 0x0 0x2880000
   mtd_debug write /dev/mtd14 0x0 0x3e6cfc squashfs-factory-kernel.bin
   mtd_debug erase /dev/mtd11 0x0 0x80e0000
   mtd_debug write /dev/mtd11 0x0 0x440000 squashfs-factory-rootfs.bin
   0x3e6cfc - size of your 'squashfs-factory-kernel.bin'
   0x440000 - size of your 'squashfs-factory-rootfs.bin'
14. Reboot:
   reboot

Recovery (stock layout)
-----------------------
The same as described in Installation (UART).

Return to stock (stock layout)
------------------------------
1. Follow the steps 1-5 of the Installation (UART)
2. Once in OpenWrt upload you backup to the /tmp dir of the router:
   scp -O mtd16.bin.gz [email protected]:/tmp
5. Connect to the router using ssh and install kmod-mtd-rw:
   apk update && apk add kmod-mtd-rw
   insmod mtd-rw i_want_a_brick=1
6. Unlock bootloader:
   mtd unlock bootloader
7. Restore stock:
   zcat /tmp/mtd16.bin.gz | mtd write - all_flash
8. Reboot:
   reboot

Notes (OpenWrt U-Boot layout)
-----------------------------
1. Only devices with SkyHigh ML02G300WHI00 spi-nand are supported. Driver
   for FudanMicro FM25G02B is absent in current U-Boot.
2. A simple installation without serial console is also possible using a
   fork of @dangowrt's UBI Installer
Link: https://github.com/dangowrt/owrt-ubi-installer

Installation / recovery (OpenWrt U-Boot layout)
-----------------------------------------------
1.  Make sure that you have 'bosa' and 'ri' partitions mtd backups before
    you start
2.  Place OpenWrt images on the tftp server (IP: 192.168.1.254):
    openwrt-airoha-an7581-nokia_xg-040g-md-ubi-bl31-uboot.fip
    openwrt-airoha-an7581-nokia_xg-040g-md-ubi-initramfs-recovery.itb
    openwrt-airoha-an7581-nokia_xg-040g-md-ubi-preloader.bin
3.  Attach serial console and start terminal with XMODEM support:
    picocom -b 115200 --send-cmd "sx -vvX" /dev/ttyUSB0
4.  Push reset button and power on the router
5.  Press 'x', then 'Ctrl + A' and 'Ctrl + S'
6.  Paste full path to the bl2 image:
    'openwrt-airoha-an7581-nokia_xg-040g-md-ubi-preloader.bin'
7.  Wait until the file is downloaded and the following prompt appears:
    Press x to load BL31 + U-Boot FIP
8.  Press 'x', then 'Ctrl + A' and 'Ctrl + S'
9.  Paste full path to the fip image:
    'openwrt-airoha-an7581-nokia_xg-040g-md-ubi-bl31-uboot.fip'
10. Wait until the file is downloaded, u-boot will prepare ubi partition
    automatically
11. Wait for U-Boot menu
12. Run 'Load BL31+U-Boot FIP via TFTP then write to NAND'
13. Run 'Load BL2 preloader via TFTP then write to NAND'
14. Run 'Boot system via TFTP'
15. Once in OpenWrt perform standard sysupgrade
16. Once in OpenWrt upload 'bosa' and 'ri' partitions mtd backups to the
    /tmp dir using scp protocol
17. Check ID of the UBI volumes:
    ubinfo -d 0 -N bosa | grep "Volume ID"
    ubinfo -d 0 -N ri | grep "Volume ID"
18. Write backups according to the volume ID:
    ubiupdatevol /dev/ubi0_2 /tmp/bosa.bin
    ubiupdatevol /dev/ubi0_3 /tmp/ri.bin
19. Reboot:
    reboot

Stock layout
------------
+-------+------------+---------+---------+
| mtd   | label      | start   | size    |
+-------+------------+---------+---------+
| mtd0  | bootloader | 0       | 80000   |
| mtd1  | romfile    | 80000   | 40000   |
| mtd14 | nsb_master | c0000   | 2880000 |
| mtd15 | nsb_slave  | 2940000 | 2880000 |
| mtd6  | bosa       | 51c0000 | 40000   |
| mtd7  | ri         | 5200000 | 40000   |
| mtd8  | flag       | 5240000 | 40000   |
| mtd9  | flagback   | 5280000 | 40000   |
| mtd10 | config     | 52c0000 | a00000  |
| mtd11 | data       | 5cc0000 | 80e0000 |
| mtd12 | oopsfs     | dda0000 | 400000  |
| mtd13 | log        | e1a0000 | a00000  |
+-------+------------+---------+---------+

USB power control
-----------------
Disable (both ports):
   echo disabled > /sys/devices/platform/usb-power/state
Enable (both ports):
   echo enabled > /sys/devices/platform/usb-power/state

UART
----
A view from the back side of the PCB:
   ------------------------
   |       GND RX TX
   |        X  X  X
Connection parameters:
115200, 8N1, 3.3V

MAC addresses
-------------
+---------+-------------------+-----------+
|         | MAC               | Algorithm |
+---------+-------------------+-----------+
| LAN     | 04:xx:xx:xx:xx:0d | label     |
| WAN     | 04:xx:xx:xx:xx:0e | label + 1 |
+---------+-------------------+-----------+
The LAN MAC (hex) was found in 'ri', 0x3e

Signed-off-by: Mikhail Zhilkin <[email protected]>
Link: https://github.com/openwrt/openwrt/pull/23569
Signed-off-by: Hauke Mehrtens <[email protected]>

SHA-256 94f80b252ef3c863d6fafebcb3a2c8ecd82179439b0177b2ff4b651297059fa8

Nachweise und Quellen

WireGuard Beweise

Keine zuverlässigen WG-Daten
Die Quellenproben · Daten & Methodik

Quelle verknüpft

Nachweise und Quellen

nokia:nokia_xg-040g-md · 2026-11-07. Quellengebunden bedeutet nicht, dass sie unabhängig überprüft werden.

Bildquelle ↗

Quelle des Markenlogos ↗ · Simple Icons · Nokia · rasterized · Siehe Quelle für Rechte und Lizenz

Überprüfte Metadaten

cpu · Verifiziert · 2026-11-11
Ursprünglicher Datensatz: "Airoha AN7581DT"
Überprüfter Wert: "Airoha AN7581DT"

cores · Verifiziert · 2026-11-11
Ursprünglicher Datensatz: 4
Überprüfter Wert: 4

flash · Verifiziert · 2026-11-13
Ursprünglicher Datensatz: [{"type":"nand","capacityMb":256}]
Überprüfter Wert: [{"type":"nand","capacityMb":256}]

Quelle verknüpft ↗

ramMb · Verifiziert · 2026-11-11
Ursprünglicher Datensatz: 512
Überprüfter Wert: 512

Quelle verknüpft ↗

serial · Verifiziert · 2026-11-11
Ursprünglicher Datensatz:
Überprüfter Wert: "Yes"

clockMhz · Verifiziert · 2026-11-11
Ursprünglicher Datensatz: 1200
Überprüfter Wert: 1200

bootloader · Verifiziert · 2026-11-11
Ursprünglicher Datensatz: "U-Boot"
Überprüfter Wert: "U-Boot"

powerSupply · Verifiziert · 2026-11-11
Ursprünglicher Datensatz:
Überprüfter Wert: "12 VDC, 1A via barrel"

serialVoltage · Verifiziert · 2026-11-11
Ursprünglicher Datensatz:
Überprüfter Wert: "3.3"

serialParameters · Verifiziert · 2026-11-11
Ursprünglicher Datensatz:
Überprüfter Wert: "115200 / 8N1"

Original-Quelleneintrag · alle Felder erhalten

Ursprünglicher Quelltext (Originalsprache)

{
  "CPU": "Airoha AN7581DT",
  "JTAG": null,
  "VLAN": "Yes",
  "Brand": "Nokia",
  "FCCID": null,
  "GPIOs": null,
  "Model": "XG-040G-MD",
  "Modem": "GPON",
  "RAM MB": "512",
  "Serial": "Yes",
  "Switch": "Airoha AN7581DT",
  "Target": "airoha",
  "CPU MHz": "1200",
  "Outdoor": "No",
  "Picture": [
    "media:nokia:xg-040g-md.jpg"
  ],
  "Version": null,
  "Comments": null,
  "Flash MB": [
    "256NAND"
  ],
  "Bluetooth": "-",
  "Device ID": "nokia:nokia_xg-040g-md",
  "LED count": "7",
  "SFP ports": "-",
  "Subtarget": "an7581",
  "USB ports": [
    "1x 2.0",
    "1x 3.0"
  ],
  "Bootloader": "U-Boot",
  "Git search": [
    "XG-040G-MD"
  ],
  "SATA ports": "-",
  "SFP+ ports": "-",
  "Audio ports": [
    "-"
  ],
  "Device Page": "toh:nokia:xg-040g-md",
  "Device Type": "Router",
  "Phone ports": [
    "-"
  ],
  "Video ports": [
    "-"
  ],
  "WLAN 2.4GHz": "-",
  "WLAN 5.0GHz": "-",
  "WLAN 6.0GHz": "-",
  "WLAN driver": [
    "none"
  ],
  "Availability": null,
  "Button count": "1",
  "Forum search": [
    "XG-040G-MD"
  ],
  "Power Supply": "12 VDC, 1A via barrel",
  "WLAN 60.0GHz": "-",
  "WikiDevi URL": [
    "https://wikidevi.wi-cat.ru/Nokia_XG-040G-MD"
  ],
  "WLAN Comments": "No WLAN",
  "WLAN Hardware": [
    "-"
  ],
  "Where available": null,
  "Comment recovery": null,
  "Comments AV ports": "-",
  "CPU CoresNumcores": "4",
  "Recovery method(s)": [
    "see devicepage"
  ],
  "Detachable Antennas": "-",
  "Ethernet 100M ports": "-",
  "Supported Since Rel": null,
  "Comment installation": null,
  "Ethernet 1Gbit ports": "3",
  "Ethernet 5Gbit ports": "-",
  "OWrt Forum Topic URL": null,
  "Package architecture": "aarch64_cortex-a53",
  "Ethernet 10Gbit ports": "-",
  "Supported Current Rel": "snapshot",
  "Unsupported Functions": [
    "XG-PON"
  ],
  "Comments network ports": "Airoha EN8811H 2.5Gbe Phy",
  "Ethernet 2.5Gbit ports": "1",
  "Firmware OEM Stock URL": null,
  "Installation method(s)": [
    "see devicepage"
  ],
  "Supported Since Commit": "https://git.openwrt.org/?p=openwrt/openwrt.git;a=commit;h=a6ecb09985fa7c14bae1c1bad7d42495737bc0ba",
  "Comments USB SATA ports": "-",
  "OEM Device Homepage URL": null,
  "Serial connection voltage": "3.3",
  "Firmware OpenWrt Install URL": null,
  "Firmware OpenWrt Upgrade URL": null,
  "Serial connection parameters": "115200 / 8N1",
  "Firmware OpenWrt snapshot Install URL": [
    "http://https://downloads.openwrt.org/snapshots//targets/airoha/an7581/openwrt-airoha-an7581-nokia_xg-040g-md-initramfs-uImage.itb"
  ],
  "Firmware OpenWrt snapshot Upgrade URL": [
    "http://https://downloads.openwrt.org/snapshots//targets/airoha/an7581/openwrt-airoha-an7581-nokia_xg-040g-md-squashfs-sysupgrade.bin"
  ]
}
Importierte Firmware-Links · nicht überprüft

Rohe URLs können veraltet, fehlerhaft oder Verzeichnisse sein. Verwenden Sie die offizielle Geräteseite und den Selektor, um das Bild zu überprüfen.

{
  "forum": [],
  "openwrtWiki": "https://openwrt.org/toh/nokia/xg-040g-md",
  "purchaseUrls": [],
  "stockFirmware": [],
  "firmwareInstall": [],
  "firmwareUpgrade": [],
  "firmwareSnapshotInstall": [
    "http://https://downloads.openwrt.org/snapshots//targets/airoha/an7581/openwrt-airoha-an7581-nokia_xg-040g-md-initramfs-uImage.itb"
  ],
  "firmwareSnapshotUpgrade": [
    "http://https://downloads.openwrt.org/snapshots//targets/airoha/an7581/openwrt-airoha-an7581-nokia_xg-040g-md-squashfs-sysupgrade.bin"
  ],
  "vendorHardwareDatasheet": []
}

Verwandte Lektüre

Kommentare