setup-ivi-bootloader-conf: gummiboot: create a splash enabled entry
authorMikko Ylinen <mikko.ylinen@intel.com>
Fri, 31 Jan 2014 12:52:38 +0000 (14:52 +0200)
committerMikko Ylinen <mikko.ylinen@intel.com>
Fri, 31 Jan 2014 13:29:34 +0000 (15:29 +0200)
To support fastboot and 'flickerless' boot testing, create a
gummiboot entry that draws a splash image to the screen.

Additionally, disable fbcon for that kernel entry.

Change-Id: I25c338efbe9560b67393a8f5b23c26e1e384b729
Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
setup-ivi-bootloader-conf

index b5b19f1..9e413aa 100755 (executable)
@@ -157,6 +157,17 @@ add_subcommand()
                        $force "$kernel-clone" "Clone $os_name" \
                        "$kernel" "$clone_opts"
        fi
+
+       # Use default gummiboot-splash file
+       local splash_path="$rootdir/usr/share/gummiboot/splash.bmp"
+
+       # Add a splash entry for fastboot testing and disable fbcon
+       if [ "$boot" = "gummiboot" ] && [ -f "$splash_path" ]; then
+               splash_opts="$options fbcon=map:9"
+               setup-$boot-conf $verbose --bootdir "$bootdir" add \
+                       $force --splash "$splash_path" "$kernel-splash" \
+                       "Splash $os_name" "$kernel" "$splash_opts"
+       fi
 }
 
 #
@@ -259,6 +270,11 @@ remove_subcommand()
                             remove --force "$kernel-clone" || \
                fatal "setup-$boot-conf failed to remove" \
                      "entry \"$kernel-clone\""
+       # Ditto for "splash"
+       setup-$boot-conf $verbose --bootdir "$bootdir" \
+                            remove --force "$kernel-splash" || \
+               fatal "setup-$boot-conf failed to remove" \
+                     "entry \"$kernel-splash\""
 
        # If this is not the default kernel, we are done
        [ "$kernel" = "$default_kernel" ] || return 0