2010年6月7日

OpenCORE Debug Print on Android

To utilize the existing log statements without rebuilding the whole PV library, you can do this:
1. In the beginning of the file, after the last "#include" line, add following:
#include <utils/Log.h>
#undef LOG_TAG
#define LOG_TAG "YOUR_MODULE_NAME"
#undef PVLOGGER_LOGMSG
#define PVLOGGER_LOGMSG(IL, LOGGER, LEVEL, MESSAGE) JJLOGE MESSAGE
#define JJLOGE(id, ...) LOGE(__VA_ARGS__)


2. In the end of the file, add these:

#undef PVLOGGER_LOGMSG
#define PVLOGGER_LOGMSG(IL, LOGGER, LEVEL, MESSAGE) OSCL_UNUSED_ARG(LOGGER);



You can play with the macro to filter based on level too.

From http://omappedia.org/wiki/Android_Debugging#Selectively_Enable_Opencore_Debug_Print

2010年5月9日

Removing carriage returns from MS-DOS file

Remove ^M in vim
:1,$s/{Ctrl+V}{Ctrl+M}//g

2010年4月30日

Get man pages for GNU/Linux Development

sudo apt-get install manpages-dev

2010年4月6日

Convert ape to flac in Ubuntu

Install flac and shntool
sudo apt-get install flac
sudo apt-get install shntool
Convert all ape files in current dir to flac
shnconv -o flac *.ape

2009年12月7日

VLC RC Interface

Open RC Interface:
vlc -I rc --rc-host localhost:4444
or
vlc --extraintf rc --rc-host localhost:4444
In the RC interface, type "help" for command info.

Send command:
echo "play" |netcat localhost 4444 -q 0
add -q option for quit time

2009年11月21日

TFTP note

OS: ubuntu 8.04 LTS

1.Install TFTP server package
$sudo apt-get install tftpd-hpa

2009年11月20日

Fuppes Installation

1. Download source (ubuntu) or .exe(win32)

2. Install