diff mbox series

[Unstable,1/2] UBUNTU: [Packaging] Add list of built-in modules to the ABI

Message ID 20210511072834.488740-2-juergh@canonical.com
State New
Headers show
Series Add modules.builtin to the ABI | expand

Commit Message

Juerg Haefliger May 11, 2021, 7:28 a.m. UTC
Add a new file <version>/modules.builtin to the buildinfo package that
lists all the built-in modules. This will be used by the ABI checker to
not complain about missing modules if module configs have changed from
'm' to 'y'.

Signed-off-by: Juerg Haefliger <juergh@canonical.com>
---
 debian/rules.d/2-binary-arch.mk | 10 ++++++++++
 1 file changed, 10 insertions(+)
diff mbox series

Patch

diff --git a/debian/rules.d/2-binary-arch.mk b/debian/rules.d/2-binary-arch.mk
index 0b008df5a853..641a9f2938e5 100644
--- a/debian/rules.d/2-binary-arch.mk
+++ b/debian/rules.d/2-binary-arch.mk
@@ -459,6 +459,12 @@  endif
 	find $(pkgdir_bin) $(pkgdir) $(pkgdir_ex) -name \*.ko | \
 		sed -e 's/.*\/\([^\/]*\)\.ko/\1/' | sort > $(abidir)/$*.modules
 
+	# Build the final ABI built-in modules information.
+	if [ -f $(pkgdir)/lib/modules/$(abi_release)-$*/modules.builtin ] ; then \
+		sed -e 's/.*\/\([^\/]*\)\.ko/\1/' $(pkgdir)/lib/modules/$(abi_release)-$*/modules.builtin | \
+			sort > $(abidir)/$*.modules.builtin; \
+	fi
+
 	# Build the final ABI firmware information.
 	find $(pkgdir_bin) $(pkgdir) $(pkgdir_ex) -name \*.ko | \
 	while read ko; do \
@@ -499,6 +505,10 @@  endif
 		$(pkgdir_bldinfo)/usr/lib/linux/$(abi_release)-$*/retpoline
 	install -m644 $(abidir)/$*.compiler \
 		$(pkgdir_bldinfo)/usr/lib/linux/$(abi_release)-$*/compiler
+	if [ -f $(abidir)/$*.modules.builtin ] ; then \
+		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.