[HOWTO] Build /e/

this all works on Ubuntu os?

Yes it does.

I build it for Motorola Titan on ubuntu 18.4.

2 Likes

ah thank you @Erekoze! Good to hear!
I think I may try this too

Just for documentationā€¦ maybe it is of help for others:
I did a build for sumire and got:

Set cache size limit to 50.0 GB
>> [Fri Dec 27 10:55:14 UTC 2019] Branch:  v1-nougat
>> [Fri Dec 27 10:55:14 UTC 2019] Devices: sumire,
>> [Fri Dec 27 10:55:14 UTC 2019] (Re)initializing branch repository
>> [Fri Dec 27 10:55:24 UTC 2019] Copying '/srv/local_manifests/*.xml' to '.repo/local_manifests/'
>> [Fri Dec 27 10:55:24 UTC 2019] Use branch cm-14.1 on github.com/TheMuppets
>> [Fri Dec 27 10:55:25 UTC 2019] Syncing branch repository
>> [Fri Dec 27 21:55:44 UTC 2019] Missing "vendor/cm", aborting 

The logs did look like:

...
Checking out files: 100% (1717/1717), done.
Checking out files: 100% (44431/44431), done.
error: Cannot checkout e/os/android_prebuilts_prebuiltapks: ManifestInvalidRevisionError: revision master in e/os/android_prebuilts_prebuiltapks not found
error: in `sync -c --force-sync`: revision master in e/os/android_prebuilts_prebuiltapks not found
Shared project LineageOS/android_hardware_qcom_media found, disabling pruning.
Shared project LineageOS/android_hardware_qcom_media found, disabling pruning.
Shared project LineageOS/android_hardware_qcom_media found, disabling pruning.
Shared project LineageOS/android_hardware_qcom_media found, disabling pruning.
Shared project LineageOS/android_hardware_qcom_media found, disabling pruning.
Shared project LineageOS/android_hardware_qcom_media found, disabling pruning.
Shared project LineageOS/android_hardware_qcom_media found, disabling pruning.
Shared project LineageOS/android_hardware_qcom_wlan found, disabling pruning.
Shared project LineageOS/android_hardware_qcom_wlan found, disabling pruning.
Shared project LineageOS/android_hardware_ril found, disabling pruning.
Shared project LineageOS/android_hardware_ril found, disabling pruning.

But after restarting everything worked fine!
BTW because I did not know before: The Syncing branch repository did take ~10 hours and the build process itself did take ~6 hours (on my IntelĀ® Coreā„¢ i3-5010U CPU @ 2.10GHz Ɨ 4).
Will now try to install my first build :sunglasses: !

1 Like

Good luck :+1::+1::+1: ā€¦

Hi @howil good to read that you were able to build your own custom ROM. The build process does take a lot of memory / resourcesā€¦ the last time i did a full build on my PC with 16 GB RAM, i5-4440 CPU @ 3.10GHz Ɨ 4 & with about 600 GB on my HD - the build took more than 7 hours with about 3 hours just for the download of repo. The Docker build process takes more time compared to the standard repo sync.

With compiling sumire using

sudo docker run \
-v "/srv/e/src:/srv/src:delegated" \
-v "/srv/e/zips:/srv/zips:delegated" \
-v "/srv/e/logs:/srv/logs:delegated" \
-v "/srv/e/ccache:/srv/ccache:delegated" \
-e "BRANCH_NAME=v1-nougat" \
-e "DEVICE_LIST=sumire" \
-e "CUSTOM_PACKAGES='MuPDF GmsCore GsfProxy FakeStore com.google.android.maps.jar Mail BlissLauncher BlissIconPack MozillaNlpBackend OpenWeatherMapWeatherProvider AccountManager MagicEarth OpenCamera eDrive Weather Notes Tasks NominatimNlpBackend DroidGuard OpenKeychain Message Browser BrowserWebView Apps LibreOfficeViewer'" \
-e "SIGNATURE_SPOOFING=restricted" \
-e "OTA_URL=https://ota.ecloud.global/api" \
-e "REPO=https://gitlab.e.foundation/e/os/android.git" \
registry.gitlab.e.foundation:5000/e/os/docker-lineage-cicd:latest

I get a .zip file of 653,8 MB while the unofficial build from https://images.ecloud.global/dev/sumire/ is 739,7 MB.
I guess it is connected to the number of CUSTOM_PACKAGESā€¦ Where do I find a list what is included in the official and unofficial builds. (See also Does Docker build use prebuilt APKs?)
Thanks in advance

@manoj, why does the build take so much HDD space? I am just so curious! What is the min space you could use?

The build downloads the source files ā€¦that means a minimum of 150 + GB of space will be taken up. Add 50 GB of cache and that become 200 Gb.This is true for a Docker build with default settings. Default settings here means the setting as mentioned here.
Docker with default setting downloads the vendor files for all supported devices. This is a one time process but is a pain when it is on a slow net connection. I have not built the ROM on my PC for sometime now but when I used to do with a 100 Mb internet it would take atleast 3-4 hrs just to sync the sources. Again as I mentioned this is a one time process. The second time it will be faster. The space it takes along with the 50 GB cache will be around 200 GB.

My build hangs here for hours already:

[Fri Jan 10 11:34:23 UTC 2020] Starting build for FP2, v1-pie branch
ANDROID_JACK_VM_ARGS=-Dfile.encoding=UTF-8 -XX:+TieredCompilation -Xmx4G
What does it mean?

It is syncing the source files. Check the logs to see what is happening in the background. It will be stuck at this stage for hours depending on your internet speed.

check your build log file.

Yes, I left the computer, donā€™t įø±now how long it had to work on it:


75GB for a .zip of 607.0 MB. The moment of truth will be in the testingSchermafdruk van 2020-01-10 21-31-59 Schermafdruk van 2020-01-10 21-36-27

75 gb is small. My builds are needing more than 120 gb plus 100 gb cache.

If I remember right then during the build the usage of disk increases to more than 120GB. But after a successful build something seems to be removed automatically by the docker process so only 75GB may remain (and I think @pjmbraet did the measurement after the end of the build).

I used an SSD of 250GB, installed Ubuntu minimal on it, and while building there was only 35GB free space on the disk left, so docker really uses up to 200GB of space.

You can see the build time from the screenshot you attached


From ā€˜Starting build time to ā€™ Moving Artifactsā€¦ā€™
The only way to figure out what is happening is to check the logs. I have run builds for 12 hours ( on a slow internet connection and a 4 GB laptop. )
Minimum config should be 250 GB of empty space
16 GB of RAM

First build was aborted after 2 hours, and restarted at 13:47, so all-together it took about two and a half, maybe three hours for the first build on 200+ GB free space and 32GB RAM.

Thatā€™s right, docker is removing the build directory when finish. I donā€™t like this. If it will stay, the next build will be much faster