how-to Quick build

Want to share your OpenWrt / Gargoyle knowledge? Implemented a new feature? Let us know here.

Moderator: Moderators

ispyisail
Moderator
Posts: 5180
Joined: Mon Apr 06, 2009 3:15 am
Location: New Zealand

how-to Quick build

Post by ispyisail »

Install Ubuntu server 22.04 64bit

make an SSH connection (putty)

Code: Select all

sudo add-apt-repository universe

Code: Select all

sudo add-apt-repository multiverse

Code: Select all

sudo apt-get update

Code: Select all

sudo apt-get upgrade -y

Code: Select all

sudo apt install build-essential gawk gcc-multilib flex git gettext libncurses5-dev libssl-dev python3-distutils zlib1g-dev

Code: Select all

sudo apt install unzip file wget python2

Code: Select all

sudo apt install python-is-python3

Code: Select all

sudo apt-get install npm -y

Code: Select all

git clone https://github.com/ericpaulbishop/gargoyle.git

Code: Select all

cd gargoyle

OPTIONAL (only required if switching branch)

Code: Select all

git checkout base_on_openwrt_remerge
or

Code: Select all

git checkout master

OPTIONAL (use if something goes wrong or switching branches)

Code: Select all

make distclean
OPTIONAL (Check for any updates)

Code: Select all

git pull

Code: Select all

make FULL_BUILD=true
or

Code: Select all

make custom
or

Code: Select all

make FULL_BUILD=true ar71xx
or

Code: Select all

make FULL_BUILD=true ar71xx.usb_large
Than wait 15 hours or so

I think my last build was close to 24 hours

Custom Build tip example

Asus RT-N12 B1 (8MB Flash)
The brcm47xx target would be close but not quite right.
You'll need to do a "make custom" and select your router from the menu which should configure it for brcm47xx/mips47k.

Once this is saved, i tend to kill the build process. Rescue the .config file from within the /custom-src directory and build my own target folder in the /targets directory.
In your case i would make a "mips74k" folder underneath "brcm47xx" and copy the same images file across. Rename the ".config" to "config".

Then you can call "make FULL_BUILD=true brcm47xx/mips74k".

For your own sanity, i would run "make FULL_BUILD=true brcm47xx" before trying any of this to make sure your build environment is 100% and you can complete a stock build first.

top_s
Posts: 37
Joined: Mon Aug 13, 2018 10:09 pm
Location: Brazil

Re: how-to Quick build

Post by top_s »

Great post!
WDR4300 v1 (stock)
WR941nd v2 (1.9.2)
WA901nd v2 (1.6.2)
2x WR741nd (1.6.2)

(Up to) 1gbps up/down link

ispyisail
Moderator
Posts: 5180
Joined: Mon Apr 06, 2009 3:15 am
Location: New Zealand

Re: how-to Quick build

Post by ispyisail »

I've just finished running through the full procedure and it now works as expected. Had to make a few small edits.

Note: adding "universe" and "multiverse" is not longer required as its looks like they fixed a bug. I have just left it for reference.

Note: Need to be careful of hard drive space especially with VM's. Need 50 Gig as a minimum. I use over 100 gig.

phgerin
Posts: 130
Joined: Sun Dec 21, 2014 2:03 pm

Re: how-to Quick build

Post by phgerin »

Thanks !!!

stuartbh
Posts: 76
Joined: Sun Oct 20, 2019 4:18 pm

Re: how-to Quick build

Post by stuartbh »

All,

The above entitled procedure would seem to presume (quite reasonably) that the compilation process is being executed upon an x86_64 based instantiation of Ubuntu Linux. However, I am curious, what (if any) differences in the procedure would be requisite if the execution of were performed on an Ubuntu Linux environment instantiated on of some other processor architecture (PowerPC, s390x, etc...)?

Worthy of notation, s390x, PowerPC, SPARC are all big-endian.

My goal in asking this is not to target these processors for a Gargoyle build but to contemplate using a far more powerful processor architecture in pursuance of speeding up the build process significantly.

What (if any) compilation parameters are required to assure that Gargoyle uses all available processor cores simultaneously during compilation?

I also read that when building Gargoyle for x86 WiFi card support is thin, what is the best WiFi chipset recommended when building Gargoyle for x86 or is a USB based WiFi adapter the best option in such a case?

