Compare commits
No commits in common. "81df5538c354f98a5c2402abd682740b40545f91" and "48c612cc5339f7769274d7082a0f49c0d6f347f0" have entirely different histories.
81df5538c3
...
48c612cc53
6 changed files with 69 additions and 88 deletions
22
IMAGE.md
22
IMAGE.md
|
@ -25,12 +25,15 @@ DEB_HOST_ARCH=arm64 dpkg-buildpackage -a arm64 -us -uc -rfakeroot -b -Pcross,noc
|
||||||
|
|
||||||
## Building the Image
|
## Building the Image
|
||||||
|
|
||||||
- First `cd` to the Mobian repo
|
First `cd` to the Mobian repo.
|
||||||
- Copy the kernel deb to `devices/qcom/packages`, so that it gets installed onta the image we are about to build.
|
|
||||||
- Add your SSH authorized keys file to `overlays/ssh/authorized_keys`, important so you can log in later
|
|
||||||
- Make sure the internet connection is stable, as the build fails if it cannot download all packages successfully.
|
|
||||||
|
|
||||||
Now build the image:
|
Copy the kernel deb to `devices/qcom/packages`, so that it gets installed onta the image we are about to build.
|
||||||
|
|
||||||
|
Temporary workarounds:
|
||||||
|
|
||||||
|
- Comment `loupe` in `include/packages-phosh.yaml` as that is currently not available in the repo. The image viewer can be installed later.
|
||||||
|
- Comment `mobian-phosh` because of a broken dependency and insert `phosh-core`, the metapackage just installs things like an XMPP client and nothing important we couldn't install later.
|
||||||
|
- Add your SSH authorized keys file to `overlays/ssh/authorized_keys`, important so you can log in later
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
./build.sh -t qcom -s -u mobian | tee mobian-build.log # -s for SSH, which we need later
|
./build.sh -t qcom -s -u mobian | tee mobian-build.log # -s for SSH, which we need later
|
||||||
|
@ -38,16 +41,15 @@ Now build the image:
|
||||||
|
|
||||||
(If you replace `mobian` with your own username, you will have to use that one for SSH later, of course)
|
(If you replace `mobian` with your own username, you will have to use that one for SSH later, of course)
|
||||||
|
|
||||||
Wait. It takes a while.
|
Wait. It takes a while. Make sure the internet connection is stable, as the build fails if it cannot download all packages successfully.
|
||||||
|
|
||||||
Note: Your SSH Host Keys seemingly get generated while building the image, please don't give your image to anyone else.
|
Note: Your SSH Host Keys currently get generated while building the image, please don't give your image to anyone else.
|
||||||
To Do: Verify whether those keys really end up in the image.
|
|
||||||
|
|
||||||
## Flash to device:
|
## Flash to device:
|
||||||
|
|
||||||
```
|
```
|
||||||
fastboot --set-active --slot a
|
fastboot --set-active --slot a
|
||||||
fastboot flash boot_a mobian-qcom-phosh-20240614.boot-sargo.img
|
fastboot flash boot_a mobian-qcom-phosh-20240614.boot-bonito-sdc.img
|
||||||
fastboot flash userdata mobian-qcom-phosh-20240614.rootfs.img
|
fastboot flash userdata mobian-qcom-phosh-20240614.rootfs.img
|
||||||
fastboot erase dtbo
|
fastboot erase dtbo
|
||||||
```
|
```
|
||||||
|
@ -56,4 +58,4 @@ Boot up the device. Connect it via USB.
|
||||||
|
|
||||||
## Temporary manual changes
|
## Temporary manual changes
|
||||||
|
|
||||||
The steps are documented in `README.md` in this repo.
|
Documented in README.md in this repo.
|
||||||
|
|
26
README.md
26
README.md
|
@ -18,8 +18,6 @@ Connect via SSH: `ssh mobian@10.66.0.1`
|
||||||
|
|
||||||
Accept the host key.
|
Accept the host key.
|
||||||
|
|
||||||
Note: If you built the image with a different username, you will have to set that in `ansible/ansible.cfg`.
|
|
||||||
|
|
||||||
### Roll out workarounds using Ansible
|
### Roll out workarounds using Ansible
|
||||||
|
|
||||||
You have to have `ansible-playbook` installed.
|
You have to have `ansible-playbook` installed.
|
||||||
|
@ -42,8 +40,7 @@ Roll out audio workarounds: `./audio.sh`
|
||||||
|
|
||||||
- Make installer images work on this device
|
- Make installer images work on this device
|
||||||
- Have droid-juicer run on installer images
|
- Have droid-juicer run on installer images
|
||||||
- Make sure my `q6voiced` package no longer includes a hard-coded config for this device
|
- Make an ITP for tinyalsa and q6voiced and get that done (use the workarounds from this repo to get call audio working for now)
|
||||||
- Create an ITP for `tinyalsa` and `q6voiced` and get both into the repos (use the workarounds from this repo to get working call audio for now)
|
|
||||||
- Combine SDM670 kernel patches with those in the Mobian qcom kernel
|
- Combine SDM670 kernel patches with those in the Mobian qcom kernel
|
||||||
- Patches are already being upstreamed by the sdm670-linux project, maybe that's already done before I start working on it xD
|
- Patches are already being upstreamed by the sdm670-linux project, maybe that's already done before I start working on it xD
|
||||||
|
|
||||||
|
@ -51,7 +48,7 @@ Roll out audio workarounds: `./audio.sh`
|
||||||
|
|
||||||
- Remove hard-coded value in the `droid-juicer` systemd unit (needs someone who knows Rust, **help wanted**)
|
- Remove hard-coded value in the `droid-juicer` systemd unit (needs someone who knows Rust, **help wanted**)
|
||||||
- https://gitlab.com/mobian1/droid-juicer/-/issues/4
|
- https://gitlab.com/mobian1/droid-juicer/-/issues/4
|
||||||
- Combining SDM670 kernel patches with the Mobian qcom kernel (To Do List entry above, **help wanted**)
|
- Combining SDM670 kernel patches with the Mobian qcom kernel (To Do List entry above)
|
||||||
|
|
||||||
Done:
|
Done:
|
||||||
|
|
||||||
|
@ -72,8 +69,8 @@ For those I will remove the workarounds once the changes are in the Mobian repo
|
||||||
|
|
||||||
- add udev rule for the vibration motor to the right package
|
- add udev rule for the vibration motor to the right package
|
||||||
- fix udev rule for the Bluetooth workaround in this repo
|
- fix udev rule for the Bluetooth workaround in this repo
|
||||||
- create/find script/tool that brings up Bluetooth & then package it
|
- add script that brings up Bluetooth & then package it
|
||||||
- for now this repo contains a simple script specific to this device and a udev rule, but something is wrong with the udev rule. Run `/opt/bluetooth-mac.bash` to get Bluetooth working, repeat after reboots
|
- for now this repo contains a simple script specific to this device and a udev rule, but something is wrong with the udev rule. Run "/opt/bluetooth-mac.bash" to get Bluetooth working, repeat after reboots
|
||||||
|
|
||||||
### This Works
|
### This Works
|
||||||
|
|
||||||
|
@ -93,19 +90,24 @@ For those I will remove the workarounds once the changes are in the Mobian repo
|
||||||
- eSIM
|
- eSIM
|
||||||
- SMS (only receiving has been tested, but I don’t have reason to believe sending wouldn’t work)
|
- SMS (only receiving has been tested, but I don’t have reason to believe sending wouldn’t work)
|
||||||
- audio (ALSA config not packaged, but can be manually added using the playbook in this repo)
|
- audio (ALSA config not packaged, but can be manually added using the playbook in this repo)
|
||||||
- full disk encryption (works, will document that soon)
|
- full disk encryption (works, need to get some MRs merged and will document that soon)
|
||||||
- camera (patches not pushed to my device-specific kernel)
|
- camera (both are still WIP, front camera buggy, back camera works but patches not in git yet)
|
||||||
|
- GPS (needs some improvements for better accuracy)
|
||||||
|
|
||||||
### This Has An Unknown Status
|
### This Has An Unknown Status
|
||||||
|
|
||||||
- Fingerprint Sensor
|
- Fingerprint Sensor
|
||||||
- GPS (needs some improvements for better accuracy)
|
- NFC (no idea what software I could use for testing, but should work, does so on pmOS)
|
||||||
- NFC (should work, does so on pmOS)
|
|
||||||
|
|
||||||
### This Does Not Work Yet (Soon™)
|
### This Does Not Work Yet (Soon™)
|
||||||
|
|
||||||
- USB host mode (no Kernel support yet, but apparently this is being worked on)
|
- USB host mode (no Kernel support yet, but apparently this is being worked on)
|
||||||
|
|
||||||
|
### This Has An Unknown Status
|
||||||
|
|
||||||
|
- Fingerprint Sensor
|
||||||
|
- NFC (no idea what software I could use for testing, but should work, does so on pmOS)
|
||||||
|
|
||||||
### This Is Missing And Will Come Later
|
### This Is Missing And Will Come Later
|
||||||
|
|
||||||
- accelerometer
|
- accelerometer
|
||||||
|
@ -117,7 +119,7 @@ For those I will remove the workarounds once the changes are in the Mobian repo
|
||||||
|
|
||||||
- My efforts of packaging a device-specific kernel: https://salsa.debian.org/erebion/sdm-670-linux (which can be used for now as patches are not yet in upstream Linux)
|
- My efforts of packaging a device-specific kernel: https://salsa.debian.org/erebion/sdm-670-linux (which can be used for now as patches are not yet in upstream Linux)
|
||||||
- `mobian-recipes`, which is used to build images: https://salsa.debian.org/Mobian-team/mobian-recipes
|
- `mobian-recipes`, which is used to build images: https://salsa.debian.org/Mobian-team/mobian-recipes
|
||||||
- `droid-juicer`, which retrieves some important files, such as firmware, from some partitions: https://gitlab.com/mobian1/droid-juicer
|
- `droid-juicer`, which retrieves some important files from some partitions: https://gitlab.com/mobian1/droid-juicer
|
||||||
- postmarketOS wiki: https://wiki.postmarketos.org (lovely folks, thanks for sharing everything you found out the hard way :D)
|
- postmarketOS wiki: https://wiki.postmarketos.org (lovely folks, thanks for sharing everything you found out the hard way :D)
|
||||||
|
|
||||||
### Thanks For All The Fish
|
### Thanks For All The Fish
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
### ALSA Config ###
|
### ALSA Config ###
|
||||||
|
|
||||||
- name: "Remove previously downloaded version of alsa ucm configs"
|
- name: "Remove previously downloaded versions of alsa ucm configs"
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
path: "/root/alsa-ucm-conf-master.tar.gz"
|
path: "/root/alsa-ucm-conf-master.tar.gz"
|
||||||
state: absent
|
state: absent
|
||||||
|
@ -16,7 +16,6 @@
|
||||||
dest: /root/alsa-ucm-conf-master.tar.gz
|
dest: /root/alsa-ucm-conf-master.tar.gz
|
||||||
force: true # overwrite if the already have a previous version
|
force: true # overwrite if the already have a previous version
|
||||||
mode: '0440'
|
mode: '0440'
|
||||||
delay: 2
|
|
||||||
retries: 20
|
retries: 20
|
||||||
|
|
||||||
- name: "Remove alsa ucm configs"
|
- name: "Remove alsa ucm configs"
|
||||||
|
@ -82,8 +81,6 @@
|
||||||
repo: 'https://salsa.debian.org/erebion/tinyalsa.git'
|
repo: 'https://salsa.debian.org/erebion/tinyalsa.git'
|
||||||
dest: /opt/repos/tinyalsa
|
dest: /opt/repos/tinyalsa
|
||||||
version: mobian-git20240621
|
version: mobian-git20240621
|
||||||
become_user: nobody
|
|
||||||
delay: 2
|
|
||||||
retries: 20
|
retries: 20
|
||||||
|
|
||||||
- name: "Clone q6voiced repo"
|
- name: "Clone q6voiced repo"
|
||||||
|
@ -91,8 +88,6 @@
|
||||||
repo: 'https://salsa.debian.org/erebion/q6voiced.git'
|
repo: 'https://salsa.debian.org/erebion/q6voiced.git'
|
||||||
dest: /opt/repos/q6voiced
|
dest: /opt/repos/q6voiced
|
||||||
version: mobian-git20240607
|
version: mobian-git20240607
|
||||||
become_user: nobody
|
|
||||||
delay: 2
|
|
||||||
retries: 20
|
retries: 20
|
||||||
|
|
||||||
- name: "chown repo directories to nobody:nogroup"
|
- name: "chown repo directories to nobody:nogroup"
|
||||||
|
@ -102,26 +97,19 @@
|
||||||
owner: nobody
|
owner: nobody
|
||||||
group: nogroup
|
group: nogroup
|
||||||
|
|
||||||
- name: "Build Debian packages for tinyalsa"
|
- name: "Build Debian packages for tinyalsa and q6voiced"
|
||||||
ansible.builtin.shell:
|
ansible.builtin.shell:
|
||||||
cmd: debuild -i -us -uc -b
|
cmd: debuild -i -us -uc -b
|
||||||
chdir: "/opt/repos/tinyalsa/"
|
chdir: "{{ item }}"
|
||||||
become_user: nobody
|
become_user: nobody
|
||||||
|
|
||||||
- name: "Install tinyalsa"
|
|
||||||
ansible.builtin.apt:
|
|
||||||
deb: "/opt/repos/{{ item }}"
|
|
||||||
loop:
|
loop:
|
||||||
- "libtinyalsa-dev_2.0.0+git20240621-7f06b2f-3_arm64.deb"
|
- "/opt/repos/tinyalsa/"
|
||||||
- "libtinyalsa_2.0.0+git20240621-7f06b2f-3_arm64.deb"
|
- "/opt/repos/q6voiced/"
|
||||||
- "tinyalsa_2.0.0+git20240621-7f06b2f-3_arm64.deb"
|
|
||||||
|
|
||||||
- name: "Build Debian package for q6voiced"
|
|
||||||
ansible.builtin.shell:
|
|
||||||
cmd: debuild -i -us -uc -b
|
|
||||||
chdir: "/opt/repos/q6voiced/"
|
|
||||||
become_user: nobody
|
|
||||||
|
|
||||||
- name: "Install tinyalsa and q6voiced"
|
- name: "Install tinyalsa and q6voiced"
|
||||||
ansible.builtin.apt:
|
ansible.builtin.apt:
|
||||||
deb: "/opt/repos/q6voiced_0~0+git20240607-75ae4079-1_arm64.deb"
|
deb: "/opt/repos/{{ item }}"
|
||||||
|
loop:
|
||||||
|
- "libtinyalsa_2.0.0+git20240621-7f06b2f-2_arm64.deb"
|
||||||
|
- "tinyalsa_2.0.0+git20240621-7f06b2f-2_arm64.deb"
|
||||||
|
- "q6voiced_0~0+git20240607-75ae4079-1_arm64.deb"
|
||||||
|
|
15
ansible/files/droid-juicer-sdm670.service
Normal file
15
ansible/files/droid-juicer-sdm670.service
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
[Unit]
|
||||||
|
Description=Android vendor firmware extraction
|
||||||
|
Wants=sysinit.target make-dynpart-mappings@system_a.service
|
||||||
|
After=-.mount tmp.mount boot.mount make-dynpart-mappings@system_a.service
|
||||||
|
Before=plymouth-quit.service display-manager.service
|
||||||
|
ConditionPathExists=!/var/lib/droid-juicer/status.json
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=oneshot
|
||||||
|
ExecStartPre=-/usr/bin/plymouth display-message --text="Extracting binary firmware..."
|
||||||
|
ExecStart=/usr/bin/droid-juicer
|
||||||
|
ExecStartPost=/usr/sbin/reboot
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=basic.target
|
|
@ -1,4 +0,0 @@
|
||||||
[Unit]
|
|
||||||
Description=Android vendor firmware extraction
|
|
||||||
Wants=sysinit.target make-dynpart-mappings@system_a.service
|
|
||||||
After=-.mount tmp.mount boot.mount make-dynpart-mappings@system_a.service
|
|
|
@ -4,26 +4,6 @@
|
||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
|
|
||||||
### Remove remnants of previous versions of this playbook ###
|
|
||||||
|
|
||||||
- name: "Remove remnants from previous versions of this playbook"
|
|
||||||
ansible.builtin.service:
|
|
||||||
enabled: false
|
|
||||||
masked: true
|
|
||||||
name: "droid-juicer-sdm670.service"
|
|
||||||
ignore_errors: true # do not fail if the unit does not exist
|
|
||||||
register: temp_droid_juicer_unit
|
|
||||||
|
|
||||||
- name: "Remove remnants of previous versions of this playbook"
|
|
||||||
ansible.builtin.file:
|
|
||||||
path: "/etc/systemd/system/droid-juicer-sdm670.service"
|
|
||||||
state: absent
|
|
||||||
|
|
||||||
- name: Reload systemd units
|
|
||||||
ansible.builtin.systemd:
|
|
||||||
daemon_reload: yes
|
|
||||||
when: temp_droid_juicer_unit.changed
|
|
||||||
|
|
||||||
### Various Small Fixes ###
|
### Various Small Fixes ###
|
||||||
|
|
||||||
- name: "Copy /usr/share/initramfs-tools/hooks/qcom-firmware"
|
- name: "Copy /usr/share/initramfs-tools/hooks/qcom-firmware"
|
||||||
|
@ -38,35 +18,33 @@
|
||||||
# Has been merged, but package did not have a new release yet
|
# Has been merged, but package did not have a new release yet
|
||||||
# https://salsa.debian.org/DebianOnMobile-team/qcom-phone-utils/-/merge_requests/2
|
# https://salsa.debian.org/DebianOnMobile-team/qcom-phone-utils/-/merge_requests/2
|
||||||
|
|
||||||
- name: "Create directory for a unit override for droid-juicer.service"
|
- name: "Copy custom droid-juicer service unit"
|
||||||
ansible.builtin.file:
|
|
||||||
path: "/etc/systemd/system/droid-juicer.service.d/"
|
|
||||||
state: directory
|
|
||||||
mode: '0644'
|
|
||||||
|
|
||||||
- name: "Copy override.conf for droid-juicer.service"
|
|
||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
src: override.conf
|
src: droid-juicer-sdm670.service
|
||||||
dest: /etc/systemd/system/droid-juicer.service.d/override.conf
|
dest: /etc/systemd/system/droid-juicer-sdm670.service
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
mode: u+rw
|
mode: u+rwx
|
||||||
force: true
|
force: true
|
||||||
register: droid_juicer_unit_override
|
register: unit
|
||||||
# Original unit has a hardcoded value, we'll just an override temporarily
|
# Original unit has a hardcoded value, we'll just use our own temporarily
|
||||||
# https://gitlab.com/mobian1/droid-juicer/-/issues/4
|
# https://gitlab.com/mobian1/droid-juicer/-/issues/4
|
||||||
|
|
||||||
- name: "Reload systemd units"
|
- name: Reload systemd units
|
||||||
ansible.builtin.systemd:
|
ansible.builtin.systemd:
|
||||||
daemon_reload: yes
|
daemon_reload: yes
|
||||||
when: droid_juicer_unit_override.changed
|
when: unit.changed
|
||||||
|
|
||||||
- name: "Restart droid-juicer.service after adding the override"
|
- name: "Disable regular service unit for droid-juicer"
|
||||||
ansible.builtin.systemd:
|
ansible.builtin.service:
|
||||||
enabled: true
|
enabled: false
|
||||||
state: restarted
|
masked: true
|
||||||
name: "droid-juicer.service"
|
name: "droid-juicer.service"
|
||||||
when: droid_juicer_unit_override.changed
|
|
||||||
|
- name: "Enable custom service unit for droid-juicer"
|
||||||
|
ansible.builtin.service:
|
||||||
|
enabled: true
|
||||||
|
name: "droid-juicer-sdm670.service"
|
||||||
|
|
||||||
### Bluetooth ###
|
### Bluetooth ###
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue