Skip to content

Prepare & compile sources

negan07 edited this page Feb 17, 2021 · 27 revisions

Prepare the host system

Repository developed on I5-3570K with Intel Virtualizazion support enabled.

OS used for developing & compiling:

Debian Stretch 64-bit with VMware running on W10.

Some links:

http://www.osboxes.org/debian/#debian-9-vmware

https://www.debian.org

Build Sources

To finalize make successfully, root privileges (sudo) must be available.

su

apt-get update && apt-get install sudo

exit

Make sure git is installed too, otherwise type:

sudo apt-get update && sudo apt-get install git

Clone the git project with:

git clone https://github.com/negan07/ancistrus

In particular, typing:

make prepare_host

could help installing the packets needed to compile sources successfully.

Expecially:

debian has dash posix compliant only default shell, faster than bash but with tiny command set

e.g. += support is missing creating problem on making and many more.

The in-use shell must be switched from default dash to bash with:

sudo dpkg-reconfigure -p critical dash

Exit from the shell terminal then enter back again.

Type: make help to see the make options.

Typing: make will begin all the building stage.

During make processes, automake does the following:

  • Download Netgear firmware sources including toolchain;
  • Patch & compile the toolchain;
  • Patch & compile kernel & original netgear sources;
  • Download & patch work dir thirdparty apps;
  • Make work thirdparty apps;
  • Build an opkg local bin app & use it to offline-install work thirdparty packages on target netgear sources;
  • Prepare & build the .img firmware with the included work thirdparty modifications.

After compiling type make ipk to prepare, create and build .ipk packages & related index, ready to be uploaded onto a repository mirror.