[Replicant] Fwd: libsamsung-ipc and Ubuntu-3.18

Victor Shilin chrono.monochrome at gmail.com
Tue Mar 30 07:00:14 UTC 2021


---------- Forwarded message ---------
От: Victor Shilin <chrono.monochrome at gmail.com>
Date: пн, 29 мар. 2021 г. в 11:47
Subject: Re: libsamsung-ipc and Ubuntu-3.18
To: Denis 'GNUtoo' Carikli <GNUtoo at cyberdimension.org>


Hi,

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.
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).
Somehow I wasn't able to retrieve the IMEI with ipc-imei tool (just some
-EAGAIN errors in the log).
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:
https://github.com/ChronoMonochrome/android_kernel_samsung_smdk4412/commits/ubuntu-3.18

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.

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:
"[ipc] ENTER generic_poll".

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):



> acroreiser at localhost:~$ sudo ipc-modem --debug start
> [I] Debug enabled
> [0] Starting modem on FMT client
> [D] Starting n7100 modem boot
> [D] Opened modem image device
> [D] Mapped modem image data to memory
> [D] Turned the modem off
> 0
> 0
> [D] Turned the modem on
> [D] Opened modem boot device
> [D] Wrote ATAT in ASCII
> [D] Read chip id (0x16)
> [D] Wrote PSI header
> [D] Wrote PSI, CRC is 0xc8
> [D] Wrote PSI CRC (0xc8)
> [D] Read PSI CRC ACK
> [D] Read PSI ACK
> [D] Sent XMM626 HSIC PSI
> [D] Wrote EBL size
> [D] Wrote EBL, CRC is 0xb5
> [D] Wrote EBL CRC (0xb5)
> [D] Sent XMM626 HSIC EBL
> [D] Read port config
> [D] Sent XMM626 HSIC port config
> [D] Sent XMM626 HSIC SEC start
> [D] Sent XMM626 HSIC firmware
> [D] Checked nv_data path
> [D] Checked nv_data md5 path
> [D] Calculated nv_data md5: 3363c44b30679cb650272c7f5e923a31
> [D] Read nv_data md5: 3363c44b30679cb650272c7f5e923a31
> [D] Checked nv_data backup path
> [D] Loaded nv_data
> [D] Sent XMM626 HSIC nv_data
> [D] Sent XMM626 HSIC SEC end
> [D] Sent XMM626 HSIC HW reset
> [D] Waiting for host wake failed
> [D] Waited for host wake
> [D] Waited for link connected
> /dev/umts_ipc: -1 19
> /dev/umts_ipc: -1 19
> /dev/umts_ipc: -1 19
> /dev/umts_ipc: -1 19
> /dev/umts_ipc: -1 19
> /dev/umts_ipc: -1 19
> /dev/umts_ipc: -1 19
> /dev/umts_ipc: -1 19
> /dev/umts_ipc: -1 19
> [1] Starting modem_read_loop on FMT client


(hungs here. The log have prints about n7100 device, but some commit in the
repo says tools should work fine on i9300 as well)

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).


UPD. I tested 4.16 kernel (
https://github.com/Midas-Mainline/android_kernel_samsung_smdk4412/commits/modem-4.16),
after powering the EHCI subsystem down, it couldn't get powered up (modem
doesn't appear in lsusb).

   1.
>
>    [ 106.031383] gpiohack xmm6262: new state: 0
>    [ 106.031498] exynos-ehci 12580000.ehci: Powering off EHCI
>    [ 106.031506] exynos-ehci 12580000.ehci: remove, state 4
>    [ 106.031534] usb usb1: USB disconnect, device number 1
>    [ 106.409161] exynos-ehci 12580000.ehci: USB bus 1 deregistered
>    [ 106.460162] gpiohack xmm6262: link active? 0
>    [ 106.665241] gpiohack xmm6262: new state: 1
>    [ 106.895635] gpiohack xmm6262: hostwake: 1
>    [ 106.926713] gpiohack xmm6262: pda active => 1
>    [ 106.926996] gpiohack xmm6262: slave wake => 0
>    [ 106.937283] gpiohack xmm6262: slave wake => 1
>    [ 106.937566] exynos-ehci 12580000.ehci: Powering on EHCI
>    [ 106.939741] exynos-ehci 12580000.ehci: EHCI Host Controller
>    [ 106.939826] exynos-ehci 12580000.ehci: new USB bus registered,
>    assigned bus number 1
>    [ 106.945577] exynos-ehci 12580000.ehci: can't setup: -110
>    [ 106.945634] exynos-ehci 12580000.ehci: USB bus 1 deregistered
>    [ 106.945690] exynos-ehci 12580000.ehci: Power on failed!
>    [ 106.995986] gpiohack xmm6262: link active? 1
>
>
>    [I] Debug enabled
>    [0] Starting modem on FMT client
>    [D] ENTER generic_data_create
>    [D] generic_data_create DONE
>    [D] ENTER generic_boot
>    [D] Starting generic modem boot
>    Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
>    [D] open_android_modem_partition_by_name: Trying to open
>    /dev/disk/by-partlabel/RADIO
>    [D] generic_boot: Opened the RADIO partition
>    [D] Mapped modem image data to memory
>    [D] ENTER xmm626_kernel_linux_modem_hci_power
>    [D] xmm626_kernel_linux_modem_hci_power: DONE
>    [D] Turned the modem off
>    [D] generic_boot: xmm626_kernel_linux_modem_power(NULL, 1) = 0
>    [D] ENTER xmm626_kernel_linux_modem_hci_power
>    [D] xmm626_kernel_linux_modem_hci_power: DONE
>    [D] generic_boot: xmm626_kernel_linux_modem_hci_power(client, 1) = 0
>    [D] Turned the modem on
>    [D] Failed to open boot device
>    [D] +-------------------------+
>    | /!\ generic_boot failed |
>    +-------------------------+
>    [E] Something went wrong
>    [D] ENTER generic_power_off
>    [D] ENTER generic_close
>    [D] generic_close DONE


-----

Best regards,
Victor.

пн, 29 мар. 2021 г. в 03:03, Denis 'GNUtoo' Carikli <
GNUtoo at cyberdimension.org>:

> Hi,
>
> Sensiblemn pointed me to the following repository:
>
> https://github.com/Midas-Mainline/android_hardware_replicant_libsamsung-ipc.git
>
> Does ipc-modem works on Ubuntu somehow with a 3.18 kernel? Did you
> manage to call someone with it? Which repository / branch did you use
> for the kernel?
>
> I'd be interested as I've been having issues with the Replicant 11
> kernel + libsamsung-ipc where I can boot the modem, send and receive
> messages but not yet call a number nor register to the network.
>
> While I'm in the process of debugging it, that information might be
> interesting.
>
> Beside that I've also looked at the commit to adapt it to Ubuntu[1] and
> both changes could be somehow integrated upstream in some other form:
> - For the change about I9300_MODEM_IMAGE_DEVICE, we now have code that
>   search for several paths, but it's not yet used in devices/i9300.
> - For the rest of the patch, "#define IPC_DEVICE_NAME=i9300" would
>   probably work as well. It is used in Android.mk but it probably needs
>   to be added to the autotools as well.
>
> References:
> -----------
> [1]0caedd21fac7e31d4c35f78c0177094f33d2fced
>
> PS: I've cc-ed the Replicant mailing list.
>
> Denis.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osuosl.org/pipermail/replicant/attachments/20210330/5142a4d9/attachment-0001.html>


More information about the Replicant mailing list