[HOWTO] Built a Pie-GSI

it should be like this:

export WITHOUT_CHECK_API=true
export WITH_SU=false
mkdir -p ~/build-output/

echo ‘start build’

##############################################

and ‘lunch’ is ok

Sorry, i again…
now he does not find any makefiles…

> repo sync has finished successfully.
> Setting up build environment
> 
> start build
> build/make/core/product_config.mk:223: error: Can not locate config makefile for product "treble_arm64_avN".
> 13:33:29 dumpvars failed with: exit status 1
> Device arm64_avN not found. Attempting to retrieve device repository from LineageOS Github (http://github.com/LineageOS).
> Repository for arm64_avN not found in the LineageOS Github repository list. If this is in error, you may need to manually add it to your local_manifests/roomservice.xml.
> build/make/core/product_config.mk:223: error: Can not locate config makefile for product "treble_arm64_avN".
> 13:33:30 dumpvars failed with: exit status 1
> build/make/core/product_config.mk:223: error: Can not locate config makefile for product "treble_arm64_avN".
> 13:33:30 dumpvars failed with: exit status 1
> 
> ** Don't have a product spec for: 'treble_arm64_avN'
> ** Do you have the right repo manifest?
> 
> ============================================
> PLATFORM_VERSION_CODENAME=REL
> PLATFORM_VERSION=10
> TARGET_PRODUCT=aosp_arm
> TARGET_BUILD_VARIANT=eng
> TARGET_BUILD_TYPE=release
> TARGET_ARCH=arm
> TARGET_ARCH_VARIANT=armv7-a-neon
> TARGET_CPU_VARIANT=generic
> HOST_ARCH=x86_64
> HOST_2ND_ARCH=x86
> HOST_OS=linux
> HOST_OS_EXTRA=Linux-5.4.0-54-generic-x86_64-Linux-Mint-20
> HOST_CROSS_OS=windows
> HOST_CROSS_ARCH=x86
> HOST_CROSS_2ND_ARCH=x86_64
> HOST_BUILD_TYPE=release
> BUILD_ID=QQ3A.200805.001
> OUT_DIR=out
> WITH_SU=false
> ============================================
> 13:33:31 Deleted images and staging directories.
> 
> #### build completed successfully (1 seconds) ####
> 
> ============================================
> PLATFORM_VERSION_CODENAME=REL
> PLATFORM_VERSION=10
> TARGET_PRODUCT=aosp_arm
> TARGET_BUILD_VARIANT=eng
> TARGET_BUILD_TYPE=release
> TARGET_ARCH=arm
> TARGET_ARCH_VARIANT=armv7-a-neon
> TARGET_CPU_VARIANT=generic
> HOST_ARCH=x86_64
> HOST_2ND_ARCH=x86
> HOST_OS=linux
> HOST_OS_EXTRA=Linux-5.4.0-54-generic-x86_64-Linux-Mint-20
> HOST_CROSS_OS=windows
> HOST_CROSS_ARCH=x86
> HOST_CROSS_2ND_ARCH=x86_64
> HOST_BUILD_TYPE=release
> BUILD_ID=QQ3A.200805.001
> OUT_DIR=out
> WITH_SU=false
> ============================================
> [100% 140/140] out/soong/.bootstrap/bin/soong_build out/soong/build.ninja
> FAILED: out/soong/build.ninja
> out/soong/.bootstrap/bin/soong_build -t -l out/.module_paths/Android.bp.list -b 
> out/soong -n out -d out/soong/build.ninja.d -globFile out/soong/.bootstrap/build
> -globs.ninja -o out/soong/build.ninja Android.bp
> error: vendor/lineage/build/soong/Android.bp:30:8: module "generated_kernel_incl
> udes": cmd: unknown variable '$(PATH_OVERRIDE_SOONG)'
> 13:34:02 soong bootstrap failed with: exit status 1
> 
> #### failed to build some targets (32 seconds) ####
> 
> ============================================
> PLATFORM_VERSION_CODENAME=REL
> PLATFORM_VERSION=10
> TARGET_PRODUCT=aosp_arm
> TARGET_BUILD_VARIANT=eng
> TARGET_BUILD_TYPE=release
> TARGET_ARCH=arm
> TARGET_ARCH_VARIANT=armv7-a-neon
> TARGET_CPU_VARIANT=generic
> HOST_ARCH=x86_64
> HOST_2ND_ARCH=x86
> HOST_OS=linux
> HOST_OS_EXTRA=Linux-5.4.0-54-generic-x86_64-Linux-Mint-20
> HOST_CROSS_OS=windows
> HOST_CROSS_ARCH=x86
> HOST_CROSS_2ND_ARCH=x86_64
> HOST_BUILD_TYPE=release
> BUILD_ID=QQ3A.200805.001
> OUT_DIR=out
> WITH_SU=false
> ============================================
> [100% 47/47] out/soong/.bootstrap/bin/soong_build out/soong/build.ninja
> FAILED: out/soong/build.ninja
> out/soong/.bootstrap/bin/soong_build -t -l out/.module_paths/Android.bp.list -b 
> out/soong -n out -d out/soong/build.ninja.d -globFile out/soong/.bootstrap/build
> -globs.ninja -o out/soong/build.ninja Android.bp
> error: vendor/lineage/build/soong/Android.bp:30:8: module "generated_kernel_incl
> udes": cmd: unknown variable '$(PATH_OVERRIDE_SOONG)'
> 13:34:19 soong bootstrap failed with: exit status 1
> 
> #### failed to build some targets (16 seconds) ####
> 
> cp: Aufruf von stat für '/system.img' nicht möglich: Datei oder Verzeichnis nicht gefunden
> Buildbot completed in 0 minutes and 51 seconds

But the other works) :slight_smile:

