diff mbox

[Xen-devel,OSSTEST,v2,15/20] Osstest/Debian: Add support for "ExtraInitramfsModules" host property

Message ID 1414579302-6692-15-git-send-email-ian.campbell@citrix.com
State New
Headers show

Commit Message

Ian Campbell Oct. 29, 2014, 10:41 a.m. UTC
The arndale platform needs a bunch of clk, phy and regulator stuff in order to
access its root filesystem. However mkinitramfs is not (currently?) able to
figure this out and therefore doesn't include them in the initrd. See
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=762042

Add a new host prop which can list these required additional module and
arranges for a suitable /etc/initramfs-tools/modules to be created on install.

Using the new HostGroupProp syntax the required modules are:

HostGroupProp_arndale_ExtraInitramfsModules clk-s2mps11 s5m8767 i2c-s3c2410 phy-exynos5250-sata

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
---
v2: References to bugs.
---
 Osstest/Debian.pm | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

Comments

Ian Jackson Oct. 29, 2014, 4:34 p.m. UTC | #1
Ian Campbell writes ("[PATCH OSSTEST v2 15/20] Osstest/Debian: Add support for "ExtraInitramfsModules" host property"):
> The arndale platform needs a bunch of clk, phy and regulator stuff in order to
> access its root filesystem. However mkinitramfs is not (currently?) able to
> figure this out and therefore doesn't include them in the initrd. See
> https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=762042

Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
diff mbox

Patch

diff --git a/Osstest/Debian.pm b/Osstest/Debian.pm
index e390ec9..5435bdf 100644
--- a/Osstest/Debian.pm
+++ b/Osstest/Debian.pm
@@ -722,6 +722,23 @@  in-target mkimage -A arm -T script -d /boot/boot /boot/boot.scr
 END
     }
 
+    my $modules = get_host_property($ho, "ExtraInitramfsModules", "NONE");
+    if ( $modules ne "NONE" )
+    {
+	# This is currently the best available way to add modules to
+	# the installed initramfs. See
+	# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=764805
+        preseed_hook_command($ho, 'late_command', $sfx, <<END);
+#!/bin/sh
+set -ex
+
+for i in $modules ; do
+    echo \$i >> /target/etc/initramfs-tools/modules
+done
+in-target update-initramfs -u -k all
+END
+    }
+
     my @extra_packages = ();
     push(@extra_packages, "u-boot-tools") if $ho->{Flags}{'need-uboot-bootscr'};