| # Copyright (c) 2012 The Chromium OS Authors. All rights reserved. |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| |
| description "Displays an animation while the system is booting" |
| author "chromium-os-dev@chromium.org" |
| |
| start on startup |
| task |
| |
| script |
| if [ ! -f /root/.factory_installer ]; then |
| # Disable blinking cursor. Without this, a splash screen will show a |
| # distinct cursor shape even when the cursor is set to none. |
| echo 0 > /sys/devices/virtual/graphics/fbcon/cursor_blink |
| |
| # Set the backlight to 40% of its maximum level. |
| BACKLIGHT_DIR=/sys/class/backlight |
| if [ -d $BACKLIGHT_DIR ] && |
| [ -n "$(find $BACKLIGHT_DIR -maxdepth 0 ! -empty)" ]; then |
| backlight_tool --set_brightness_percent 40.0 || true |
| fi |
| |
| # Use differently-sized images depending on the framebuffer width. |
| WIDTH=$(ply-image --print-resolution | cut -d ' ' -f 1) |
| |
| ASSETS=/usr/share/chromeos-assets |
| ASSETS_200=$ASSETS/images_200_percent |
| ASSETS_100=$ASSETS/images_100_percent |
| if [ $WIDTH -gt 1920 -a -e "$ASSETS_200/boot_splash_frame01.png" ]; then |
| BOOT_IMAGES="$ASSETS_200"/boot_splash_frame*.png |
| else |
| BOOT_IMAGES="$ASSETS_100"/boot_splash_frame*.png |
| fi |
| |
| ply-image --set-monitors --gamma /usr/share/color/bin/internal_display.bin \ |
| --clear 0xfefefe --frame-interval 25 $BOOT_IMAGES |
| fi |
| end script |