1. 下载openwrt源代码

点击(此处)折叠或打开

  1. git clone https://git.openwrt.org/openwrt/openwrt.git
  2. enzo@t430s:~/openwrt/openwrt$ git branch -a
  3. * master
  4. remotes/origin/HEAD -> origin/master
  5. remotes/origin/lede-17.01
  6. remotes/origin/master
  7. remotes/origin/openwrt-18.06
  8. enzo@t430s:~/openwrt/openwrt$ git tag
  9. reboot
  10. v17.01.0
  11. v17.01.0-rc1
  12. v17.01.0-rc2
  13. v17.01.1
  14. v17.01.2
  15. v17.01.3
  16. v17.01.4
  17. v17.01.5
  18. v17.01.6
  19. v18.06.0
  20. v18.06.0-rc1
  21. v18.06.0-rc2
  22. v18.06.1
  23. v18.06.2


切换稳定分支

点击(此处)折叠或打开

  1. git checkout v18.06.2 -b v18.06.2
2.安装依赖库
sudo apt-get install  libncurses5-dev  zlib1g-dev  gawk flex patch unzip python2.7
3. 解决编译问题
Checking 'case-sensitive-fs'... failed.
解决方法:
fsutil.exe file SetCaseSensitiveInfo d:\work enable
关闭openwrt大小写敏感检查
/openwrt$ vi include/prereq-build.mk

点击(此处)折叠或打开

  1. 20 #$(eval $(call TestHostCommand,case-sensitive-fs, \
  2. 21 # OpenWrt can only be built on a case-sensitive filesystem, \
  3. 22 # rm -f $(TMP_DIR)/test.*; touch $(TMP_DIR)/test.fs; \
  4. 23 # test ! -f $(TMP_DIR)/test.FS))
  5. 24

点击(此处)折叠或打开

  1. //启用NTFS区分大小写功能
  2. fsutil.exe file SetCaseSensitiveInfo C:文件夹名称 enable
  3. //禁用NTFS区分大小写功能
  4. fsutil.exe file SetCaseSensitiveInfo C:文件夹名称 disable
./scripts/feeds update -a
./scripts/feeds install -a

4
make menuconfig
"Target System" as (TI OMAP3/4/AM33xx),
"Target Profile" as (TI AM335x BeagleBone Black), 
 5.编译
proxychains make -j4

6. 烧写
烧写镜像到sd卡
zcat openwrt-omap-am335x-boneblack-ext4-sdcard.img.gz | sudo dd of=/dev/sdb bs=4096 conv=fsync

备注: 配置终端代理

安装proxychains终端代理,前提需要安装shadowsockets

点击(此处)折叠或打开

  1. vi /etc/proxychains4.conf
  2. socks5 127.0.0.1 1080

参考链接:
http://lirobo.blogspot.com/2018/06/official-openwrt-on-beaglebone-black.html

09-29 04:14