星期五, 6月 24, 2011

OMAPDSS:How to enable DVI display

How to enable DVI display
DVI display can be enabled in two ways
1. Using bootargs
Eg: omapdss.def_disp="dvi" omapfb.mode=dvi:720x480@60
2. Using SYSFS attributes
echo 0 > /sys/devices/platform/omapdss/display0/enabled
echo "" > /sys/devices/platform/omapdss/manager0/display
fbset -fb /dev/fb0 -xres 720 -yres 480
echo "dvi" > /sys/devices/platform/omapdss/manager0/display
echo 1 > /sys/devices/platform/omapdss/display2/enabled
kill
Restart without enabling rotation: matrix_gui -qws /usr/share/matrix/html/menu_main.html

ref: http://processors.wiki.ti.com/index.php/AM37x_EVM_Software_Developer%27s_Guide

星期四, 6月 16, 2011

Bash - rename your file name

for i in *.rmvb; do mv $i `echo $i | cut -d '.' -f 2,3,4,5,6`; done

ex: 远古外星人.Ancient.Aliens.S02E10.HDTV-RMVB.rmvb to Ancient.Aliens.S02E10.HDTV-RMVB.rmvb

星期日, 3月 27, 2011

Ubuntu Backup/Restore

reference from: http://ubuntuforums.org/showthread.php?t=81311

1. Gen the Tar file:
tar cvpf sendai-backup.tar --exclude=/proc --exclude=/lost+found --exclude=/sendai-backup.tar --exclude=/mnt --exclude=/sys /

2. Restore the tar to target
tar xvpf sendai-backup.tar -C /

3. mkdir the exclude dir
mkdir proc
mkdir lost+found
mkdir mnt
mkdir sys