<div dir="ltr"><br><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">---------- Forwarded message ---------<br>От: <strong class="gmail_sendername" dir="auto">Victor Shilin</strong> <span dir="auto"><<a href="mailto:chrono.monochrome@gmail.com">chrono.monochrome@gmail.com</a>></span><br>Date: пн, 29 мар. 2021 г. в 11:47<br>Subject: Re: libsamsung-ipc and Ubuntu-3.18<br>To: Denis 'GNUtoo' Carikli <<a href="mailto:GNUtoo@cyberdimension.org">GNUtoo@cyberdimension.org</a>><br></div><br><br><div dir="ltr"><div dir="ltr">Hi, <br><br>3.18 kernel uses the same modem driver as 3.0.101 one. I used my old backport kernel sources to test if I got the configuration right at least on the smdk4412 kernel.<br>I didn't test calls, but the modem seemed to boot correctly (it received the PLMN code of my operator correctly, I didn't test here anything else besides that).<br>Somehow I wasn't able to retrieve the IMEI with ipc-imei tool (just some -EAGAIN errors in the log).<br>I'm not sure if the kernel used provides any interest by itself (as it doesn't even use the device tree, neither the device specific drivers are upstreamed), but I'll leave the link:<br><a href="https://github.com/ChronoMonochrome/android_kernel_samsung_smdk4412/commits/ubuntu-3.18" target="_blank">https://github.com/ChronoMonochrome/android_kernel_samsung_smdk4412/commits/ubuntu-3.18</a><br><br>Like I said 3.18 kernel uses exactly same driver as smdk4412 (3.0.101) kernel, so unfortunately, it's nothing new that the modem booted up here.<br><br>But I'm moving now to test 4.16 kernel. I was having some issues getting 4.16 booted up for some reason, so first I tested 5.10-rc2 and got the ipc-test stuck with the message:<br>"[ipc] ENTER generic_poll".<br><br>forkbomb's version of libsamsung-ipc repo returns the following log on 5.10-rc2 (replicant-11-i9300-modem branch without the ap_dump commit, as the latter prevented the gpiohack driver from booting somehow):<br><br><br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>acroreiser@localhost:~$ sudo ipc-modem --debug start<br>[I] Debug enabled<br>[0] Starting modem on FMT client<br>[D] Starting n7100 modem boot<br>[D] Opened modem image device<br>[D] Mapped modem image data to memory<br>[D] Turned the modem off<br>0<br>0<br>[D] Turned the modem on<br>[D] Opened modem boot device<br>[D] Wrote ATAT in ASCII<br>[D] Read chip id (0x16)<br>[D] Wrote PSI header<br>[D] Wrote PSI, CRC is 0xc8<br>[D] Wrote PSI CRC (0xc8)<br>[D] Read PSI CRC ACK<br>[D] Read PSI ACK<br>[D] Sent XMM626 HSIC PSI<br>[D] Wrote EBL size<br>[D] Wrote EBL, CRC is 0xb5<br>[D] Wrote EBL CRC (0xb5)<br>[D] Sent XMM626 HSIC EBL<br>[D] Read port config<br>[D] Sent XMM626 HSIC port config<br>[D] Sent XMM626 HSIC SEC start<br>[D] Sent XMM626 HSIC firmware<br>[D] Checked nv_data path<br>[D] Checked nv_data md5 path<br>[D] Calculated nv_data md5: 3363c44b30679cb650272c7f5e923a31<br>[D] Read nv_data md5: 3363c44b30679cb650272c7f5e923a31<br>[D] Checked nv_data backup path<br>[D] Loaded nv_data<br>[D] Sent XMM626 HSIC nv_data<br>[D] Sent XMM626 HSIC SEC end<br>[D] Sent XMM626 HSIC HW reset<br>[D] Waiting for host wake failed<br>[D] Waited for host wake<br>[D] Waited for link connected<br>/dev/umts_ipc: -1 19<br>/dev/umts_ipc: -1 19<br>/dev/umts_ipc: -1 19<br>/dev/umts_ipc: -1 19<br>/dev/umts_ipc: -1 19<br>/dev/umts_ipc: -1 19<br>/dev/umts_ipc: -1 19<br>/dev/umts_ipc: -1 19<br>/dev/umts_ipc: -1 19<br>[1] Starting modem_read_loop on FMT client</blockquote><br>(hungs here. The log have prints about n7100 device, but some commit in the repo says tools should work fine on i9300 as well)<br><br>I'm testing everything on Ubuntu 16.04 (I haven't found a way to get ADB working here, but fortunately, internal wifi and ssh works which makes it much easier to test things).</div><div dir="ltr"><br></div><div dir="ltr"><br></div><div>UPD. I tested 4.16 kernel (<a href="https://github.com/Midas-Mainline/android_kernel_samsung_smdk4412/commits/modem-4.16">https://github.com/Midas-Mainline/android_kernel_samsung_smdk4412/commits/modem-4.16</a>), after powering the EHCI subsystem down, it couldn't get powered up (modem doesn't appear in lsusb).</div><div><ol class="gmail-text" style="box-sizing:border-box;padding:0px 10px;font-size:12px;vertical-align:baseline;color:rgb(51,51,51);background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial;font-family:Consolas,Menlo,Monaco,"Lucida Console","Liberation Mono","DejaVu Sans Mono","Bitstream Vera Sans Mono",monospace,serif;margin:0px"><li class="gmail-li1" style="box-sizing:border-box;padding:0px;vertical-align:baseline;list-style-type:decimal;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial;color:rgb(172,172,172)"><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote">[  106.031383] gpiohack xmm6262: new state: 0<br>[  106.031498] exynos-ehci 12580000.ehci: Powering off EHCI<br>[  106.031506] exynos-ehci 12580000.ehci: remove, state 4<br>[  106.031534] usb usb1: USB disconnect, device number 1<br>[  106.409161] exynos-ehci 12580000.ehci: USB bus 1 deregistered<br>[  106.460162] gpiohack xmm6262: link active? 0<br>[  106.665241] gpiohack xmm6262: new state: 1<br>[  106.895635] gpiohack xmm6262: hostwake: 1<br>[  106.926713] gpiohack xmm6262: pda active => 1<br>[  106.926996] gpiohack xmm6262: slave wake => 0<br>[  106.937283] gpiohack xmm6262: slave wake => 1<br>[  106.937566] exynos-ehci 12580000.ehci: Powering on EHCI<br>[  106.939741] exynos-ehci 12580000.ehci: EHCI Host Controller<br>[  106.939826] exynos-ehci 12580000.ehci: new USB bus registered, assigned bus number 1<br>[  106.945577] exynos-ehci 12580000.ehci: can't setup: -110<br>[  106.945634] exynos-ehci 12580000.ehci: USB bus 1 deregistered<br>[  106.945690] exynos-ehci 12580000.ehci: Power on failed!<br>[  106.995986] gpiohack xmm6262: link active? 1<br> <br> <br>[I] Debug enabled<br>[0] Starting modem on FMT client<br>[D] ENTER generic_data_create<br>[D] generic_data_create DONE<br>[D] ENTER generic_boot<br>[D] Starting generic modem boot<br>Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub<br>[D] open_android_modem_partition_by_name: Trying to open /dev/disk/by-partlabel/RADIO<br>[D] generic_boot: Opened the RADIO partition<br>[D] Mapped modem image data to memory<br>[D] ENTER xmm626_kernel_linux_modem_hci_power<br>[D] xmm626_kernel_linux_modem_hci_power: DONE<br>[D] Turned the modem off<br>[D] generic_boot: xmm626_kernel_linux_modem_power(NULL, 1) = 0<br>[D] ENTER xmm626_kernel_linux_modem_hci_power<br>[D] xmm626_kernel_linux_modem_hci_power: DONE<br>[D] generic_boot: xmm626_kernel_linux_modem_hci_power(client, 1) = 0<br>[D] Turned the modem on<br>[D] Failed to open boot device<br>[D] +-------------------------+<br>| /!\ generic_boot failed |<br>+-------------------------+<br>[E] Something went wrong<br>[D] ENTER generic_power_off<br>[D] ENTER generic_close<br>[D] generic_close DONE</blockquote></li></ol></div><div dir="ltr">

