From patchwork Thu Jun 10 08:08:04 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Juerg Haefliger X-Patchwork-Id: 1490235 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4G0xSf2lvlz9sW7; Thu, 10 Jun 2021 18:08:50 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1lrFk6-0000DJ-Tq; Thu, 10 Jun 2021 08:08:46 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1lrFk1-0000AX-Vh for kernel-team@lists.ubuntu.com; Thu, 10 Jun 2021 08:08:41 +0000 Received: from mail-wr1-f69.google.com ([209.85.221.69]) by youngberry.canonical.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.93) (envelope-from ) id 1lrFk1-0004CH-Ou for kernel-team@lists.ubuntu.com; Thu, 10 Jun 2021 08:08:41 +0000 Received: by mail-wr1-f69.google.com with SMTP id z3-20020adfdf830000b02901198337bc39so531176wrl.0 for ; Thu, 10 Jun 2021 01:08:41 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=WgdIEC+pxj3bvyCG77MqwM1FWCObdl+ymSaRBlUo7hg=; b=HwIiGQtKhXloiUxoaKqM3KZYpqvr/khvsvotyPh4EpxAfwiE9cBuZIzbZ1zZfua0ne p3hZBNHbIIKdqR+Z/+Otwtu262yQYccxrnxm2nwSwUkfy6PrtvMJ1sMr7kliGDvP9o0Q oF8FN50v+9GheKMnMSUmEWLZ+nhCJhuUa9fsq4mHn76/r8xEfSCukILNIcgwnJ9hqjMu f1YkpFTHnTU8WqaK7FvD4rYDAD9f/XxOPEylibfkg+naqpxLX4/zKFpwqTzhuO7+h8Ds zBo3tYr+roo08/YueRjE51GraWg+1xO/ablFK/WAAxNCoBWOY0tP6FiHGFPFeBhLz+tE BeZg== X-Gm-Message-State: AOAM532O8ihRFn8whKxSgBOZQk1uIkuaZsP2lDngJI/IqyY0+CNzbjGB YSgvw9qe6z0WZ98kJsC5cvuuTF77CCDVyAfr1FhvbVrYC1T2doBpksplap225TxgZ7wCfkeoMSG sPFbiCNX8fcMum4pdWI+QVB1NK8rUFE/oLcVXsUuxbw== X-Received: by 2002:a5d:56d1:: with SMTP id m17mr3845700wrw.354.1623312521481; Thu, 10 Jun 2021 01:08:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzrr+jyCJ5F9bFfod2u7f6G+Ht3lFub4XgMANfpi+CyX7p52HH/gILproJVbzBDsYM2/+mMJQ== X-Received: by 2002:a5d:56d1:: with SMTP id m17mr3845691wrw.354.1623312521336; Thu, 10 Jun 2021 01:08:41 -0700 (PDT) Received: from gollum.fritz.box ([194.191.244.86]) by smtp.gmail.com with ESMTPSA id n13sm2843854wrg.75.2021.06.10.01.08.40 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Jun 2021 01:08:41 -0700 (PDT) From: Juerg Haefliger X-Google-Original-From: Juerg Haefliger To: kernel-team@lists.ubuntu.com Subject: [Unstable][PATCH v2 2/5] UBUNTU: [Packaging] buildinfo: Add modinfo data from built-in modules to the ABI Date: Thu, 10 Jun 2021 10:08:04 +0200 Message-Id: <20210610080807.25518-3-juergh@canonical.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210610080807.25518-1-juergh@canonical.com> References: <20210610080807.25518-1-juergh@canonical.com> MIME-Version: 1.0 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" Collect the modinfo data from the built-in modules and put it in a modules.builtin subdirectory provided by the buildinfo package. For Hirsute this adds roughly 1.2MB to the amd64 generic buildinfo package: $ du -h /usr/lib/linux/5.11.0-14-generic/modules.builtin/ 1.2M /usr/lib/linux/5.11.0-14-generic/modules.builtin/ With the previous commit, this results in an amd64 generic buildinfo package size increase from 440K to 4.8M. Signed-off-by: Juerg Haefliger --- debian/rules.d/2-binary-arch.mk | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/debian/rules.d/2-binary-arch.mk b/debian/rules.d/2-binary-arch.mk index fbc7ce928587..2b45b1caf925 100644 --- a/debian/rules.d/2-binary-arch.mk +++ b/debian/rules.d/2-binary-arch.mk @@ -354,6 +354,20 @@ endif INSTALL_DIR="$(pkgdir)" SOURCE_DIR="$(CURDIR)" \ run-parts -v $(DROOT)/tests-build + # Build the final ABI information for built-in modules. + # This needs to happen before the next step below which removes + # essential files required by modinfo (modules.dep and the likes). + if [ -f $(pkgdir)/lib/modules/$(abi_release)-$*/modules.builtin ] ; then \ + install -d $(abidir)/$*.modules.builtin; \ + cat $(pkgdir)/lib/modules/$(abi_release)-$*/modules.builtin | \ + while read ko; do \ + modname=$${ko##*/}; \ + modname=$${modname%.ko}; \ + /sbin/modinfo -b $(pkgdir) -k $(abi_release)-$* "$${modname}" > \ + $(abidir)/$*.modules.builtin/"$${modname}"; \ + done; \ + fi + # # Remove files which are generated at installation by postinst, # except for modules.order and modules.builtin @@ -501,6 +515,11 @@ endif $(pkgdir_bldinfo)/usr/lib/linux/$(abi_release)-$*/retpoline install -m644 $(abidir)/$*.compiler \ $(pkgdir_bldinfo)/usr/lib/linux/$(abi_release)-$*/compiler + if [ -d $(abidir)/$*.modules.builtin ] ; then \ + install -d $(pkgdir_bldinfo)/usr/lib/linux/$(abi_release)-$*/modules.builtin; \ + install -m644 $(abidir)/$*.modules.builtin/* \ + $(pkgdir_bldinfo)/usr/lib/linux/$(abi_release)-$*/modules.builtin/; \ + fi ifneq ($(full_build),false) # Clean out this flavours build directory.