Building /e/OS for FP5

Hello,

i tried to build /e/OS for the FP5 using the official documentation but the build fails.

Did i use the correct device name or is something missing? Any help is appreciated.


This is the docker command i used:

docker run \
-v "/srv/e/src:/srv/src" \
-v "/srv/e/zips:/srv/zips" \
-v "/srv/e/logs:/srv/logs" \
-v "/srv/e/ccache:/srv/ccache" \
-e "BRANCH_NAME=v1.18-t" \
-e "DEVICE_LIST=FP5" \
-e "REPO=https://gitlab.e.foundation/e/os/releases.git" \
-e "MINIMAL_APPS=true" \
registry.gitlab.e.foundation:5000/e/os/docker-lineage-cicd:community

The repo sync was sucessfulā€¦

>> [Thu Dec 28 00:04:43 UTC 2023] Branch:  v1.18-t
>> [Thu Dec 28 00:04:43 UTC 2023] Devices: FP5,
>> [Thu Dec 28 00:04:43 UTC 2023] (Re)initializing branch repository
>> [Thu Dec 28 00:04:43 UTC 2023] Branch name v1.18-t is a tag on e/os/releases, prefix with refs/tags/ for 'repo init'
>> [Thu Dec 28 00:04:47 UTC 2023] Copying '/srv/local_manifests/*.xml' to '.repo/local_manifests/'
>> [Thu Dec 28 00:04:48 UTC 2023] Syncing branch repository
>> [Thu Dec 28 00:21:03 UTC 2023] Setting "UNOFFICIAL" as release type
>> [Thu Dec 28 00:21:03 UTC 2023] Adding OTA URL overlay (for custom URL )
>> [Thu Dec 28 00:21:03 UTC 2023] Preparing build environment
>> [Thu Dec 28 00:21:03 UTC 2023] Starting build for FP5, v1.18-t branch
>> [Thu Dec 28 00:21:03 UTC 2023] ANDROID_JACK_VM_ARGS=-Dfile.encoding=UTF-8 -XX:+TieredCompilation -Xmx4G
>> [Thu Dec 28 00:21:03 UTC 2023] Switch to Python2
>> [Thu Dec 28 00:21:12 UTC 2023] Failed build for FP5
>> [Thu Dec 28 00:21:12 UTC 2023] Finishing build for FP5
>> [Thu Dec 28 00:21:12 UTC 2023] Cleaning source dir for device FP5
>> [Thu Dec 28 00:21:13 UTC 2023] Switch back to Python3

ā€¦but the build (breakfast) failed.
This is the contents of /srv/e/logs/FP5/:

