2009年12月3日

Useful SVN commands

# Create new SVN repository
#> svnadmin create /svn/FOO

# Import new project FOO
#> svn import --no-ignore MyFOO svn://foo.domain.com/FOO/MyFOO -m "My First Project."

# Checkout FOO
#> svn co svn://foo.domain.com/FOO/MyFOO

# Add
#> svn add myfoo.c
#> svn commit myfoo.c -m "My Foo file."

# Delete
#> svn del myfoo.c
#> svn commit myfoo.c -m "Remove Foo file."

# Add tag
#> svn copy http://foo.domain.com/FOO/trunk http://foo.domain.com/FOO/tags/FOO-r1 -m "${LOGS}"

# Add branch
#> svn copy http://foo.domain.com/FOO/trunk http://foo.domain.com/FOO/branches/FOO-b1 -m "${LOGS}"
#> svn switch http://foo.domain.com/FOO/branches/FOO-b1

# Modify file permission
#> svn propset svn:executable "*" ${FILENAME}

2009年12月2日

Use external SMTP server on Mantis bugtracker

[mantis]# cat config_inc.php
# --- email variables -------------
$g_smtp_host = 'smtp.domain.com';
$g_smtp_username = 'user_id';
$g_smtp_password = 'user_password';
$g_use_phpMailer = 'ON';
# We do not use sendmail.
$g_phpMailer_method = '2';
?>
[mantis]#

2009年12月1日

God damn issue on Bugzilla installation!

Issue:
[error] [client 192.168.99.11] (13)Permission denied: exec of /var/www/html/bugzilla/index.cgi failed
[error] [client 192.168.99.11] Premature end of script headers: index.cgi

Solution:
#> vi /etc/sysconfig/selinux
Set SELINUX=disabled, then reboot the system.

2009年11月22日

J-Link Commander

SEGGER J-Link Commander V4.09p ('?' for help)
Compiled Oct 28 2009 17:33:31
DLL version V4.09p, compiled Oct 28 2009 17:33:00
Firmware: J-Link ARM V8 compiled Oct 27 2009 18:08:30
Hardware: V8.00
S/N : 20090626
Feature(s) : RDI,FlashDL,FlashBP,JFlash,GDBFull
VTarget = 3.248V
Info: TotalIRLen = 10, IRPrint = 0x0021
Found 2 JTAG devices, Total IRLen = 5:
[Porter] -- Dual core is identified. #1 is the main host CPU, #0 is a DSP. Thus, all command sets should be set to #1 CPU.
#0 Id: 0x07B3645B, IRLen: 05, IRPrint: 0x1, ARM1136 Core
#1 Id: 0x07B3645B, IRLen: 05, IRPrint: 0x1, ARM1136 Core
ARM11 identified.
JTAG speed: 1000 kHz

[Porter] -- Use "Config" to tell commander that we'll work on #1 CPU.
J-Link>Config 5,1
Info: TotalIRLen = 10, IRPrint = 0x0021
Found 2 JTAG devices, Total IRLen = 5:
#0 Id: 0x07B3645B, IRLen: 05, IRPrint: 0x1, ARM1136 Core
#1 Id: 0x07B3645B, IRLen: 05, IRPrint: 0x1, ARM1136 Core
ARM11 identified.
J-Link>

