Re: please revert commit ce8556cca6 "kbuild: verify that $DEPMOD is installed" introduced in v4.18.4.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Randy,

> Am 23.08.2018 um 03:07 schrieb Randy Dunlap <rdunlap@xxxxxxxxxxxxx>:
> 
> On 08/22/2018 05:39 PM, Dmitry Torokhov wrote:
>> On Wed, Aug 22, 2018 at 4:35 PM Randy Dunlap <rdunlap@xxxxxxxxxxxxx> wrote:
>>> 
>>> On 08/22/2018 11:53 AM, H. Nikolaus Schaller wrote:
>>>> This patch requires that /sbin/depmod is installed and installable on
>>>> the build host.
>>>> 
>>>> But not all build hosts for cross compiling Linux are Linux systems
>>>> and are able to provide a working port of depmod, especially at the
>>>> file patch /sbin/depmod.
>>>> 
>>>> I use, for example, a Darwin system to cross compile Linux and I run
>>>> depmod -a on the embedded system once, after installing a new Linux
>>>> kernel there.
>>>> 
>>>> I have no problem with seeing a warning, but aborting the build process
>>>> is IMHO a bad idea since the previous behaviour didn't harm many people
>>>> as far as I see. Probably 99% of people compiling Linux kernels do that
>>>> on Linux and 99% of those have depmod installed for optimal operation of
>>>> their build host. So IMHO printing the warning is good enough.
>>> 
>>> Thanks for the report and sorry about the problem.
>>> 
>>> I'm OK with changing the error to a warning.
>>> Does the patch below work for you?
>> 
>> Why would one want a warning on a host that never runs "make modules_install"?
>> Can this check be only done when we actually try to install modules?
> 
> 
> So Nikolaus:  how do you provoke this problem that you are reporting?
> It's not just a theoretical problem, is it?
> 
> The way that I read the top-level Makefile, this check for $DEPMOD only happens
> when you run "make modules_install".

Yes,
we run on the build host

 make letux_defconfig dtbs uImage INSTALL_MOD_PATH=/tmp/kernel-modules-$$ modules modules_install

and then scp the files from  /tmp/kernel-modules-$$ to the embedded device.
Or pack into some installable file setfor download on our server.

So we run modules_install on the build host as well to copy the modules into the correct hierarchy
and give it the correct lib/modules/<kernel_release> prefix.

I would have to duplicate this what module_install does in some wrapper script.

BTW: it is a standard technique described by others:

http://labs.isee.biz/index.php/The_Linux_kernel#IGEP_Boards_based_on_Texas_Instruments_.C2.A0Processors

 make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- modules_install INSTALL_MOD_PATH=/media/user/rootfs

http://en.gnublin.org/index.php/Kernel_compile_%2B_Module_installation#Compile_the_modules

 mkdir kernel_archiv
 make modules_install INSTALL_MOD_PATH=kernel_archiv
 cp arch/arm/boot/zImage kernel_archiv
 cd kernel_archiv
 tar cfvz kernel.tar.gz zImage lib/

All these descriptions will now break if run on a host without /sbin/depmod installed.

BR and thanks,
Nikolaus



[Index of Archives]     [Linux&nblp;USB Development]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite Secrets]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux