#!/bin/sh

# Display a splash screen
. /env/config
if [ ${splash_loc} != nand ] && [ ${splash_loc} != nor ]; then
        exit 0
fi

if [ -e /dev/fb0 ]; then
        fb0.mode_name=$display
        if [ -e /dev/fb1 ]; then
                if [ ${splash_loc} = nand ]; then
                        if [ -e /dev/nand0.splash.bb ]; then
                                bmp -f /dev/fb1 /dev/nand0.splash.bb
                        fi
                elif [ ${splash_loc} = nor ]; then
                        if [ -e /dev/nor0.splash ]; then
                                bmp -f /dev/fb1 /dev/nor0.splash
                        fi
                fi

                fb1.alpha=255
                fb1.enable=1
        fi
        fb0.enable=1
		i2c_read -a 0x04 -b 2 -r 0xFF -c 2
fi
