I build and run it on MiWifi Router 3G (mips MT7621) device, OpenWrt OS #2271
VincentZyu233
started this conversation in
Show and tell
Replies: 6 comments 11 replies
-
proxychains4 wget https://downloads.openwrt.org/releases/23.05.4/targets/ramips/mt7621/openwrt-sdk-23.05.4-ramips-mt7621_gcc-12.3.0_musl.Linux-x86_64.tar.xz
# or download from tsinghua tuna mirror cdn:
wget https://mirrors.tuna.tsinghua.edu.cn/openwrt/releases/23.05.4/targets/ramips/mt7621/openwrt-sdk-23.05.4-ramips-mt7621_gcc-12.3.0_musl.Linux-x86_64.tar.xz
tar -xJf openwrt-sdk-23.05.4-ramips-mt7621_gcc-12.3.0_musl.Linux-x86_64.tar.xz
cd openwrt-sdk-23.05.4-ramips-mt7621_gcc-12.3.0_musl.Linux-x86_64
# cd home/mac/SSoftwareFiles/openwrt-sdk/openwrt-sdk-23.05.4-ramips-mt7621_gcc-12.3.0_musl.Linux-x86_64
pwd
# 寻找工具链目录
export SDK_PATH=$(pwd)
export TOOLCHAIN_PATH=$SDK_PATH/staging_dir/toolchain-mipsel_24kc_gcc-12.3.0_musl
export PATH=$TOOLCHAIN_PATH/bin:$PATH
export STAGING_DIR=$SDK_PATH/staging_dir
export SYSROOT=$SDK_PATH/staging_dir/toolchain-mipsel_24kc_gcc-12.3.0_musl
cd ..
proxychains4 git clone https://github.com/fastfetch-cli/fastfetch
cd fastfetch
# cd /home/mac/SSoftwareFiles/fastfetch
pwd
mkdir build_mips && cd build_mips
rm -rf ./*
cmake .. \
-DCMAKE_SYSTEM_NAME=Linux \
-DCMAKE_SYSTEM_PROCESSOR=mips \
-DCMAKE_C_COMPILER=mipsel-openwrt-linux-gcc \
-DCMAKE_CXX_COMPILER=mipsel-openwrt-linux-g++ \
-DCMAKE_STAGING_PREFIX=$SDK_PATH/staging_dir/target-mipsel_24kc_musl \
-DCMAKE_FIND_ROOT_PATH=$SYSROOT \
-DCMAKE_FIND_ROOT_PATH_MODE_PROGRAM=NEVER \
-DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY=ONLY \
-DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE=ONLY \
-DCMAKE_EXE_LINKER_FLAGS="-static" \
-DCMAKE_C_FLAGS="--sysroot=$SYSROOT -msoft-float -mips32r2 -nostdinc -I$SYSROOT/include -I$SYSROOT/usr/include" \
-DENABLE_ZLIB=OFF \
-DENABLE_DRM=OFF -DENABLE_X11=OFF -DENABLE_WAYLAND=OFF -DENABLE_VULKAN=OFF -DENABLE_DBUS=OFF -DENABLE_PCI=OFF
make -j$(nproc)
# 瘦身
ls -lh ./fastfetch
mipsel-linux-gnu-strip ./fastfetch
ls -lh ./fastfetch
cp ./fastfetch ./fastfetch-linux-mipsel
scp ./fastfetch-linux-mipsel root@192.168.5.1:/usr/bin/fastfetch |
Beta Was this translation helpful? Give feedback.
1 reply
-
|
Beta Was this translation helpful? Give feedback.
0 replies
-
|
2分钱谢了。。。 |
Beta Was this translation helpful? Give feedback.
1 reply
-
|
Shell 那行是啥情况。你试下 |
Beta Was this translation helpful? Give feedback.
8 replies
-
Beta Was this translation helpful? Give feedback.
1 reply
-
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment






Uh oh!
There was an error while loading. Please reload this page.
-
https://github.com/VincentZyu233/fastfetch_ForMiWifiRouter3G
Beta Was this translation helpful? Give feedback.
All reactions