如何编译自己需要的 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

相关文章

  • 描述时间过得快的好句子

    1.后来,南山的风吹散了谷堆,北海的水淹没了墓碑。 这句话的意思是“时间过得很快”,但富有诗意,有那种“时光荏苒,岁月沧桑”的意境。比如,写“回忆”类记叙文时,表示时间很快过去,但依然铭记亲人或朋友时,可以这么去结尾:“后来,南山的风吹散了谷堆,北海的水淹没了墓碑,多少事沧桑巨变,无数人来了又回,可与你有关的点点滴滴,一直在我心上铭刻,不曾改变,也永不褪色。…

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

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

    无关专业 2020-02-24
  • 让PVE直接跑docker

    最近貌似流行软路由,选了一圈Proxmox VE下玩多系统,结果还想玩玩docker,居然pve原生还不支持,放狗搜了下找到自己开启方法。 1.添加软件源 nano /etc/apt/sources.list deb http://download.proxmox.com/debian stretch pve-no-subscription 复制代码2.注释…

    无关专业 2020-03-05
  • Tewa-708G admin password

    1. 假设你光猫的局域网ip是 192.168.1.11. 光猫插入u盘,fat32文件系统。2. 常规用户登陆 http://192.168.1.1:80803. 切换到 管理-设备管理4. 浏览器进入调试模式,在console处,从top切换到MD_Device.html5. 在console内执行`http://192.168.1.1:8080/usb
    无关专业 2020-12-01
  • UNRAID使用NVIDIA显卡(直通篇)

    在UNRAID下想要利用NVIDIA显卡,最为传统的方法是创建一个虚拟机,并将显卡直通进去。最早使用1080测试了直通功能,只需要在虚拟机设置里的Other PCI Devices选中1080即可。但20系显卡因为多了一个type c接口,情况有些变化,之前在知乎上分享了URNIAD 6.6.6直通2080ti的经历,特地将其转载过来。 错误 之前在Unra…

    无关专业 2020-05-18
  • 如何让手上的E5-v3处理器工作在最佳频率——总结篇

    前言:全核心最大睿频与工作原理     上篇中说,通过测试得出E5-v3是不能通过手动调节倍频的方式锁定到最大睿频。而实际上有人眉头一皱,发现事情并不单纯。。。    结果E5-v3系列的一个勘误被发现了。我们知道,Haswell的桌面级cpu,如i5-4570,在早期bios中可以手动将全部核心锁定在最大睿频运行。虽然随后intel马上发布微码更新修复了这…

    无关专业 2019-12-08