which other ??

And you are building arm -eng ?? better use arm-userdebug.

This is a error from missing patch

I meant the other thing, that the download works, but apparently not quite when a patch is missing.

What can I do? I’m trying to understand it, but I guess it takes some time.
I am not a programmer, I just make up the one or the other thing.

I “just” started your script and wait and see what happens.

Where can I “change” with the arm-userdebug?
How do I get the missing patch?

I have now skimmed some scripts, searching for the makefile or the folders and github searches for the missing makefile.

But, with my little experience I’m not getting anywhere at the moment.

Thanks Guntram :slight_smile:

OK, that’s a lot open points and I’m low in time. And I think we better will use German :slight_smile:
I will give you tomorrow some more informations how to resolve all

Thanks :slight_smile:

Then I’ll try to continue my research, I didn’t have time all day at noon, just came back and I’m looking forward to your answer tomorrow :slight_smile:

check your home folder for folder treble-experimentations. And start the full build script again. Repos sync will need only some minutes.
When build is starting, you can stop it with CTRL-C

Than change line 14 of restart.sh to lunch treble_arm_avN-userdebug
and start it again

No, negative, I had started GSI-Q.sh, stopped it when I started building.
Then I started the changed restart.sh in the same directory, there are also direct errors.
The folder treble-experimentations is in the home folder.
I made the scripts executable by you, otherwise I have no rights, if I start them with “./GSI-Q.sh”, as root nothing works. I just tested it, then started it again as normal user, now I get more errors as usual, I think I’ll get another “old” VM and download everything again…

If you start a .sh file with

bash file.sh

it will work with every user. Building with root is no good choice

So, everything freshly downloaded, GSI-Q.sh started, as known after the download was stopped.
Then restart.sh started with a changed line, these messages appeared:

~/srv/e$ bash restart.sh
apply changes
ready to build
build/make/core/product_config.mk:223: error: Can not locate config makefile for product "treble_arm_avN".
20:47:06 dumpvars failed with: exit status 1
Device arm_avN not found. Attempting to retrieve device repository from LineageOS Github (http://github.com/LineageOS).
Repository for arm_avN not found in the LineageOS Github repository list. If this is in error, you may need to manually add it to your local_manifests/roomservice.xml.
build/make/core/product_config.mk:223: error: Can not locate config makefile for product "treble_arm_avN".
20:47:06 dumpvars failed with: exit status 1
build/make/core/product_config.mk:223: error: Can not locate config makefile for product "treble_arm_avN".
20:47:07 dumpvars failed with: exit status 1

** Don't have a product spec for: 'treble_arm_avN'
** Do you have the right repo manifest?

============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=10
TARGET_PRODUCT=aosp_arm
TARGET_BUILD_VARIANT=eng
TARGET_BUILD_TYPE=release
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv7-a-neon
TARGET_CPU_VARIANT=generic
HOST_ARCH=x86_64
HOST_2ND_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-5.4.0-54-generic-x86_64-Linux-Mint-20
HOST_CROSS_OS=windows
HOST_CROSS_ARCH=x86
HOST_CROSS_2ND_ARCH=x86_64
HOST_BUILD_TYPE=release
BUILD_ID=QQ3A.200805.001
OUT_DIR=out
WITH_SU=false
============================================
20:47:08 Deleted images and staging directories.

#### build completed successfully (1 seconds) ####

============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=10
TARGET_PRODUCT=aosp_arm
TARGET_BUILD_VARIANT=eng
TARGET_BUILD_TYPE=release
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv7-a-neon
TARGET_CPU_VARIANT=generic
HOST_ARCH=x86_64
HOST_2ND_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-5.4.0-54-generic-x86_64-Linux-Mint-20
HOST_CROSS_OS=windows
HOST_CROSS_ARCH=x86
HOST_CROSS_2ND_ARCH=x86_64
HOST_BUILD_TYPE=release
BUILD_ID=QQ3A.200805.001
OUT_DIR=out
WITH_SU=false
============================================
[100% 1/1] out/soong/.bootstrap/bin/soong_build out/soong/build.ninja
FAILED: out/soong/build.ninja
out/soong/.bootstrap/bin/soong_build -t -l out/.module_paths/Android.bp.list -b 
out/soong -n out -d out/soong/build.ninja.d -globFile out/soong/.bootstrap/build
-globs.ninja -o out/soong/build.ninja Android.bp
error: vendor/lineage/build/soong/Android.bp:30:8: module "generated_kernel_incl
udes": cmd: unknown variable '$(PATH_OVERRIDE_SOONG)'
20:47:23 soong bootstrap failed with: exit status 1

#### failed to build some targets (15 seconds) ####

Buildbot completed in 0 minutes and 18 seconds

Maybe I have the wrong repo manifest?

mkdir -p ~/bin
curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
chmod a+x ~/bin/repo

No, that.s ok. I have to check the build name

Ok, there is no

treble_arm_avN-userdebug

It should be

treble_arm_avS-userdebug

No, unfortunately still not…

~/srv/e$ bash restart.sh
apply changes
ready to build
build/make/core/product_config.mk:223: error: Can not locate config makefile for product "treble_arm_avS".
23:07:52 dumpvars failed with: exit status 1
Device arm_avS not found. Attempting to retrieve device repository from LineageOS Github (http://github.com/LineageOS).
Repository for arm_avS not found in the LineageOS Github repository list. If this is in error, you may need to manually add it to your local_manifests/roomservice.xml.
........

restart.sh

START=`date +%s`
BUILD_DATE="$(date +%Y%m%d)"
echo "apply changes"

export USE_CCACHE=1
export CCACHE_SIZE=100G
export ANDROID_JACK_VM_ARGS="-Dfile.encoding=UTF-8  -XX:+TieredCompilation  -Xmx20G"

echo "ready to build"

source build/envsetup.sh
export WITHOUT_CHECK_API=true
export WITH_SU=false
lunch treble_arm_avS-userdebug

make installclean
make -j4 systemimage

END=`date +%s`
ELAPSEDM=$(($(($END-$START))/60))
ELAPSEDS=$(($(($END-$START))-$ELAPSEDM*60))
echo "Buildbot completed in $ELAPSEDM minutes and $ELAPSEDS seconds"

Also, ich ahbe das built-eOS.sh gestartet und festgetsellt, dass diese beiden Verzeichnisse falsch angelegt werden
git clone https://github.com/AndyCGYan/treble_patches -b lineage-17.1
git clone https://github.com/AndyCGYan/treble_build_los -b lineage-17.1

Bite ändere die Zeile 11

cd srv/e

so, dass in dein build Verzeichnis gewechselt wird.
Die Ordner treble_patches und treble_build_los müssen in deinem build verzeichnis liegen. Alos das Verzeichnis in dem du das scrip startest

und Zeile 45 das # entfernen und in Zeile 49 hinzufügen
Der Block sollte dann so aussehen:

buildVariant treble_arm_avN
#buildVariant treble_arm_bvN
#buildVariant treble_a64_avN
#buildVariant treble_a64_bvN
#buildVariant treble_arm64_avN
#buildVariant treble_arm64_bvN

Dann nochmal starten und bis (hoffentlich) Ende durchlaufen lassen

So, also, ich scheitere am selben Punkt. Es sieht so aus, als wenn es für Q kein buildVariant treble_arm_avN gibt. Bis du sicher, dass du arm brauchst ?

Ich frag mal beim Master of GSI an und meld mich wieder

Erstmal schon Danke das Du Dich weiter darum kümmerst.

Du meinst mit dem built-eOS.sh das Script das Du zum Download angeboten hast (GSI-Q.sh)?
Denn das built-eOS.sh findet meine VM nicht.

Was ich benötige ist eine Datei wie Du sie auch anbietest, sprich für a/b Varianten, genauer, entweder das Pocophone F1 (a) oder Redmi Note 9pro (a/b).
Du machst diese ja auch, und ich möchte es auch können :-). Zudem steigen dann vielleicht mehr Leute darauf ein, wenn wenigstens 2 “Anbieter” da sind. Sonst denken viele ja immer, das die Gefahr besteht das das Projekt einschläft.
Mein “Spiele PC” soll auch mal was zu tun haben, ist die meiste Zeit aus…

Diese Ordner liegen in dem Verzeichnis, oder meinst Du tatsächlich den Ordner “build”?
Ich habe Dein Script übernommen, die Ordner srv/e im Homeverzeichnis angelegt und in diesem Verzeichnis dann auch das Script gestartet.

nee, sieht gut aus. Wie gesagt, das Problem ist wohl das arm build. Ich weiß nicht, ob die ‘alten’ arm processoren für ein Q_GSI genügen. Aber ich bin nich dabei das ganze zu klären

Wie geschrieben, ich benötige das für relativ aktuelle Handys, ich habe es mal mit

buildVariant treble_arm64_bvN

getestet, damit geht es auch nicht, aber das sind doch auch die Dateien die Du anbietest?