Thanks in advance!
Very Respectfully,

Stuart, N3GWG
Computer Scientist

ispyisail
Moderator
Posts: 5180
Joined: Mon Apr 06, 2009 3:15 am
Location: New Zealand

Re: how-to Quick build

Post by ispyisail »

My goal in asking this is not to target these processors for a Gargoyle build but to contemplate using a far more powerful processor architecture in pursuance of speeding up the build process significantly.
I have wondered about this as well

There are many things you can do to speed up the process but over the years I found bugs causing build errors. So now I just do the slow sure and steady. e.g. I erase the whole build each time now, start fresh each time.

Years a ago building with multicore caused errors so Eric forced single core only. Not sure what the current status is.

stuartbh
Posts: 76
Joined: Sun Oct 20, 2019 4:18 pm

Re: how-to Quick build

Post by stuartbh »

There are many things you can do to speed up the process but over the years I found bugs causing build errors. So now I just do the slow sure and steady. e.g. I erase the whole build each time now, start fresh each time.

Years a ago building with multicore caused errors so Eric forced single core only. Not sure what the current status is.
What would be the necessary changes to attempt to do a multicore build to the make files or that?
Very Respectfully,

Stuart, N3GWG
Computer Scientist

pythonic
Posts: 230
Joined: Mon Mar 11, 2019 5:47 am
Location: Australia

Re: how-to Quick build

Post by pythonic »

ispyisail wrote:
Fri Oct 15, 2021 3:39 am
Years a ago building with multicore caused errors so Eric forced single core only. Not sure what the current status is.
Best I can tell multi-thread builds are active. My Ubuntu build VM has 2 cores enabled; the build script sets the number of threads at 4 (i.e. available cores +2) and it seems to fully utilise those 2 cores much of the time during a build from monitoring on the host (which has 4 cores).

The VM storage is on 7200rpm spinning rust rather than SSD which does impede build performance at times; using a VM also robs some performance as well (I/O especially). I've gotten used to starting the build and doing something else until it's done (usually build overnight, especially if I kick off parallel builds with different targets).

stuartbh
Posts: 76
Joined: Sun Oct 20, 2019 4:18 pm

Re: how-to Quick build

Post by stuartbh »

pythonic wrote:
Fri Oct 15, 2021 8:00 am
ispyisail wrote:
Fri Oct 15, 2021 3:39 am
Years a ago building with multicore caused errors so Eric forced single core only. Not sure what the current status is.
Best I can tell multi-thread builds are active. My Ubuntu build VM has 2 cores enabled; the build script sets the number of threads at 4 (i.e. available cores +2) and it seems to fully utilise those 2 cores much of the time during a build from monitoring on the host (which has 4 cores).
I was trying to compile it using a Debian 11 instance I have running in a container on Proxmox VE 7 (I posted a different thread in this forum on it with background info and errors). The container has 2 vCPUs, 2 GB RAM, 2 GB swap. But the error I got was about not having Python 2 despite "which python" resolving as link to the python3 binary in the container. The title of the other thread is "Build error with Debian 11".
pythonic wrote:
Fri Oct 15, 2021 8:00 am
The VM storage is on 7200rpm spinning rust rather than SSD which does impede build performance at times; using a VM also robs some performance as well (I/O especially). I've gotten used to starting the build and doing something else until it's done (usually build overnight, especially if I kick off parallel builds with different targets).
I have an x3650 M1 IBM server (2 processors, 8 cores, 48GB RAM), I'd use eventually and I have another IBM x3650 M3 that can have up to 192GB of RAM (it has 8GB right now) and has 2 processors/8 cores also. If I create a RAM disk the speed ought be fantastic.

I may also be to try it on an IBM LinuxONE or IBM Z mainframe or large IBM Power box at some point. But, I'd like to get a good baseline for compilation on an my "xeon 4-core x 2" or Intel i7 system.
Very Respectfully,

Stuart, N3GWG
Computer Scientist

ispyisail
Moderator
Posts: 5180
Joined: Mon Apr 06, 2009 3:15 am
Location: New Zealand

Re: how-to Quick build

Post by ispyisail »

I've gotten used to starting the build and doing something else until it's done (usually build overnight, especially if I kick off parallel builds with different targets).
This is exactly where I'm at.

Start getting into exotic stuff you are bound to find problems.

Post Reply