#
#                             STB225 Project
#                   ---------------------------------
#
# Copyright (C) 2009 NXP B.V.
# All Rights Reserved.
#
# Suggested STB225 Uboot setup.
# By default this is:
# - Linux kernel in flash
# - rootfs over NFS Ethernet
#
# Rev Date       Author      Comments
#-------------------------------------------------------------------------------
#   1 20070123   batelaan    Initial
#   2 20070124   batelaan    Simplify: (hostname=stb225, rootpath=/rootfs)
#   3 20070124   fedonczuk   Revert to standard 3M kernel size
#   4 20070125   steel       fix flash device name
#   5 20070126   fedonczuk   fix mdids to match new device name
#   6 20070131   steel       mount jffs2 as read only
#   7 20070206   fedonczuk   mount using nfsvers=3 to avoid readdir truncated
#   8 20070220   batelaan    hostname now "stb"
#   9 20070220   fedonczuk   pass mac address value through to Linux
#  10 20070601   steel       make config string shorter
#  11 
#  12 20070601   steel       add serverip
#  13 20070611   barnish     To suit build with ethernet driver enabled, use eth1 (USB network)
#  14 20070531   sjones      Add environment variables for NAND booting
#  15 20070803   fedonczuk   Switch from "${bootmech}" to "run bootmech", for consistency
#ds15 20070805   amccurdy    Comment out setenv bootdelay (2 seconds is now u-boot default)
#  16 20070813   fedonczuk   Update mtdparts for large page NAND
#  17 
#  18 20070817   amccurdy    Merge San Jose #15 with Soton #15 and #16
#  19 20070823   fedonczuk   Remove nand write protect workaround (no longer necessary)
#  20 20070824   fedonczuk   Split NAND and NOR specific sections to separate files
#  21 20070917   sjones      Add ethport variable to facilitate usb/ethernet switching
#  22 20070927   amccurdy    Remove "rootfstype=jffs2" from addjffs
#  23 20071024   gbr02691    (mwhittaker) Do not set 'ethport' network interface setting - allows default eth0
#  24 20071024   gbr02691    (mwhittaker) Set 'ethport' to 'eth0' to ensure works OK without DHCP on Linux host
#  25 20080102   amccurdy    Remove explicit "console=ttyS0,115200" from setargs (it's the kernel default).
#  26 20080110   burningh    Allow easy switching between static and dynamic IP addresses
#  27 20080324   amccurdy    Add "addcramfs" support, remove old bootdelay option
#  28 20080519   fedonczuk   Change default boot to NFS+TFTP with macros for NAND/NOR
#  29 20090316   ocourson    Add "addsquashfs" support
#  30 20080728   amccurdy    Add 'boottftp' as alias for 'tftpboot'
#
###############################################################################

# These environment variables are common to both NOR and NAND boards

# For a complete environment you must combine this with either
# 'uboot_env_stb225_nor.txt' or 'uboot_env_stb225_nand.txt'

###############################################################################

# Command line for booting the system
#
# Use addip/adddhcp to set a static/dynamic IP address
# Use addnfs/addcramfs/addsquashfs/addjfs to choose a filesystem
# Use 'run bootnand/bootnor/boottftp' to start the kernel from NAND/NOR/TFTP
#
setenv boottftp 'tftpboot'
setenv bootcmd  'run setargs; run addip; run addnfs; run boottftp'

# Network configuration
setenv ipaddr    '192.168.0.2'
setenv serverip  '192.168.0.1'
setenv gatewayip '192.168.0.1'
setenv netmask   '255.255.255.0'
setenv hostname  'stb'
setenv rootpath  '/rootfs'
setenv ethport   'eth0'
setenv loadaddr  '80800000'
setenv bootfile  'uImage_stb225'
setenv autostart 'yes'

# Common "Macros" for constructing kernel command line ($bootargs)
setenv setargs  'setenv bootargs ${mtdparts} ${xargs} ip3902.mac_address=${ethaddr}'
setenv addnfs   'setenv bootargs ${bootargs} root=/dev/nfs rw nfsroot=${serverip}:${rootpath},tcp,nfsvers=3'
setenv addip    'setenv bootargs ${bootargs} ip=${ipaddr}:${serverip}::::${ethport}'
setenv adddhcp  'setenv bootargs ${bootargs} ip=dhcp'
setenv addjffs  'setenv bootargs ${bootargs} root=/dev/mtdblock${fspart} ro rootfstype=jffs2'
setenv bootargs

###############################################################################

saveenv
