Add command flashing custom lineageOS zip

This commit is contained in:
Waldemar Tomme 2025-01-12 18:33:53 +01:00
parent d5450b8c49
commit 41b0cd3e4e
2 changed files with 65 additions and 2 deletions

View File

@ -47,7 +47,7 @@ samsung-a715f:~# i2cdetect -y -r 2 # slow; might be broken
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
samsung-a715f:~# i2cdetect -y -r 7 # slow; might be broken
samsung-a715f:~# i2cdetect -y -r 7 # slow; broken
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
@ -70,6 +70,61 @@ samsung-a715f:~# i2cdetect -y -r 9
70: -- -- -- -- -- -- -- --
```
```
[ 41.251691] geni_i2c a84000.i2c: here: geni_i2c_gpi_xfer [Enter] @ drivers/i2c/busses/i2c-qcom-geni.c:615
[ 41.251714] geni_i2c a84000.i2c: msg[0].len:1
[ 41.251722] geni_i2c a84000.i2c: here: geni_i2c_gpi_xfer [Prepare I2C_WRITE] @ drivers/i2c/busses/i2c-qcom-geni.c:639
[ 41.251753] gpi a00000.dma-controller: here: gpi_prep_slave_sg @ drivers/dma/qcom/gpi.c:1841
[ 41.251765] gpi a00000.dma-controller: here: gpi_create_i2c_tre [TRE:set_config; low_count: 11, high_count: 10, cycle_count: 26, pack_enable: 3, clk_div: 7] @ drivers/dma/qcom/gpi.c:1647
[ 41.251777] gpi a00000.dma-controller: here: gpi_create_i2c_tre [TRE:I2C_WRITE] @ drivers/dma/qcom/gpi.c:1674
[ 41.251785] gpi a00000.dma-controller: here: gpi_create_i2c_tre [TRE:I2C_READ || !multi_msg; multi_msg: 0, address: 4294966848, length: 1] @ drivers/dma/qcom/gpi.c:1698
[ 41.251797] gpi a00000.dma-controller: TRE:0 31a0a0b:0:7:220001
[ 41.251805] gpi a00000.dma-controller: TRE:1 4801:0:1:200001
[ 41.251814] gpi a00000.dma-controller: TRE:2 fffffe40:0:1:100200
[ 41.251824] geni_i2c a84000.i2c: here: geni_i2c_gpi_xfer [Prepare I2C_READ] @ drivers/i2c/busses/i2c-qcom-geni.c:646
[ 41.251835] gpi a00000.dma-controller: here: gpi_prep_slave_sg @ drivers/dma/qcom/gpi.c:1841
[ 41.251843] gpi a00000.dma-controller: here: gpi_create_i2c_tre [TRE:set_config; low_count: 11, high_count: 10, cycle_count: 26, pack_enable: 3, clk_div: 7] @ drivers/dma/qcom/gpi.c:1647
[ 41.251854] gpi a00000.dma-controller: here: gpi_create_i2c_tre [TRE:I2C_READ || !multi_msg; multi_msg: 0, address: 4294962760, length: 1] @ drivers/dma/qcom/gpi.c:1698
[ 41.251864] gpi a00000.dma-controller: here: gpi_create_i2c_tre [TRE:GO TRE for I2C_READ] @ drivers/dma/qcom/gpi.c:1718
[ 41.251871] gpi a00000.dma-controller: TRE:0 31a0a0b:0:7:220001
[ 41.251880] gpi a00000.dma-controller: TRE:1 ffffee48:0:1:100200
[ 41.251888] gpi a00000.dma-controller: TRE:2 4802:0:1:200001
[ 41.251897] geni_i2c a84000.i2c: here: geni_i2c_gpi_xfer [Issue read dma] @ drivers/i2c/busses/i2c-qcom-geni.c:652
[ 41.251906] gpi a00000.dma-controller: [Issuing] TRE:0 31a0a0b:0:7:220001
[ 41.251915] gpi a00000.dma-controller: [Issuing] TRE:1 ffffee48:0:1:100200
[ 41.251923] gpi a00000.dma-controller: [Issuing] TRE:2 4802:0:1:200001
[ 41.251934] geni_i2c a84000.i2c: here: geni_i2c_gpi_xfer [Issue write dma] @ drivers/i2c/busses/i2c-qcom-geni.c:656
[ 41.251941] gpi a00000.dma-controller: [Issuing] TRE:0 31a0a0b:0:7:220001
[ 41.251950] gpi a00000.dma-controller: [Issuing] TRE:1 4801:0:1:200001
[ 41.251958] gpi a00000.dma-controller: [Issuing] TRE:2 fffffe40:0:1:100200
[ 42.279007] geni_i2c a84000.i2c: GPI transfer failed: -110
[ 42.279054] gpi a00000.dma-controller: sending cmd: CH STOP:0
[ 42.534719] gpi a00000.dma-controller: cmd: CH STOP completion timeout:0
[ 42.534751] gpi a00000.dma-controller: Error with cmd:CH STOP ret:-5
[ 42.534769] gpi a00000.dma-controller: sending cmd: CH STOP:1
[ 42.534944] gpi a00000.dma-controller: process CH CTRL interrupts
[ 42.535160] gpi a00000.dma-controller: sending cmd: CH_RESET:0
[ 42.535385] gpi a00000.dma-controller: process CH CTRL interrupts
[ 42.535457] gpi a00000.dma-controller: sending cmd: CH_RESET:1
[ 42.535661] gpi a00000.dma-controller: process CH CTRL interrupts
[ 42.535723] gpi a00000.dma-controller: sending cmd: CH START:0
[ 42.535985] gpi a00000.dma-controller: process CH CTRL interrupts
[ 42.536035] gpi a00000.dma-controller: sending cmd: CH START:1
[ 42.536257] gpi a00000.dma-controller: process CH CTRL interrupts
[ 42.536313] gpi a00000.dma-controller: sending cmd: CH STOP:0
[ 42.536527] gpi a00000.dma-controller: process CH CTRL interrupts
[ 42.536576] gpi a00000.dma-controller: sending cmd: CH STOP:1
[ 42.536800] gpi a00000.dma-controller: process CH CTRL interrupts
[ 42.536847] gpi a00000.dma-controller: sending cmd: CH_RESET:0
[ 42.537070] gpi a00000.dma-controller: process CH CTRL interrupts
[ 42.537124] gpi a00000.dma-controller: sending cmd: CH_RESET:1
[ 42.537341] gpi a00000.dma-controller: process CH CTRL interrupts
[ 42.537399] gpi a00000.dma-controller: sending cmd: CH START:0
[ 42.537612] gpi a00000.dma-controller: process CH CTRL interrupts
[ 42.537660] gpi a00000.dma-controller: sending cmd: CH START:1
[ 42.537883] gpi a00000.dma-controller: process CH CTRL interrupts
```
### Android
```
a71:/ # cat /proc/interrupts | grep -i -e dma -e i2c
@ -204,3 +259,6 @@ a71:/ # i2cdetect -y 28
[ 140.022606] i2c_geni a84000.i2c: here: geni_i2c_gsi_xfer [Done (time left: 51)] @ ../../../../../../kernel/samsung/a71/drivers/i2c/busses/i2c-qcom-geni.c:689
[ 140.022621] i2c_geni a84000.i2c: here: geni_i2c_gsi_xfer [geni_i2c_gsi_xfer_out (ret: 0, err: 0)] @ ../../../../../../kernel/samsung/a71/drivers/i2c/busses/i2c-qcom-geni.c:716
```
## Links
- https://lore.kernel.org/all/60b5e755-352b-476d-8c6e-2170594ae80d@quicinc.com/t/

View File

@ -31,6 +31,7 @@
rootDir = "."; # Assume PWD as root for now
in
pkgs.mkShell {
shellHook = "exec zsh";
packages = with pkgs; [
(python3.withPackages (pypi: with pypi; [
libfdt
@ -73,9 +74,13 @@
flash-lineage-magisk
'')
(writeShellScriptBin "flash-custom-lineage-kernel" ''
echo "Installing custom LineageOS..."
echo "Installing custom LineageOS kernel..."
heimdall flash --BOOT ".repos/lineageos/out/target/product/a71/boot.img"
'')
(writeShellScriptBin "flash-custom-lineage" ''
echo "Installing custom LineageOS..."
adb sideload ".repos/lineageos/out/target/product/a71/lineage-22.1-$(date +%Y%m%d)-UNOFFICIAL-a71.zip"
'')
(writeShellScriptBin "flash-stock" ''
echo "Installing stock..."