# bspinst_var.sh
#
# Global variables for drawing API for WonderMedia ARM SoC.
#
# Written by Vincent Chen <vincentchen@wondermedia.com.tw>
#
# Copyright 2008-2009 WonderMedia Corporation. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice,
#    this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright notice,
#    this list of conditions and the following disclaimer in the documentation
#    and/or other materials provided with the distribution.
#
# THIS SOFTWARE IS PROVIDED BY WONDERMEDIA CORPORATION ``AS IS'' AND ANY
# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL WONDERMEDIA CORPORATION OR CONTRIBUTORS BE
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
# THE POSSIBILITY OF SUCH DAMAGE.

video_mode=`fbset | grep - | cut -d\  -f2 | sed 's/\"//g' | cut -d- -f1`

# Display resolution
# @xres	X-resolution
# @yres Y-resolution
xres=`echo ${video_mode} | cut -dx -f1`
yres=`echo ${video_mode} | cut -dx -f2`

# Backgound color
# @bc_r	red color
# @bc_g	green color
# @bc_b blue color
bc_r=0
bc_g=0
bc_b=255

# Foreground color
# @fc_r	red color
# @fc_g	green color
# @fc_b blue color
fc_r=255
fc_g=255
fc_b=255


# Font config
# @fs		font size
# @font1	fixed width font
# @font2	chinese font
# for 1024x768, best font size is 32.
fs1=`expr $xres \* 32 / 1024`
fs2=`expr $yres \* 32 / 768`
if [ $fs1 -lt $fs2 ]; then
	fs=$fs1
else
	fs=$fs2
fi
echo "set fs $fs, ${xres}x${yres}"
font1="$src_dir/data/courbd.ttf"
font2="$src_dir/data/bsmi00lp.ttf"

CompleteRatio=0

KEY_0="0xb"
KEY_1="0x2"
KEY_2="0x3"
KEY_3="0x4"
KEY_4="0x5"
KEY_5="0x6"
KEY_6="0x7"
KEY_7="0x8"
KEY_8="0x9"
KEY_9="0xa"
KEY_ENTER="0x1c"

# 0. SF 16MiB         (ramdisk)
# 1. SF 16MiB  + NAND (yaffs2)
# 2. SF 512KiB + NAND (yaffs2)
# 3. SD/MMC           (ramdisk)
# 4. Reserved
# 5. Reserved
# 6. Quit
DEFAULT_SCENARIO=2

# 0 = Basic installation
# 1 = Recommended installation
# 2 = Full installation
# if all values are zero, the config menu will be disabled.

INSTALL_BASIC=0
INSTALL_RECOMMENDED=0
INSTALL_FULL=0

TIMEOUT_MENU=0
TIMEOUT_STARTUP=3
TIMEOUT_EXIT=3

MAC_0=AUTO
MAC_INCREMENT=0

# JodyFu: move next env-var from .config to env/uboot_env_head
#MEM_TOTAL=212M
#MMC_ID=0
#LPJ=1748992

UBOOT_LOG2_OFFSET=0x100000
INIT_LOCAL_DISK=1
