halium-generic-adaptation-build-tools: use main branch
Issue
-
Current situation :
In build.sh and .gitlab-ci.yml files, we use
halium-10
/halium-10-focal
branch of halium-generic-adaptation-build-tools repository. -
What does UBports official documentation say ?
By using the shared script, your port will receive the latest changes in device tarball building as rootfs continues to evolve (e.g. for 22.04 or newer).
-
UBports Documentation uses default branch (
main
) of halium-generic-adaptation-build-tools repository :
for-gitlab-ci-based-ports-switch-to-shared-building-script-gitlab-ci-configurationbuild.sh
#!/bin/bash set -xe [ -d build ] || git clone https://gitlab.com/ubports/community-ports/halium-generic-adaptation-build-tools build ./build/build.sh "$@"
.gitlab-ci.yml
include: - https://gitlab.com/ubports/porting/community-ports/halium-generic-adaptation-build-tools/-/raw/main/gsi-port-ci.yml variables: BUILD_DEVEL_FLASHABLE_FOCAL: "1"
-
UBports Documentation specifies halium version in deviceinfo file :
filling-in-your-deviceinfo- Add this option to specify your Halium version. Up to Halium 13 is supported at this moment.
deviceinfo_halium_version="11"
🔗 This page of the UBports documentation is relatively recent : https://github.com/ubports/docs.ubports.com/commits/master/porting/UpdatePortsFor2004.rst - Add this option to specify your Halium version. Up to Halium 13 is supported at this moment.
-
-
What does UBports Porting Telegram Group say ?
- according to the following message,
halium-11
branch is legacy, so probablyhalium-10
branch too :
https://t.me/ubports_porting/194304
- according to the following message, non main branches are legacies :
https://t.me/ubports_porting/190731
- according to the following message,
-
What will happen during migration to 24.04-noble ?
The use of thehalium-10-focal
branch in line 6 of .gitlab-ci.yml may cause problems. -
Differences between default (
main
) andhalium-10
/halium-10-focal
branches of halium-generic-adaptation-build-tools repository :default ( main
)halium-10
/halium-10-focal
gsi-port-ci.yml uses ubuntu 22.04 image uses ubuntu 20.04 image build.sh
build-kernel.shoptional support for :
-deviceinfo_kernel_llvm_compile
https://docs.kernel.org/kbuild/llvm.html
Fix
I copied /pasted the content of the build.sh and .gitlab ci.yaml files from the official documention to the xiaomi-surya repository.
I specified our halium version in deviceinfo file.
Tests
I built the images and flashed them on my phone with fastboot flash
.
- The xenial development atifact is no more built.
- There is a ~25% gain at endurance level.
- The reboot time is shorter.
- It seems to me that applications are getting slightly faster and the the device heats a little less.
- No performance loss.
- Stability is good. No system/application crash during tests.
- Later, we will have the possibility of using LLVM to build the kernel.
Battery lifetime : 7-hour gain (greater than 25%)
before fix : 27 hours | after fix : 34 hours |
---|---|
![]() |
![]() |
Reboot time
before fix : random. often greater than 1 min | after fix : less than 20 sec |
---|
Performance : no loss
- WebGL : no loss
before fix : 36 fps | after fix : 37 fps |
---|---|
![]() |
![]() |
- CPU : no loss
- before fix
sysbench --test=cpu --num-threads=2 --cpu-max-prime=20000 run 1985 events per second sysbench --test=cpu --num-threads=8 --cpu-max-prime=20000 run 4010 events per second sysbench --test=memory --num-threads=4 run Total operations: 47619005 (4759595.74 per second) 46502.93 MiB transferred (4648.04 MiB/sec) sysbench --test=mutex --num-threads=64 run total time: 4.8462s
- after fix
sysbench --test=cpu --num-threads=2 --cpu-max-prime=20000 run 1989 events per second sysbench --test=cpu --num-threads=8 --cpu-max-prime=20000 run 4012 events per second sysbench --test=memory --num-threads=4 run Total operations: 47641133 (4763089.31 per second) 46524.54 MiB transferred (4651.45 MiB/sec) sysbench --test=mutex --num-threads=64 run total time: 4.8909s
- before fix