-----</div><div dir="ltr"><br></div><div>Best regards,</div><div>Victor.</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">пн, 29 мар. 2021 г. в 03:03, Denis 'GNUtoo' Carikli <<a href="mailto:GNUtoo@cyberdimension.org" target="_blank">GNUtoo@cyberdimension.org</a>>:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi,<br>
<br>
Sensiblemn pointed me to the following repository:<br>
<a href="https://github.com/Midas-Mainline/android_hardware_replicant_libsamsung-ipc.git" rel="noreferrer" target="_blank">https://github.com/Midas-Mainline/android_hardware_replicant_libsamsung-ipc.git</a><br>
<br>
Does ipc-modem works on Ubuntu somehow with a 3.18 kernel? Did you<br>
manage to call someone with it? Which repository / branch did you use<br>
for the kernel?<br>
<br>
I'd be interested as I've been having issues with the Replicant 11<br>
kernel + libsamsung-ipc where I can boot the modem, send and receive<br>
messages but not yet call a number nor register to the network.<br>
<br>
While I'm in the process of debugging it, that information might be<br>
interesting.<br>
<br>
Beside that I've also looked at the commit to adapt it to Ubuntu[1] and<br>
both changes could be somehow integrated upstream in some other form:<br>
- For the change about I9300_MODEM_IMAGE_DEVICE, we now have code that<br>
  search for several paths, but it's not yet used in devices/i9300.<br>
- For the rest of the patch, "#define IPC_DEVICE_NAME=i9300" would<br>
  probably work as well. It is used in Android.mk but it probably needs<br>
  to be added to the autotools as well.<br>
<br>
References:<br>
-----------<br>
[1]0caedd21fac7e31d4c35f78c0177094f33d2fced<br>
<br>
PS: I've cc-ed the Replicant mailing list.<br>
<br>
Denis.<br>
</blockquote></div></div>
</div></div>