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

H. Nikolaus Schaller hns at goldelico.com
Fri Jun 28 08:36:03 CEST 2019


Hi Andreas,

> Am 27.06.2019 um 19:42 schrieb Andreas Kemnade <andreas at kemnade.info>:
> 
> On Thu, 27 Jun 2019 18:34:29 +0200
> "H. Nikolaus Schaller" <hns at goldelico.com> wrote:
> 
>>> Am 27.06.2019 um 18:20 schrieb H. Nikolaus Schaller <hns at goldelico.com>:
>>> 
>>> Hi Andreas,
>>> 
>>>> Am 27.06.2019 um 18:09 schrieb Andreas Kemnade <andreas at kemnade.info>:
>>>> 
>>>> Hi Nikolaus,
>>>> 
>>>> On Thu, 27 Jun 2019 15:59:11 +0200
>>>> "H. Nikolaus Schaller" <hns at goldelico.com> wrote:
>>>> 
>>>>> Hi,
>>>>> maybe some reader here remembers better than me how to build
>>>>> the android compatible kernels for LetuxOS Replicant.
>>>>> 
>>>>> Our LetuxOS Replicant 4.2 image
>>>>> 
>>>>> 	http://download.goldelico.com/letux-replicant/4.2/  (File: latest-replicant.tbz)
>>>>> 
>>>> 
>>>> hmm, there is:
>>>> http://download.goldelico.com/letux-replicant/4.2/20170423-kernel-4.10-replicant.tbz  
>>> 
>>> Yes... I just found it. I'm getting old :)
>>> 
>>> Unfortunately that one boots, shows the red Android but then ended in a kernel panic
>>> for some iio locking.
>>> 
>>> I also tried the same with 
>>> 
>>> 20170423-kernel-4.10+smshack-replicant.tbz
>>> 
>>> and it also panics (attached).  
>> 
>> 20160626-kernel-4.6.tbz seems to boot and without NAND ECC reports!
>> 
> but probably without correct sound and support for newer modem fw. I
> think I started on 4.9 or 4.10 with the gta04a5.

Yes, I remember that there were quite some bugs fixed with 4.9 and 4.10 (which may be the reason
why we have only those listed on our git repo).

The 4.6 image is working quite well, except WiFi (which I need for the .apk to test):

[  207.916900] libertas_sdio: Libertas SDIO driver
[  207.921661] libertas_sdio: Copyright Pierre Ossman
[  207.927185] driver_register 'libertas_sdio'
[  207.997924] libertas_sdio mmc1:0001:1: Direct firmware load for libertas/sd8686_v9_helper.bin failed with error -2
[  208.026611] libertas_sdio mmc1:0001:1: Direct firmware load for libertas/sd8686_v8_helper.bin failed with error -2
[  208.046295] libertas_sdio mmc1:0001:1: Direct firmware load for sd8686_helper.bin failed with error -2
[  208.066101] libertas_sdio: failed to find firmware (-2)


> [...]
>>>> Kernel config is attached.  
>>> 
>>> What I now think to remember is that the kernel build is part of the Replicant
>>> build process and was not built separately. So we never were able to build
>>> it externally and patch over a replicant rootfs. Probably this is possible,
>>> by adding some scripts which are buried in the replicant build process to
>>> mangle the kernel modules.
>>> 
> I have built it externally. Well, I have the running system here to
> check.

Ok.

How did you install the kernel and kernel modules?

