[Letux-kernel] How to build LetuxOS Android Kernel for LetuxOS Replicant 4.2?

H. Nikolaus Schaller hns at goldelico.com
Sun Jun 30 22:45:02 CEST 2019


> Am 30.06.2019 um 22:15 schrieb Andreas Kemnade <andreas at kemnade.info>:
> 
> On Sun, 30 Jun 2019 21:49:22 +0200
> "H. Nikolaus Schaller" <hns at goldelico.com> wrote:
> 
>>> Am 30.06.2019 um 17:39 schrieb Andreas Kemnade <andreas at kemnade.info>:
>>> 
>>> On Sun, 30 Jun 2019 17:29:27 +0200
>>> "H. Nikolaus Schaller" <hns at goldelico.com> wrote:
>>> 
>>>>> Am 30.06.2019 um 16:13 schrieb Andreas Kemnade <andreas at kemnade.info>:
>>>>> 
>>>>> On Sun, 30 Jun 2019 10:55:52 +0200
>>>>> "H. Nikolaus Schaller" <hns at goldelico.com> wrote:
>>>>> 
>>>>> =    
>>>>>> Another thought: most likely I can simply copy binaries like iwconfig to get more comparable results.
>>>>>> I.e. enhance the Replicant installation by some tools from Debian :)
>>>>>> 
>>>>> well, there is a quite standard wpa_suppilcant in the replicant builds
>>>>> (or should be, in the replicant 6 build it is missing, but I guess I
>>>>> can push a fix this evening).    
>>>> 
>>>> I remember having seen a wpa_suppilcant config file, but do not know if
>>>> it exists.
>>>> 
>>>> And I have not found an iwconfig so I could not check what the kernel thinks
>>>> about presence and setup of the interface and was not able to test it.
>>>> 
>>> well, you can start wpa_suppilcant without a configuration file,
>>> just with a control interface via -C commandline parameter
>>> 
>>> and then to everything using wpa_cli.  
>> 
>> I have now tried:
>> 
>> root at android:/ # wpa_supplicant -Dwext -iwlan0 -c/etc/wpa_supplicant.conf      
>> root at android:/ # 
>> root at android:/ # wpa_cli                                                   
>> wpa_cli v2.0-devel-
>> Copyright (c) 2004-2012, Jouni Malinen <j at w1.fi> and contributors
>> 
>> This software may be distributed under the terms of the BSD license.
>> See README for more details.
>> 
>> 
>> Using interface 'wlan0'
>> 
>> Interactive mode
>> 
>>> 
>> 
>> Doesn't look that bad because it reports that the interface "wlan0" exists.
>> 
>> Since I have no experience with wpa_cli: how do I now scan for WLAN base stations?
> 
> you can enter help and see commands.
> some basics
> scan         - starts scan
> scan_results - displays scan results.

root at android:/ # ps |fgrep wpa
wifi      2676  1     2784   2444  00000001 00000000 S /system/bin/wpa_supplicant
root at android:/ #

so wpa_supplicant is already running

root at android:/ # wpa_cli                                                       
wpa_cli v2.0-devel-
Copyright (c) 2004-2012, Jouni Malinen <j at w1.fi> and contributors

This software may be distributed under the terms of the BSD license.
See README for more details.


Using interface 'wlan0'

Interactive mode

<3>CTRL-EVENT-STATE-CHANGE id=-1 state=3 BSSID=00:00:00:00:00:00 SSID=
<3>CTRL-EVENT-SCAN-RESULTS 
<3>WPS-AP-AVAILABLE 
<3>CTRL-EVENT-STATE-CHANGE id=-1 state=2 BSSID=00:00:00:00:00:00 SSID=
> scan
OK
<3>CTRL-EVENT-STATE-CHANGE id=-1 state=3 BSSID=00:00:00:00:00:00 SSID=
<3>CTRL-EVENT-SCAN-RESULTS 
<3>WPS-AP-AVAILABLE 
<3>CTRL-EVENT-STATE-CHANGE id=-1 state=2 BSSID=00:00:00:00:00:00 SSID=
> scan_results 
bssid / frequency / signal level / flags / ssid
c0:25:06:e4:8e:cc       2412    -44     [ESS]   DSITRI-3
00:0b:3b:9b:6e:e9       2452    -81     [WPA2-PSK-CCMP][WPS][ESS]       DSITRI-4
<3>CTRL-EVENT-STATE-CHANGE id=-1 state=3 BSSID=00:00:00:00:00:00 SSID=
<3>CTRL-EVENT-SCAN-RESULTS 
<3>WPS-AP-AVAILABLE 
<3>CTRL-EVENT-STATE-CHANGE id=-1 state=2 BSSID=00:00:00:00:00:00 SSID=
> 

This means WiFi is working.

Did even survive a suspend.

> 
> and then
> add_network
> -> returns a number
> set_network X ssid "ssid"
> set_network X key_mgmt WPA-PSK (or NONE for unencrypted things)
> set_network X psk "passphrase"
> enable_network X

I have played a little and only got OKs.

After quit I tried "ping" but got

connect: Network is unreachable

> 
> but as a first step, I would check whether libertas survives suspend if
> iface is up on a known-good system. There might be problems, so we might
> debug a kernel problem and not a replicant one. For the GTA04A5, we do
> not have these problems. 

So it is more a GUI issue, that I can't enable WiFi from the Settings.
At least I would expect that the scan result is shown.

And it may be a problem with networking/routing table/dhcp setup.

> 
> 
>> 
>>> 
>>> wpa_supplicant now also available on my replicant-6 builds,
>>> but there seems to be some issue with a socket. So I have drilled
>>> a lot through the thick wall.  
>> 
>> BTW: making a dual-partition card wasn't difficult any more after doing all that preparation work:
>> 
>> makesd -v 20170423-kernel-4.10 replicant -kboot letux-4.14.129-replicant -dboot letux-4.14.129-replicant -m letux-4.14.129-replicant -v latest quantumstep
>> 
>> I could also mount the partition (one has to know that it is in /dev/block/):
>> 
>> mkdir /mnt/debian
>> mount -t ext4 /dev/block/mmcblk0p2 /mnt/debian
>> 
>> "chroot /mnt/debian /bin/bash" works. Well, one has to update the $PATH first:
>> 
>> PATH=/bin:/usr/bin:$PATH
>> 
>> Then, I can run e.g. iwconfig.
>> 
>> But not much more since /proc, /sys, /dev are empty...
>> So setting up this "Replian" is a little more complex.
>> 
> well, in the chroot
> mount -t devtmpfs none /dev
> mount -t proc none /proc
> mount -t sys none /sys

Yes, that should work.

BR,
Nikolaus



More information about the Letux-kernel mailing list