恩山无线论坛

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
查看: 668|回复: 26

DW33D使用nand固件刷机方法-breed下操作

[复制链接]
发表于 2021-2-22 12:39 | 显示全部楼层 |阅读模式
本帖最后由 260821425 于 2021-2-22 13:14 编辑

设备:DW33D
参考教程:来自论坛shanpo
采用编译源码:来自github-coolsnowwolf/lede
刷写平台:hackpascal-Breed
经过一晚摸索现最简单的方法:
刷机前请仔细阅读上文参考教程!
刷机有风险,砖不负责,救砖自行寻找教程
一、进入breed,更新到最新breed(若还是原厂没有刷机的状态请按照其他教程刷入breed)
二、电脑开启http服务器并设置好详细参数(ip一般为192.168.1.x,修改端口为80,请关闭电脑系统网络防火墙!
并将编译好的带squashfs-factory.bin名称固件放进web文件夹
屏幕截图 2021-02-22 120737.png

三、使用putty用telnet进行连接
屏幕截图 2021-02-22 120924.png

四、breed环境变量及启动设置
1、设置环境变量
在telnet下依次输入:
  1. envconf 0x6000000 0x20000
复制代码
输入完上条命令后输入reset重启生效
  1. env set network.ipaddr 192.168.1.1
  2. env set network.netmask 255.255.255.0
  3. env set autoboot.disabled 0
  4. env set autoboot.delay 5
  5. env set autoboot.command "boot flash bank 0 0x0"
  6. env save
复制代码

五、刷写固件
在telnet下等待完成依次输入:
  1. wget http://192.168.1.x/openwrt-ath79-nand-domywifi_dw33d-squashfs-factory.bin
复制代码
  1. flash bank 0 erase 0x0 0xd00000
复制代码
  1. flash bank 0 write 0x0 0x80000000 0xd00000
复制代码
完成后输入reset重启即可如有错误请坛友指出,附上网盘链接:网盘链接 密码:
游客,如果您要查看本帖隐藏内容请回复
固件采用lean源码编译,不带其他特殊软件
注意:直接刷机文件必须是文件名包含factory的固件文件。reset重启就ok了。在breed下刷机就无所谓之前采用的是什么固件,但必须强调不能用breed web控制台更新NAND固件。

顺便说说如何返回原厂固件
ssh连接到路由器,修改uboot启动参数:
fw_setenv bootcmd "tftp 0x84000000 dw33d.bin;bootm 0x84000000 ||bootm 0x9fe80000”
重启后uboot将启动NOR闪存上的固件,如果NOR闪存上是原厂固件,启动不会成功,因为原厂固件将nand闪存作为rootfs_data分区,而NAND闪存上已有的数据对原厂固件来说是脏数据;但不要紧,当启动卡住时只需按reset键5秒,重启就行了。刷入原厂固件的方法还是先tftp加载内存固件,用scp命令上传固件到路由器,然后刷入:
scp firmware.bin root@192.168.1.1:/tmp
ssh root@192.168.1.1
mtd erase /dev/mtd2
mtd write /tmp/firmware /dev/mtd2
在我编译的ath79固件中,mtd2分区名是oem-firmware。


我的恩山、我的无线 The best wifi forum is right here.
发表于 2021-2-22 13:39 | 显示全部楼层
看看学习下,内容不全,手机app看不全
来自安卓客户端来自安卓客户端
我的恩山、我的无线 The best wifi forum is right here.
发表于 2021-2-22 13:44 | 显示全部楼层
./scripts/feeds update -a && ./scripts/feeds install -a
我的恩山、我的无线 The best wifi forum is right here.
发表于 2021-2-22 16:02 | 显示全部楼层
学习下 谢谢楼主
我的恩山、我的无线 The best wifi forum is right here.
发表于 2021-2-23 19:58 | 显示全部楼层
学习下 谢谢楼主
我的恩山、我的无线 The best wifi forum is right here.
发表于 2021-2-23 22:50 | 显示全部楼层
Boot and Recovery Environment for Embedded Devices
Copyright (C) 2020 HackPascal <hackpascal@gmail.com>
Build date 2020-10-09 [git-676bfd4]
Version 1.1 (r1286)

DRAM: 256MB
Platform: Qualcomm Atheros QCA9558 rev 0
Board: DomyWiFi DW33D
Clocks: CPU: 720MHz, DDR: 600MHz, AHB: 200MHz, Ref: 40MHz
Environment variables @ 06000000 on flash bank 0, size 00020000
Flash: Micron MT29F1G08ABAEAWP (128MB) on ath79-nand
Flash: Macronix MX25L12835E (16MB) on ath79-spi
ag71xx-eth: MAC address is invalid, using default settings.
ag71xx-eth: Using MAC address 00:13:74:00:00:01
Waiting for auto-negotiation complete ... OK
eth0: Qualcomm Atheros QCA8337 rev 2

Network started on eth0, inet addr 192.168.1.1, netmask 255.255.255.0

Press any key to interrupt autoboot ... 0

Trying to boot firmware from 0x00000000 in flash bank 0 ...
Reading data into memory ...
U-Boot firmware image header detected.
    Image Name:   MIPS OpenWrt Linux-4.19.138
    Data Size:    1961987 Bytes
    Load Address: 80060000
    Entry Point:  80060000
Uncompressing data (LZMA) ... done.
Flushing cache ... done.

Starting kernel at 0x80060000...

[    0.000000] Linux version 4.19.138 (runner@fv-az224-687) (gcc version 8.4.0 (OpenWrt GCC 8.4.0 r1-80acc25f1)) #0 Mon Feb 22 13:51:29 2021
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU0 revision is: 00019750 (MIPS 74Kc)
[    0.000000] MIPS: machine is DomyWifi DW33D
[    0.000000] SoC: Qualcomm Atheros QCA9558 ver 1 rev 0
[    0.000000] Determined physical RAM map:
[    0.000000]  memory: 10000000 @ 00000000 (usable)
[    0.000000] Initrd not found or empty - disabling initrd
[    0.000000] Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes.
[    0.000000] Primary data cache 32kB, 4-way, VIPT, cache aliases, linesize 32 bytes
[    0.000000] Zone ranges:
[    0.000000]   Normal   [mem 0x0000000000000000-0x000000000fffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000000000000-0x000000000fffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x000000000fffffff]
[    0.000000] random: get_random_bytes called from start_kernel+0x98/0x4a4 with crng_init=0
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 64960
[    0.000000] Kernel command line: console=ttyS0,115200n8 rootfstype=squashfs,jffs2
[    0.000000] Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)
[    0.000000] Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
[    0.000000] Writing ErrCtl register=00000000
[    0.000000] Readback ErrCtl register=00000000
[    0.000000] Memory: 251864K/262144K available (4661K kernel code, 171K rwdata, 1068K rodata, 1196K init, 206K bss, 10280K reserved, 0K cma-reserved)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] NR_IRQS: 51
[    0.000000] CPU clock: 720.000 MHz
[    0.000000] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 5309056796 ns
[    0.000007] sched_clock: 32 bits at 360MHz, resolution 2ns, wraps every 5965232126ns
[    0.008685] Calibrating delay loop... 359.42 BogoMIPS (lpj=718848)
[    0.043590] pid_max: default: 32768 minimum: 301
[    0.048934] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.056321] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.068460] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[    0.079349] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.086266] pinctrl core: initialized pinctrl subsystem
[    0.092524] NET: Registered protocol family 16
[    0.122055] workqueue: max_active 576 requested for napi_workq is out of range, clamping between 1 and 512
[    0.134877] clocksource: Switched to clocksource MIPS
[    0.141535] NET: Registered protocol family 2
[    0.147187] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 4096 bytes)
[    0.155805] TCP established hash table entries: 2048 (order: 1, 8192 bytes)
[    0.163603] TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
[    0.170712] TCP: Hash tables configured (established 2048 bind 2048)
[    0.177911] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.184463] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.191757] NET: Registered protocol family 1
[    0.199401] Crashlog allocated RAM at address 0x3f00000
[    0.206603] workingset: timestamp_bits=14 max_order=16 bucket_order=2
[    0.219521] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.226057] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.249242] io scheduler noop registered
[    0.253654] io scheduler deadline registered (default)
[    0.261630] pinctrl-single 1804002c.pinmux: 544 pins, size 68
[    0.269014] Serial: 8250/16550 driver, 1 ports, IRQ sharing disabled
[    0.276738] console [ttyS0] disabled
[    0.280785] 18020000.uart: ttyS0 at MMIO 0x18020000 (irq = 9, base_baud = 2500000) is a 16550A
[    0.290408] console [ttyS0] enabled
[    0.290408] console [ttyS0] enabled
[    0.297829] bootconsole [early0] disabled
[    0.297829] bootconsole [early0] disabled
[    0.312473] m25p80 spi0.0: mx25l12805d (16384 Kbytes)
[    0.317679] 4 fixed-partitions partitions found on MTD device spi0.0
[    0.324136] Creating 4 MTD partitions on "spi0.0":
[    0.329006] 0x000000000000-0x000000040000 : "u-boot"
[    0.334752] 0x000000040000-0x000000050000 : "u-boot-env"
[    0.340887] 0x000000050000-0x000000ff0000 : "oem-firmware"
[    0.347215] 0x000000ff0000-0x000001000000 : "art"
[    0.356758] nand: device found, Manufacturer ID: 0x2c, Chip ID: 0xf1
[    0.363241] nand: Micron NAND 128MiB 3,3V 8-bit
[    0.367844] nand: 128 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
[    0.375550] Scanning device for bad blocks
[    0.383500] random: fast init done
[    0.467870] 3 fixed-partitions partitions found on MTD device ar934x-nand
[    0.474766] Creating 3 MTD partitions on "ar934x-nand":
[    0.480083] 0x000000000000-0x000000500000 : "kernel"
[    0.485846] 0x000000500000-0x000006000000 : "ubi"
[    0.491644] 0x000006000000-0x000008000000 : "oem-backup"
[    0.498601] libphy: Fixed MDIO Bus: probed
[    0.820639] libphy: ag71xx_mdio: probed
[    0.827391] switch0: Atheros AR8337 rev. 2 switch registered on mdio.0
[    1.412082] ag71xx 19000000.eth: connected to PHY at mdio.0:00 [uid=004dd036, driver=Atheros AR8216/AR8236/AR8316]
[    1.423205] eth0: Atheros AG71xx at 0xb9000000, irq 4, mode: rgmii
[    1.744473] ag71xx 1a000000.eth: connected to PHY at fixed-0:00 [uid=00000000, driver=Generic PHY]
[    1.754157] eth1: Atheros AG71xx at 0xba000000, irq 5, mode: sgmii
[    1.762647] NET: Registered protocol family 10
[    1.771973] Segment Routing with IPv6
[    1.775838] NET: Registered protocol family 17
[    1.780443] 8021q: 802.1Q VLAN Support v1.8
[    1.787345] PCI host bridge /ahb/pcie-controller@180c0000 ranges:
[    1.793584]  MEM 0x0000000010000000..0x0000000011ffffff
[    1.798895]   IO 0x0000000000000000..0x0000000000000000
[    1.804371] PCI host bridge to bus 0000:00
[    1.808561] pci_bus 0000:00: root bus resource [mem 0x10000000-0x11ffffff]
[    1.815543] pci_bus 0000:00: root bus resource [io  0x0000]
[    1.821209] pci_bus 0000:00: root bus resource [??? 0x00000000 flags 0x0]
[    1.828100] pci_bus 0000:00: No busn resource found for root bus, will use [bus 00-ff]
[    1.837434] pci 0000:00:00.0: BAR 0: assigned [mem 0x10000000-0x101fffff 64bit]
[    1.844910] pci 0000:00:00.0: BAR 6: assigned [mem 0x10200000-0x1020ffff pref]
[    1.854429] UBI: auto-attach mtd5
[    1.857845] ubi0: attaching mtd5
[    1.908419] ubi0 error: ubi_attach: bad image sequence number 1673028335 in PEB 64, expected 1614001889
[    1.917967] Erase counter header dump:
[    1.921777]  magic          0x55424923
[    1.925586]  version        1
[    1.928596]  ec             1
[    1.931606]  vid_hdr_offset 2048
[    1.934879]  data_offset    4096
[    1.938145]  image_seq      1673028335
[    1.941955]  hdr_crc        0x80eaafb3
[    1.945755] erase counter header hexdump:
[    1.949943] ubi0 error: ubi_attach_mtd_dev: failed to attach mtd5, error -22
[    1.957160] UBI error: cannot attach mtd5
[    1.962080] VFS: Cannot open root device "(null)" or unknown-block(0,0): error -6
[    1.969718] Please append a correct "root=" boot option; here are the available partitions:
[    1.978199] 1f00             256 mtdblock0
[    1.978202]  (driver?)
[    1.984844] 1f01              64 mtdblock1
[    1.984846]  (driver?)
[    1.991487] 1f02           16000 mtdblock2
[    1.991489]  (driver?)
[    1.998122] 1f03              64 mtdblock3
[    1.998124]  (driver?)
[    2.004766] 1f04            5120 mtdblock4
[    2.004768]  (driver?)
[    2.011410] 1f05           93184 mtdblock5
[    2.011412]  (driver?)
[    2.018046] 1f06           32768 mtdblock6
[    2.018048]  (driver?)
[    2.024686] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
[    2.033881] Rebooting in 1 seconds..