>> [Thu Dec 28 00:21:03 UTC 2023] Starting build for FP5, v1.18-t branch
00:21:10 Build sandboxing disabled due to nsjail error.
In file included from build/make/core/config.mk:353:
In file included from build/make/core/envsetup.mk:352:
build/make/core/product_config.mk:228: error: Can not locate config makefile for product "lineage_FP5".
00:21:10 dumpvars failed with: exit status 1
Device FP5 not found. Attempting to retrieve device repository from LineageOS Github (http://github.com/LineageOS).
Repository for FP5 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.
00:21:11 Build sandboxing disabled due to nsjail error.
In file included from build/make/core/config.mk:353:
In file included from build/make/core/envsetup.mk:352:
build/make/core/product_config.mk:228: error: Can not locate config makefile for product "lineage_FP5".
00:21:11 dumpvars failed with: exit status 1
00:21:12 Build sandboxing disabled due to nsjail error.
In file included from build/make/core/config.mk:353:
In file included from build/make/core/envsetup.mk:352:
build/make/core/product_config.mk:228: error: Can not locate config makefile for product "lineage_FP5".
00:21:12 dumpvars failed with: exit status 1

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

No such item in brunch menu. Try 'breakfast'
>> [Thu Dec 28 00:21:12 UTC 2023] Failed build for FP5
>> [Thu Dec 28 00:21:12 UTC 2023] Finishing build for FP5
>> [Thu Dec 28 00:21:12 UTC 2023] Cleaning source dir for device FP5
00:21:13 Entire build directory removed.

Maybe youā€™d have to include this? https://gitlab.e.foundation/e/os/local_manifests/-/blob/v1-t/FP5.xml

Quick how-to:

  • create a /srv/local_manifests directory
  • create a /srv/local_manifests/roomservice.xml file, copy/paste content from above URL
  • add -v "/srv/local_manifests:/srv/local_manifests" to your Docker run command

If it still fails, please share both your logs files (repo and build) using one of these online services: https://privatebin.info/directory/

3 Likes

And you need to do that because FP5 is not supported by LineageOS (yet). So you need to create a manifest to tell the Docker image where to find the necessary source files (currently that is in the /e/ gitlab repos) as described here by @smu44

The build will also need to find vendor ā€˜blobsā€™ for the FP5.

  • Step 5 of the official instructions describe how to to manually extract vendor files from your device
  • Or you can extract them from another custom ROM (such as the official /e/ ROMs here. Instructions on how to do this are in the LineagOS Wiki
  • Or you may be able to use what other builders have extracted and published in someone elseā€™s repos
    • For devices officially supported by LineageOS, the vendor blobs can be found in TheMuppets github repos.
    • /e/ will have extracted the FP5 vendor blobs and stored them in their gitlab repos but, to avoid possible copyright issues, they only allow access to the vendor repos to their own staff)
    • the only repo I could find searching github and gitlab for vendor_fairphone_FP5 is this one which you may be able to use, but which may cause other build errors

Good luck!

2 Likes

Thank you to both of you :smiley:, got much further now in the build process.
I was missing the manifest and the vendor blobs.

@smu44 I used the manifest you linked to, however it uses the remote=ā€œe-privā€ which uses ssh access that i do not have, so i changed these lines to remote=ā€œeā€ and it worked (the repos are public)

@petefoth I first tried using the vendor_fairphone_FP5 github repo you linked to and added it to the manifest but i got a build error at 99% (see below) which i interpret as the blobs were not matching some description in the sources, so i extracted them from the latest /e/OS image and building again right now (takes quite some timeā€¦), i will give an update once i got a successful build.

I read about the anti-rollback feature in the install guide and i am not sure if i want to flash this image :upside_down_face:
How safe is it to flash such an image? Are there any steps that can be done to disable this feature for development or testing purposes?


The following HALs in device manifest are not declared in FCM <= level 5: 
  android.hardware.bluetooth.audio.IBluetoothAudioProviderFactory/default (@2)
  android.hardware.drm.IDrmFactory/clearkey (@1)
  android.hardware.power.IPower/default (@3)
  android.hardware.usb@1.3::IUsb/default
  android.hardware.vibrator.IVibrator/default (@2)
  android.hardware.wifi.hostapd.IHostapd/default (@1)
  android.hardware.wifi.supplicant.ISupplicant/default (@1)
  android.hardware.wifi@1.6::IWifi/default
  vendor.pixelworks.hardware.display@1.1::IIris/default
INCOMPATIBLE

stderr:ERROR: files are incompatible: The following instances are in the device manifest but not specified in framework compatibility matrix: 
    vendor.pixelworks.hardware.display@1.1::IIris/default
Suggested fix:
1. Update deprecated HALs to the latest version.
2. Check for any typos in device manifest or framework compatibility matrices with FCM version >= 5.
3. For new platform HALs, add them to any framework compatibility matrix with FCM version >= 5 where applicable.
4. For device-specific HALs, add to DEVICE_FRAMEWORK_COMPATIBILITY_MATRIX_FILE or DEVICE_PRODUCT_COMPATIBILITY_MATRIX_FILE.: Success

ninja: build stopped: subcommand failed.
1 Like

Sorry, saw it but forgot to mention :confused:

Happy building, finger crossed! :crossed_fingers:
If it fails, based on my past experience Iā€™d recommend to cleanup src dir and redo from start.

Sorry, saw it but forgot to mention :confused:
Happy building, finger crossed! :crossed_fingers:

No worries, my build succeeded :smile:
I did not test the image because 1. i do not have a fairphone 5 at the moment and 2. i fear bricking the phone because of the anti-roll back feature as mentioned above.

If anyone is willing and brave enough to flash this, i wrote down how i build it here.

The feature is disabled when your bootloader is unlocked.

The feature is disabled when your bootloader is unlocked.

So as long as the bootloader is working and unlocked i can flash test images and return to an official /e/OS image or the official fairphone rom. Thats good to know, thanks :+1: