From patchwork Sun May 3 13:10:01 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Yann E. MORIN" X-Patchwork-Id: 1281959 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=none (p=none dis=none) header.from=free.fr 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=nUhGKJJJ; 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 49FRDk14pGz9sRf for ; Sun, 3 May 2020 23:10:30 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 193C786E8F; Sun, 3 May 2020 13:10:26 +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 6GJOhWVMVBd5; Sun, 3 May 2020 13:10:20 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id 2E3BF86F66; Sun, 3 May 2020 13:10:19 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id 6EEBB1BF414 for ; Sun, 3 May 2020 13:10:06 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 69F2A8876A for ; Sun, 3 May 2020 13:10:06 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id tp3rDxY0JUrJ for ; Sun, 3 May 2020 13:10:05 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wm1-f65.google.com (mail-wm1-f65.google.com [209.85.128.65]) by hemlock.osuosl.org (Postfix) with ESMTPS id 94F7988763 for ; Sun, 3 May 2020 13:10:05 +0000 (UTC) Received: by mail-wm1-f65.google.com with SMTP id k12so5262880wmj.3 for ; Sun, 03 May 2020 06:10:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=sYR8HYzPnNCfn4sttjk5k/xf1VAQ+49CPiwqa4lK1e4=; b=nUhGKJJJ1RyHza8qLw6SzLtU7K4NvlGKJ4LCX4FHYtG8t/VO12Q1+iVT/taIOJ/7wu vB9hpHkYa3/KTJzyHD/5cx3UOamAWjgSKNY3Ihn4+cZWjJ+Cupo4kxGVlL2W3OcexXwa +GWVW+qYs2+1h3tZosZGQaYEiqupkL85FFQQC//NajXsfN+m5f6BnXF8OxepYJKkl2ZJ NCIheXVIkWN9Oejs7HFlJm2y0uJlvARNpT42zlWh7nVmkRssJEQ5EmJ+XXSGWLUV7Hkb /qvozjTDbpeJ8SLSynEFpxKB4UW2yz1Ni8CBG94ufJq/iiSnLPmcSR+6HGmB/MvmEERV qCKg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=sYR8HYzPnNCfn4sttjk5k/xf1VAQ+49CPiwqa4lK1e4=; b=oVd3tDvbV+LCvM+ADhWyfQ0co9jnipOS0/L71rMgXHzG4rROTMOSLBeWc0xBKlaGko YgDGbRsJFvTpgphG6DWY55Y0ecv0+WLZWlSHZqABa1D+zt0KDdHxveeOuoQWjHs5NwBN +V3qskzigIGQotTItfek4nZvwUkUAXqjZwUNwShyVfEk/lphUofptDdS8EK2TeyOECu0 1woqhtLiF5/npEu0srFiHvG5URMq3t/k6d9N9+hqi+1nc76BFdXnQXdXIM/zURK9lR/R M4+bH3CxPRcE7Q+2OMym5TpPzJ9x5oParrLebByy73gh5Ur6Gv6rVCZdWG/zrPhyUIAi vHeQ== X-Gm-Message-State: AGi0PuYW54Lc4WT0dM4sdcUxOF4oSa3LVx/zbjcVi9vU299l/w8W4mRw 6mVZyhP3oaaNKanvnPetQmVrFNjs X-Google-Smtp-Source: APiQypI8zRKaaTjprtSJMPNfy7Ae498yELFtOPRj0uAsEUZ0E4T13wjk6HGKkxu4jXpzsLRQrfvwtA== X-Received: by 2002:a7b:c4c9:: with SMTP id g9mr9244919wmk.171.1588511403801; Sun, 03 May 2020 06:10:03 -0700 (PDT) Received: from scaer.home ([2a01:cb19:8b51:cb00:2d8d:e954:ae3d:7f6a]) by smtp.gmail.com with ESMTPSA id u127sm9199919wme.8.2020.05.03.06.10.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 03 May 2020 06:10:03 -0700 (PDT) From: "Yann E. MORIN" To: buildroot@buildroot.org Date: Sun, 3 May 2020 15:10:01 +0200 Message-Id: X-Mailer: git-send-email 2.20.1 In-Reply-To: References: MIME-Version: 1.0 Subject: [Buildroot] [PATCH 3/3 v2] package/lmod: add compression support for the host variant 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: Lucian Buga , "Yann E. MORIN" , Thomas Petazzoni Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" The kernel may install compressed modules. At the end of the buid, we then run depmod, to generate modules.dep and a few assorted files, so that loadign modules works properly on the target (loading by alias, loading dependencies...) However, depmod needs support for compressed modules, or it would generate empty modules.dep et al. Systematically adding support for gz and xz, and the required deps, was deemed too much of a burden [0], so we add too options to enable either or both compression. [0] http://lists.busybox.net/pipermail/buildroot/2018-April/218410.html Yegor Yefremov Cc: Signed-off-by: Yann E. MORIN Cc: Thomas Petazzoni Cc: Lucian Buga Tested-by: Matt Weber --- Changes v1 -> v2: - make compression support optional (Thomas) --- package/kmod/Config.in.host | 10 ++++++++++ package/kmod/kmod.mk | 14 ++++++++++++++ 2 files changed, 24 insertions(+) diff --git a/package/kmod/Config.in.host b/package/kmod/Config.in.host index ea99a790f6..810fac3156 100644 --- a/package/kmod/Config.in.host +++ b/package/kmod/Config.in.host @@ -4,3 +4,13 @@ config BR2_PACKAGE_HOST_KMOD kmod is a set of tools to handle common tasks with Linux kernel modules like insert, remove, list, check properties, resolve dependencies and aliases. + +if BR2_PACKAGE_HOST_KMOD + +config BR2_PACKAGE_HOST_KMOD_GZ + bool "support gzip-compresed modules" + +config BR2_PACKAGE_HOST_KMOD_XZ + bool "support xz-compresed modules" + +endif diff --git a/package/kmod/kmod.mk b/package/kmod/kmod.mk index cdbfc5a469..979c3e87e6 100644 --- a/package/kmod/kmod.mk +++ b/package/kmod/kmod.mk @@ -75,6 +75,20 @@ else KMOD_CONF_OPTS += --disable-tools endif +ifeq ($(BR2_PACKAGE_HOST_KMOD_GZ),y) +HOST_KMOD_DEPENDENCIES += host-zlib +HOST_KMOD_CONF_OPTS += --with-zlib +else +HOST_KMOD_CONF_OPTS += --without-zlib +endif + +ifeq ($(BR2_PACKAGE_HOST_KMOD_XZ),y) +HOST_KMOD_DEPENDENCIES += host-xz +HOST_KMOD_CONF_OPTS += --with-xz +else +HOST_KMOD_CONF_OPTS += --without-xz +endif + # We only install depmod, since that's the only tool used for the # host. define HOST_KMOD_INSTALL_TOOLS