一、OpenWrt源码下载
虚拟机:Ubuntu 16.04 LTS
sudo apt install git subversion curl wget gawk
git clone https://git.openwrt.org/openwrt/openwrt.git
git checkout
HEAD origin/openwrt-18.06 v17.01.3 v18.06.3 v19.07.1 v21.02.0 v22.03.0
lede-17.01 origin/openwrt-19.07 v17.01.4 v18.06.4 v19.07.10 v21.02.0-rc1 v22.03.0-rc1
master origin/openwrt-21.02 v17.01.5 v18.06.5 v19.07.2 v21.02.0-rc2 v22.03.0-rc2
openwrt-18.06 origin/openwrt-22.03 v17.01.6 v18.06.6 v19.07.3 v21.02.0-rc3 v22.03.0-rc3
openwrt-19.07 reboot v17.01.7 v18.06.7 v19.07.4 v21.02.0-rc4 v22.03.0-rc4
openwrt-21.02 v17.01.0 v18.06.0 v18.06.8 v19.07.5 v21.02.1 v22.03.0-rc5
openwrt-22.03 v17.01.0-rc1 v18.06.0-rc1 v18.06.9 v19.07.6 v21.02.2 v22.03.0-rc6
origin/HEAD v17.01.0-rc2 v18.06.0-rc2 v19.07.0 v19.07.7 v21.02.3 v22.03.1
origin/lede-17.01 v17.01.1 v18.06.1 v19.07.0-rc1 v19.07.8 v21.02.4 v22.03.2
origin/master v17.01.2 v18.06.2 v19.07.0-rc2 v19.07.9 v21.02.5
git checkout v19.07.9
这里选择 OpenWrt-19.07.9
查看README,安装编译需要的工具
sudo apt install gcc g++ binutils patch bzip2 flex bison make autoconf gettext texinfo unzip sharutils libncurses5-dev ncurses-term zlib1g-dev gawk libz-dev libc6-dev curl libssl-dev libstdc++6 lib32stdc++6
二、获取所有最新的包
feeds.conf.default 可以根据自己版本选择设置
##默认:
src-git-full packages https://git.openwrt.org/feed/packages.git
src-git-full luci https://git.openwrt.org/project/luci.git
src-git-full routing https://git.openwrt.org/feed/routing.git
src-git-full telephony https://git.openwrt.org/feed/telephony.git
#src-git-full video https://github.com/openwrt/video.git
#src-git-full targets https://github.com/openwrt/targets.git
#src-git-full oldpackages http://git.openwrt.org/packages.git
#src-link custom /usr/src/openwrt/custom-feed
##git checkout v19.07.9 之后
src-git packages https://git.openwrt.org/feed/packages.git^1c5e4c80f49bfddaee1998636fd8efe915fee7fc
src-git luci https://git.openwrt.org/project/luci.git^786ebc9c014efed4df0d67b140b2348a58d99f5b
src-git routing https://git.openwrt.org/feed/routing.git^33254957df8d148631a98c49a5b623f996d8d6fc
src-git telephony https://git.openwrt.org/feed/telephony.git^c6bff940c0d3e73eac0d8ec62bf1e86f1c3cbefe
src-git freifunk https://github.com/freifunk/openwrt-packages.git^944ff29d953a0de7e7fcca7b0907f7d7486b7b4c
##看到的一个
src-git packages https://git.openwrt.org/feed/packages.git;openwrt-19.07
src-git luci https://git.openwrt.org/project/luci.git;openwrt-19.07
src-git routing https://git.openwrt.org/feed/routing.git;openwrt-19.07
src-git telephony https://git.openwrt.org/feed/telephony.git;openwrt-19.07
src-link custom /usr/src/openwrt/custom-feed
更新
./scripts/feeds update -a
./scripts/feeds install -a
三、开始编译
配置
make menuconfig
## 根据开发板选择
┌──────────────────────────────────────────────────────────────────────────────────────────│
│ │ Target System (MediaTek Ralink MIPS) ---> │ │
│ │ Subtarget (MT76x8 based boards) ---> │ │
│ │ Target Profile (MediaTek LinkIt Smart 7688) --->
## 定制自己的系统
编译
##首次编译
make V=sc
##或者
make -j1 V=s
.
.
.
.
.
work/openwrt$ ls bin/targets/ramips/mt76x8/ -lh
total 11M
-rw-r--r-- 1 x2intell x2intell 16K 11月 18 16:45 config.buildinfo
-rw-r--r-- 1 x2intell x2intell 502 11月 18 16:45 feeds.buildinfo
-rw-r--r-- 1 x2intell x2intell 3.1K 11月 18 17:30 openwrt-19.07.10-ramips-mt76x8-device-linkit7688.manifest
-rw-r--r-- 1 x2intell x2intell 5.4M 11月 18 17:30 openwrt-19.07.10-ramips-mt76x8-LinkIt7688-initramfs-kernel.bin
-rw-r--r-- 1 x2intell x2intell 5.6M 11月 18 17:30 openwrt-19.07.10-ramips-mt76x8-LinkIt7688-squashfs-sysupgrade.bin
drwxr-xr-x 2 x2intell x2intell 12K 11月 18 17:30 packages
-rw-r--r-- 1 x2intell x2intell 634 11月 18 17:30 sha256sums
-rw-r--r-- 1 x2intell x2intell 18 11月 18 16:45 version.buildinfo
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)