This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
developer_documentation [2015/09/04 12:01] nworbnhoj [Building] add "apt-get install textinfo" to prerequisites |
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 | + | sudo apt-get install build-essential asciidoc binutils bzip2 gawk gettext git libncurses5-dev libz-dev patch unzip zlib1g-dev subversion flex uglifyjs |
- | </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 | + | 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 |
- | </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 | ||
+ | |||
+ | For more details on building OpenWrt, you can see their wiki page [[https:// | ||
+ | |||
+ | ===== Building ===== | ||
- | For more details on building OpenWRT, you can see their wiki page [[http:// | ||
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 175: | 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> |
+ | |||
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 ==== | ||
+ | |||
+ | |||
+ | For compatibility reasons, it is recommended to use these versions of NodeJS and NPM. To do so: | ||
+ | <code bash> | ||
+ | curl -sL https:// | ||
+ | sudo bash nodesource_setup.sh | ||
+ | sudo apt-get install nodejs | ||
+ | nodejs -v | ||
+ | npm -v | ||
+ | </ | ||
+ | |||
+ | The contents of nodesource_setup.sh are preserved below for posterity: | ||
+ | <code bash> | ||
+ | #!/bin/bash | ||
+ | |||
+ | # Discussion, issues and change requests at: | ||
+ | # | ||
+ | # | ||
+ | # Script to install the NodeSource Node.js v6.x LTS Boron repo onto a | ||
+ | # Debian or Ubuntu system. | ||
+ | # | ||
+ | # Run as root or insert `sudo -E` before `bash`: | ||
+ | # | ||
+ | # curl -sL https:// | ||
+ | # or | ||
+ | # wget -qO- https:// | ||
+ | # | ||
+ | |||
+ | export DEBIAN_FRONTEND=noninteractive | ||
+ | SCRSUFFIX=" | ||
+ | NODENAME=" | ||
+ | NODEREPO=" | ||
+ | NODEPKG=" | ||
+ | |||
+ | print_status() { | ||
+ | echo | ||
+ | echo "## $1" | ||
+ | echo | ||
+ | } | ||
+ | |||
+ | if test -t 1; then # if terminal | ||
+ | ncolors=$(which tput > /dev/null && tput colors) # supports color | ||
+ | if test -n " | ||
+ | termcols=$(tput cols) | ||
+ | bold=" | ||
+ | underline=" | ||
+ | standout=" | ||
+ | normal=" | ||
+ | black=" | ||
+ | red=" | ||
+ | green=" | ||
+ | yellow=" | ||
+ | blue=" | ||
+ | magenta=" | ||
+ | cyan=" | ||
+ | white=" | ||
+ | fi | ||
+ | fi | ||
+ | |||
+ | print_bold() { | ||
+ | title=" | ||
+ | text=" | ||
+ | |||
+ | echo | ||
+ | echo " | ||
+ | echo " | ||
+ | echo | ||
+ | echo -e " | ||
+ | echo | ||
+ | echo -en " | ||
+ | echo | ||
+ | echo " | ||
+ | echo " | ||
+ | } | ||
+ | |||
+ | bail() { | ||
+ | echo 'Error executing command, exiting' | ||
+ | exit 1 | ||
+ | } | ||
+ | |||
+ | exec_cmd_nobail() { | ||
+ | echo "+ $1" | ||
+ | bash -c " | ||
+ | } | ||
+ | |||
+ | exec_cmd() { | ||
+ | exec_cmd_nobail " | ||
+ | } | ||
+ | |||
+ | node_deprecation_warning() { | ||
+ | if [[ " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | |||
+ | print_bold \ | ||
+ | " | ||
+ | ${bold}${NODENAME} is no longer actively supported!${normal} | ||
+ | |||
+ | ${bold}You will not receive security or critical stability updates${normal} for this version. | ||
+ | |||
+ | You should migrate to a supported version of Node.js as soon as possible. | ||
+ | Use the installation script that corresponds to the version of Node.js you | ||
+ | wish to install. e.g. | ||
+ | |||
+ | * ${green}https:// | ||
+ | * ${green}https:// | ||
+ | |||
+ | Please see ${bold}https:// | ||
+ | may be appropriate for you. | ||
+ | |||
+ | The ${bold}NodeSource${normal} Node.js Linux distributions GitHub repository contains | ||
+ | information about which versions of Node.js and which Linux distributions | ||
+ | are supported and how to use the install scripts. | ||
+ | ${bold}https:// | ||
+ | " | ||
+ | echo | ||
+ | echo " | ||
+ | echo | ||
+ | sleep 10 | ||
+ | |||
+ | elif [ " | ||
+ | |||
+ | print_bold \ | ||
+ | " | ||
+ | Node.js v0.10 will cease to be actively supported in ${bold}October 2016${normal}. | ||
+ | |||
+ | This means you will not continue to receive security or critical stability | ||
+ | updates for this version of Node.js beyond that time. | ||
+ | |||
+ | You should begin migration to a newer version of Node.js as soon as | ||
+ | possible. Use the installation script that corresponds to the version of | ||
+ | Node.js you wish to install. e.g. | ||
+ | |||
+ | * ${green}https:// | ||
+ | * ${green}https:// | ||
+ | |||
+ | Please see ${bold}https:// | ||
+ | may be appropriate for you. | ||
+ | |||
+ | The ${bold}NodeSource${normal} Node.js Linux distributions GitHub repository contains | ||
+ | information about which versions of Node.js and which Linux distributions | ||
+ | are supported and how to use the install scripts. | ||
+ | ${bold}https:// | ||
+ | " | ||
+ | |||
+ | echo | ||
+ | echo " | ||
+ | echo | ||
+ | sleep 5 | ||
+ | |||
+ | elif [ " | ||
+ | |||
+ | print_bold \ | ||
+ | " | ||
+ | Node.js v0.12 will cease to be actively supported ${bold}at the end of 2016${normal}. | ||
+ | |||
+ | This means you will not continue to receive security or critical stability | ||
+ | updates for this version of Node.js beyond that time. | ||
+ | |||
+ | You should begin migration to a newer version of Node.js as soon as | ||
+ | possible. Use the installation script that corresponds to the version of | ||
+ | Node.js you wish to install. e.g. | ||
+ | |||
+ | * ${green}https:// | ||
+ | * ${green}https:// | ||
+ | |||
+ | Please see ${bold}https:// | ||
+ | may be appropriate for you. | ||
+ | |||
+ | The ${bold}NodeSource${normal} Node.js Linux distributions GitHub repository contains | ||
+ | information about which versions of Node.js and which Linux distributions | ||
+ | are supported and how to use the install scripts. | ||
+ | ${bold}https:// | ||
+ | " | ||
+ | |||
+ | echo | ||
+ | echo " | ||
+ | echo | ||
+ | sleep 3 | ||
+ | |||
+ | fi | ||
+ | } | ||
+ | |||
+ | script_deprecation_warning() { | ||
+ | if [ " | ||
+ | print_bold \ | ||
+ | " | ||
+ | This script, located at ${bold}https:// | ||
+ | install Node.js v0.10, is being deprecated and will eventually be made | ||
+ | inactive. | ||
+ | |||
+ | You should use the script that corresponds to the version of Node.js you | ||
+ | wish to install. e.g. | ||
+ | |||
+ | * ${green}https:// | ||
+ | * ${green}https:// | ||
+ | |||
+ | Please see ${bold}https:// | ||
+ | may be appropriate for you. | ||
+ | |||
+ | The ${bold}NodeSource${normal} Node.js Linux distributions GitHub repository contains | ||
+ | information about which versions of Node.js and which Linux distributions | ||
+ | are supported and how to use the install scripts. | ||
+ | ${bold}https:// | ||
+ | " | ||
+ | |||
+ | echo | ||
+ | echo " | ||
+ | echo | ||
+ | sleep 10 | ||
+ | fi | ||
+ | } | ||
+ | |||
+ | setup() { | ||
+ | |||
+ | script_deprecation_warning | ||
+ | |||
+ | print_status " | ||
+ | |||
+ | if $(uname -m | grep -Eq ^armv6); then | ||
+ | print_status "You appear to be running on ARMv6 hardware. Unfortunately this is not currently supported by the NodeSource Linux distributions. Please use the ' | ||
+ | exit 1 | ||
+ | fi | ||
+ | |||
+ | PRE_INSTALL_PKGS="" | ||
+ | |||
+ | # Check that HTTPS transport is available to APT | ||
+ | # (Check snaked from: https:// | ||
+ | |||
+ | if [ ! -e / | ||
+ | PRE_INSTALL_PKGS=" | ||
+ | fi | ||
+ | |||
+ | if [ ! -x / | ||
+ | PRE_INSTALL_PKGS=" | ||
+ | fi | ||
+ | |||
+ | if [ ! -x / | ||
+ | PRE_INSTALL_PKGS=" | ||
+ | fi | ||
+ | |||
+ | # Populating Cache | ||
+ | print_status " | ||
+ | exec_cmd ' | ||
+ | |||
+ | if [ " | ||
+ | print_status " | ||
+ | # This next command needs to be redirected to /dev/null or the script will bork | ||
+ | # in some environments | ||
+ | exec_cmd " | ||
+ | fi | ||
+ | |||
+ | IS_PRERELEASE=$(lsb_release -d | grep ' | ||
+ | if [[ $IS_PRERELEASE -eq 0 ]]; then | ||
+ | print_status "Your distribution, | ||
+ | exit 1 | ||
+ | fi | ||
+ | |||
+ | DISTRO=$(lsb_release -c -s) | ||
+ | |||
+ | check_alt() { | ||
+ | if [ " | ||
+ | echo | ||
+ | echo "## You seem to be using ${1} version ${DISTRO}." | ||
+ | echo "## This maps to ${3} \" | ||
+ | DISTRO=" | ||
+ | fi | ||
+ | } | ||
+ | |||
+ | check_alt " | ||
+ | check_alt " | ||
+ | check_alt " | ||
+ | check_alt "Linux Mint" | ||
+ | check_alt "Linux Mint" | ||
+ | check_alt "Linux Mint" | ||
+ | check_alt "Linux Mint" | ||
+ | check_alt "Linux Mint" | ||
+ | check_alt "Linux Mint" | ||
+ | check_alt "Linux Mint" | ||
+ | check_alt "Linux Mint" | ||
+ | check_alt "Linux Mint" | ||
+ | check_alt " | ||
+ | check_alt " | ||
+ | check_alt " | ||
+ | check_alt " | ||
+ | check_alt " | ||
+ | check_alt " | ||
+ | check_alt " | ||
+ | check_alt " | ||
+ | check_alt " | ||
+ | check_alt " | ||
+ | check_alt " | ||
+ | check_alt " | ||
+ | |||
+ | if [ " | ||
+ | print_status " | ||
+ | NEWDISTRO=$([ -e / | ||
+ | if [ " | ||
+ | print_status "Could not determine distribution from / | ||
+ | else | ||
+ | DISTRO=$NEWDISTRO | ||
+ | print_status "Found \" | ||
+ | fi | ||
+ | fi | ||
+ | |||
+ | print_status " | ||
+ | |||
+ | if [ -x / | ||
+ | exec_cmd_nobail "curl -sLf -o /dev/null ' | ||
+ | RC=$? | ||
+ | else | ||
+ | exec_cmd_nobail "wget -qO /dev/null -o /dev/null ' | ||
+ | RC=$? | ||
+ | fi | ||
+ | |||
+ | if [[ $RC != 0 ]]; then | ||
+ | print_status "Your distribution, | ||
+ | exit 1 | ||
+ | fi | ||
+ | |||
+ | if [ -f "/ | ||
+ | print_status ' | ||
+ | |||
+ | exec_cmd_nobail ' | ||
+ | exec_cmd "rm -f / | ||
+ | fi | ||
+ | |||
+ | print_status ' | ||
+ | |||
+ | if [ -x / | ||
+ | exec_cmd 'curl -s https:// | ||
+ | else | ||
+ | exec_cmd 'wget -qO- https:// | ||
+ | fi | ||
+ | |||
+ | print_status " | ||
+ | |||
+ | exec_cmd "echo 'deb https:// | ||
+ | exec_cmd "echo ' | ||
+ | |||
+ | print_status ' | ||
+ | |||
+ | exec_cmd ' | ||
+ | |||
+ | node_deprecation_warning | ||
+ | |||
+ | print_status "Run \`apt-get install ${NODEPKG}\` (as root) to install ${NODENAME} and npm" | ||
+ | |||
+ | } | ||
+ | |||
+ | ## Defer setup until we have the complete script | ||
+ | setup | ||
+ | </ | ||
+ | The same steps may work on other OSes | ||
+ | ===== Building Older Versions of Gargoyle ===== | ||
+ | |||
+ | Due to changes in upstream infrastructure, | ||
+ | The latest commits on each branch back to 1.6 have all been fixed to build as of November 2020 |