#!/bin/sh

PHYS_MEMPOOL_BASE=`cat /proc/cmdline | sed -e s/.*dsp_base=// | cut -f 1 -d\ `
PHYS_MEMPOOL_SIZE=`cat /proc/cmdline | sed -e s/.*dsp_len=// | cut -f 1 -d\ `

SHM_SIZE=0x5B5000

if [ -z $PHYS_MEMPOOL_BASE ]
then
	# Setup the dsp bridge
	/sbin/modprobe bridgedriver shm_size=0x400000 GT_str="*=0123456789"
	
else
	echo DSP PHYS_MEMPOOL_BASE = $PHYS_MEMPOOL_BASE
	echo DSP PHYS_MEMPOOL_SIZE = $PHYS_MEMPOOL_SIZE 
	echo DSP SHM_SIZE = $SHM_SIZE

	# Setup the dsp bridge
	/sbin/modprobe bridgedriver phys_mempool_base=$PHYS_MEMPOOL_BASE phys_mempool_size=$PHYS_MEMPOOL_SIZE shm_size=$SHM_SIZE GT_str="**=0123456789"
fi

# Load the dsp image
#/usr/bin/cexec.out -T /lib/dsp/baseimage.dof
