![]() H3C TX180x series WiFi6 routers are customized by different carrier. While these three devices look different, they use the same motherboard inside. Another minor difference comes from the model name definition in the u-boot environment variable. Specifications: SOC: MT7621 + MT7915 ROM: 128 MiB RAM: 256 MiB LED: status *2 Button: reset *1 + wps/mesh *1 Ethernet: lan *3 + wan *1 (10/100/1000Mbps) TTL Baudrate: 115200 TFTP server IP: 192.168.124.99 Compatibility mode is used to guarantee the connection of old devices that only support WiFi4 or WiFi5. TFTP + TTL Installation: Although a TTL connection is required for installation, we do not need to tear down it. We can find the TTL port from the cooling hole at the bottom. It is located below LAN3 and the pins are defined as follows: |LAN1|LAN2|LAN3|----|WAN| -------------------- |GND|TX|RX|VCC| 1. Set tftp server IP to 192.168.124.99 and put initramfs firmware in server's root directory, rename it to a simple name "initramfs.bin". 2. Plug in the power supply and wait for power on, connect the TTL cable and open a TTL session, enter "reboot", then enter "Y" to confirm. Finally push "0" to interruput boot while booting. 3. Execute command to install a initramfs system: # tftp 0x80010000 192.168.124.99:initramfs.bin # bootm 0x80010000 4. Backup nand flash by OpenWrt LuCI or dd instruction. We need those partitions if we want to back to stock firmwre due to official website does not provide download link. # dd if=/dev/mtd1 of=/tmp/u-boot-env.bin # dd if=/dev/mtd4 of=/tmp/firmware.bin 5. Edit u-boot env to ensure use default bootargs and first image slot: # fw_setenv bootargs # fw_setenv bootflag 0 6. Upgrade sysupgrade firmware. 7. About restore stock firmware: flash the "firmware" and "u-boot-env" partitions that we backed up in step 4. # mtd write /tmp/u-boot-env.bin u-boot-env # mtd write /tmp/firmware.bin firmware Additional Info: The H3C stock firmware has a 160-byte firmware header that appears to use a non-standard CRC32 verification algorithm. For this part of the data, the u-boot does not check it so we can just directly replace it with a placeholder. Signed-off-by: Shiji Yang <yangshiji66@qq.com> |
||
---|---|---|
.github | ||
config | ||
doc | ||
include | ||
LICENSES | ||
package | ||
scripts | ||
target | ||
toolchain | ||
tools | ||
.gitattributes | ||
.gitignore | ||
BSDmakefile | ||
Config.in | ||
COPYING | ||
feeds.conf.default | ||
Makefile | ||
README_EN.md | ||
README_JA.md | ||
README.md | ||
rules.mk |
Welcome to Lean's git source of OpenWrt and packages
Official Channels
If you have technical questions for discussion or sharing, feel free to join the following channels:
- QQ Group: OpenWRT Firmware Technical Research Group, Group Number is
891659613
. Join the group: Link. - Telegram Group: OpenWRT Firmware Technical Research Group. Join the group: Link.
- Rockchip RK3568 precompiled firmware release (including H68K): Click to download.
- Rockchip RK3588 precompiled firmware release (including H68K): Click to download.
Notice
- Never compile OpenWRT as
root
- If you are living in mainland China, please make sure you could visit the REAL Internet.
- Default login IP is
192.168.1.1
, password ispassword
.
How to Compile
-
Install a Linux distribution, Debian 11 or Ubuntu LTS is recommended.
-
Install dependencies:
sudo apt update -y sudo apt full-upgrade -y sudo apt install -y ack antlr3 asciidoc autoconf automake autopoint binutils bison build-essential \ bzip2 ccache cmake cpio curl device-tree-compiler fastjar flex gawk gettext gcc-multilib g++-multilib \ git gperf haveged help2man intltool libc6-dev-i386 libelf-dev libglib2.0-dev libgmp3-dev libltdl-dev \ libmpc-dev libmpfr-dev libncurses5-dev libncursesw5-dev libreadline-dev libssl-dev libtool lrzsz \ mkisofs msmtp nano ninja-build p7zip p7zip-full patch pkgconf python2.7 python3 python3-pyelftools \ libpython3-dev qemu-utils rsync scons squashfs-tools subversion swig texinfo uglifyjs upx-ucl unzip \ vim wget xmlto xxd zlib1g-dev python3-setuptools
-
Clone the source code, update
feeds
and configure:git clone https://github.com/coolsnowwolf/lede cd lede ./scripts/feeds update -a ./scripts/feeds install -a make menuconfig
-
Download libraries and compile firmware
(
-j
is the thread count, single-thread is recommended for the first build):make -j8 download V=s make -j1 V=s
These commands are supposed to compile the source code successfully. All source code of R23 is included, including IPK.
You can use this source code freely, but please link this GitHub repository when redistributing. Thank you for your cooperation!
Rebuild:
cd lede
git pull
./scripts/feeds update -a
./scripts/feeds install -a
make defconfig
make download -j8
make V=s -j$(nproc)
If reconfiguration is need:
rm -rf ./tmp && rm -rf .config
make menuconfig
make V=s -j$(nproc)
Build artifacts will be outputted to bin/targets
directory.
If you are using WSL/WSL2 as your build environment
WSL's PATH
potentially contain Windows paths with spaces, which may cause compilation failure. Please add the following lines to your local environment profiles before compiling:
# Update and reload your profile, ~/.bashrc for example.
cat << EOF >> ~/.bashrc
export PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:$PATH"
EOF
source ~/.bashrc
NTFS-formatted drives mounted to a WSL distribution will be case-insensitive by default. This will cause the following error when compiling in WSL/WSL2:
Build dependency: OpenWrt can only be built on a case-sensitive filesystem
A simple solution is to create a case-sensitive directory for the repository before git clone
:
# Open a terminal as administrator
PS > fsutil.exe file setCaseSensitiveInfo <your_local_lede_path> enable
# Clone this repository to the case-sensitive directory <your_local_lede_path>
PS > git clone git@github.com:coolsnowwolf/lede.git <your_local_lede_path>
For directories that have already been
git clone
d,fsutil.exe
will not take effect. Case sensitivity will only be enabled for new changes in the directory.
macOS Compilation
- Install Xcode from AppStore
- Install Homebrew:
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
- Install toolchain, dependencies and packages with Homebrew:
brew unlink awk brew install coreutils diffutils findutils gawk gnu-getopt gnu-tar grep make ncurses pkg-config wget quilt xz brew install gcc@11
- Update your system environment:
echo 'export PATH="/usr/local/opt/coreutils/libexec/gnubin:$PATH"' >> ~/.bashrc echo 'export PATH="/usr/local/opt/findutils/libexec/gnubin:$PATH"' >> ~/.bashrc echo 'export PATH="/usr/local/opt/gnu-getopt/bin:$PATH"' >> ~/.bashrc echo 'export PATH="/usr/local/opt/gnu-tar/libexec/gnubin:$PATH"' >> ~/.bashrc echo 'export PATH="/usr/local/opt/grep/libexec/gnubin:$PATH"' >> ~/.bashrc echo 'export PATH="/usr/local/opt/gnu-sed/libexec/gnubin:$PATH"' >> ~/.bashrc echo 'export PATH="/usr/local/opt/make/libexec/gnubin:$PATH"' >> ~/.bashrc
- Reload your shell profile
source ~/.bashrc && bash
, then you can compile normally like Linux.
Declaration
- This source code doesn't contain any backdoors or closed source applications that can monitor/capture your HTTPS traffic. SSL security is the final castle of cyber security. Safety is what a firmware should do.
- Want to learn OpenWRT development but don't know how to start? Can't motivate yourself for self-learning? Do not have enough fundamental knowledge? Learn OpenWRT development with Mr. Zuo through his Beginner OpenWRT Training Course. Click here to register.
- QCA IPQ60xx open source repository: https://github.com/coolsnowwolf/openwrt-gl-ax1800
- OpenWRT Archive repository: https://github.com/coolsnowwolf/openwrt
Introduction to Software Routers
Yingku R2 - N95/N300 Mini Four-Network HomeLab Server
(Introduction page - Yingku Technology (support AliPay Huabei)):
Donation
If this project did helped you, please consider donating to support the development of this project.