[HOWTO] Built a GSI

@harvey186
here my new howto for the building chain:

  1. VirtualBox with LM 19.3; HD 125GB
  2. installing the building packages for LineageOS
    sudo apt install bc bison build-essential ccache curl flex g+±multilib 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

For Ubuntu versions older than 20.04 (focal), install also:
sudo apt install libwxgtk3.0-dev
and ‘repo’
sudo apt install repo

Then I started the commands:
repo init -u https://gitlab.e.foundation/e/os/releases.git -b v1-pie
git clone https://github.com/MyOxy/e_gsi_localmanifest .repo/local_manifests
repo sync --force-sync

ATM I get the following error:
Checking out projects: 84% (592/700) platform/prebuilts/gcc/linux-x86/arm/arm-lChecking out projects: 84% (593/700) platform/prebuilts/gcc/linux-x86/host/x86_Checking out projects: 84% (594/700) platform/prebuilts/gcc/linux-x86/host/x86_Checking out projects: 85% (595/700) platform/prebuilts/gcc/linux-x86/x86/x86_6Checking out projects: 97% (682/700) LineageOS/android_vendor_codeaurora_telepherror: vendor/lineage/:
prior sync failed; rebase still in progress
error: Cannot checkout e/os/android_vendor_lineage
Checking out projects: 98% (686/700) LineageOS/android_vendor_nxp_opensource_exChecking out projects: 98% (687/700) LineageOS/android_vendor_nxp_opensource_frChecking out projects: 98% (688/700) LineageOS/android_vendor_nxp_opensource_paChecking out projects: 98% (689/700) LineageOS/android_vendor_nxp_opensource_haChecking out projects: 98% (690/700) LineageOS/android_vendor_nxp_opensource_hiChecking out projects: 98% (691/700) LineageOS/android_vendor_nxp_interfaces_opChecking out projects: 98% (692/700) LineageOS/android_vendor_qcom_opensource_aChecking out projects: 99% (693/700) LineageOS/android_vendor_qcom_opensource_cChecking out projects: 99% (694/700) LineageOS/android_vendor_qcom_opensource_dChecking out projects: 99% (695/700) LineageOS/android_vendor_qcom_opensource_dChecking out projects: 99% (696/700) LineageOS/android_vendor_qcom_opensource_iChecking out projects: 99% (697/700) LineageOS/android_vendor_qcom_opensource_tChecking out projects: 99% (699/700), done.

error: Unable to fully sync the tree.
error: Checking out local projects failed.
Failing repos:
vendor/lineage

What am I missing?

EDIT:
and running the build command
bash treble_build_los/buildbot_treble.sh

I get:

Applying GSI-specific patches
fatal: could not open ‘/home/user/treble_build_los/patches/0001-Revert-Enable-dyanmic-image-size-for-GSI.patch’ for reading: No such file or directory
[detached HEAD 5dcc653] Revert “tinycompress: Use generated kernel headers”
Date: Tue Sep 15 21:52:17 2020 +0200
1 file changed, 1 insertion(+), 1 deletion(-)
fatal: previous rebase directory .git/rebase-apply still exists but mbox given.
rm: cannot remove ‘vendor/qcom/opensource/cryptfs_hw’: Is a directory
fatal: not a git repository (or any of the parent directories): .git
fatal: not a git repository (or any of the parent directories): .git

CHECK PATCH STATUS NOW!

Couldn’t locate the top of the tree. Try setting TOP.
Trying dependencies-only mode on a non-existing device tree?
cat: /build/envsetup.sh: No such file or directory
cat: /vendor/lineage/build/envsetup.sh: No such file or directory
cat: /build/envsetup.sh: No such file or directory
cat: /vendor/lineage/build/envsetup.sh: No such file or directory

mkdir: cannot create directory ‘/target’: Permission denied
Couldn’t locate the top of the tree. Try setting TOP.
Couldn’t locate the top of the tree. Try setting TOP.
make: *** No rule to make target ‘systemimage’. Stop.

failed to build some targets

mv: cannot stat ‘system.img’: No such file or directory
zip warning: name not matched: e-pie-20200915-JoJo-treble_arm64_beN.img

zip error: Nothing to do! (e-pie-20200915-JoJo-treble_arm64_beN.img.zip)
Buildbot completed in 3 minutes and 47 seconds

Mhm, looks all pretty well. Pls check your source folders. If there is a folder vendor/lineage? If yes, remove it.

And run again ‘repo sync --force-sync’

No way to solve the issue with this repo:
repo init -u https://gitlab.e.foundation/e/os/releases.git -b v1-pie
I’m trying to restart from the following command (which is the same used in your building PIE-GSI script):
repo init -u https://gitlab.e.foundation/e/os/releases.git -b refs/tags/v0.11-pie
I’ll keep you updated…

The download link is dead

can’t change first post https://ecloud.global/s/o3Tyw8t4Rtcoar6

Thanks !
Will try to build a a64 (arm 32 with 64 binder) for my Redmi 7A

but not sure if it is still working. Haven’t build pie for a long time. could be that the sources are changed and build will fail

I’m building on a VPS (for now repo sync) and I tried to automate this a bit with Github Actions :

Manual CI Automated CI