Skip to content

Commit

Permalink
docs: original source of 6.2.239 has been lost
Browse files Browse the repository at this point in the history
  • Loading branch information
WaterLemons2k committed Apr 12, 2024
1 parent fb824ce commit 65fff28
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 15 deletions.
13 changes: 7 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@

A collection of MiWiFi firmware for CR880x (CR8806, CR8808 and CR8809).

Visit [the README on GitHub](https://github.com/WaterLemons2k/miwifi_cr880x#download) to download from the manufacturer's website, or
Visit [the README on GitHub](https://github.com/WaterLemons2k/miwifi_cr880x#download) to download from the original source, or
[GitHub Pages](https://waterlemons2k.github.io/miwifi_cr880x/#download) to download from a local copy.

## Download

| Model | URL |
| ------ | ------------------------------------------------ |
| CR8806 | [6.2.14]<br>[6.2.33] |
| CR8808 | [6.2.11]<br>[6.2.147]<br>[6.2.220] |
| CR8809 | [6.2.102]<br>[6.2.136]<br>[6.2.182]<br>[6.2.239] |
| Model | Versions |
| ------ | ---------------------------------------------------------------- |
| CR8806 | [6.2.14]<br>[6.2.33] |
| CR8808 | [6.2.11]<br>[6.2.147]<br>[6.2.220] |
| CR8809 | [6.2.102]<br>[6.2.136]<br>[6.2.182]<br>[6.2.239] (original lost) |

[6.2.14]: https://cdn.cnbj1.fds.api.mi-img.com/xiaoqiang/rom/cr8806/miwifi_cr8806_firmware_fe70b_6.2.14.bin
[6.2.33]: https://cdn.cnbj1.fds.api.mi-img.com/xiaoqiang/rom/cr8806/miwifi_cr8806_firmware_4622b_6.2.33.bin
Expand All @@ -26,5 +26,6 @@ Visit [the README on GitHub](https://github.com/WaterLemons2k/miwifi_cr880x#down
## Acknowledgements

- [CR880x (AX3000 , IPQ50xx , RA8x) 官方固件及刷机工具,宇宙最全汇总-小米无线路由器以及小米无线相关的设备-恩山无线论坛](https://www.right.com.cn/forum/thread-8292516-1-1.html)
- [红米 AX3000、CR880X 固件下载地址汇总(欢迎大家补充)-小米无线路由器及小米网络设备-恩山无线论坛](https://www.right.com.cn/forum/thread-8279844-1-1.html)
- [求带“漫游阈值”功能的 CR8808 固件-小米无线路由器及小米网络设备-恩山无线论坛](https://www.right.com.cn/forum/thread-8307851-1-1.html)
- [hzyitc/openwrt-redmi-ax3000: Openwrt for Redmi AX3000 / Xiaomi CR8806 / Xiaomi CR8808 / Xiaomi CR8809](https://github.com/hzyitc/openwrt-redmi-ax3000#get-uart-access)
21 changes: 12 additions & 9 deletions scripts/build.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
// @ts-check

import { readFileSync, writeFileSync } from "fs";
import { readFileSync, writeFileSync } from 'fs';

const README_FILE = "README.md";
const FIRMWARE_URL_PREFIX = "https://cdn.cnbj1.fds.api.mi-img.com/xiaoqiang/";
const README_FILE = 'README.md';

// Remove all firmware URL prefixes from the README file because
// we want all firmware to be downloadable from a local copy.
removeAll(README_FILE, FIRMWARE_URL_PREFIX);
/** Contents that will be removed from the README file when building a GitHub Pages. */
const EXCLUDE_FROM_PAGES = [
'https://cdn.cnbj1.fds.api.mi-img.com/xiaoqiang/',
'(original lost)',
];
EXCLUDE_FROM_PAGES.forEach((content) => removeAll(README_FILE, content));

/**
* Removes all occurrences of `content` from the file.
Expand All @@ -16,8 +18,9 @@ removeAll(README_FILE, FIRMWARE_URL_PREFIX);
* @param {string} content - The content to remove.
*/
function removeAll(file, content) {
const fileContent = readFileSync(file, { encoding: "utf8" });
const newContent = fileContent.replace(new RegExp(content, "g"), "");
const fileContent = readFileSync(file, { encoding: 'utf8' });

writeFileSync(file, newContent, { encoding: "utf8" });
// Use `split` instead of `replace` to avoid escaping.
const newContent = fileContent.split(content).join('');
writeFileSync(file, newContent, { encoding: 'utf8' });
}

0 comments on commit 65fff28

Please sign in to comment.