add cirrusfb.conf to upstart when creating VM image

It loads cirrus framebuffer driver module. Which enables boot-splash
to work and later will allow to use fbdev X11 driver and running
X11 server as user instead of root.

BUG=chromium:182119
TEST=start Chromium OS in VM, boot splash animation should work now.

Change-Id: Icc9c681887c5ae57ac773cd89e5be5fc46a7e5c2
Signed-off-by: Dominik Behr <dbehr@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/171455
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Reviewed-by: Richard Barnette <jrbarnette@chromium.org>
diff --git a/image_to_vm.sh b/image_to_vm.sh
index c0742ce..f02f664 100755
--- a/image_to_vm.sh
+++ b/image_to_vm.sh
@@ -149,6 +149,17 @@
 # Modify the unverified usb template which uses a default usb_disk of sdb3
 sudo sed -i -e 's/sdb3/sda3/g' "${TEMP_MNT}/boot/syslinux/usb.A.cfg"
 
+# add loading of cirrus fb module
+if [ "${FLAGS_format}" = "qemu" ]; then
+  sudo_clobber "${TEMP_MNT}/etc/init/cirrusfb.conf" <<END
+start on starting boot-splash
+task
+exec modprobe cirrus
+END
+fi
+# TODO as these image modifying hacks accumulate, we should consider
+# creating a better solution
+
 # Unmount everything prior to building a final image
 trap - INT TERM EXIT
 cleanup