博文

目前显示的是标签为“OpenWRT”的博文

About Netgear WNDR4300v1 5GHz missing problem

After flashing OpenWRT to Netgear WNDR4300v1, I surprisingly found that 5GHz wireless card was missing. And I tried to flash back to OEM version but ended up in dead loop rebooting. The 5GHz wifi of WNDR4300 is provided by AR9580 which is connected by the PCI interface. I used dmesg to inspect the log of openwrt and found that PCI found nothing when starting. Was the chip broken? I nearly gave up and tried to disconnect the router with its power and went to dinner. After the dinner, I powered up the router and -- it just worked! Here is the log from dmesg. [     0.391671] PCI host bridge to bus 0000:00 [     0.396044] pci_bus 0000:00: root bus resource [mem 0x10000000-0x13ffffff] [     0.403409] pci_bus 0000:00: root bus resource [io   0x0000] [     0.409340] pci_bus 0000:00: root bus resource [??? 0x00000000 flags 0x0] [     0.416575] pci_bus 0000:00: No busn resource found for root bus, will use [bus 00-ff]...

Compile specific OpenWRT version and change the mtdlayout

1. Clone OpenWRT project from github git clone https://github.com/openwrt/openwrt.git 2. Find the release info from their github page. Click the 'X releases' tab can copy the commit number of the release you want. 3. Enter the folder of your cloned openwrt and reset header to that release. git reset --hard <commit number> 4. Install feeds. ./scripts/feeds update -a ./scripts/feeds install -a 5. Config. You must choose your target according to your router. make menuconfig e.g.: For router Netgear WNDR4300 * Target System => Atheros AR7xxx/AR9xxx * Subtarget  => Generic devices with nand flash * Target Profile => Netgear WNDR4300v1 * You may need LuCi Web admin interface. Please choose LuCi/Collections/luci 6. Download all packages before make make download 7. Make. (If you are in China, you may encounter some errors caused by GFW. Try to use a proxy to solve the problem.) make 8. The image will be in ./bin/targets/<you...

Create ubifs volumes in Linux (OpenWRT)

When using a router flashed with OpenWRT, you may find that the capacity of the filesystem is much smaller than the real capacity. For example, the router I use is Netgear WNDR4300 which has a 128MB Nand flash. But when using the 'df -h' command to inspect the space usage status, I surprisingly found that the space of the total mounting point '/' is only 14MB. So to find out the reason and try to expand usable space, I used the command "dmesg" and "cat /proc/mtd" to collect the information of mtd devices. [     0.634792] nand: device found, Manufacturer ID: 0x2c, Chip ID: 0xf1 [     0.641287] nand: Micron NAND 128MiB 3,3V 8-bit [     0.645888] nand: 128 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64 [     0.653625] Scanning device for bad blocks [     0.661590] random: fast init done [     0.744785] 12 cmdlinepart partitions found on MTD device ar934x-nfc [     0.751249] Creating 12 MT...

Configure shadowsocks transparent proxy + gfwlist(PAC) on OpenWRT Router

You must have Shadowsocks services which can be gained in the following way before actually starting to configure. Purchase Shadowsocks Service directly online. Recommendation:  Just My Socks Quick Shadowsocks configuration using Just My Socks, please click here . Build the service yourself. Please refer to  Configure V2Ray(Shadowsocks mode) + 加速:普通BBR/魔改BBR on KVM VPS (Tested on Ubuntu 16.04) . The environment this article used, FYI: OpenWrt 18.06.1/LuCI openwrt-18.06 The Overall Idea: DNS part: if the requested address is in gfwlist     forward DNS request to 127.0.0.1:5353 which is listened by dns-forwarder     dns-forwarder forwards the request to 8.8.8.8 for translating     8.8.8.8 is in gfwlist, so match iptables rules and is fowared to 1080     ss-redir listen on port 1080, foward request to shadowsocks server else     use public DNS servers or the DNS servers provided by the ISP other da...

Openwrt路由器上配置shadowsocks透明代理+gfwlist(PAC)

Shadowsocks 服务推荐: Just My Socks 推荐理由:价格便宜,支持月付,安全灵活。 本文配置的前提是已经有shadowsocks服务。你可以通过购买或者自行搭建的方式获得。以下是链接: 直接购买网上的服务,此处推荐 Just My Socks 快速Just My Socks配置Shadowsocks,请点 这里 。 自行搭建,请参考 KVM VPS上配置V2Ray(Shadowsocks mode) + 加速:普通BBR/魔改BBR(测试于Ubuntu 16.04) 本文所使用的环境,仅作参考: OpenWrt 18.06.1/LuCI openwrt-18.06 整体思路: DNS部分: if 访问地址在gfwlist中     DNS请求转发到127.0.0.1:5353的dns-forwarder的监听端口     dns-forwarder转发到8.8.8.8进行解析     8.8.8.8在gfwlist中,通过匹配iptables规则转发到1080端口     ss-redir监听1080端口,通过shadowsocks代理服务器转发请求 else     正常使用公共DNS或者ISP提供的DNS服务器 其他数据: if 访问地址在gfwlist中     通过匹配iptables规则转发到1080端口     ss-redir监听1080端口,通过shadowsocks代理服务器转发请求 else     正常访问 步骤1:依赖包安装( 非常重要 ) 本文所有的操作都基于SSH和Web管理界面操作。 首先通过SSH添加GPG Key,这样之后添加的源才能通过签名验证: wget http://openwrt-dist.sourceforge.net/packages/openwrt-dist.pub -O /tmp/openwrt-dist.pub opkg-key add /tmp/openwrt-dist.pub 然后在OpenWRT Web管理界面,“...