刷了后,无限重启

点评

已经搞定了,是固件大小的问题,没有注意你的固件小了,要改参数。  详情 回复 发表于 2021-2-23 23:35
是不是你编译的固件太大了,我加了好多东西后刷入也会无限重启,我把固件先限制在16m以内,然后进入系统后ipk安装  详情 回复 发表于 2021-2-23 23:33
我的恩山、我的无线 The best wifi forum is right here.
 楼主| 发表于 2021-2-23 23:33 | 显示全部楼层
daysdragon 发表于 2021-2-23 22:50
Boot and Recovery Environment for Embedded Devices
Copyright (C) 2020 HackPascal
Build date 2020- ...

是不是你编译的固件太大了,我加了好多东西后刷入也会无限重启,我把固件先限制在16m以内,然后进入系统后ipk安装

点评

flash bank 0 erase 0x0 0xd00000 flash bank 0 write 0x0 0x80000000 0xd00000 嗯,0xd00000注意这里的大小,改为前面wget 回来时的大小,或加大点就可以了。  详情 回复 发表于 2021-2-24 01:03
我的恩山、我的无线 The best wifi forum is right here.
发表于 2021-2-23 23:35 | 显示全部楼层
daysdragon 发表于 2021-2-23 22:50
Boot and Recovery Environment for Embedded Devices
Copyright (C) 2020 HackPascal
Build date 2020- ...

