This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
developer_documentation [2018/10/25 06:32] ispyisail [Building] |
developer_documentation [2022/04/24 11:50] (current) lantis |
||
---|---|---|---|
Line 45: | Line 45: | ||
You can browse the repository online here, or clone from one of the URLs below. There is both a local copy of the repository and a Github mirror: | You can browse the repository online here, or clone from one of the URLs below. There is both a local copy of the repository and a Github mirror: | ||
- | <shell> | + | <code> |
apt-get install git | apt-get install git | ||
- | git clone git:// | + | git clone git@github.com: |
- | </shell> | + | </code> |
- | <shell> | + | SSH |
- | git clone http:// | + | <code> |
- | git clone git:// | + | git clone git@github.com: |
- | git clone http:// | + | </ |
- | git clone git:// | + | HTTPS |
- | </shell> | + | < |
+ | git clone https:// | ||
+ | </code> | ||
If you want to build an older branch or tag, use the "git checkout" | If you want to build an older branch or tag, use the "git checkout" | ||
- | <shell> | + | <code> |
git checkout 1.2 | git checkout 1.2 | ||
- | </shell> | + | </code> |
Anyone who still prefers working with subversion can make use of the subversion support provided by the github mirror: | Anyone who still prefers working with subversion can make use of the subversion support provided by the github mirror: | ||
- | <shell> | + | <code> |
svn checkout http:// | svn checkout http:// | ||
- | </shell> | + | </code> |
- | <shell> | + | <code> |
cd gargoyle | cd gargoyle | ||
- | </shell> | + | </code> |
- | <shell> | + | <code> |
make | make | ||
- | </shell> | + | </code> |
You'll notice there are two scripts in the build directory: // | You'll notice there are two scripts in the build directory: // | ||
Line 79: | Line 81: | ||
If you run make without the FULL_BUILD=true flag, and you've previously done a build, it will only rebuild the packages and not the underlying version of OpenWrt. This speeds up testing small changes in the packages dramatically. However, to do a complete build from scratch you really need to run the make command with " | If you run make without the FULL_BUILD=true flag, and you've previously done a build, it will only rebuild the packages and not the underlying version of OpenWrt. This speeds up testing small changes in the packages dramatically. However, to do a complete build from scratch you really need to run the make command with " | ||
- | <shell> | + | <code> |
make FULL_BUILD=true | make FULL_BUILD=true | ||
- | </shell> | + | </code> |
Or to build (for example) just the ar71xx architecture: | Or to build (for example) just the ar71xx architecture: | ||
- | <shell> | + | <code> |
make FULL_BUILD=true ar71xx | make FULL_BUILD=true ar71xx | ||
- | </shell> | + | </code> |
Allow building of only one profile for a given architecture by running e.g. "make ar71xx.usb_large" | Allow building of only one profile for a given architecture by running e.g. "make ar71xx.usb_large" | ||
- | <shell> | + | <code> |
make ar71xx.usb_large | make ar71xx.usb_large | ||
- | </shell> | + | </code> |
ar71xx profiles | ar71xx profiles | ||
Line 110: | Line 112: | ||
Building Gargoyle for the first time for even one supported platform can take several hours of churning on your computer. | Building Gargoyle for the first time for even one supported platform can take several hours of churning on your computer. | ||
- | Before you can build Gargoyle, you will require the appropriate tools to [[http://wiki.openwrt.org/ | + | Before you can build Gargoyle, you will require the appropriate tools to [[https:// |
To install these (list edited to add the additional things missing on Ubuntu Server 10.10), use the following on a 32 bit system: | To install these (list edited to add the additional things missing on Ubuntu Server 10.10), use the following on a 32 bit system: | ||
- | <shell> | + | <code> |
sudo apt-get install build-essential asciidoc binutils bzip2 gawk gettext git libncurses5-dev libz-dev patch unzip zlib1g-dev subversion flex uglifyjs texinfo | sudo apt-get install build-essential asciidoc binutils bzip2 gawk gettext git libncurses5-dev libz-dev patch unzip zlib1g-dev subversion flex uglifyjs texinfo | ||
- | </shell> | + | </code> |
Or for a 64 bit system: | Or for a 64 bit system: | ||
- | <shell> | + | <code> |
sudo apt-get install build-essential asciidoc binutils bzip2 gawk gettext git libncurses5-dev libz-dev patch unzip zlib1g-dev lib32gcc1 libc6-dev-i386 subversion flex uglifyjs git-core gcc-multilib p7zip p7zip-full msmtp libssl-dev texinfo | sudo apt-get install build-essential asciidoc binutils bzip2 gawk gettext git libncurses5-dev libz-dev patch unzip zlib1g-dev lib32gcc1 libc6-dev-i386 subversion flex uglifyjs git-core gcc-multilib p7zip p7zip-full msmtp libssl-dev texinfo | ||
- | </shell> | + | </code> |
+ | |||
+ | ===== Ubuntu 18.04 ===== | ||
+ | Enable universe repository | ||
+ | < | ||
+ | sudo add-apt-repository universe | ||
+ | </ | ||
+ | < | ||
+ | sudo add-apt-repository multiverse | ||
+ | </ | ||
+ | |||
+ | ===== NPM ===== | ||
+ | |||
**NOTE:** To save build time, consider also installing npm, which will also install nodejs as a dependency. It is recommended that you install nodejs v6.13.1 (or equivalent) and npm v3.10.10 (or equivalent). See below | **NOTE:** To save build time, consider also installing npm, which will also install nodejs as a dependency. It is recommended that you install nodejs v6.13.1 (or equivalent) and npm v3.10.10 (or equivalent). See below | ||
- | For more details on building | + | For more details on building |
+ | |||
+ | ===== Building ===== | ||
Simply entering: | Simply entering: | ||
- | <shell> | + | <code> |
make | make | ||
- | </shell> | + | </code> |
will result in all targets being built. If you prefer to build a single target (in this example ar71xx, though you could substitute brcm47xx or another valid target), enter: | will result in all targets being built. If you prefer to build a single target (in this example ar71xx, though you could substitute brcm47xx or another valid target), enter: | ||
- | <shell> | + | <code> |
make ar71xx | make ar71xx | ||
- | </shell> | + | </code> |
The makefile calls the full-build-backfire.sh script found in the same directory. | The makefile calls the full-build-backfire.sh script found in the same directory. | ||
Line 176: | Line 194: | ||
**images/< | **images/< | ||
+ | |||
+ | ===== Make Custom ===== | ||
+ | |||
It is also possible to build Gargoyle using a custom build configuration. | It is also possible to build Gargoyle using a custom build configuration. | ||
- | <shell> | + | <code> |
make custom | make custom | ||
- | </shell> | + | </code> |
- | or a different profile | ||
- | < | ||
- | make custom x86 | ||
- | </ | ||
You will then be given access to the OpenWrt menuconfig screen and can select the packages you want to include in your base image. | You will then be given access to the OpenWrt menuconfig screen and can select the packages you want to include in your base image. | ||
+ | |||
+ | Example | ||
+ | |||
+ | - make custom | ||
+ | - Select " | ||
+ | - Select all Gargoyle packages and dependencies from the Administration menu (hint, there is more to be found than what is just shown initially, you may need to enable other dependencies first) | ||
+ | - Exit and save config, then quit the build | ||
+ | - Grab .config file from custom-src/ | ||
+ | - make clean | ||
+ | - make FULL_BUILD=true ipq40xx | ||
+ | |||
+ | An example | ||
+ | To enable plugin_gargoyle-minidlna, | ||
+ | To enable plugin_gargoyle-email-notifications, | ||
+ | |||
+ | If you press “/“ while navigating the menu and then search for “gargoyle”, | ||
+ | |||
+ | **<fs 110%> | ||
+ | |||
+ | "/" | ||
+ | |||
+ | x Symbol: DEFAULT_libffmpeg-mini [=DEFAULT_libffmpeg-mini] | ||
+ | x Type : unknown | ||
+ | x x | ||
+ | x x | ||
+ | x Symbol: PACKAGE_libffmpeg-mini [=y] x | ||
+ | x Type : tristate | ||
+ | x Prompt: libffmpeg-miniries (mini) | ||
+ | x | ||
+ | x (1) -> Libraries | ||
+ | x | ||
+ | x | ||
+ | x | ||
+ | |||
+ | |||
+ | |||
==== Installing Nodejs 6.13.1 and NPM 3.10.10 on Ubuntu ==== | ==== Installing Nodejs 6.13.1 and NPM 3.10.10 on Ubuntu ==== | ||
Line 548: | Line 601: | ||
===== Building Older Versions of Gargoyle ===== | ===== Building Older Versions of Gargoyle ===== | ||
- | Due to changes in upstream infrastructure, | + | Due to changes in upstream infrastructure, |
- | The following is a patch to restore | + | The latest commits on each branch back to 1.6 have all been fixed to build as of November 2020 |
- | <code diff> | + | |
- | --- a/ | + | |
- | +++ b/ | + | |
- | @@ -21,15 +21,17 @@ set_version_variables() | + | |
- | + | ||
- | | + | |
- | | + | |
- | - branch_id=" | + | |
- | + branch_id=" | + | |
- | | + | |
- | - branch_packages_path=" | + | |
- | + branch_packages_path=" | + | |
- | + | ||
- | + | ||
- | - # set svn revision number to use | + | |
- | - # you can set this to an alternate revision | + | |
- | + # set precise commit in repo to use | + | |
- | + # you can set this to an alternate commit | + | |
- | # or empty to checkout latest | + | |
- | - rnum=46817 | + | |
- | + openwrt_commit=" | + | |
- | + openwrt_abbrev_commit=$( echo " | + | |
- | + | + | |
- | + | ||
- | #set date here, so it's guaranteed the same for all images | + | |
- | | + | |
- | @@ -82,7 +84,7 @@ create_gargoyle_banner() | + | |
- | | + | |
- | | + | |
- | | + | |
- | - local openwrt_revision=" | + | |
- | + local openwrt_cmt=" | + | |
- | | + | |
- | | + | |
- | + | ||
- | @@ -92,7 +94,7 @@ create_gargoyle_banner() | + | |
- | fi | + | |
- | + | ||
- | | + | |
- | - local middle_line=$(printf "| %-26s| %-35s|" | + | |
- | + local middle_line=$(printf "| %-26s| %-35s|" | + | |
- | | + | |
- | + | ||
- | cat << ' | + | |
- | @@ -198,7 +200,6 @@ distrib_init () | + | |
- | fi | + | |
- | #git log --since=5/ | + | |
- | git log $(git describe --abbrev=0 --tags)..$(git log -1 --pretty=format: | + | |
- | - svn log -r " | + | |
- | cp -fR " | + | |
- | } | + | |
- | + | ||
- | @@ -334,9 +335,9 @@ fi | + | |
- | + | ||
- | | + | |
- | | + | |
- | -if [ -n " | + | |
- | - openwrt_src_dir=" | + | |
- | - openwrt_package_dir=" | + | |
- | +if [ -n " | + | |
- | + openwrt_src_dir=" | + | |
- | + openwrt_package_dir=" | + | |
- | | + | |
- | rm -rf " | + | |
- | rm -rf " | + | |
- | @@ -345,23 +346,22 @@ fi | + | |
- | + | ||
- | # | + | |
- | if [ ! -d " | + | |
- | - revision="" | + | |
- | - if [ -n " | + | |
- | - revision=" | + | |
- | - fi | + | |
- | echo " | + | |
- | rm -rf " | + | |
- | if [ " | + | |
- | - svn checkout $revision svn:// | + | |
- | + git clone git:// | + | |
- | | + | |
- | - svn checkout $revision svn:// | + | |
- | + git clone git:// | + | |
- | fi | + | |
- | - if [ ! -d " | + | |
- | + if [ ! -d " | + | |
- | | + | |
- | | + | |
- | fi | + | |
- | - cd " | + | |
- | - find . -name " | + | |
- | + if [ -n " | + | |
- | + cd " | + | |
- | + git checkout " | + | |
- | + fi | + | |
- | + | + | |
- | cd " | + | |
- | mv " | + | |
- | fi | + | |
- | @@ -475,14 +475,10 @@ for target in $targets ; do | + | |
- | if [ " | + | |
- | if [ ! -d " | + | |
- | + | ||
- | - if [ " | + | |
- | - svn checkout $revision svn:// | + | |
- | - else | + | |
- | - svn checkout $revision " | + | |
- | - fi | + | |
- | + git clone git:// | + | |
- | + | ||
- | cd " | + | |
- | - find . -name " | + | |
- | + | + | |
- | | + | |
- | | + | |
- | | + | |
- | @@ -507,10 +503,9 @@ for target in $targets ; do | + | |
- | + | ||
- | + | ||
- | + | ||
- | - #enter build directory and make sure we get rid of all those pesky .svn files, | + | |
- | - #and any crap left over from editing | + | |
- | + # | + | |
- | + #any crap left over from editing | + | |
- | cd " | + | |
- | - find . -name " | + | |
- | find . -name " | + | |
- | find . -name " | + | |
- | + | ||
- | @@ -534,7 +529,7 @@ for target in $targets ; do | + | |
- | + | ||
- | + | ||
- | | + | |
- | - create_gargoyle_banner " | + | |
- | + create_gargoyle_banner " | + | |
- | + | ||
- | | + | |
- | + | ||
- | @@ -551,7 +546,7 @@ for target in $targets ; do | + | |
- | + | ||
- | + | ||
- | | + | |
- | - create_gargoyle_banner " | + | |
- | + create_gargoyle_banner " | + | |
- | + | ||
- | | + | |
- | + | ||
- | @@ -565,8 +560,9 @@ for target in $targets ; do | + | |
- | + | ||
- | | + | |
- | | + | |
- | - package_files=$(find bin -name " | + | |
- | - index_files=$(find bin -name " | + | |
- | + package_base_dir=$(find bin -name " | + | |
- | + package_files=$(find " | + | |
- | + index_files=$(find " | + | |
- | if [ -n " | + | |
- | + | ||
- | for pf in $package_files ; do | + | |
- | @@ -643,7 +639,7 @@ for target in $targets ; do | + | |
- | + | ||
- | + | ||
- | | + | |
- | - create_gargoyle_banner " | + | |
- | + create_gargoyle_banner " | + | |
- | + | ||
- | + | ||
- | | + | |
- | @@ -674,8 +670,9 @@ for target in $targets ; do | + | |
- | | + | |
- | | + | |
- | | + | |
- | - package_files=$(find bin -name " | + | |
- | - index_files=$(find bin -name " | + | |
- | + package_base_dir=$(find bin -name " | + | |
- | + package_files=$(find " | + | |
- | + index_files=$(find " | + | |
- | if [ -n " | + | |
- | | + | |
- | | + | |
- | @@ -684,7 +681,10 @@ for target in $targets ; do | + | |
- | | + | |
- | | + | |
- | | + | |
- | - | + | |
- | + | + | |
- | + | + | |
- | + | + | |
- | + | + | |
- | if [ " | + | |
- | | + | |
- | | + | |
- | @@ -719,3 +719,4 @@ for target in $targets ; do | + | |
- | cd " | + | |
- | | + | |
- | + | ||
- | + | + | |
- | --- /dev/null | + | |
- | +++ b/ | + | |
- | @@ -0,0 +1,13 @@ | + | |
- | +--- a/ | + | |
- | ++++ b/ | + | |
- | +@@ -165,8 +165,8 @@ foreach my $mirror (@ARGV) { | + | |
- | + push @extra, " | + | |
- | + } | + | |
- | + foreach my $dir (@extra) { | + | |
- | +- push @mirrors, " | + | |
- | +- push @mirrors, " | + | |
- | ++ push @mirrors, " | + | |
- | ++ push @mirrors, " | + | |
- | + } | + | |
- | + } elsif ($mirror =~ / | + | |
- | + push @mirrors, " | + | |
- | </ | + | |
- | The same patch should work for earlier versions including 1.6.2 with some modifications | + |