如何编译自己需要的 OpenWrt 固件

Lean https://github.com/coolsnowwolf/lede

注意:

  1. 要用 root 用户 git 和编译!!!
  2. 国内用户编译前最好准备好梯子
  3. 默认登陆IP 192.168.1.1, 密码 password

编译命令如下:

  1. 首先装好 Ubuntu 64bit,推荐 Ubuntu 18 LTS x64
  2. 命令行输入 sudo apt-get update ,然后输入 sudo apt-get -y install build-essential asciidoc binutils bzip2 gawk gettext git libncurses5-dev libz-dev patch python3 python2.7 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 antlr3 gperf wget curl swig rsync
  3. 使用 git clone https://github.com/coolsnowwolf/lede 命令下载好源代码,然后 cd lede 进入目录
  4. ./scripts/feeds update -a ./scripts/feeds install -a make menuconfig
  5. make -j8 download V=s 下载dl库(国内请尽量全局科学上网)
  6. 输入 make -j1 V=s (-j1 后面是线程数。第一次编译推荐用单线程)即可开始编译你要的固件了。

本套代码保证肯定可以编译成功。里面包括了 R20 所有源代码,包括 IPK 的。

二次编译:

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

如果需要重新配置:

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

编译完成后输出路径:/lede/bin/targets

English Version: How to make your Openwrt firmware.

Note:

  1. DO NOT USE ROOT USER TO CONFIGURE!!!
  2. Login IP is 192.168.1.1 and login password is “password”.

Let’s start!

First, you need a computer with a linux system. It’s better to use Ubuntu 18 LTS 64-bit.

Next you need gcc, binutils, bzip2, flex, python3.5+, perl, make, find, grep, diff, unzip, gawk, getopt, subversion, libz-dev and libc headers installed.

To install these program, please login root users and type sudo apt-get -y install build-essential asciidoc binutils bzip2 gawk gettext git libncurses5-dev libz-dev patch python3.5 python2.7 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 antlr3 gperf wget swig rsync in terminal

Third, logout of root users. And type this git clone https://github.com/coolsnowwolf/lede in terminal to clone this source.

After these please type cd lede to cd into the source.

Please Run ./scripts/feeds update -a to get all the latest package definitions defined in feeds.conf / feeds.conf.default respectively and ./scripts/feeds install -a to install symlinks of all of them into package/feeds/ .

Please use make menuconfig to choose your preferred configuration for the toolchain and firmware.

Use make menuconfig to configure your image.

Simply running make will build your firmware. It will download all sources, build the cross-compile toolchain, the kernel and all chosen applications.

To build your own firmware you need to have access to a Linux, BSD or MacOSX system (case-sensitive filesystem required). Cygwin will not be supported because of the lack of case sensitiveness in the file system.

Note: Addition Lean’s private package source code in ./package/lean directory. Use it under GPL v3.

GPLv3 is compatible with more licenses than GPLv2: it allows you to make combinations with code that has specific kinds of additional requirements that are not in GPLv3 itself. Section 7 has more information about this, including the list of additional requirements that are permitted.

(0)
PipitaPipita
上一篇 2020-12-10
下一篇 2020-12-10

Warning: Undefined array key "related_news" in /var/www/html/www.pita.ltd/wordpress/wp-content/themes/justnews/single.php on line 175

相关文章

  • #脚本#SSH端口怎么防止被暴力破解攻击?使用一键脚本自动拉黑

    SSH端口两种防御脚本 方法1: 超过10次登陆失败就封掉IP,创建shell脚本:secure_ssh.sh 123456789101112 #! /bin/bashcat /var/log/secure|awk ‘/Failed/{print $(NF-3)}’|sort|uniq -c|awk&nbsp…

    无关专业 2021-09-20
  • 内网穿透神器Frps一键安装脚本及设置教程

     frps 是一个高性能的反向代理应用,可以帮助您轻松地进行内网穿透,对外网提供服务,支持 tcp, http, https 等协议类型,并且 web 服务支持根据域名进行路由转发。        *因为frps是go语言写的,所以在路由器上使用的时候,请使用虚拟内存,请使用虚拟内存,请使用虚拟内存。 前期准…

    无关专业 2020-02-24
  • 一键网络重装系统 – DD魔改版(适用于Linux / Windows)

    简介 一键网络重装系统 – 魔改版,它可以通过Internet重新安装Linux和Windows以及常见的操作系统。例如:Linux(CentOS,Debian,Ubuntu、etc..),Windows(2019、2016、2012R2、2008R2、7、2003、etc..),以及其他系统(不断支持更多中)。 当我们需要重装VPS/云平台/独…

    无关专业 2020-12-01
  • 神仙文案

    1、“我在山谷湖泊间拾荒,捡拾散落的星辰和光。” 2、我爱了整个宇宙,只为了跟你碰头。 3、落幕下的花店,玫瑰将荒野的故事告诉风烟。 4、“一枝真心准备的花胜过千朵玫瑰。” 5、“我搬来整个城市的玫瑰,赠你一个错过的春天。” 6、等风起,等花开,等我们再次相遇。 7、窗前的白鸽飞过,你眼中落下星光。 8、“人间永远有野火焚不尽的诗书和法钵罩不住的柔情。” 9…

    无关专业 2021-10-01
  • PROXMOX PVE 设置国内源

    目前Proxmox中文社区源已正式提供镜像服务,镜像更新频率为每10小时,镜像站机房存放在法国巴黎online机房使用阿里云、华为云融合提供国内CDN加速服务。 地址 http://download.proxmox.wiki # 删除企业源 rm -rf /etc/apt/sources.list.d/pve-enterprise.list #下载秘钥 wg…

    无关专业 2020-12-01