| # 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" |
| |
| # boot-splash depends on udev-trigger-early because frecon does need |
| # graphics device to be ready to display splash screen and tty (ptmx) |
| # device to create terminals, it also uses input devices (though they |
| # can also be hotplugged). |
| |
| start on stopped udev-trigger-early |
| |
| script |
| # 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 |
| |
| ASSETS=/usr/share/chromeos-assets |
| ASSETS_200=$ASSETS/images_200_percent |
| ASSETS_100=$ASSETS/images_100_percent |
| |
| # Use differently-sized images depending on the framebuffer width. |
| if [ -e "$ASSETS_200/boot_splash_frame01.png" ]; then |
| BOOT_IMAGES="" |
| for image in "$ASSETS_200"/boot_splash_frame*.png; do |
| BOOT_IMAGES="${BOOT_IMAGES} --image-hires ${image}" |
| done |
| for image in "$ASSETS_100"/boot_splash_frame*.png; do |
| BOOT_IMAGES="${BOOT_IMAGES} --image ${image}" |
| done |
| else |
| BOOT_IMAGES="$ASSETS_100"/boot_splash_frame*.png |
| fi |
| |
| DEV_END_USER= |
| if is_developer_end_user; then |
| DEV_END_USER="--dev-mode --enable-osc --enable-vts --pre-create-vts" |
| fi |
| |
| frecon --daemon --clear 0xfffefefe $DEV_END_USER --frame-interval 25 \ |
| $BOOT_IMAGES |
| end script |