Prepare the computer for GSI / Treble Images
According to Guntram’s recommendations installed the computer.
The scripts are from Guntram, I honestly don’t know much about it, I just start and run. If any questions arise, it’s best to search the internet for answers.
As operating system LinuxMint 19.3 (I installed the xfce version) was recommended (not newer yet, because of the packages that are installed there). Also I use the system EXCLUSIVELY for building images, nothing else, otherwise I have my Linux on the laptop…
I specially installed a new hard drive (500GB SSD) in the home PC, installed Linux Mint 19.3 there. Manual partitioning, 30GB for “/”, rest for “/home”.
I also had the bootloader installed on the SSD, NOT where Windows is installed. I wanted to start it via BIOS boot menu, but lo and behold, although I have the bootloader (GRUB) installed on the SSD, Linux recognized that Windows is also installed somewhere, and offers it to me in the boot menu. So in the BIOS I set the boot order to the SSD as the first option. If I remove the SSD again, I set the m.2 SSD as 1st option again and Windows (should at least) boots as if nothing else had ever been.
Why no VM? According to Guntram should be at least 12GB RAM available, because the computer is very busy, in the VM (with it I had tested) I had 8GB RAM, there nothing more responded, therefore then also rather “real” installed.
The PC consists of a Ryzen 5 1600, running stable at 3.8GHz, and 16GB RAM.
Here are some data that were created during the creation of 2 images: After the 2 files were done, 186.4GB (!!!) were created on the hard drive, also the script ran for 167minutes and 5seconds.
You can assume that at least 100GB of data was downloaded, then compiled etc. etc.
After LinuxMint 19.3 is installed, run all updates.
Note in between, I backup the system often with Clonezilla, in the different “stages”, without installed addons, with installed addons etc. etc. Depending on when an error occurs, I just go back to the last backup stage and continue there again, so I don’t always have to reinstall the system completely. But everyone as he wants. Is only a hint…
First we install the SDK package from Google (yes, it has to be, unfortunately) https://dl.google.com/android/repository/platform-tools-latest-linux.zip.
Unpack the file in the home directory into the folder “platform-tools”.
Now we open the file ~/.profile with a text editor. If necessary activate show hidden files. The file is located in the home profile.
There we copy in:
#add Android SDK platform tools to path
if [ -d “$HOME/platform-tools” ] ; then
PATH=“$HOME/platform-tools:$PATH”
fi
Save and close.
Then we update our environment with the following command in the terminal:
source ~/.profile
Alternatively reboot, just for reference…
After that we run:
sudo apt install bc bison build-essential ccache curl flex gcc-multilib git gnupg gperf imagemagick lib32ncurses5-dev lib32readline-dev lib32z1-dev liblz4-tool libncurses5 libncurses5-dev libsdl1. 2-dev libssl-dev libxml2 libxml2-utils lzop pngcrush rsync schedtool squashfs-tools xsltproc zip zlib1g-dev lunzip openjdk-8-jdk python perl git git-lfs libncurses5 xmlstarlet virtualenv xz-utils rr jq g+±multilib libwxgtk3.0-dev
Furthermore repo is needed, we install it as follows via the terminal:
mkdir -p ~/bin
curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
chmod a+x ~/bin/repo
Then you can configure Git, I don’t know if you need a user account, I created one.
git config --global user.name "your_user_name
git config --global user.email deine.email@domain.com
In the home directory we create the folder /home/user/srv/e
In the folder /e we copy the two files in.
builtbot.sh and restart.sh
In the folder /e we open a console and then simply enter without root privileges:
./builtbot.sh
Now everything should run automatically and you should find the finished image files in your home directory under /home/user/build-output.
If you want to restart, delete the directory “base” under /home/user/srv/e/frameworks, otherwise errors will occur.
If you want to start from scratch, delete all files and folders under /home/user/srv/e EXCEPT the 2 files builtbot.sh and restart.sh.
If a file is not created, you can try to create it with the restart.sh file.
As you should know, the lines beginning with “#” are NOT considered. If you don’t want to create the “b” version for example, just put a “#” in front of the line, whereas the “a” version you want to create must not have a “#” in front of the line.
Example from the restart.sh
####### Built Variante eingeben ##############
VARIANT=arm64_avS
#Variant=arm64_bvS
###############################################
The files are here for download: https://android.l1nux.org/index.php/s/tNyG9ZcrjGBPrdH in Folder “Scripte”.