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

Denis 'GNUtoo' Carikli GNUtoo at cyberdimension.org
Tue Mar 30 13:40:42 UTC 2021


On Tue, 30 Mar 2021 10:00:14 +0300
Victor Shilin <chrono.monochrome at gmail.com> wrote:
> Hi,
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).
Thanks a lot, that means that it most probably worked. With the
Replicant 11 kernel I don't see any networks yet.

> Somehow I wasn't able to retrieve the IMEI with ipc-imei tool (just
> some -EAGAIN errors in the log).
That tool didn't work well. I could manage to get the IMEI under
Replicant 6 but it had crashes for instance.

I wrote that tool to have tests that didn't depend on having a SIM card
that could register to a network, but at the end, I got a new SIM card
and modified ipc-modem to be a little more configurable (to call a
number of your choosing in the same country) as it was order of
magnitude faster to do.

I also tried to make it easier to write simple test applications along
the way so I'll eventually get back to it.

> 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.
That's interesting for doing tests.

> 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):
As I understand the combination of forkbomb's modem branch (using
forkbomb's repository) and forkbomb's libsamsung-ipc wasn't tested
up to making a call. So while the modem is supposed to bootstrap we
don't know if the code fully works.

The issue is that older kernels doesn't seem to build anymore on my
system so I'll try to import the patches that fixes that and if it
takes too much time I'll build it on a VM.

> > acroreiser at localhost:~$ sudo ipc-modem --debug start
[...]
> > [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
On my branches I at least manage to send and receive some messages and
I get into LPM mode, but the modem doesn't go in full power.

I may have trigger somehow the modem registration while shutting down
the phone once but I didn't manage to reproduce it.

So there might be something in the kernel side that is missing, and
I've also modified it extensively and left out 1 GPIO due to some
conflicts with some other kernel versions.

I've also tried manually toggling the suspend-req GPIOs but when I read
it in /sys/kernel/debug/gpio it stays high after the modem boot whereas
in the smdk4412 kernel it is low.

> 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).
I've also a GNU/Linux setup with Parabola but unfortunately it can't
run older kernels like 3.0 for comparison / test purposes.

I should probably try with 3.18 too.

[...]
> >    [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
That doesn't look good. 

I had that often and each time I fixed by restoring the backup of the
RADIO partition. Sometimes the restored image would not stick after
rebooting.

I've no idea why it is corrupted as it's not supposed to open it
read/write and open_android_modem_partition_by_name uses O_RDONLY.

Maybe it's some issue with reboot as I tend to reboot before each test
to make sure there is no interference with the tests.

I've also to do some Replicant 6 work to release the next RC image and
I'll get back to the modem work right after that or even in my free
time in between.

Denis.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://lists.osuosl.org/pipermail/replicant/attachments/20210330/115c4933/attachment.asc>


More information about the Replicant mailing list