[Porter] -- Halt CPU.
J-Link>h
Info: CP15.0.0: 0x4117B365: ARM, Architecture 6
Info: CP15.0.1: 0x1D9D29D2: ICache: 64kB (4*512*32), DCache: 64kB (4*512*32)
DIDR: 6 Breakpoints available and 2 Watchpoints available.
J-Link>h
PC: (R15) = AA6F8300, CPSR = 000001D7 (ABORT mode, ARM FIQ dis. IRQ dis.)
R0 = 00000000, R1 = 46521804, R2 = 04008000, R3 = 0003C000
R4 = 40000000, R5 = 00002000, R6 = 000C2084, R7 = 04000080
USR: R8 =428020C8, R9 =11410AC8, R10=00000000, R11 =C0C18004, R12 =00009020
R13=02A48501, R14=F0940315
FIQ: R8 =02002000, R9 =00035604, R10=C8048010, R11 =40108900, R12 =E1060000
R13=00801100, R14=00020980, SPSR=00000010
SVC: R13=0083523C, R14=00040000, SPSR=00000010
ABT: R13=6086010A, R14=C0000004, SPSR=000001D3
IRQ: R13=0201D008, R14=00140110, SPSR=00000010
UND: R13=44328000, R14=00400800, SPSR=00000010
J-Link>
[Porter] -- Load boot loader binary to RAM. The base is 0x80000000.
J-Link>loadbin c:/arm/u-boot.bin 0x80000000
Loading binary file... [c:/arm/u-boot.bin]
Writing bin data into target memory @ 0x80000000.
J-Link>

[Porter] -- Set program counter to 0x80000000 and then run.
J-Link>setpc 0x80000000
J-Link>g



2009年5月24日

New AntiVir software will freeze Windows UI?

After upgrading to new Avira AntiVir, my WindowsXP sometimes stop responding requests and only mouse cursor is still alive, and all applications can't be launched and the machine is not able to be shutdown either.

In my case, restarting explorer.exe can solve this abnormal issue:
1. Press [Ctrl] + [Alt] + [Del], launch [Task Manager].
2. Find "explorer.exe" process and terminate it.
3. From [File] menu of [Task Manager], choose [New Task]...
4. Run explorer.exe again.

2009年4月22日

Porting JVM to Embedded Device

Using Infineon Wildpass as target platform. "http://www.linux-mips.org/wiki/Adm5120#ADM8668_-_WildPass".
The compilation(host) platform is Fedora 10 installed in VMware.

Files:
classpath-0.97.2.tar.gz (classpath-0.98.tar.gz, Not recommend.)
fastjar-0.97.tar.gz
libtool-1.5.20.tar.gz (libtool-2.2.6.tar.gz, Not recommend.)
zziplib-0.13.50.tar.bz2
kaffe-1.1.9.tar.bz2

Define PREFIX as "TARGET/ramdisk/usr".
Define TARGET as "mipsel-linux".
Define HOST as "i386-redhat-linux".

Building Procedure:

1. Untar all files and run "./configure; make; make install" to install programs to host machine. It will reduce some compiling troubles.

2. Compile classpath-0.97.2.tar.gz
# ./configure --prefix=${PREFIX} --target=${TARGET} --host=${TARGET} --build=${HOST} CC=${IFX_CC} CFLAGS=-O2 --disable-gtk-peer --disable-gconf-peer --disable-plugin
# make CC=${IFX_CC} STRIP=${IFX_STRIP} LD=${IFX_LD} AR=${IFX_AR} RANLIB=${IFX_RANLIB} IFX_CFLAGS="${IFX_CFLAGS}" IFX_LDFLAGS="${IFX_LDFLAGS}"
# make install

3. Compile fastjar-0.97.tar.gz, libtool-2.2.6a.tar.gz and zziplib-0.13.50.tar.bz2
# ./configure --prefix=${PREFIX} --host=${TARGET} --build=${HOST} CC=${IFX_CC} CFLAGS=-O2
# make CC=${IFX_CC} STRIP=${IFX_STRIP} LD=${IFX_LD} AR=${IFX_AR} RANLIB=${IFX_RANLIB} IFX_CFLAGS="${IFX_CFLAGS}" IFX_LDFLAGS="${IFX_LDFLAGS}"

# make install


4. Compile kaffe-1.1.9.tar.bz2
# ./configure --prefix=${IFX_ROOTFS_DIR}JVM --host=${TARGET} --build=${HOST} CC=${IFX_CC} CFLAGS=-O2 ZZIP_CFLAGS=-I${IFX_ROOTFS_DIR}JVM/include ZZIP_LIBS=-L${IFX_ROOTFS_DIR}JVM/lib
# make CC=${IFX_CC} STRIP=${IFX_STRIP} LD=${IFX_LD} AR=${IFX_AR} RANLIB=${IFX_RANLIB} IFX_CFLAGS="${IFX_CFLAGS}" IFX_LDFLAGS="${IFX_LDFLAGS}"
# make install


