Thursday, June 17, 2010

Linux board bringup commands

CRAMFS for AVL board
mkfs.cramfs -b 4096 arago-rootfs/ arago-rootfs.img
************************************************************************************************************************************************
#this is board specific changes
echo "Board specific script"

#/bin/psplash-write "PROGRESS 90"
#/bin/psplash-write "MSG Board Specific changes"
#/bin/psplash-write "PROGRESS 100"
#/bin/psplash-write "MSG "
#/bin/psplash-write "QUIT"

cp /home/root/pap-secrets /tmp/
cp /home/root/chap-secrets /tmp/
cp /home/root/resolv.conf /tmp/

export TSLIB_TSEVENTTYPE=GALAX
export TSLIB_FBDEVICE=/dev/fb0
export TSLIB_CALIBFILE=/tmp/pointercal
export TSLIB_CONFFILE=/etc/ts.conf
export TSLIB_TSDEVICE=/dev/input/event0
export TSLIB_PLUGINDIR=/usr/lib/ts
export QWS_MOUSE_PROTO=tslib:/dev/input/event0

echo "05c6 9000" >/sys/bus/usb-serial/drivers/option1/new_id

#./bin/psplash-write "PROGRESS 100"
#./bin/psplash-write "QUIT"

/opt/dm365/av_capture_load.sh

cat /etc/maven.txt

/opt/dm365/encodedecode &

************************************************************************************************************************************************
Iperf configure

Assuming you are running using bash shell, can you try running this command, before running configure:
$ export ac_cv_func_malloc_0_nonnull=yes
If you are using a different shell, adapt this command.

./configure --host=arm-linux --prefix=/home/shriharsh/Projects/AVL/Test_App/iperf-2.0.4/install CC=/opt/arm/v5t_le/bin/arm_v5t_le-gcc CXX=/opt/arm/v5t_le/bin/arm_v5t_le-g++ CFLAGS=-static CXXFLAGS=-static LDFLAGS=-L /home/shriharsh/temp/arago_rootfs/lib

insmod /mnt/usb/libertas.ko libertas_debug=0x4863a7
libertas_debug=0xFFF86FFF

insmod /mnt/usb/libertas.ko
insmod /mnt/usb/libertas_sdio.ko &
ifconfig wlan0 up
iwconfig wlan0 essid "TESTAP" key "1010abcd20"
echo "nameserver 192.168.1.3" > /etc/resolv.conf
ifconfig wlan0 192.168.1.249
route add default gw 192.168.1.1

TCP

* Server side command - iperf -s
* Client side command - iperf -c (serveripadddress) -w (window size) -d -t (time interval for data tranfer).

UDP

* Server side command - iperf -s -u
* Client side command - iperf -c (serveripadddress) -u -d -t (time interval for data tranfer).

NOTE :-d option stands for bidirectional traffic.


wpa_supplicant -i wlan0 -D wext -c /etc/wpa_supplicant.conf -B

************************************************************************************************************************************************
http://elinux.org/CompilingMTDUtils
http://www.linux-mtd.infradead.org/faq/ubifs.html

create ubi.img on PC
//512 page size
mkfs.ubifs -r dm365 -m 512 -e 15360 -c 768 -o ubifs.img
ubinize -o ubi.img -m 512 -p 16KiB ubinize.cfg
//2048 page size
mkfs.ubifs -r dm365 -m 2048 -e 129024 -c 96 -o ubifs.img
ubinize -o ubi.img -m 2048 -p 128KiB -s 512 ubinize.cfg

Configuration file ubinize.cfg contents
>>>>>>
[ubifs]
mode=ubi
image=ubifs.img
vol_id=0
vol_size=11MiB
vol_type=dynamic
vol_name=jffs2
vol_alignment=1
vol_flags=autoresize
<<<<<<

ubiformat /dev/mtd9 -f ubi.img
ubiattach /dev/ubi_ctrl -m 9
ubimkvol /dev/ubi0 -N jffs2 -s 11MiB
mount -t ubifs ubi0 /mnt/cf

************************************************************************************************************************************************
SIMCOM Modem Command

Add this VID/PID to usb-serial
echo "05c6 9000" >/sys/bus/usb-serial/drivers/option1/new_id

./DM365_modemtest /dev/ttyUSB2 115200 AT+CFUN=1

Start GPS
./DM365_modemtest /dev/ttyUSB2 115200 AT+CGPS=1
Stop GPS
./DM365_modemtest /dev/ttyUSB2 115200 AT+CGPS=0