Coder Social home page Coder Social logo

openwrt-docker's Introduction

openwrt-docker

这个 repo 主要是用 docker 来调试和生成不同的配置,然后放到 github action 中自动编译,您也可以直接用来编译

构建镜像

$ git clone [email protected]:garryshield/openwrt-docker.git
$ cd openwrt-docker
$ docker build -t openwrt-docker ./

# 上传镜像
$ docker login
$ docker push openwrt-docker:latest

下载源码

$ cd openwrt-docker
$ git clone [email protected]:coolsnowwolf/lede.git
$ docker run -it --rm -v $(pwd)/lede:/home/ubuntu/lede openwrt-docker /bin/bash

更新 feeds

$ id
uid=1000(ubuntu) gid=1000(ubuntu) groups=1000(ubuntu),27(sudo)
$ pwd
/home/ubuntu

$ cd ~/lede
$ ./scripts/feeds clean
$ ./scripts/feeds update -a
$ ./scripts/feeds install -a
$ ./scripts/feeds install -a

注:第一次执行 ./scripts/feeds install -a 可能会出现 WARNING 再执行一次就不会出现 原因见:issues/4731

选择配置

# 生成默认配置 .config
$ make defconfig
# 手动修改配置 .config
$ make menuconfig

编译固件

$ make download -j$(nproc)
$ make V=s -j1

二次编译

$ id
uid=1000(ubuntu) gid=1000(ubuntu) groups=1000(ubuntu),27(sudo)
$ pwd
/home/ubuntu

$ cd ~/lede
$ git pull
$ ./scripts/feeds update -a
$ ./scripts/feeds install -a
$ make defconfig
$ make download -j$(nproc)
$ make V=s -j$(nproc)

重新配置

$ rm -rf ./tmp && rm -rf .config*
$ make menuconfig
$ make download -j$(nproc)
$ make V=s -j$(nproc)

参考链接:

openwrt-docker's People

Contributors

garryshield avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.