1. XenForo 1.5.14 中文版——支持中文搜索!现已发布!查看详情
  2. Xenforo 爱好者讨论群:215909318 XenForo专区

Win10子系统编译OpenWrt固件

本帖由 admin2020-02-29 发布。版面名称:应用交流

  1. admin

    admin 管理员 管理成员

    注册:
    2011-11-01
    帖子:
    3,671
    赞:
    2,425
    一、准备工作:
    1、应用商店安装Ubuntu 16.04
    2、自备socks5全局代理
    二、编译说明:
    1、使用Lean的Openwrt源码https://github.com/coolsnowwolf/lede
    2、加入lienol的软件仓库https://github.com/Lienol/openwrt-package
    3、不要用 root 用户 git 和编译!!!
    4、默认登陆IP 192.168.1.1, 密码 password
    5、LuCI说明https://www.vrrmr.net/img/luCI--说明.txt
    三、编译过程
    1、安装组件(国内源见结尾备注)
    代码:
    sudo apt-get update
    sudo apt-get -y install build-essential asciidoc binutils bzip2 gawk gettext git libncurses5-dev libz-dev patch python3.5 unzip zlib1g-dev lib32gcc1 libc6-dev-i386 subversion flex uglifyjs git-core gcc-multilib p7zip p7zip-full msmtp libssl-dev texinfo libglib2.0-dev xmlto qemu-utils upx libelf-dev autoconf automake libtool autopoint device-tree-compiler g++-multilib linux-libc-dev:i386
    2、安装proxychains使用socks5代理
    代码:
    git clone https://github.com/rofl0r/proxychains-ng.git
    cd proxychains-ng
    ./configure
    make && make install
    cp ./src/proxychains.conf /etc/proxychains.conf
    cd .. && rm -rf proxychains-ng
    编辑配置文件/etc/proxychains.conf结尾处
    代码:
    socks5 127.0.0.1 1080
    
    3、克隆Lean的源码
    代码:
    proxychains4 git clone http://github.com/coolsnowwolf/lede
    4、添加lienol的软件仓库
    编辑feeds.conf.default最后插入
    代码:
    src-git lienol http://github.com/Lienol/openwrt-package
    5、清理、更新、安装源feeds
    代码:
    proxychains4 ./scripts/feeds clean
    proxychains4 ./scripts/feeds update -a
    proxychains4 ./scripts/feeds install -a
    6、预下载源码
    代码:
    proxychains4 make -j1 V=s download
    7、config配置,参考LuCI说明。
    代码:
    make menuconfig
    8、开始编译,n=线程数+1,例如4线程的I5填-j5。
    代码:
    proxychains4 make -j5 V=s 
    四、更新编译,建议每次重新生成config。
    代码:
    cd lede
    proxychains4 git pull
    proxychains4 ./scripts/feeds update -a && ./scripts/feeds install -a
    proxychains4 make -j1 V=s download
    rm -rf ./tmp && rm -rf .config
    make menuconfig
    proxychains4 make -j5 V=s 
    五、备注
    1、如遇ubuntu: Unable to correct problems, you have held broken packages
    备份并替换/etc/apt/sources.list的源内容
    代码:
    deb http://mirrors.aliyun.com/ubuntu/ xenial main restricted universe multiverse
    deb http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted universe multiverse
    deb http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted universe multiverse
    deb http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse
    ##测试版源
    deb http://mirrors.aliyun.com/ubuntu/ xenial-proposed main restricted universe multiverse
    # 源码
    deb-src http://mirrors.aliyun.com/ubuntu/ xenial main restricted universe multiverse
    deb-src http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted universe multiverse
    deb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted universe multiverse
    deb-src http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse
    ##测试版源
    deb-src http://mirrors.aliyun.com/ubuntu/ xenial-proposed main restricted universe multiverse
    
    2、如遇find: The relative path 'Files/WindowsApps/CanonicalGroupLimited.Ubuntu16.04onWindows_1604.2019.523.0_x64__79rhkp1fndgsc' is included in the PATH environment variable, which is insecure in combination with the -execdir action of find. Please remove that entry from $PATH
    修改注册表把值从7 改为5,并重启电脑。
    代码:
    HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Lxss\{GUID}\Flags
     
    最后编辑: 2020-02-29
正在加载...