From 0878c8ed027fbfcb515bebc093c98eb61bc36c3a Mon Sep 17 00:00:00 2001 From: Sam Thursfield Date: Wed, 23 Dec 2015 12:21:40 +0000 Subject: Fix minimal systems build This was broken by changes in c4bf91813c787b503eaeaa1d372f271d4638a16d which expected 'depmod' to be present in all systems. It would be annoying to prevent anyone from using modules, but it also defeats the point of minimal-system to start adding bits of the 'foundation' stratum. This hack to only run 'depmod' if it is present in the system seems like a reasonable compromise, until we have a nice way of customising the Linux config for different systems. Change-Id: Ida083b51353cab78f8d3f6a72af711a00d0fcfd8 --- strata/bsp-x86_32-generic/linux-x86-32-generic.morph | 6 +++++- strata/bsp-x86_64-generic/linux-x86-64-generic.morph | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/strata/bsp-x86_32-generic/linux-x86-32-generic.morph b/strata/bsp-x86_32-generic/linux-x86-32-generic.morph index 3d141fd9..529b74bd 100644 --- a/strata/bsp-x86_32-generic/linux-x86-32-generic.morph +++ b/strata/bsp-x86_32-generic/linux-x86-32-generic.morph @@ -290,5 +290,9 @@ install-commands: ) | cpio -0pumd "$DESTDIR$PREFIX/src/linux" system-integration: linux-x86-32-generic-misc: + # This is required for any modules to work correctly. However, it depends + # `depmod` from the 'kmod' chunk in the 'foundation' stratum, so it runs + # conditionally on `depmod` existing to avoid breaking in + # minimal-system-x86_32. 00-depmod: - - (cd /lib/modules && for version in *; do depmod -a "$version"; done) + - if which depmod; then (cd /lib/modules && for version in *; do depmod -a "$version"; done) fi diff --git a/strata/bsp-x86_64-generic/linux-x86-64-generic.morph b/strata/bsp-x86_64-generic/linux-x86-64-generic.morph index d7206b2f..1a3d388b 100644 --- a/strata/bsp-x86_64-generic/linux-x86-64-generic.morph +++ b/strata/bsp-x86_64-generic/linux-x86-64-generic.morph @@ -290,5 +290,9 @@ install-commands: ) | cpio -0pumd "$DESTDIR$PREFIX/src/linux" system-integration: linux-x86-64-generic-misc: + # This is required for any modules to work correctly. However, it depends + # `depmod` from the 'kmod' chunk in the 'foundation' stratum, so it runs + # conditionally on `depmod` existing to avoid breaking in + # minimal-system-x86_64. 00-depmod: - - (cd /lib/modules && for version in *; do depmod -a "$version"; done) + - if which depmod; then (cd /lib/modules && for version in *; do depmod -a "$version"; done) fi -- cgit v1.2.1