Setting up ubuntu build box:
-
create Ubuntu 12.04 LTS 64bit box with at least 6GB of RAM and 40 GB of storage. Assign as many CPU cores as you can, use SSD storage and fast Internet connection to improve build times
-
install required packages:
sudo apt-get update
sudo apt-get dist-upgrade
sudo apt-get install git-core build-essential libssl-dev libncurses5-dev unzip gawk htop mc
sudo apt-get install build-essential subversion git-core libncurses5-dev zlib1g-dev gawk flex quilt libssl-dev xsltproc libxml-parser-perl mercurial bzr ecj cvs unzip
sudo apt-get install build-essential subversion libncurses5-dev zlib1g-dev gawk gcc-multilib flex git-core gettext libssl-dev
-
copy
openwrt-python2.7.11-almond.tar.bz2
archive to build box I.e. by scp -
uncompress
openwrt-python2.7.11-almond.tar.bz2
archive:
tar jxvf openwrt-python2.7.11-almond.tar.bz2
- (optional) rename
openwrt-to-package
folder to something more descriptive. We useopenwrt-python
in this document
mv openwrt-to-package openwrt-python
- go into extracted folder
cd openwrt-python
- run initial build setup
./setup.sh
- start the build
make -j<number of CPUs+1>
i.e. make -j13
After hour or so package repository will appear in ./bin
direcory of openwrt
Caution: if you loose ssh connection to the vm build will be terminated and you have start over by issuing:
make distclean
./setup.sh
make -j<number of CPUs+1>
in order to prevent this you can use terminal session manager such as screen or simply add nohup to make command in point 7:
nohup make -j13 &
tail -f nohup.out
Then after you loose connection build will be running but you won't see it in the console so you may want to monitor htop process list for build processes such as make and gcc to know when it's done.
- copy compiled pcakages to almond (this requires previous preparation of Almond and usb drive connected to it and mounted in /extUSB)
scp -r -oKexAlgorithms=diffie-hellman-group1-sha1 bin/g2-uClibc/packages root@<almond IP>:/extUSB/repo/