Last active
July 25, 2019 11:42
-
-
Save rodero95/6449484 to your computer and use it in GitHub Desktop.
Script to set up an Android build server running Red Hat Enterprise Linux
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| mkdir ~/sources | |
| # Update yum | |
| sudo yum update | |
| # Packages to build AOSP 4.0.3 or CM9 | |
| sudo yum install make curl gnupg git bison unzip zip flex gperf | |
| sudo yum install gcc-c++ libstdc++-devel | |
| sudo yum install glibc-devel.i686 zlib-devel.i686 ncurses-devel.i686 | |
| sudo yum install libX11-devel.i686 mesa-libGL-devel.i686 | |
| # Packages needed to build the Android kernel | |
| sudo yum install glibc-devel.x86_64 glibc-devel.i686 | |
| sudo yum install ncurses-devel.x86_64 lzo lzop | |
| # Packages to build other CM versions | |
| sudo yum install readline-devel.i686 | |
| # Build and install schedtool | |
| cd ~/sources | |
| curl -O http://freequaos.host.sk/schedtool/schedtool-1.3.0.tar.bz2 | |
| tar -jxvf schedtool-1.3.0.tar.bz2 | |
| cd schedtool-1.3.0 | |
| make | |
| sudo make install | |
| # Set up Java OpenJDK 7 | |
| sudo yum install java-1.7.0-openjdk-devel | |
| # Download the repo tool | |
| mkdir ~/bin | |
| export PATH=~/bin:$PATH | |
| curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo | |
| chmod a+x ~/bin/repo | |
| # The git version included with RHEL6 is too old for repo | |
| # so we download the latest code from github and build it | |
| # We need to install some packages needed to build git first | |
| sudo yum install curl-devel expat-devel gettext-devel \ | |
| openssl-devel zlib-devel gcc | |
| # Then, download the latest code from the repository | |
| cd ~/sources | |
| git clone git://git.kernel.org/pub/scm/git/git.git | |
| # After that, we should remove the old git version | |
| sudo yum remove git | |
| # And finally, build and install the latest git | |
| cd git | |
| make prefix=/usr/local | |
| sudo make prefix=/usr/local install | |
| # Add new git to path | |
| export PATH=/usr/local/bin:$PATH | |
| # Install a web server to publish new builds of the ROM | |
| sudo curl https://gist.github.com/rodero95/6450728/raw/nginx.repo > /etc/yum.repos.d/nginx.repo | |
| sudo yum update | |
| sudo yum install nginx | |
| # Though this installs the web server, it will still be necessary to manually configure it | |
| # Cleanup | |
| cd ~/ | |
| rm -rf sources |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| mkdir ~/sources | |
| # Update yum | |
| sudo yum update | |
| # Packages to build AOSP 4.0.3 or CM9 | |
| sudo yum install make curl gnupg git bison unzip zip flex gperf | |
| sudo yum install gcc-c++ libstdc++-devel | |
| sudo yum install glibc-devel.i686 zlib-devel.i686 ncurses-devel.i686 | |
| sudo yum install libX11-devel.i686 mesa-libGL-devel.i686 | |
| # Packages needed to build the Android kernel | |
| sudo yum install glibc-devel.x86_64 glibc-devel.i686 | |
| sudo yum install ncurses-devel.x86_64 lzo lzop | |
| # Packages to build other CM versions | |
| sudo yum install readline-devel.i686 | |
| # Build and install schedtool | |
| cd ~/sources | |
| curl -O http://freequaos.host.sk/schedtool/schedtool-1.3.0.tar.bz2 | |
| tar -jxvf schedtool-1.3.0.tar.bz2 | |
| cd schedtool-1.3.0 | |
| make | |
| sudo make install | |
| # Set up Java OpenJDK 6 | |
| sudo yum install java-1.6.0-openjdk-devel | |
| # Download the repo tool | |
| mkdir ~/bin | |
| export PATH=~/bin:$PATH | |
| curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo | |
| chmod a+x ~/bin/repo | |
| # The git version included with RHEL6 is too old for repo | |
| # so we download the latest code from github and build it | |
| # We need to install some packages needed to build git first | |
| sudo yum install curl-devel expat-devel gettext-devel \ | |
| openssl-devel zlib-devel gcc | |
| # Then, download the latest code from the repository | |
| cd ~/sources | |
| git clone git://git.kernel.org/pub/scm/git/git.git | |
| # After that, we should remove the old git version | |
| sudo yum remove git | |
| # And finally, build and install the latest git | |
| cd git | |
| make prefix=/usr/local | |
| sudo make prefix=/usr/local install | |
| # Add new git to path | |
| export PATH=/usr/local/bin:$PATH | |
| # Install a web server to publish new builds of the ROM | |
| sudo curl https://gist.github.com/rodero95/6450728/raw/nginx.repo > /etc/yum.repos.d/nginx.repo | |
| sudo yum update | |
| sudo yum install nginx | |
| # Though this installs the web server, it will still be necessary to manually configure it | |
| # Cleanup | |
| cd ~/ | |
| rm -rf sources |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment