更正里之前一些下載鏈接和錯誤 1.下載 OpenWrt-ImageBuilder-ramips-mt7620.Linux-x86_64.tar.bz2 到這里下載新OpenWrt-ImageBuilder包 https://downloads./snapshots/trunk/ramips/mt7620/ 這個是直接下載鏈接,有時候官方文件名會有變化,你可以點上面鏈接進去下載 https://downloads./snapshots/trunk/ramips/mt7620/OpenWrt-ImageBuilder-ramips-mt7620.Linux-x86_64.tar.bz2 2 .解壓ImageBuilder 壓縮包 tar -xjvf OpenWrt-ImageBuilder-ramips-mt7620.Linux-x86_64.tar.bz2 3.進入解壓后文件夾 cd OpenWrt-ImageBuilder-ramips-mt7620.Linux-x86_64 4. 查看默認軟件包和硬件支持列表 make info Current Target: "ramips (MT7620 based boards)" Default Packages: base-files libc libgcc busybox dropbear mtd uci opkg netifd fstools kmod-leds-gpio kmod-gpio-button-hotplug wpad-mini swconfig kmod-rt2800-pci kmod-rt2800-soc dnsmasq iptables ip6tables ppp ppp-mod-pppoe kmod-nf-nathelper firewall odhcpd odhcp6c Available Profiles: Default: Default Profile Packages: kmod-usb-core kmod-usb2 kmod-usb-ohci kmod-ledtrig-usbdev AIBR100: Aigale Ai-BR100 Packages: kmod-usb-ohci kmod-usb2 E1700: Linksys E1700 Packages: swconfig MT7620a: MT7620a EVB Packages: kmod-usb-core kmod-usb2 kmod-usb-ohci kmod-ledtrig-usbdev XIAOMI-MIWIFI-MINI: Xiaomi MiWiFi Mini Packages: kmod-usb-core kmod-usb-dwc2 kmod-usb2 kmod-usb-ohci kmod-mt76 Image Generator (Image Builder) - OpenWrt Wiki 沿途見識[2] 5.使用說明 make image命令會創(chuàng)建一個只包含必不可少包文件的最小化鏡像,這個命令可以通過三個傳遞過去的參數(shù)控制: PROFILE - 指定要編譯的目標(biāo)鏡像的配置 PACKAGES - 要嵌入鏡像的包文件的列表 FILES - 要包含進去的自定義文件的目錄 6.編譯 make image PROFILE=XIAOMI-MIWIFI-MINI PACKAGES="luci luci-i18n-base-zh-cn luci-app-ddns luci-app-p910nd luci-app-qos luci-app-samba luci-app-upnp luci-app-wol kmod-fs-ext4 kmod-fs-ntfs kmod-fs-vfat kmod-nls-utf8 ppp-mod-pptp ppp-mod-pppoa comgt xl2tpd kmod-usb-printer block-mount mount-utils" 在make命令結(jié)束后,生成的鏡像會被放到bin目錄中。 ll bin/ramips -rw-r--r-- 1 cs cs 372 2月 10 18:07 md5sums -rw-r--r-- 1 cs cs 3538944 2月 10 18:07 openwrt-ramips-mt7620-root.squashfs -rw-r--r-- 1 cs cs 1163507 2月 10 18:07 openwrt-ramips-mt7620-uImage.bin -rwxr-xr-x 1 cs cs 3410636 2月 10 18:07 openwrt-ramips-mt7620-vmlinux.bin -rwxr-xr-x 1 cs cs 3415640 2月 10 18:07 openwrt-ramips-mt7620-vmlinux.elf -rw-r--r-- 1 cs cs 4718596 2月 10 18:07 openwrt-ramips-mt7620-xiaomi-miwifi-mini-squashfs-sysupgrade.bin 7.備份官方rom 查看rom cat /proc/mtd dev: size erasesize name mtd0: 01000000 00010000 "ALL" mtd1: 00030000 00010000 "Bootloader" mtd2: 00010000 00010000 "Config" mtd3: 00010000 00010000 "Factory" mtd4: 00c80000 00010000 "OS1" mtd5: 00b26eac 00010000 "rootfs" mtd6: 00200000 00010000 "OS2" mtd7: 00100000 00010000 "overlay" mtd8: 00010000 00010000 "crash" mtd9: 00010000 00010000 "reserved" mtd10: 00010000 00010000 "Bdata" 備份 dd if=/dev/mtd0 of=/extdisks/sda1/rom/ALL.bin dd if=/dev/mtd1 of=/extdisks/sda1/rom/Bootloader.bin dd if=/dev/mtd2 of=/extdisks/sda1/rom/Config.bin dd if=/dev/mtd3 of=/extdisks/sda1/rom/Factory.bin dd if=/dev/mtd4 of=/extdisks/sda1/rom/OS1.bin dd if=/dev/mtd5 of=/extdisks/sda1/rom/rootfs.bin dd if=/dev/mtd6 of=/extdisks/sda1/rom/OS2.bin dd if=/dev/mtd7 of=/extdisks/sda1/rom/overlay.bin dd if=/dev/mtd8 of=/extdisks/sda1/rom/crash.bin dd if=/dev/mtd9 of=/extdisks/sda1/rom/reserved.bin dd if=/dev/mtd10 of=/extdisks/sda1/rom/Bdata.bin 恢復(fù)方法 mtd -r write /extdisks/sda1/rom/Bootloader.bin Bootloader mtd -r write /extdisks/sda1/rom/Config.bin Config mtd -r write /extdisks/sda1/rom/Factory.bin Factory mtd -r write /extdisks/sda1/rom/OS1.bin OS1 mtd -r write /extdisks/sda1/rom/rootfs.bin rootfs mtd -r write /extdisks/sda1/rom/OS2.bin OS2 mtd -r write /extdisks/sda1/rom/overlay.bin overlay mtd -r write /extdisks/sda1/rom/crash.bin crash mtd -r write /extdisks/sda1/rom/reserved.bin reserved mtd -r write /extdisks/sda1/rom/Bdata.bin Bdata 8.刷生產(chǎn)openwrt的rom 8.1 通過頁面刷回 系統(tǒng)版本: 0.7.15 開發(fā)版 miwifi_r1cm_all_02508_0.7.15.bin http://bigota./xiaoqiang/rom/r1cm/miwifi_r1cm_all_02508_0.7.15.bin 查看固件分區(qū) root@XiaoQiang:/extdisks/sda1# cat /proc/mtd dev: size erasesize name mtd0: 01000000 00010000 "ALL" mtd1: 00030000 00010000 "Bootloader" mtd2: 00010000 00010000 "Config" mtd3: 00010000 00010000 "Factory" mtd4: 00c80000 00010000 "OS1" mtd5: 00b26e43 00010000 "rootfs" mtd6: 00200000 00010000 "OS2" mtd7: 00100000 00010000 "overlay" mtd8: 00010000 00010000 "crash" mtd9: 00010000 00010000 "reserved" mtd10: 00010000 00010000 "Bdata" mtd11: 00fa0000 00010000 "firmware" 備份 dd if=/dev/mtd0 of=/extdisks/sda1/rom_old/ALL.bin dd if=/dev/mtd1 of=/extdisks/sda1/rom_old/Bootloader.bin dd if=/dev/mtd2 of=/extdisks/sda1/rom_old/Config.bin dd if=/dev/mtd3 of=/extdisks/sda1/rom_old/Factory.bin dd if=/dev/mtd4 of=/extdisks/sda1/rom_old/OS1.bin dd if=/dev/mtd5 of=/extdisks/sda1/rom_old/rootfs.bin dd if=/dev/mtd6 of=/extdisks/sda1/rom_old/OS2.bin dd if=/dev/mtd7 of=/extdisks/sda1/rom_old/overlay.bin dd if=/dev/mtd8 of=/extdisks/sda1/rom_old/crash.bin dd if=/dev/mtd9 of=/extdisks/sda1/rom_old/reserved.bin dd if=/dev/mtd10 of=/extdisks/sda1/rom_old/Bdata.bin dd if=/dev/mtd11 of=/extdisks/sda1/rom_old/firmware.bin 刷系統(tǒng) mtd -r write /extdisks/sda1/openwrt_rom/openwrt-ramips-mt7620-xiaomi-miwifi-mini-squashfs-sysupgrade.bin firmware 刷機后 root@OpenWrt:/# cat /proc/mtd dev: size erasesize name mtd0: 00030000 00010000 "u-boot" mtd1: 00010000 00010000 "u-boot-env" mtd2: 00010000 00010000 "factory" mtd3: 00f80000 00010000 "firmware" mtd4: 0011c816 00010000 "kernel" mtd5: 00e637ea 00010000 "rootfs" mtd6: 00b10000 00010000 "rootfs_data" mtd7: 00010000 00010000 "crash" mtd8: 00010000 00010000 "reserved" mtd9: 00010000 00010000 "Bdata" http://bbs./thread-9734746-1-1.html 即可完成LUCI的安裝。 輸入以下命令開啟支持web服務(wù)的uhttpd,并設(shè)置其為自啟動: Shell代碼 /etc/init.d/uhttpd enable # 開機自啟動 /etc/init.d/uhttpd start # 啟動uhttpd 玩壞路由如何恢復(fù) http://bbs./thread-10512768-1-1.html 【操作流程】 閱讀特別提示并確認備份已經(jīng)完成后,請按照以下步驟操作: 1、請將下載的工具包bin文件復(fù)制到U盤的根目錄,點此進入最新Rom下載頁面 2、將U盤里的bin文件重命名為 miwifi.bin 3、斷開小米路由器mini的電源,將U盤插入USB接口 4、按下reset按鈕后重新接入電源,指示燈變?yōu)辄S色閃爍狀態(tài)后松開reset鍵 5、整個u盤刷機的時間相比正常OTA升級更長一些,因為這種刷機方式會將小米路由器mini的系統(tǒng)重新刷一遍 6、刷機完成之后系統(tǒng)會自己重啟并進入正常的啟動狀態(tài)(黃燈常亮—藍燈常亮) 7、如果出現(xiàn)異常/失敗/U盤無法讀取狀態(tài),會進入紅燈狀態(tài),建議重試或更換U盤再試8、正常啟動顯示藍燈,完成刷機! 然后配置路由器! 首先我們掛載個U盤或者移動硬盤,先格式化為 NTFS 插上U盤 一般都能識別出來! 選擇掛載點 添加 設(shè)備 選擇儲存介質(zhì) 掛載點 為 /mnt/sda1 文件系統(tǒng) 自定義 為 NTFS 文件系統(tǒng)檢查 √ 保存應(yīng)用 ------------------------------------------------------------------------------------------- 然后選擇 服務(wù) 共享網(wǎng)絡(luò) 共享主目錄 為 1 名稱隨意 不要有漢子 目錄 為 /mnt/sda1 允許匿名用戶 √ 創(chuàng)建權(quán)限 0700 目錄權(quán)限 0700 保存應(yīng)用 網(wǎng)絡(luò)鄰居找找就有網(wǎng)絡(luò)存儲! ![]() |
|
來自: Hongrongqi > 《openwrt》