已经搞定了,是固件大小的问题,没有注意你的固件小了,要改参数。
我的恩山、我的无线 The best wifi forum is right here.
发表于 2021-2-24 01:03 | 显示全部楼层
260821425 发表于 2021-2-23 23:33
是不是你编译的固件太大了,我加了好多东西后刷入也会无限重启,我把固件先限制在16m以内,然后进入系统 ...

flash bank 0 erase 0x0 0xd00000
flash bank 0 write 0x0 0x80000000 0xd00000
嗯,0xd00000注意这里的大小,改为前面wget 回来时的大小,或加大点就可以了。

点评

这样子~~~那最大可以到多大  详情 回复 发表于 2021-2-24 18:32
我的恩山、我的无线 The best wifi forum is right here.
发表于 2021-2-24 01:21 | 显示全部楼层
不错,支持下
来自安卓客户端来自安卓客户端
我的恩山、我的无线 The best wifi forum is right here.
发表于 2021-2-24 14:41 | 显示全部楼层
的成分丰富反反复复反反复复
我的恩山、我的无线 The best wifi forum is right here.
发表于 2021-2-24 16:47 | 显示全部楼层
6666666666
我的恩山、我的无线 The best wifi forum is right here.
 楼主| 发表于 2021-2-24 18:32 | 显示全部楼层
daysdragon 发表于 2021-2-24 01:03
flash bank 0 erase 0x0 0xd00000
flash bank 0 write 0x0 0x80000000 0xd00000
嗯,0xd00000注意这里 ...

这样子~~~那最大可以到多大
我的恩山、我的无线 The best wifi forum is right here.
发表于 2021-2-25 17:51 | 显示全部楼层
感谢 看看
我的恩山、我的无线 The best wifi forum is right here.
发表于 2021-2-26 12:00 | 显示全部楼层
我的恩山、我的无线 The best wifi forum is right here.
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|手机版|小黑屋|Archiver|恩山无线论坛(常州市恩山计算机开发有限公司版权所有) ( 苏ICP备05084872号 )|网站地图

GMT+8, 2021-3-9 06:23

Powered by Discuz! X3.4

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表