diff options
author | Sam Thursfield <sam.thursfield@codethink.co.uk> | 2015-12-23 12:21:40 +0000 |
---|---|---|
committer | Sam Thursfield <sam.thursfield@codethink.co.uk> | 2015-12-23 14:58:16 +0000 |
commit | 0878c8ed027fbfcb515bebc093c98eb61bc36c3a (patch) | |
tree | 9d2db548aab93d257c81fb23798f8f6fdba6637d | |
parent | 2905d47704253c7384786c09653d7fd257a54b43 (diff) | |
download | infrastructure-0878c8ed027fbfcb515bebc093c98eb61bc36c3a.tar.gz |
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
-rw-r--r-- | strata/bsp-x86_32-generic/linux-x86-32-generic.morph | 6 | ||||
-rw-r--r-- | 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 |