<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>openwrt &#8211; 老丁的博客</title>
	<atom:link href="https://www.laoding.me/archives/tag/openwrt/feed" rel="self" type="application/rss+xml" />
	<link>https://www.laoding.me</link>
	<description></description>
	<lastBuildDate>Thu, 17 Oct 2024 07:05:34 +0000</lastBuildDate>
	<language>zh-Hans</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>

<image>
	<url>https://public-123.oss-cn-guangzhou.aliyuncs.com/2024/09/cropped-图片_20240927133356-768x768-1-32x32.jpg</url>
	<title>openwrt &#8211; 老丁的博客</title>
	<link>https://www.laoding.me</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>群晖NAS用Docker安装Opnewrt教程</title>
		<link>https://www.laoding.me/archives/661</link>
					<comments>https://www.laoding.me/archives/661#respond</comments>
		
		<dc:creator><![CDATA[laoding]]></dc:creator>
		<pubDate>Mon, 07 Oct 2024 02:16:57 +0000</pubDate>
				<category><![CDATA[办公网络]]></category>
		<category><![CDATA[NAS]]></category>
		<category><![CDATA[openwrt]]></category>
		<category><![CDATA[群晖]]></category>
		<guid isPermaLink="false">https://www.laoding.me/?p=661</guid>

					<description><![CDATA[1.首先开启网卡混杂模式 sudo ip link set eth0 promisc on 虚拟机搭建的黑群晖 [&#8230;]]]></description>
										<content:encoded><![CDATA[<h2>1.首先开启网卡混杂模式</h2>
<pre class="code">sudo ip link set eth0 promisc on</pre>
<p>虚拟机搭建的黑群晖将<code>eth0</code>改成<code>ovs_eth0</code></p>
<h2>2.新建一个macnet网络</h2>
<pre class="code">docker network create -d macvlan --subnet=192.168.1.0/24 --gateway=192.168.1.1 -o parent=eth0 macnet</pre>
<ul>
<li>如果你使用了VMM开启了open vSwitch的，用下面这条命令新建macnet网络</li>
</ul>
<pre class="code">docker network create -d macvlan --subnet=192.168.22.0/24 --gateway=192.168.22.1 -o parent=ovs_eth0 openwrt</pre>
<h2>3.创建启动容器</h2>
<pre class="code">docker run -d \
  --restart always \
  --name openwrt \
  --privileged \
  --network macvlan \
  sulinggg/openwrt:x86_64 \
  /sbin/init</pre>
<p>或<code>bleachwrt/mini</code></p>
<pre class="code">docker run --restart always --name bleachwrt-mini -d --network macnet --privileged --ip 192.168.22.33 bleachwrt/mini:latest /sbin/init</pre>
<h2>4.进入该容器</h2>
<p>切换至root账户权限</p>
<pre class="code">sudo -i</pre>
<pre class="code">docker exec -it openwrt bash</pre>
<h2>5.修改该容器IP配置 option ipaddr &#8216;192.168.2.233&#8217;</h2>
<pre class="code">vi /etc/config/network</pre>
<p><img decoding="async" src="https://laoding.me/wp-content/media/202404/20240408121707_1712553457.jpg" alt="" /></p>
<ul>
<li>或者修改为DHCP模式</li>
</ul>
<pre class="code">config interface 'lan' 
   option type 'bridge' 
   option ifname 'eth0' 
   option proto 'dhcp'</pre>
<h2>6.重启该容器网络配置</h2>
<pre class="code">/etc/init.d/network restart</pre>
<h2>7.退出容器</h2>
<pre class="code">exit</pre>
<h2>8.浏览器登录192.168.22.33进入OpenWrt管理后台</h2>
<p>用户名：root 密码：password</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.laoding.me/archives/661/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Openwrt软路由如何修改软件应用页面</title>
		<link>https://www.laoding.me/archives/655</link>
					<comments>https://www.laoding.me/archives/655#respond</comments>
		
		<dc:creator><![CDATA[laoding]]></dc:creator>
		<pubDate>Fri, 04 Oct 2024 09:43:07 +0000</pubDate>
				<category><![CDATA[办公网络]]></category>
		<category><![CDATA[openwrt]]></category>
		<category><![CDATA[Zerotier]]></category>
		<guid isPermaLink="false">https://www.laoding.me/?p=655</guid>

					<description><![CDATA[以Zieotier为例 1.进行/www/luci-static/resources/view/zerotie [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>以Zieotier为例</p>
<p>1.进行/www/luci-static/resources/view/zerotier/</p>
<pre class="code"> cd /www/luci-static/resources/view/zerotier/</pre>
<p>2.修改文件&#8221;/www/luci-static/resources/view/zerotier/base.js&#8221;</p>
<p>&nbsp;</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.laoding.me/archives/655/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>编译OpenWrt系统流程</title>
		<link>https://www.laoding.me/archives/635</link>
					<comments>https://www.laoding.me/archives/635#respond</comments>
		
		<dc:creator><![CDATA[laoding]]></dc:creator>
		<pubDate>Wed, 02 Oct 2024 06:03:34 +0000</pubDate>
				<category><![CDATA[办公网络]]></category>
		<category><![CDATA[数码硬件]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[openwrt]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<guid isPermaLink="false">https://www.laoding.me/?p=635</guid>

					<description><![CDATA[1.安装编译依赖 sudo apt update -y sudo apt full-upgrade -y su [&#8230;]]]></description>
										<content:encoded><![CDATA[<h3>1.安装编译依赖</h3>
<pre><code class="language-c">sudo apt update -y</code></pre>
<pre><code>sudo apt full-upgrade -y</code></pre>
<pre><code class="language-c">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</code></pre>
<h3>2.下载源代码</h3>
<p>以下源码三选一下载，也可以使用其他团队的源码</p>
<table>
<thead>
<tr>
<th>列名</th>
<th>列名</th>
<th>列名</th>
</tr>
</thead>
<tbody>
<tr>
<td>git clone <a href="https://github.com/openwrt/openwrt">https://github.com/openwrt/openwrt</a></td>
<td>官方版本</td>
<td>内核新</td>
</tr>
<tr>
<td>git clone <a href="https://github.com/coolsnowwolf/lede">https://github.com/coolsnowwolf/lede</a> </td>
<td>lede版本</td>
<td>插件多</td>
</tr>
<tr>
<td>git clone -b 22.03 &#8211;single-branch <a href="https://github.com/Lienol/openwrt">https://github.com/Lienol/openwrt</a></td>
<td>lienol版本</td>
<td>小而快</td>
</tr>
</tbody>
</table>
<p>如需指定openwrt版本，可以使用以下命令</p>
<pre><code class="language-c">git tag</code></pre>
<p>查看稳定版，回车键拉到最低，按Q结束！</p>
<pre><code class="language-c">git checkout v22.03.3</code></pre>
<p>指定版本，红色部分位版本号</p>
<h3>3.切换到文件目录</h3>
<pre><code class="language-c">cd openwrt</code></pre>
<h3>4.添加插件或主题</h3>
<p>打开openwrt文件夹，找到feeds.conf.default文件打开，添加到最下面！</p>
<pre><code class="language-c">src-git amlogic https://github.com/ophub/luci-app-amlogic   #amlogicCPU必须添加
src-git alist https://github.com/sbwml/luci-app-alist       #Alist插件
src-git passwall_packages https://github.com/xiaorouji/openwrt-passwall.git;packages
src-git passwall_luci https://github.com/xiaorouji/openwrt-passwall.git;luci
src-git kenzo https://github.com/kenzok8/openwrt-packages
src-git argonnew https://github.com/jerrykuku/luci-theme-argon.git;main    #主题</code></pre>
<h3>5.更新源码</h3>
<pre><code class="language-c">./scripts/feeds update -a   #更新源码</code></pre>
<pre><code class="language-c">./scripts/feeds install -a  #拷贝源码</code></pre>
<h3>6.定制openwrt系统</h3>
<p>打开openwrt配置面板</p>
<pre><code class="language-c">make menuconfig</code></pre>
<p>————-————————————————————————————————————</p>
<ul>
<li>必须设置项目（CPU架构，镜像文件格式）</li>
</ul>
<pre><code>Target System  -&gt;  QEMU ARM Virtual Machine 
Subtarget -&gt;  QEMU ARMv8 Virtual Machine (cortex-a53)
Target Profile  -&gt;  Default
Target Images  -&gt;   tar.gz</code></pre>
<ul>
<li>必选软件包(基础依赖包，仅保证打出的包可以写入EMMC,可以在EMMC上在线升级，不包含具体的应用)：</li>
</ul>
<pre><code class="language-c">Languages -&gt; Perl
             -&gt;  perl-http-date
             -&gt;  perlbase-file
             -&gt;  perlbase-getopt
             -&gt;  perlbase-time
             -&gt;  perlbase-unicode
             -&gt;  perlbase-utf8
Utilities -&gt; Compression -&gt; bsdtar 或 p7zip(非官方源)、pigz
          -&gt; Disc -&gt; blkid、fdisk、lsblk、parted
          -&gt; Filesystem -&gt; attr 、btrfs-progs(Build with zstd support)、chattr、dosfstools、e2fsprogs、f2fs-tools、f2fsck、lsattr、mkf2fs、xfs-fsck、xfs-mkfs
          -&gt; Shells  -&gt;  bash         
          -&gt; gawk、getopt、losetup、tar、uuidgen</code></pre>
<ul>
<li>Wifi基础包，打出的包可支持博通SDIO无线模块,Firmware不用选，因为打包源码中已经包含了来自Armbian的firmware，会自动覆盖openwrt rootfs中已有的firmware</li>
</ul>
<pre><code class="language-c">Kernel modules -&gt; Wireless Drivers -&gt; kmod-brcmfmac(SDIO) 
                                   -&gt; kmod-brcmutil
                                   -&gt; kmod-cfg80211
                                   -&gt; kmod-mac80211
                -&gt; USB Support -&gt; kmod-usb-net-asix
                               -&gt; kmod-usb-net-asix-ax88179
                               -&gt; kmod-usb2
                               -&gt; kmod-usb3</code></pre>
<ul>
<li>红色为选填，如果你需要！USB3.0转千兆网卡（型号：亚信asix-ax88179）则必选！</li>
</ul>
<pre><code class="language-c">Network  -&gt;  WirelessAPD -&gt; hostapd-common
                         -&gt; wpa-cli
                         -&gt; wpad-basic
                         -&gt;  iw</code></pre>
<ul>
<li>插件和主题，语言设置选项，根据需求设置，为了减少编译失败的概率，除了必要的晶晨插件，其他都不要安装，主题也是。可以编译成功后单独编译插件在安装。</li>
</ul>
<pre><code class="language-c">LUCI -&gt; 2.Modules -&gt; Translations -&gt; Chinese simplified 简体中文 自选
          -&gt; 3.Applications  -&gt; luci-app-amlogic  #晶晨插件，必选
          -&gt; 4. Themes   #尽量不要安装，不然容易后台面板进不去！</code></pre>
<h3>7.如果需要重新配置</h3>
<p>方法：使用命令</p>
<pre><code class="language-c">rm -rf ./tmp &amp;&amp; rm -rf .config
make menuconfig
make V=s -j$(nproc)</code></pre>
<h5>1.下载 dl 库，编译固件 （-j 后面是线程数）</h5>
<pre><code class="language-c">make -j8 download V=s</code></pre>
<h5>2.下载dl库，V=s 显示任务详细情况</h5>
<pre><code class="language-c">make V=s -j4</code></pre>
<blockquote>
<p>4代表线程，根据个人实际情况调整</p>
</blockquote>
<h5>3.如果编译失败，可以执行以下命令：</h5>
<blockquote>
<p>“make clean”删除编译目录/bin和/build_dir目录中的文件</p>
<p>“make dirclean”除了删除编译目录之外还删除编译工具目录，删除/bin和/build_dir目录的中的文件(make clean)以及/staging_dir、/toolchain、/tmp和/logs中的文件，一般在更换CPU架构的情况下才操作。</p>
</blockquote>
<h5>4.下载编译压缩包</h5>
<p>编译完成后输出路径：home/用户名/openwrt/bin/targets</p>
<h3>8. 安装并开通SSH登录方法：</h3>
<h5>1，必须切换成为root用户</h5>
<pre><code>sudo -i</code></pre>
<h5>2，先更新软件列表和更新软件</h5>
<pre><code>sudo apt-get update</code></pre>
<h5>3，先更新软件列表和更新软件</h5>
<pre><code>sudo apt-get upgrade</code></pre>
<h5>4，安装ssh</h5>
<pre><code>apt-get install ssh</code></pre>
<h5>5，启动ssh服务</h5>
<pre><code>sudo /etc/init.d/ssh start</code></pre>
<h5>6，检查是否有ssh环境</h5>
<pre><code>ps -e | grep ssh</code></pre>
<h5>7.ubuntu开通root登录SSH权限</h5>
<p>使用普通用户登录后切换root</p>
<pre><code>sudo -i</code></pre>
<p>创建root管理员密码</p>
<pre><code>passwd root</code></pre>
<p>开启root登录</p>
<pre><code>sudo sed -i &#039;s/^#\?PermitRootLogin.*/PermitRootLogin yes/g&#039; /etc/ssh/sshd_config </code></pre>
<p>开启密码验证</p>
<pre><code>sudo sed -i &#039;s/^#\?PasswordAuthentication.*/PasswordAuthentication yes/g&#039; /etc/ssh/sshd_config   </code></pre>
<p>重启ssh服务</p>
<pre><code>service sshd restart</code></pre>
<p>检查是否有ssh环境</p>
<pre><code>ps -e | grep ssh</code></pre>
]]></content:encoded>
					
					<wfw:commentRss>https://www.laoding.me/archives/635/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
