ubuntu1604
HomeLede20200905 V5.4.61 release version
================================================================================
build for v2020.09.05 (stable version, checked in release image)
first run the release version (v2020.09.05),find out build info
root@OpenWrt:~# cat /proc/version
Linux version 5.4.61 (xiaoqingfengATGH@Homelede) (gcc version 8.4.0 (OpenWrt GCC 8.4.0 r2922-68b445b2d)) #0 SMP Tue Sep 1 08:53:14 2020
root@OpenWrt:~# opkg info kernel
Package: kernel
Version: 5.4.61-1-b7c57e1a0f7829a2a192cfb23d734924
Depends: libc
Status: install user installed
Architecture: x86_64
Installed-Time: 1599222131
================================================================================
trace the origin build
dongzl@ccef69934827:~/share/HomeLede$ git log 68b445b2d
commit 68b445b2d6a1d5db0a5d1043e12524090fe8cffd
Merge: ecacef2 c1941e1
Author: xiaoqingfeng <xiaoqingfengatgm@gmail.com>
Date: Fri Jul 3 21:08:57 2020 +0800
Merge remote-tracking branch 'upstream/master' into k5
================================================================================
trace the optimize version
commit a535ac8ab600970424af14759a036a954eccf2ae
Author: Richard Yu <31612198+xiaoqingfengATGH@users.noreply.github.com>
Date: Sun Sep 6 14:54:59 2020 +0800
Update README.md
commit 1bb7f0f94706402d0fb79f6cb748712df11662d0
Author: homelede <homelede@191>
Date: Sat Sep 5 22:25:18 2020 +0800
update defconfig for v2020.09.05
================================================================================
sudo apt-get update
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 \
curl swig rsync
git clone https://github.com/xiaoqingfengATGH/HomeLede.git HomeLede
git checkout -b k5 origin/k5
================================================================================
wget https://golang.google.cn/dl/go1.16.2.linux-amd64.tar.gz
tar xvf go1.16.2.linux-amd64.tar.gz
sudo mv go /usr/local/.
file /usr/local/go/bin/go
sudo ln -s /usr/local/go/bin/go /usr/bin/.
go version
//replace goproxy
echo "export GO111MODULE=on" >> ~/.bashrc
echo "export GOPROXY=https://goproxy.io" >> ~/.bashrc
source ~/.bashrc
echo $GO111MODULE
echo $GOPROXY
--------------------------------------------------------------------------------
//first test proxychains work success
//http://192.168.150.35 is the windows which installed clash-windows and open port 7890
sudo apt install w3m proxychains
file /usr/lib/x86_64-linux-gnu/libproxychains.so.3
sudo vi /usr/bin/proxychains
export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libproxychains.so.3
sudo vi /etc/proxychains.conf
#local with host
http 192.168.150.35 7890
proxychains w3m www.google.com
git config --global http.https://github.com.proxy http://192.168.150.35:7890
git config --global https.https://github.com.proxy http://192.168.150.35:7890
================================================================================
7z x HomeLede-20210316.7z
git checkout .
git branch -a
git checkout a535ac8ab6009704
tar xvf buildl-20210316.tgz
copy -f [root] to [.]
sudo cp -f po2lmo /usr/bin/po2lmo
sudo chmod 755 /usr/bin/po2lmo
#proxychains ./prepareCompile.sh
#./prepareCompile.sh
./scripts/feeds clean
//first run -a(add)
./scripts/feeds update -a
./scripts/feeds update -i
./scripts/feeds install -a
//modify kernel md5 sign (from [opkg info kernel])
patch -p1 < md5_vermagic.patch
patch -p1 < package-dnsforwarder.patch
================================================================================
feeds warning must be cleared
Fatal:
WARNING: Makefile 'package/feeds/packages/docker-compose/Makefile' has a dependency on 'docker-ce', which does not exist
fix:
find package -iname "docker-compose"
find feeds -iname "docker-compose"
vi prepareCompile.sh
add del items in disablePkgsList
./feeds/packages/utils/docker-compose
./package/feeds/packages/docker-compose
================================================================================
cp -f defconfig .config
make menuconfig
Network --->Firewall ---><*> iptables-mod-u32
Utilities ---><*> inotifywait
Utilities ---><*> inotifywatch
LuCI --->3. Applications --->< > luci-app-ttyd
make download V=s
================================================================================
prepare
//avoid build stack overflow
ulimit -s 10240
#make defconfig
//use V=s to see build detail, this leeads the build very slow
make download V=s
#proxychains make download V=s
#proxychains make -j1 V=s
make -j1 V=s
make -j20
#use root to build
export FORCE_UNSAFE_CONFIGURE=1
make -j1 V=s
================================================================================
make -j1
make -j20
make[3] -C package/lean/rclone-ng compile
make -r world: build failed. Please re-run make with -j1 V=s or V=sc for a higher verbosity level to see what's going on
check detail and fix build with single(j1)
make package/lean/rclone-ng/compile V=s
================================================================================
ipk path
HomeLede\bin\targets\x86\64\packages
opkg install xxx.ipk
opkg install xxx.ipk --force-depends
================================================================================
================================================================================
================================================================================
================================================================================
================================================================================
================================================================================
---
Fatal:
gzip: /home/dongzl/share/HomeLede/dl/tcp_wrappers_7.6.tar.gz: not in gzip format
fix:
tar xvf tcp_wrappers_7.6.tar.gz
tar -czvf tcp_wrappers_7.6.tar.gz tcp_wrappers_7.6/
---
Fatal:
configure: error: you should not run configure as root (set FORCE_UNSAFE_CONFIGURE=1 in environment to bypass this check)
fix:
export FORCE_UNSAFE_CONFIGURE=1
---
Fatal: You must get working getaddrinfo() function.
or you can specify "--disable-ipv6".
fix:
proxychains PYTHON_CONFIGURE_OPTS="--disable-ipv6" pyenv install 3.6.2
---
Fatal:
opkg_install_cmd: Cannot install package luci-app-ttyd.
fix:
rm -rf ./feeds/luci/modules/luci-app-ttyd/luasrc
---
Fatal:
go Get i/o timeout
fix:
https://blog.csdn.net/asty9000/article/details/107720900
go ver1.2 below
export GO111MODULE=on
export GOPROXY=https://goproxy.io
go ver1.3
go env -w GO111MODULE=on
go env -w GOPROXY=https://goproxy.io,direct
---
Fatal:
gnutls_handshake() failed: The TLS connection was non-properly terminated.
fix:
first make proxychains work success
proxychains w3m www.google.com
git config --global http.https://github.com.proxy http://192.168.150.35:7890
git config --global https.https://github.com.proxy http://192.168.150.35:7890
---
Fatal:
/lede/feeds/packages/lang/golang//golang-build.sh: line 108: go: command not found
fix:
/usr/local/go/bin
wget https://golang.google.cn/dl/go1.16.2.linux-amd64.tar.gz
tar xvf go1.16.2.linux-amd64.tar.gz
sudo mv go /usr/local/.
file /usr/local/go/bin/go
sudo ln -s /usr/local/go/bin/go /usr/bin/.
go version
---
Fatal:
dnsforwarder-6.1.15.tar.gz: Download from https://github.com/holmium/dnsforwarder.git failed
fix:
sed -i "s/PKG_SOURCE_URL:=.*/PKG_SOURCE_URL:=https:\/\/github\.com\/1715173329\/dnsforwarder\.git/" package/lean/dnsforwarder/Makefile
sed -i "s/PKG_SOURCE_VERSION:=.*/PKG_SOURCE_VERSION:=693b554e59479c2867c74f0bb5e26290b93747c5/" package/lean/dnsforwarder/Makefile
sed -i "s/\ \ URL:=.*/\ \ URL:=https:\/\/github\.com\/1715173329\/dnsforwarder/" package/lean/dnsforwarder/Makefile
================================================================================
================================================================================
================================================================================
================================================================================