From patchwork Wed Mar 25 00:21:54 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Carlos Santos X-Patchwork-Id: 1261074 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=busybox.net (client-ip=140.211.166.137; helo=fraxinus.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=g5gq5StF; dkim-atps=neutral Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48n82D3C2fz9sRR for ; Wed, 25 Mar 2020 11:22:12 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 253C485BAE; Wed, 25 Mar 2020 00:22:09 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 4zmFnyXz88Po; Wed, 25 Mar 2020 00:22:07 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id 2075785B94; Wed, 25 Mar 2020 00:22:07 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id E030F1BF32A for ; Wed, 25 Mar 2020 00:22:05 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id DC36E88055 for ; Wed, 25 Mar 2020 00:22:05 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id qpJ9ASH84+Ct for ; Wed, 25 Mar 2020 00:22:04 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-qk1-f193.google.com (mail-qk1-f193.google.com [209.85.222.193]) by whitealder.osuosl.org (Postfix) with ESMTPS id 6CCD48802E for ; Wed, 25 Mar 2020 00:22:04 +0000 (UTC) Received: by mail-qk1-f193.google.com with SMTP id q188so676204qke.8 for ; Tue, 24 Mar 2020 17:22:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=KD5SX1F6HullTjsRqyNiejt084c3SEdsyd6V64C9WwI=; b=g5gq5StF4qo0cSCo/KQY4bvuYMM7aEYNBi7r556l6GENjGegR4p+GtNRWuP10P0ZkW PLrhzSZgwPecWi9YhZH6H2NyjUHUT6Ky8/eE5jVawpPY+2xTVuGqnk4V9XQzbXK/MZZ9 NQQWhLb6/xEbltjRUYLTDMjmBjN63/De4aAmJmExesoltzvLyBWUX/f/JsFYJA2IQrz6 G4iPI3/5R6VzHgugG6uoRF76IPGgvHIT8Hc7yKac+5BcHJ8Vxo/3v5lr4LSAg7TLulvR e1OtUMFT/tG1zt+NbAtwn3JJ2LzQjC5Ezxl7o/yNG/eoDSrwwjIEqQE6MsLDenjhum5U AfWQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=KD5SX1F6HullTjsRqyNiejt084c3SEdsyd6V64C9WwI=; b=kDbMZRraABe8YYGKEgqWnXkNTKuTLvLf0aUY/WWYfpe9Dzh1cCtmP0BF7PtUrh9WcO 06UfO/VcAHxSldD60uciwybyMLsmntmqB1ho2G6xnWvIYLB8pZjPWzZoXla4SaFpNYHo qhsgPi+5I6InTvN/ZwZyu1m9QhG8JmIcRddwOIizmliSx3SVeP9Vb0yiF4uxu5pZkDHq aXUNhG9EqAtBL7jO2pVD9z8AZnCelpi8rVqNxqR82YXsGLqhGnUFyx8eZD+A+AgQV5MZ QjxpgsIib/Oneqgw6i4cfbvMxqfT/DhJrt3F0C/3XH/S/rfKpO/ywS1/3ApnznqmucuF AofQ== X-Gm-Message-State: ANhLgQ2RsYq+EjGvYHDBIvRaNfI/ETrLg1n8CW6yYTNtK1sxpu4oS30M iIWU4PtvZxAJ0AvzsLxh2ej8hlgn X-Google-Smtp-Source: ADFU+vuuFpoPWi77lCVQ567ZHxc/3s2jKzNOR3BOUIf5IBmuSxcHx3QB3hsmt30Z4G1d0EUypPLUTw== X-Received: by 2002:ae9:f511:: with SMTP id o17mr545508qkg.367.1585095723084; Tue, 24 Mar 2020 17:22:03 -0700 (PDT) Received: from casantos.remote.com ([177.97.95.208]) by smtp.gmail.com with ESMTPSA id d201sm14139019qke.59.2020.03.24.17.22.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 Mar 2020 17:22:02 -0700 (PDT) From: unixmania@gmail.com To: buildroot@buildroot.org Date: Tue, 24 Mar 2020 21:21:54 -0300 Message-Id: <20200325002154.5882-1-unixmania@gmail.com> X-Mailer: git-send-email 2.18.2 Subject: [Buildroot] [PATCH] linux: run depmod only if modules are enabled X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Carlos Santos , "Yann E. MORIN" MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" From: Carlos Santos If the kernel configuration CONFIG_MODULES disabled, there's no /lib/modules/ directory, causing this: depmod: ERROR: could not open directory [...]/target/lib/modules/4.19.8: No such file or directory depmod: FATAL: could not search modules: No such file or directory Makefile:745: recipe for target 'target-finalize' failed Reported-by: Thomas Petazzoni Signed-off-by: Carlos Santos --- CC: "Yann E. MORIN" --- linux/linux.mk | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/linux/linux.mk b/linux/linux.mk index 2e3ea52053..b2ceeecafb 100644 --- a/linux/linux.mk +++ b/linux/linux.mk @@ -539,7 +539,9 @@ endef # Run depmod in a target-finalize hook, to encompass modules installed by # packages. define LINUX_RUN_DEPMOD - $(HOST_DIR)/sbin/depmod -a -b $(TARGET_DIR) $(LINUX_VERSION_PROBED) + if grep -q "CONFIG_MODULES=y" $(LINUX_DIR)/.config; then \ + $(HOST_DIR)/sbin/depmod -a -b $(TARGET_DIR) $(LINUX_VERSION_PROBED); \ + fi endef LINUX_TARGET_FINALIZE_HOOKS += LINUX_RUN_DEPMOD