#!/bin/sh

# Platform specific options for OF-DPA daemon and kernel modules
# to be placed in /etc/default/ofdpa

OFDPA_DAEMON_OPTIONS=""
OFDPA_KERNEL_OPTIONS=""
#### Turn on all of the debugging options
#OFDPA_DAEMON_OPTIONS="$OFDPA_DAEMON_OPTIONS -c1 -c2 -c3 -c4 -c5 -c6 -c8 -d2"

#### WARNING: this will fill up your disk - there is NO log rotation
## use only in short debugging investigations
#OFDPA_DAEMON_OPTIONS="$OFDPA_DAEMON_OPTIONS >& /var/log/ofdpa-debug.log"

if [ -z TEST_PLATFORM ] ; then
    PLATFORM=$TEST_PLATFORM    # for script testing
elif [ -f /etc/onl_platform ] ; then
    PLATFORM=`cat /etc/onl_platform`
else
    PLATFORM='unknown'
fi
    
case "$PLATFORM" in 
    powerpc-quanta-ly2-r0)
        ;;
    powerpc-as5710-54x-r0b | powerpc-accton-as5710-54x-r0)
        OFDPA_KERNEL_OPTIONS="dmasize=32M maxpayload=128"
        ;;
    *)
        echo "Defaulting to no OFDPA options for unknown platform $PLATFORM - hope that is ok" >&2
        ;;
esac
