Skip to content

Instantly share code, notes, and snippets.

Last active September 19, 2023 19:52
Show Gist options
  • Save keton/f199ff68d6414d1f3dc810f4e83977d9 to your computer and use it in GitHub Desktop.
Save keton/f199ff68d6414d1f3dc810f4e83977d9 to your computer and use it in GitHub Desktop.
Openwrt for Almond build instructions

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 use openwrt-python in this document

mv openwrt-to-package openwrt-python

  • go into extracted folder

cd openwrt-python

  • run initial build setup


  • 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


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/

src-git packages^2edb2e36ec662ecd950ebc9fb8e7b8931d9bbb10
src-git luci^6415c04d1342162bad16874653189b3780cdbd04
./scripts/feeds update -a
ls feeds/packages/lang/python-* | grep : | sed -e 's=:==' | cut -d'/' -f4 | xargs ./scripts/feeds install
./scripts/feeds install curl wget nano
cp working.config .config
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment