update:openwrt

This commit is contained in:
dichgrem
2025-07-16 14:02:57 +08:00
parent 23db8005e0
commit 580700589f
18 changed files with 71 additions and 82 deletions

View File

@ -119,14 +119,7 @@ tags = ["综合工程"]
uci commit luci
/etc/init.d/uhttpd restart``
然后重新访问 Web 界面,查看是否恢复正常。
- 一般要安装的包:
```
openssh-sftp-server
libpcap
luci-app-upnp
luci-app-ttyd
kmod-nft-xxx
```
## **X86平台本地编译完整openwrt**
@ -164,7 +157,7 @@ sudo apt clean
```
useradd -m openwrt # 新建一个名为 openwrt 的用户
```
> 不可以使用Root用户进行编译!!
> 不可以使用Root用户进行编译!!!
- **修改用户默认的 Shell**
```
@ -423,43 +416,41 @@ git clean -fd
git restore --source=v24.10.2 --staged --worktree .
```
## Dwrt 方案
| 作用 | 组件 |
| ----------- | -------------------- |
| 主题 | argon |
| Shell | bash |
| SSH 服务器 | dropbear |
| Web 服务器 | uhttpd |
| DNS/DHCP 服务 | dnsmasqfull |
| 加密库 | openssl |
| 压缩算法 | zstd |
| 拥塞控制 | bbr |
| 防火墙 | nftables + iptables |
| 调度模块 | BPF + kmod-sched-xxx |
| 时间同步 | ntpd-full |
| 文本编辑 | vim-fullvim-runtime |
| 编译优化 | LTO + O3 |
要启用的软件包:
**base**
```
autocore base-files bash block-mount ca-bundle coremark curl dnsmasq-full dropbear ds-lite e2fsprogs fdisk firewall4 fstools grub2-bios-setup htop kmod-8139cp kmod-8139too kmod-amazon-ena kmod-amd-xgbe kmod-atlantic kmod-bnx2 kmod-bnx2x kmod-button-hotplug kmod-drm-amdgpu kmod-drm-i915 kmod-dwmac-intel kmod-e1000 kmod-e1000e kmod-forcedeth kmod-fs-f2fs kmod-fs-vfat kmod-i40e kmod-iavf kmod-igb kmod-igbvf kmod-igc kmod-ixgbe kmod-ixgbevf kmod-lib-zstd kmod-mlx4-core kmod-mlx5-core kmod-mmc kmod-pcnet32 kmod-phy-broadcom kmod-r8101 kmod-r8125 kmod-r8126 kmod-r8168 kmod-sdhci kmod-tcp-bbr kmod-tg3 kmod-tulip kmod-usb-hid kmod-vmxnet3 libc libgcc libustream-mbedtls lm-sensors-detect logd lsblk luci-app-fan luci-app-filemanager luci-app-firewall luci-app-log-viewer luci-app-package-manager luci-app-syscontrol luci-app-upnp luci-base luci-compat luci-lib-fs luci-lib-ipkg mkf2fs mtd nano netifd odhcp6c odhcpd-ipv6only openssh-sftp-server opkg partx-utils pciutils ppp ppp-mod-pppoe resolveip swconfig uci uclient-fetch urandom-seed urngd usbutils wget-ssl zram-swap
```
**cli**
```
btop iperf3 tcpdump
```
**luci**
```
luci-app-argon luci-app-upnp luci-app-ttyd luci-app-eqosplus luci-app-timecontrol luci-app-parentcontrol luci-app-homeproxy luci-app-daed
```
## 单独编译openwrt的ipk包
这里以ubuntu环境为例我们假设你有一台虚拟机或者WSL。
> ``注意编译不能使用Root用户``
**随后安装编译依赖的各个包:**
```
sudo apt update
sudo apt install -y \
ack antlr3 asciidoc autoconf automake autopoint binutils bison build-essential \
bzip2 ccache clang cmake cpio curl device-tree-compiler diffutils diffstat findutils flex gawk \
gcc-multilib g++-multilib git gettext gperf grep haveged help2man intltool \
libelf-dev libfuse-dev libgmp3-dev libgl1-mesa-dev libgraphene-1.0-dev libglib2.0-dev \
libltdl-dev libmpc-dev libmpfr-dev libncurses-dev libpython3-dev libreadline-dev libssl-dev \
libtool lrzsz make mesa-common-dev msmtp ninja-build p7zip p7zip-full patch pkgconf \
perl python-is-python3 python3 python3-dev python3-distutils-extra python3-pip python3-pyelftools \
python3-setuptools qemu-utils rsync scons squashfs-tools subversion swig texinfo uglifyjs \
upx-ucl unzip vim wget gnu-which xmlto xxd zlib1g-dev genisoimage llvm llvm-runtime docutils-common \
ecj fastjar java-wrappers libeclipse-jdt-core-java libgnutls-dane0t64 \
libgnutls-openssl27t64 libgnutls28-dev libidn2-dev libp11-kit-dev libtasn1-6-dev libtasn1-doc \
libunbound8 libyaml-dev lld lld-18 nettle-dev python3-docutils python3-ply python3-roman re2c
```
随后下载我们**刷入openwrt的对应的SDK包**,如
```
git clone https://github.com/immortalwrt/immortalwrt.git
```
**下载和安装仓库信息**
```
./scripts/feeds update -a
./scripts/feeds install -a
```
**下载并选中我们需要编译的包,这里以inyn为例**
**其他步骤同上,下载并选中我们需要编译的包,这里以inyn为例**
```
git clone https://github.com/diredocks/openwrt-inyn.git ./package/inyn
make menuconfig

View File

@ -245,14 +245,7 @@
<li>刷错主题无法打开luci通过 SSH 登录路由器,切换到另一个已知正常的主题(例如 Bootstrap
<code>uci set luci.main.mediaurlbase='/luci-static/bootstrap' uci commit luci /etc/init.d/uhttpd restart</code>
然后重新访问 Web 界面,查看是否恢复正常。</li>
<li>一般要安装的包:</li>
</ul>
<pre style="background-color:#151515;color:#e8e8d3;"><code><span>openssh-sftp-server
</span><span>libpcap
</span><span>luci-app-upnp
</span><span>luci-app-ttyd
</span><span>kmod-nft-xxx
</span></code></pre>
<h2 id="x86ping-tai-ben-di-bian-yi-wan-zheng-openwrt"><strong>X86平台本地编译完整openwrt</strong></h2>
<ul>
<li>
@ -292,7 +285,7 @@
<pre style="background-color:#151515;color:#e8e8d3;"><code><span>useradd -m openwrt # 新建一个名为 openwrt 的用户
</span></code></pre>
<blockquote>
<p>不可以使用Root用户进行编译!!</p>
<p>不可以使用Root用户进行编译!!!</p>
</blockquote>
<ul>
<li><strong>修改用户默认的 Shell</strong></li>
@ -530,35 +523,34 @@
<pre style="background-color:#151515;color:#e8e8d3;"><code><span>git clean -fd
</span><span>git restore --source=v24.10.2 --staged --worktree .
</span></code></pre>
<h2 id="dwrt-fang-an">Dwrt 方案</h2>
<table><thead><tr><th>作用</th><th>组件</th></tr></thead><tbody>
<tr><td>主题</td><td>argon</td></tr>
<tr><td>Shell</td><td>bash</td></tr>
<tr><td>SSH 服务器</td><td>dropbear</td></tr>
<tr><td>Web 服务器</td><td>uhttpd</td></tr>
<tr><td>DNS/DHCP 服务</td><td>dnsmasqfull</td></tr>
<tr><td>加密库</td><td>openssl</td></tr>
<tr><td>压缩算法</td><td>zstd</td></tr>
<tr><td>拥塞控制</td><td>bbr</td></tr>
<tr><td>防火墙</td><td>nftables + iptables</td></tr>
<tr><td>调度模块</td><td>BPF + kmod-sched-xxx</td></tr>
<tr><td>时间同步</td><td>ntpd-full</td></tr>
<tr><td>文本编辑</td><td>vim-fullvim-runtime</td></tr>
<tr><td>编译优化</td><td>LTO + O3</td></tr>
</tbody></table>
<p>要启用的软件包:</p>
<p><strong>base</strong></p>
<pre style="background-color:#151515;color:#e8e8d3;"><code><span>autocore base-files bash block-mount ca-bundle coremark curl dnsmasq-full dropbear ds-lite e2fsprogs fdisk firewall4 fstools grub2-bios-setup htop kmod-8139cp kmod-8139too kmod-amazon-ena kmod-amd-xgbe kmod-atlantic kmod-bnx2 kmod-bnx2x kmod-button-hotplug kmod-drm-amdgpu kmod-drm-i915 kmod-dwmac-intel kmod-e1000 kmod-e1000e kmod-forcedeth kmod-fs-f2fs kmod-fs-vfat kmod-i40e kmod-iavf kmod-igb kmod-igbvf kmod-igc kmod-ixgbe kmod-ixgbevf kmod-lib-zstd kmod-mlx4-core kmod-mlx5-core kmod-mmc kmod-pcnet32 kmod-phy-broadcom kmod-r8101 kmod-r8125 kmod-r8126 kmod-r8168 kmod-sdhci kmod-tcp-bbr kmod-tg3 kmod-tulip kmod-usb-hid kmod-vmxnet3 libc libgcc libustream-mbedtls lm-sensors-detect logd lsblk luci-app-fan luci-app-filemanager luci-app-firewall luci-app-log-viewer luci-app-package-manager luci-app-syscontrol luci-app-upnp luci-base luci-compat luci-lib-fs luci-lib-ipkg mkf2fs mtd nano netifd odhcp6c odhcpd-ipv6only openssh-sftp-server opkg partx-utils pciutils ppp ppp-mod-pppoe resolveip swconfig uci uclient-fetch urandom-seed urngd usbutils wget-ssl zram-swap
</span></code></pre>
<p><strong>cli</strong></p>
<pre style="background-color:#151515;color:#e8e8d3;"><code><span>btop iperf3 tcpdump
</span></code></pre>
<p><strong>luci</strong></p>
<pre style="background-color:#151515;color:#e8e8d3;"><code><span>luci-app-argon luci-app-upnp luci-app-ttyd luci-app-eqosplus luci-app-timecontrol luci-app-parentcontrol luci-app-homeproxy luci-app-daed
</span></code></pre>
<h2 id="dan-du-bian-yi-openwrtde-ipkbao">单独编译openwrt的ipk包</h2>
<p>这里以ubuntu环境为例我们假设你有一台虚拟机或者WSL。</p>
<blockquote>
<p><code>注意编译不能使用Root用户</code></p>
</blockquote>
<p><strong>随后安装编译依赖的各个包:</strong></p>
<pre style="background-color:#151515;color:#e8e8d3;"><code><span>sudo apt update
</span><span>sudo apt install -y \
</span><span> ack antlr3 asciidoc autoconf automake autopoint binutils bison build-essential \
</span><span> bzip2 ccache clang cmake cpio curl device-tree-compiler diffutils diffstat findutils flex gawk \
</span><span> gcc-multilib g++-multilib git gettext gperf grep haveged help2man intltool \
</span><span> libelf-dev libfuse-dev libgmp3-dev libgl1-mesa-dev libgraphene-1.0-dev libglib2.0-dev \
</span><span> libltdl-dev libmpc-dev libmpfr-dev libncurses-dev libpython3-dev libreadline-dev libssl-dev \
</span><span> libtool lrzsz make mesa-common-dev msmtp ninja-build p7zip p7zip-full patch pkgconf \
</span><span> perl python-is-python3 python3 python3-dev python3-distutils-extra python3-pip python3-pyelftools \
</span><span> python3-setuptools qemu-utils rsync scons squashfs-tools subversion swig texinfo uglifyjs \
</span><span> upx-ucl unzip vim wget gnu-which xmlto xxd zlib1g-dev genisoimage llvm llvm-runtime docutils-common \
</span><span> ecj fastjar java-wrappers libeclipse-jdt-core-java libgnutls-dane0t64 \
</span><span> libgnutls-openssl27t64 libgnutls28-dev libidn2-dev libp11-kit-dev libtasn1-6-dev libtasn1-doc \
</span><span> libunbound8 libyaml-dev lld lld-18 nettle-dev python3-docutils python3-ply python3-roman re2c
</span></code></pre>
<p>随后下载我们<strong>刷入openwrt的对应的SDK包</strong>,如</p>
<pre style="background-color:#151515;color:#e8e8d3;"><code><span>git clone https://github.com/immortalwrt/immortalwrt.git
</span></code></pre>
<p><strong>下载和安装仓库信息</strong></p>
<pre style="background-color:#151515;color:#e8e8d3;"><code><span>./scripts/feeds update -a
</span><span>./scripts/feeds install -a
</span></code></pre>
<p><strong>下载并选中我们需要编译的包,这里以inyn为例</strong></p>
<p><strong>其他步骤同上,下载并选中我们需要编译的包,这里以inyn为例</strong></p>
<pre style="background-color:#151515;color:#e8e8d3;"><code><span>git clone https://github.com/diredocks/openwrt-inyn.git ./package/inyn
</span><span>make menuconfig
</span></code></pre>

View File

@ -1,6 +1,12 @@
<!doctype html>
<meta charset="utf-8">
<link rel="canonical" href="https://blog.dich.bid/">
<meta http-equiv="refresh" content="0; url=https://blog.dich.bid/">
<title>Redirect</title>
<script>
const target = "https://blog.dich.bid/";
const hash = window.location.hash || "";
window.location.replace(target + hash);
</script>
<noscript>
<meta http-equiv="refresh" content="0; url=https://blog.dich.bid/">
</noscript>
<p><a href="https://blog.dich.bid/">Click here</a> to be redirected.</p>

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -1 +1 @@
{"version":"1.3.0","languages":{"en":{"hash":"en_916d413087","wasm":"en","page_count":98}}}
{"version":"1.3.0","languages":{"en":{"hash":"en_87fead6ca5","wasm":"en","page_count":98}}}

Binary file not shown.