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

@ -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>