|
本帖最后由 gently 于 2022-9-19 23:47 编辑
是这样的。本菜最近对openwrt甚是感兴趣,当然,在此之前也刷过数次的路由器,这次正好手边有一台4g的路由器,可以插手机卡上网,带两个RJ45网口,双频Wi-Fi,出差外地的时候还是很有用的。
经过一番摸索,发现系统是openwrt的,拆机后获得一些硬件信息:
SoC 是 MTK的MT7628AN
wifi芯片 mt7613ben (是不是wifi芯片?)
内存 128M
flash 64M
令人激动的是TTL排针竟然还保留在板子上,一顿乱试后,获得了正确的接线顺序,可以观察到输出信息。
我找了mt7628an同芯片,内存128M的固件,强制刷入后,可以成功启动,有个普遍的问题是只有2.4G的Wi-Fi,5G不支持。
我这台路由器的官方固件是lede 17.01的,本菜的想法有点过于简单,导出原固件的dts,然后修改openwrt相关文件(主要参考的这篇 https://www.daimajiaoliu.com/daima/479ac5b519003e0 ),编译了一个最新的22版固件,用binwalk查看格式好像一切正常
- DECIMAL HEXADECIMAL DESCRIPTION
- --------------------------------------------------------------------------------
- 0 0x0 uImage header, header size: 64 bytes, header CRC: 0x1898422F, created: 2022-09-16 16:50:46, image size: 2189034 bytes, Data Address: 0x80000000, Entry Point: 0x80000000, data CRC: 0xDA52C1EF, OS: Linux, CPU: MIPS, image type: OS Kernel Image, compression type: lzma, image name: "MIPS OpenWrt Linux-5.10.138"
- 64 0x40 LZMA compressed data, properties: 0x6D, dictionary size: 8388608 bytes, uncompressed size: 7351243 bytes
- 2189098 0x21672A Squashfs filesystem, little endian, version 4.0, compression:xz, size: 4706888 bytes, 1748 inodes, blocksize: 262144 bytes, created: 2022-09-16 16:50:46
复制代码
信心百倍的给刷进去了,然后就无限重启,一开始我以为是刷的不对,又重置出厂设置再刷了一次,仍然是这样的。。。终于想起来ttl打印信息,接上后如下
- console [ttyS0] enabled
- [ 0.814477] printk: console [ttyS0] enabled
- [ 0.822867] printk: bootconsole [early0] disabled
- [ 0.822867] printk: bootconsole [early0] disabled
- [ 0.833761] spi-mt7621 10000b00.spi: there is not valid maps for state default
- [ 0.841178] spi-mt7621 10000b00.spi: sys_freq: 191666666
- [ 0.856684] spi-nor spi0.0: gd25q128 (16384 Kbytes)
- [ 0.861804] 6 fixed-partitions partitions found on MTD device spi0.0
- [ 0.868335] Creating 6 MTD partitions on "spi0.0":
- [ 0.873201] 0x000000000000-0x000000030000 : "u-boot"
- [ 0.880873] 0x000000030000-0x000000040000 : "kpanic"
- [ 0.887288] 0x000000040000-0x000000050000 : "factory"
- [ 0.895654] 0x000000050000-0x000000fe0000 : "firmware"
- [ 0.902143] 0x000000fe0000-0x000000ff0000 : "bdinfo"
- [ 0.910341] 0x000000ff0000-0x000001000000 : "reserve"
- [ 0.971467] rt3050-esw 10110000.esw: port 1 link up
- [ 0.976490] rt3050-esw 10110000.esw: mediatek esw at 0xb0110000, irq 25 initialized
- [ 0.984384] mtk_soc_eth 10100000.ethernet: generated random MAC address 62:93:1d:3a:c9:3d
- [ 0.993402] mtk_soc_eth 10100000.ethernet eth0: mediatek frame engine at 0xb0100000, irq 5
- [ 1.003056] NET: Registered protocol family 10
- [ 1.011661] Segment Routing with IPv6
- [ 1.015613] NET: Registered protocol family 17
- [ 1.020230] 8021q: 802.1Q VLAN Support v1.8
- [ 1.027258] /dev/root: Can't open blockdev
- [ 1.031438] VFS: Cannot open root device "(null)" or unknown-block(0,0): error -6
- [ 1.039093] Please append a correct "root=" boot option; here are the available partitions:
- [ 1.047602] 1f00 192 mtdblock0
- [ 1.047607] (driver?)
- [ 1.054253] 1f01 64 mtdblock1
- [ 1.054256] (driver?)
- [ 1.060881] 1f02 64 mtdblock2
- [ 1.060884] (driver?)
- [ 1.067527] 1f03 15936 mtdblock3
- [ 1.067531] (driver?)
- [ 1.074176] 1f04 64 mtdblock4
- [ 1.074180] (driver?)
- [ 1.080804] 1f05 64 mtdblock5
- [ 1.080808] (driver?)
- [ 1.087448] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
- [ 1.095829] Rebooting in 1 seconds..
复制代码
正常的启动信息如下:
- [ 0.663345] console [ttyS0] enabled
- [ 0.663345] console [ttyS0] enabled
- [ 0.670333] bootconsole [early0] disabled
- [ 0.670333] bootconsole [early0] disabled
- [ 0.679178] ralink_priv_init
- [ 0.682728] spi-mt7621 10000b00.spi: sys_freq: 191666666
- [ 0.692698] m25p80 spi32766.0: using chunked io (size=32)
- [ 0.698256] m25p80 spi32766.0: gd25q128 (16384 Kbytes)
- [ 0.703500] 6 ofpart partitions found on MTD device spi32766.0
- [ 0.709422] Creating 6 MTD partitions on "spi32766.0":
- [ 0.714636] 0x000000000000-0x000000030000 : "u-boot"
- [ 0.721486] 0x000000030000-0x000000040000 : "kpanic"
- [ 0.728467] 0x000000040000-0x000000050000 : "factory"
- [ 0.735430] 0x000000050000-0x000000fe0000 : "firmware"
- [ 0.792451] 2 uimage-fw partitions found on MTD device firmware
- [ 0.798497] 0x000000050000-0x000000190000 : "kernel"
- [ 0.805190] 0x000000190000-0x000000fe0000 : "rootfs"
- [ 0.812153] mtd: device 5 (rootfs) set to be root filesystem
- [ 0.818064] 1 squashfs-split partitions found on MTD device rootfs
- [ 0.824337] 0x000000e30000-0x000000fe0000 : "rootfs_data"
- [ 0.831738] 0x000000fe0000-0x000000ff0000 : "bdinfo"
- [ 0.913572] 0x000000ff0000-0x000001000000 : "reserve"
- [ 0.930324] rt3050-esw 10110000.esw: link changed 0x00
- [ 0.936133] mt7621_wdt 10000120.watchdog: Initialized
- [ 0.942691] NET: Registered protocol family 10
- [ 0.950951] NET: Registered protocol family 17
- [ 0.955551] bridge: automatic filtering via arp/ip/ip6tables has been deprecated. Update your scripts to load br_netfilter if you need this.
- [ 0.968410] 8021q: 802.1Q VLAN Support v1.8
- [ 0.976127] mtk_soc_eth 10100000.ethernet eth0: mediatek frame engine at 0xb0100000, irq 5
- [ 0.994682] VFS: Mounted root (squashfs filesystem) readonly on device 31:5.
- [ 1.002833] Freeing unused kernel memory: 168K
- [ 2.847880] init: Console is alive
- [ 2.851548] init: - watchdog -
- ......
- ......
复制代码
看意思是分区表错误了,我搜索了很多资料,然后不知道该如何继续了,特来请教。还望路过的大大指导一二
我的疑惑是 编译op的时候,添加了一个新硬件,除了dts要注意之外,还有哪些需要修改的地方?或者我这个dts导出来根本就是错误的?
附件我放上dts文件
望各位路过的大大不吝赐教,特别感谢!
我自己研究了很长时间了,对openwrt也是非常感兴趣,目前仍然不得其解,再次感谢
|
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有账号?立即注册
×
|