Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1402388imm; Thu, 23 Aug 2018 02:27:32 -0700 (PDT) X-Google-Smtp-Source: AA+uWPxzAAlNRxMjJMz9hJDzNPUBD6MaZwEwJr8QNuKug405jwh1au1j6v3OGJ/wb8N3x0iP1X5Q X-Received: by 2002:a65:5286:: with SMTP id y6-v6mr54501578pgp.65.1535016452503; Thu, 23 Aug 2018 02:27:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535016452; cv=none; d=google.com; s=arc-20160816; b=Xi2IGwFccaNyJE6YJvz1Hviue3m1caR1spkwsy7IM90boUr86LrMjcm2boKss/bMOH VWlHdx5P5XDjYMvLrCSXtK+smelzwnApxSDiNdFb7bNL5lcsUprjs1NjtUj9ERBTmvWo AGsi2R3dUFUREzdZFOriPaXk/xQoE9lB/ZvVpScpV72WS6QckEZ1F1w3orp/lcvm8Tyo /JpA5uf2BC84lVpQOmF3Kp/i6WP3KgpnBJlkeqdRMv6UYnsHtCc+bUmncL/2F96+bqZt HgNmq9PqCtb42GuQ1xHuR2UgtRKXwDkJmv8c979GI/jAv89I9MqdwZqel/p6qPNDTFsr X/nQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:references:message-id :content-transfer-encoding:cc:date:in-reply-to:from:subject :mime-version:arc-authentication-results; bh=C4y0LAZiBwYNWxy9aIHv6XTPBRdP+nomBBHdENCtLIc=; b=gIEynJBd12/Zd9Lg7WQ0w85bf+I/wJVNb8LGn6751bOIHTypdX5RRHe7FcZ+BwrrPp LFc0fWXWZewAHRH2B1l9yeYl6DX+OPyqtnDBoNdZsJXgnHQfoo+/sffkfAb6zcFk52/A a6r+dLzVLkdqlz+FR7xNWrdzZ1RSum7xvUa1J//ugkxWozWptITuY1MjnX6AxE8Snor5 qpkVZKlIWaziMfvztpXxA6Spv5p9h7dFxYCpIz7SS7yKEBLwv5zrtQrlwfex5imjaeUI w3U6iLd613V3socqpvh3gwsabOzTH+lh4zstFHIUWaKnbyPosTSSt/FIHcftRXCZk60f ZZTA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b8-v6si3714317pls.392.2018.08.23.02.27.14; Thu, 23 Aug 2018 02:27:32 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726601AbeHWKow convert rfc822-to-8bit (ORCPT + 99 others); Thu, 23 Aug 2018 06:44:52 -0400 Received: from mo4-p01-ob.smtp.rzone.de ([85.215.255.52]:12581 "EHLO mo4-p01-ob.smtp.rzone.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726075AbeHWKow (ORCPT ); Thu, 23 Aug 2018 06:44:52 -0400 X-RZG-AUTH: ":JGIXVUS7cutRB/49FwqZ7WcJeFKiMgPgp8VKxflSZ1P34KBj5gpw91kgwllX1BiDcw==" X-RZG-CLASS-ID: mo00 Received: from imac.fritz.box by smtp.strato.de (RZmta 43.18 DYNA|AUTH) with ESMTPSA id x038eeu7N7GQSge (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (curve secp521r1 with 521 ECDH bits, eq. 15360 bits RSA)) (Client did not present a certificate); Thu, 23 Aug 2018 09:16:26 +0200 (CEST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Subject: Re: please revert commit ce8556cca6 "kbuild: verify that $DEPMOD is installed" introduced in v4.18.4. From: "H. Nikolaus Schaller" In-Reply-To: <7e154505-5f73-1054-e67e-cdfb249fec43@infradead.org> Date: Thu, 23 Aug 2018 09:16:23 +0200 Cc: Dmitry Torokhov , lucas.demarchi@profusion.mobi, lucas.de.marchi@gmail.com, michal.lkml@markovi.net, jeyu@kernel.org, cwhuang@linux.org.tw, "3.8+" , lkml , Discussions about the Letux Kernel , Masahiro Yamada , Linux Kbuild mailing list Content-Transfer-Encoding: 8BIT Message-Id: <75BCA8F9-B649-48BD-9A30-2561AEFBB877@goldelico.com> References: <490A46D5-834E-46A9-9106-A31F94344F99@goldelico.com> <7e154505-5f73-1054-e67e-cdfb249fec43@infradead.org> To: Randy Dunlap X-Mailer: Apple Mail (2.3124) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Randy, > Am 23.08.2018 um 03:07 schrieb Randy Dunlap : > > On 08/22/2018 05:39 PM, Dmitry Torokhov wrote: >> On Wed, Aug 22, 2018 at 4:35 PM Randy Dunlap 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/ 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