diff mbox

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

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

Commit Message

Ian Campbell Oct. 10, 2014, 12:02 p.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.

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>
---
 Osstest/Debian.pm | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

Comments

Ian Jackson Oct. 10, 2014, 2:47 p.m. UTC | #1
Ian Campbell writes ("[PATCH RFC OSSTEST 15/19] 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.

Is this not a bug in mkinitrams or something ?  If so I think we
should provide a reference to the bug here (eg bugs.debian.org URL or
something).

I'm surprised that there isn't a less-raw way of doing this with d-i,
than using a late-command.

Ian.
Ian Campbell Oct. 10, 2014, 2:50 p.m. UTC | #2
On Fri, 2014-10-10 at 15:47 +0100, Ian Jackson wrote:
> Ian Campbell writes ("[PATCH RFC OSSTEST 15/19] 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.
> 
> Is this not a bug in mkinitrams or something ?  If so I think we
> should provide a reference to the bug here (eg bugs.debian.org URL or
> something).

Yes, I should file one.

> I'm surprised that there isn't a less-raw way of doing this with d-i,
> than using a late-command.

So was I.

Ian.
diff mbox

Patch

diff --git a/Osstest/Debian.pm b/Osstest/Debian.pm
index 19d6a22..97a6cda 100644
--- a/Osstest/Debian.pm
+++ b/Osstest/Debian.pm
@@ -708,6 +708,20 @@  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" )
+    {
+        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'};