[Letux-kernel] depmod for replicant modules

H. Nikolaus Schaller hns at goldelico.com
Wed Jul 3 16:15:37 CEST 2019


> Am 03.07.2019 um 16:11 schrieb Josua Mayer <josua.mayer at jm0.eu>:
> 
> Hi Nikolaus,
> 
> Am 03.07.19 um 16:09 schrieb H. Nikolaus Schaller:
>> Hi Josua,
>> 
>>> Am 03.07.2019 um 16:01 schrieb Josua Mayer <josua.mayer at jm0.eu>:
>>> 
>>> Hi Andreas,
>>> 
>>> Am 29.06.19 um 18:40 schrieb Andreas Kemnade:
>>>> On Sat, 29 Jun 2019 18:15:02 +0200
>>>> "H. Nikolaus Schaller" <hns at goldelico.com> wrote:
>>>> 
>>>>>> Am 29.06.2019 um 17:29 schrieb Andreas Kemnade <andreas at kemnade.info>:
>>>>>> 
>>>>>> Hi,
>>>>>> 
>>>>>> I found some dirty way to create a modules.dep file in finished
>>>>>> replicant images.
>>>>>> On a system with depmod available.
>>>>>> - create a directory /some_tmp_dir/lib/modules/
>>>>>> ln -s /path/to/replicant/system/lib/modules /some_tmp_dir/lib_modules/4.17
>>>>>> depmod -b /some_tmp_dir 4.17  
>>>>> 
>>>>> yes, that is the principle described by
>>>>> 
>>>>> https://android.googlesource.com/device/asus/fugu/+/b01b7fd/AndroidKernel.mk#102
>>>>> 
>>>>> I had tried it but maybe got the symlink wrong.
>>>>> 
>>>>> What I don't get with these paths is what is constant file names and what is system-dependent.
>>>>> For example why do you use /some_tmp_dir/lib_modules/4.17 and not /some_tmp_dir/lib/modules/4.17
>>>>> 
>>>>> Could you please rewrite as something like
>>>>> 
>>>>> KERNEL_MODULES_FROM_BUILD=...
>>>>> TEMP_DIR=/tmp/build-$$
>>>>> ln -s $KERNEL_MODULES_FROM_BUILD ... 
>>>>> depmod -b ...
>>>>> 
>>>>> etc.
>>>>> 
>>>>>> 
>>>>>> modprobe then works. But now we a using a lot of insmod in load_modules.sh,
>>>>>> so it is not so important  
>>>>> 
>>>>> Indeed. As long as the load_modules.sh is complete and loads all what is needed.
>>>>> 
>>>> oh, we have some modprobe there...
>>>> 
>>>> There is a patch for depmod at
>>>> 
>>>> http://lists.goldelico.com/pipermail/gta04-owner/2017-December/007547.html
>>> Glad you found the patch! I remember pulling a lot of hair over it :(
>>> The commit description however says all there is to know about insmod
>>> being the outdated way.
>> 
>> I have a new kernel version that builds a modules.dep.bb which is compatible to the special BusyBox format used by Replicant 4.2.
>> 
>> See:
>> 
>> http://git.goldelico.com/?p=letux-kernel.git;a=commitdiff;h=9d648ca900fa364591cf08946021384f884e570f
> I have never heard about the need for a special format .. .. ../

It was new to me as well...

> However I am pretty sure that android switched to toybox quite a while ago.

Yes, but 4.2 still uses busybox.

Basically I am working on a setup so that we can use the existing Replicant 4.2
image with a 4.10 kernel and replace the kernel (plus all dependencies like
modules.dep and load_modules.sh) by a newer one. 4.14 is working quite well
and 4.19 also to some extent.

The key idea is to "upgrade" it to longterm kernels without rebuilding the
rootfs each time.

BR,
Nikolaus



More information about the Letux-kernel mailing list