> 
> 
>>>> 
>>>> Regards,
>>>> Andreas
>>>> <config.gz>  
>>> 
>>> BR and thanks,
>>> Nikolaus
>>> 
>>> 
>>> [   20.687072] extcon-gpio: probe of antenna-detect failed with error -22
>>> [   20.750854] twl4030_gpio twl4030-gpio: can't dispatch IRQs from modules
>>> [   20.909484] at24 1-0050: 8192 byte 24c64 EEPROM, writable, 1 bytes/write
>>> [   22.975891] usb 2-2: new high-speed USB device number 2 using ehci-omap
>>> [   23.183624] usb 2-2: New USB device found, idVendor=0af0, idProduct=8800
>>> [   23.191528] usb 2-2: New USB device strings: Mfr=3, Product=2, SerialNumber=0
>>> [   23.199340] usb 2-2: Product: Globetrotter HSUPA Modem
>>> [   23.206115] usb 2-2: Manufacturer: Option N.V.
>>> [   27.718444] voice ctl route: 0
>>> [   35.126678] random: crng init done
>>> [   50.172393] Unable to handle kernel NULL pointer dereference at virtual address 00000058
>>> [   50.180969] pgd = dcd84000
>>> [   50.183837] [00000058] *pgd=00000000
>>> [   50.187652] Internal error: Oops: 5 [#1] PREEMPT SMP ARM
>>> [   50.193237] Modules linked in: at24 nvmem_core gpio_twl4030 extcon_gpio w2sg0004 lis3lv02d_i2c lis3lv02d input_polldev hmc5843_i2c hmc5843_core itg3200 industrialio_triggered_buffer kfifo_buf xt_owner wwan_on_off ehci_omap libertas cfg80211 leds_tca6507 hci_uart bluetooth w2cbw003_bluetooth twl4030_vibra g_ffs iptable_nat nf_conntrack_ipv4 nf_defrag_ipv4 nf_nat_ipv4 nf_nat nf_conntrack ip6table_mangle omap2430 iptable_mangle twl4030_pwrbutton bq27xxx_battery ip6table_raw w1_bq27000 iptable_raw omap_hdq twl4030_charger twl4030_madc phy_twl4030_usb musb_hdrc tsc2007 industrialio pwm_bl pwm_omap_dmtimer snd_soc_omap_mcbsp snd_soc_omap snd_pcm_dmaengine snd_soc_omap_twl4030 snd_soc_simple_card snd_soc_simple_card_utils snd_soc_twl4030 ip6table_filter ip6_tables ipv6 omapdrm drm_kms_helper cfbcopyarea
>>> [   50.268157]  sysimgblt sysfillrect cfbimgblt syscopyarea cfbfillrect fb_sys_fops drm iptable_filter panel_dpi ip_tables panel_tpo_td028ttec1 x_tables omapdss usb_f_fs libcomposite configfs
>>> [   50.286010] CPU: 0 PID: 2060 Comm: SensorService Tainted: G        W       4.10.5-letux+ #1
>>> [   50.294799] Hardware name: Generic OMAP36xx (Flattened Device Tree)
>>> [   50.301422] task: dcf9ae00 task.stack: dcf9c000
>>> [   50.306243] PC is at __lock_acquire+0xa4/0x1680
>>> [   50.311035] LR is at lock_acquire+0x25c/0x290
>>> [   50.315643] pc : [<c018547c>]    lr : [<c01871b4>]    psr: 20030093
>>> [   50.315643] sp : dcf9dac8  ip : 00000000  fp : 00000000
>>> [   50.327728] r10: 60030093  r9 : 00000001  r8 : 00000000
>>> [   50.333251] r7 : 00000058  r6 : 00000080  r5 : 00000000  r4 : dcf9ae00
>>> [   50.340118] r3 : 00000001  r2 : 00000000  r1 : 00000000  r0 : dcf9dac8
>>> [   50.347015] Flags: nzCv  IRQs off  FIQs on  Mode SVC_32  ISA ARM  Segment none
>>> [   50.354644] Control: 10c5387d  Table: 9cd84019  DAC: 00000051
>>> [   50.360717] Process SensorService (pid: 2060, stack limit = 0xdcf9c218)
>>> [   50.367675] Stack: (0xdcf9dac8 to 0xdcf9e000)
>>> [   50.372283] dac0:                   ffbddfd7 00000000 b3d7ffff 00000000 00000000 00000001
>>> [   50.380950] dae0: 72274524 74e028d9 c12a24c0 c120711c cafeeeff efefdfbf fd5fdd5b beebc8ff
>>> [   50.389587] db00: f7cfffff d9f7ffde ebfe8fdf dfffffff dbafff7f ffffffbd fffbbfdf 00000000
>>> [   50.398223] db20: 00000000 00000058 00000000 00000000 00000000 60030093 00000001 c01871b4
>>> [   50.406860] db40: 00000001 00000080 00000000 c017b99c 00000000 00000000 00000001 00000048
>>> [   50.415496] db60: 60030013 c017b99c 00000000 dcf9dbf4 00000000 00000000 00000000 c0763018
>>> [   50.424133] db80: 00000001 00000000 c017b99c 00000000 00000048 dcf9dd44 dcf9dd38 c017b99c
>>> [   50.432769] dba0: 00000000 dcc31000 dcf3f180 bf1af148 bf1af10c dcf9dc04 00000000 c0282134
>>> [   50.441406] dbc0: 77fffeff dcf3f181 00000000 00000000 00000000 00000000 00000000 00000000
>>> [   50.450042] dbe0: 80f0dc70 dcf9dc0c d9bfecdf fddfffff fffffffe 00000000 00000002 00000027
>>> [   50.458679] dc00: 00000001 0000002e 00000001 fddfeeed 77f7ffde dffffcfe 00000001 dcf9b3a8
>>> [   50.467315] dc20: 00000000 ffffffff dcf9ae00 c018282c 00000000 600f0093 98fc28af dcf9ae00
>>> [   50.475952] dc40: 0002540c c01828b4 00000001 dcf9ae80 00000001 dcf9b3a8 00000000 ffffffff
>>> [   50.484588] dc60: dcf9ae00 c018282c 00000000 600f0093 dcf9ae80 dcf9de4c c0b72f00 c01828b4
>>> [   50.493225] dc80: 00000000 df99cf58 00000000 dcf9ae00 00000006 00000007 1ee2a000 dcf9dd70
>>> [   50.501861] dca0: 60070113 c0187540 00000001 dcf9ae00 00000001 c0226680 c0b75bc0 c01876d4
>>> [   50.510498] dcc0: dfd87620 c0ca42c0 00000000 c0226680 00000001 df99cf00 dcf9ae00 00000001
>>> [   50.519134] dce0: dcf9b3c8 dd801b10 00000000 00000001 00000052 c02809dc 00000019 00000000
>>> [   50.527770] dd00: dcf9ae00 00000000 00000000 00000002 dcc60c00 00000019 00000000 dcf9dcf4
>>> [   50.536407] dd20: c0280ac4 dcb6b448 dcb6b448 dcb6b428 dcf3f180 00000019 00000000 dcf9dcf4
>>> [   50.545043] dd40: c0280ac4 c01876d4 dfcba860 00000048 00000000 c0226680 00000000 00000001
>>> [   50.553680] dd60: dcf9ae00 00000001 dcf9b3c8 dc94b4c4 00000001 00000001 00000262 c01857c0
>>> [   50.562316] dd80: 00000000 ffffffff dcf9ae00 c018282c 000059c8 00000000 5060e779 52008c02
>>> [   50.570953] dda0: c12acb78 c01828b4 00000001 c0c4d4a5 00000000 c019c0c0 00000000 c022783c
>>> [   50.579589] ddc0: 00000000 ddeb24bc 00000000 00000000 dcf9ae00 00000000 00000000 dc94b4c4
>>> [   50.588226] dde0: 00000000 00000000 dc94b480 60030113 00000000 dc94b4c4 dcf9ae00 00000001
>>> [   50.596862] de00: c024f4d4 c0186d08 00000000 00000000 c09ad127 c09db14c c09db167 c0ca42c0
>>> [   50.605499] de20: 0000000b 60030113 c09ad133 dc94b4b4 dcf67f78 dfcba860 964c334f dcb30000
>>> [   50.614135] de40: 00000000 00000043 00000070 c07636d0 dcb3010c c024f4d4 dc94b480 60030113
>>> [   50.622802] de60: 00000000 dc94b508 dcf9ae00 00000000 c07646d8 c0186d08 00051843 51843000
>>> [   50.631439] de80: dcd85460 00000000 00000000 00000000 00000000 60030113 dc94b4b4 dc94b4d4
>>> [   50.640075] dea0: 51843268 dcf9ae00 00000055 00000817 dc94b480 00000000 00000000 c018168c
>>> [   50.648712] dec0: dcf9dfb0 c07646d8 00000000 00000000 00000000 00000001 00000000 dc94b4d4
>>> [   50.657348] dee0: 00000800 00000000 dcaace40 00000817 51843268 c0c0d88c dcf9dfb0 10c5387d
>>> [   50.665985] df00: 80f118d8 4013ed5d 00000070 c010130c 516c64ae 0000000e 5184896c 00000023
>>> [   50.674621] df20: 00000001 c0c5e1f8 dca01e90 0000000c 00004000 c028b90c 00000000 00000000
>>> [   50.683258] df40: c028b75c dcf9b3a8 00000000 00000003 51848940 ffffffff 00000002 80f0dc70
>>> [   50.691894] df60: 000000a8 c0107224 dcf9c000 00000000 51846008 c0282474 dcaace40 c026d8b8
>>> [   50.700531] df80: 00000000 51848940 80f11408 00000000 80f11408 00000000 00000010 000000a8
>>> [   50.709167] dfa0: c0107224 c0107080 80f11408 00000000 80f0dc70 00000002 ffffffff 517481e8
>>> [   50.717803] dfc0: 80f11408 00000000 00000010 000000a8 80ed8530 80f118d8 4013ed5d 51846008
>>> [   50.726440] dfe0: 51747f48 51843238 51742f63 400b9f38 60030010 80f0dc70 bfff9ffb f4ff51ff
>>> [   50.735076] [<c018547c>] (__lock_acquire) from [<c01871b4>] (lock_acquire+0x25c/0x290)
>>> [   50.743469] [<c01871b4>] (lock_acquire) from [<c0763018>] (_raw_spin_lock_irqsave+0x40/0x54)
>>> [   50.752380] [<c0763018>] (_raw_spin_lock_irqsave) from [<c017b99c>] (add_wait_queue+0x20/0x48)
>>> [   50.761505] [<c017b99c>] (add_wait_queue) from [<bf1af148>] (iio_buffer_poll+0x3c/0x68 [industrialio])
>>> [   50.771362] [<bf1af148>] (iio_buffer_poll [industrialio]) from [<c0282134>] (do_sys_poll+0x260/0x4e4)
>>> [   50.781097] [<c0282134>] (do_sys_poll) from [<c0282474>] (SyS_poll+0x68/0xd0)
>>> [   50.788665] [<c0282474>] (SyS_poll) from [<c0107080>] (ret_fast_syscall+0x0/0x1c)
>>> [   50.796569] Code: e5933008 e3530000 01a09003 0a000003 (e5972000) 
>>> [   50.803039] ---[ end trace 6f43f79b77117070 ]---
>>> [   50.807922] Kernel panic - not syncing: Fatal exception
>>> [   50.813446] ---[ end Kernel panic - not syncing: Fatal exception
>>> 
> 
> hmm, some sensor trouble, maybe disable some?

Yes, looks so. But to disable I have to rebuild the kernel which I do not know any more how to...

BR and thanks,
Nikolaus



More information about the Letux-kernel mailing list