今天要給一個newifi d1刷系統時發現竟然仍是原廠的uboot, 使用uboot刷入rom時會進行校驗攔截第三方的rom. 以前有刷過這個設備的, 可是已經徹底記不清怎麼處理的了. 查了一下, 這個得用pb-boot這個boot固件, 不能用breed, 由於這個32M的flash若是使用breed的話會有問題, 好比沒法軟件reboot.瀏覽器
網上不少資料由於時間長了, 文件連接都已經失效. 費了很多功夫把pb-boot安裝上了, 把過程記錄一下bash
1. 下載3500版本的固件, 地址 https://pan.baidu.com/s/1-jgMP_pa6BjxKopUsSrrkg, 密碼 k533
用其餘版本的固件, 在最後一步執行mtd write的時候, 會出現 Could not open mtd device: fullflash Can't open device for writing! 錯誤ssh
2. 拔掉電源, 壓着resset孔加電. 進入自帶的uboot
3. 須要將電腦IPv4地址配置爲 192.168.1.10/255.255.255.0, 經過瀏覽器訪問 http://192.168.1.1
4. 上傳剛纔下載的固件, 時間會比較長, 黃藍燈(有些版本的顏色不同, 也多是藍紅燈)交錯時是在上傳, 而後是黃燈, 而後會自動重啓, 藍燈閃, 到藍燈不閃時, 恢復就結束了
5. 電腦IPv4配置爲DHCP自動獲取IP, 而後瀏覽器訪問http://192.168.99.1, 主界面點擊"高級設置", 進入lucy界面後, 點擊"系統->管理權", 在這裏啓用ssh
開始命令行操做,
終端1:spa
# ssh連入192.168.99.1 cd /tmp dd if=/dev/mtd0 of=uboot.bin dd if=/dev/mtd2 of=factory.bin dd if=/dev/mtd3 of=fullflash.bin
終端2:.net
# 備份至本地 scp root@192.168.99.1:/tmp/factory.bin . root@192.168.99.1's password: factory.bin 100% 64KB 4.5MB/s 00:00 scp root@192.168.99.1:/tmp/fullflash.bin . root@192.168.99.1's password: fullflash.bin 100% 32MB 5.0MB/s 00:06 scp root@192.168.99.1:/tmp/uboot.bin . root@192.168.99.1's password: uboot.bin 100% 192KB 4.8MB/s 00:00 # 將pb-boot上傳至d1 scp pb-boot-newifi2-20170927-6562a88.bin root@192.168.99.1:/tmp/ root@192.168.99.1's password: pb-boot-newifi2-20170927-6562a88.bin 100% 148KB 3.3MB/s 00:00
終端1:命令行
# 製做fullflash固件 dd if=/dev/zero bs=1024 count=192 | tr "\000" "\377" >pb_192.bin 192+0 records in 192+0 records out 196608 bytes (192.0KB) copied, 0.004637 seconds, 40.4MB/s dd if=pb-boot-newifi2.bin of=pb_192.bin conv=notrunc 295+1 records in 295+1 records out 151312 bytes (147.8KB) copied, 0.003581 seconds, 40.3MB/s cat /tmp/pb_192.bin /dev/mtd1 /dev/mtd2 /dev/mtd4 >fullflash_with_pb.bin # 寫入, 寫入的時間比較長, 須要耐心等待 mtd write fullflash_with_pb.bin fullflash Unlocking fullflash ... Writing from fullflash_with_pb.bin to fullflash ... root@xCloud:/tmp#
寫入時, 等交替閃爍的(e)和(w)結束後返回提示符時, 就能夠重啓設備了, 按着reset進入pb-boot. 此次不須要再設置固定IP了, 能夠自動獲取192.168.1.2的IPcode
OpenWrt 18.06的rom, 2.4G wlan仍是有問題blog
Update 2019-02-16:路由
Breed又提供d1的下載了, https://breed.hackpascal.net/ 下面的 breed-mt7621-newifi-d1.bin
若是是刷breed, 其實命令是同樣的, 就是把pb-boot換成了breed, 所有命令以下get
dd if=/dev/mtd0 of=uboot.bin dd if=/dev/mtd2 of=factory.bin dd if=/dev/mtd3 of=fullflash_original.bin #這步有點慢, 耐心等待 # scp備份以前生成的三個文件 dd if=/dev/zero bs=1024 count=192 | tr "\000" "\377" >breed_192.bin dd if=breed-mt7621-newifi-d1.bin of=breed_192.bin conv=notrunc cat /tmp/breed_192.bin /dev/mtd1 /dev/mtd2 /dev/mtd4 >fullflash_with_breed.bin #這步有點慢, 耐心等待 mtd write fullflash_with_breed.bin fullflash # 寫入, 寫入的時間比較長, 須要耐心等待 # 若是這步發生錯誤, 在未重啓d1以前, 均可以用 mtd write fullflash_original.bin fullflash 命令將路由器恢復回原來的固件
所有命令執行記錄
root@xCloud:/tmp# dd if=/dev/mtd0 of=uboot.bin 384+0 records in 384+0 records out 196608 bytes (192.0KB) copied, 0.103660 seconds, 1.8MB/s root@xCloud:/tmp# dd if=/dev/mtd2 of=factory.bin 128+0 records in 128+0 records out 65536 bytes (64.0KB) copied, 0.033944 seconds, 1.8MB/s root@xCloud:/tmp# dd if=/dev/mtd3 of=fullflash_original.bin 65536+0 records in 65536+0 records out 33554432 bytes (32.0MB) copied, 17.245314 seconds, 1.9MB/s root@xCloud:/tmp# dd if=/dev/zero bs=1024 count=192 | tr "\000" "\377" >breed_192.bin 192+0 records in 192+0 records out 196608 bytes (192.0KB) copied, 0.004785 seconds, 39.2MB/s root@xCloud:/tmp# dd if=breed-mt7621-newifi-d1.bin of=breed_192.bin conv=notrunc 205+1 records in 205+1 records out 104981 bytes (102.5KB) copied, 0.002521 seconds, 39.7MB/s root@xCloud:/tmp# cat /tmp/breed_192.bin /dev/mtd1 /dev/mtd2 /dev/mtd4 >fullflash_with_breed.bin root@xCloud:/tmp# mtd write fullflash_with_breed.bin fullflash Unlocking fullflash ... Writing from fullflash_with_breed.bin to fullflash ...