@kaznelson
Woudn't it be easier (and better) to simply remove
Code:
PLATFORM=ntx508
if [ $DEVICE == TOUCH ]; then
PLATFORM=freescale
fi
and use the values of PLATFORM as they are exported by rcS? The code above does not take into account all models of the Touch anyway.