Issues Solved:

1. With the latest libtool-2.2.6a, kaffe may fail in configuring as:
#checking for library containing lt_dlcaller_register... no
#configure: error: Can't find the libltdl library.
Thus, to vanish the configuring error, here we install an old version, libtool-1.5.20, for building kaffe.

2. The two ZZIP related arguments are used to solve:
#checking for ZZIP... configure: error: Package requirements (zziplib >= 0.13.24) were not met: #No package 'zziplib' found

3. If you encounter cross-compiling error as following, please install kaffe to host first.
# configure: error: please set KAFFEH to the full pathname of a locally executable kaffeh
Reference from: "http://www.kaffe.org/pipermail/kaffe/2002-October/177793.html".

While compiling kaffe for host machine, you may see make failure due to "CPStringBuilder" issue.
#ERROR in java/lang/reflect/Constructor.java (at line 235)
# Modifier.toString(getModifiers(), sb).append(' ');
^^^^^^^^
#The method toString(int, CPStringBuilder) in the type Modifier is not applicable for the #arguments (int, StringBuilder)
In my case, this issue comes with classpath-0.98.tar.gz package, but it is vanished after downgrade to classpath-0.97.2.tar.gz. Maybe 0.98 version is too new?

4. Issue prompt while cross-compiling kaffe:
# trampolines.S:33:11: invalid preprocessing directive #needed # trampolines.S:46:11: invalid preprocessing directive #$fp
Commenting/removing those two lines to pass the compilation.
(Is it a correct fix? Not sure.)

5. Issue prompt while cross-compiling kaffe:
# : undefined reference to `lt_preloaded_symbols'
# ../../kaffe/kaffevm/.libs/libkaffe.so: undefined reference to `isfinite'
# ../../kaffe/kaffevm/.libs/libkaffe.so: undefined reference to `signbit'
# ../../kaffe/kaffevm/.libs/libkaffe.so: undefined reference to `g_atomic_pointer_compare_and_exchange'

Still ongoing ...

2009年3月17日

Install VMwareTools in Fedora 10

Issue: Cannot use share-folder after VMWareTools installed in Fedora 10.

After googling, found a solution from internet. With the following steps, the share-folder issue has been fixed. (My machine is WinXP-SP2 with v6.0.0 build-45731 VMware installed.)

1. Download open-vm-tools source from
"http://sourceforge.net/project/showfiles.php?group_id=204462&package_id=244023".
2. Do the compilation
# tar zxvf open-vm-tools-2009.02.18-148847.tar.gz
# cd open-vm-tools-2009.02.18-148847
# ./configure --disable-unity --without-gtkmm --without-dnet --without-icu
// Need --disable-unity --without-gtkmm --without-dnet --without-icu on my machine.
# make
3. Create needed tar files for VMwareTools.
# cd open-vm-tools-2009.02.18-148847/modules/linux
# for i in *; do mv ${i} ${i}-only; tar -cf ${i}.tar ${i}-only; done
// vmblock.tar, vmci.tar, vmhgfs.tar, vmmemctl.tar, vmsync.tar and vmxnet.tar will be created.
3. Untar VMwareTools-6.0.0-45731.tar.gz, the source is from VMware software itself.
4. Copy all tar files created by open-vm-tools to vmware-tools-distrib/lib/modules/source.
5. Run VMwareTools installation
# cd vmware-tools-distrib
# ./vmware-install.pl
6. Besides, "RgbPath" is not a valid keyword in /etc/X11/xorg.conf, "startx" cannot be activated due to the error. Please comment it from L:13 of /etc/X11/xorg.conf.

Reference:
http://diamondsw.dyndns.org/Home/Et_Cetera/Entries/2008/4/25_Linux_2.6.24_and_VMWare.html