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年4月22日
Porting JVM to Embedded Device
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
2005年11月9日
Install Ser SIP server
Files needed:
ser-0.9.4_src.tar.gz
mysqld/mysqladmin
phpMyAdmin-2.6.4-pl3.tar.bz2
1. Compilation
# tar zxvf ser-0.9.4_src.tar.gz
# cd ser-0.9.4
# make
# make modules
# make install
// The default installed path is /usr/local/sbin.
// The configuration file will be placed under /usr/local/etc/ser.
# cp ser-0.9.4/rpm/ser.ini /etc/init.d/ser
# chkconfig ser reset
# chkconfig ser on
# service ser start
3. Activate and Configure MySQL
# chkconfig mysqld on
# service mysqld start
// Setup password for MySQL. (root/root)
# mysqladmin –u root password root
//Setup Ser database in MySQL:
# /usr/sbin/ser_mysql.sh create
4. Install phpMyAdmin to manage MySQL:
# tar jxvf phpMyAdmin-2.6.4-pl3.tar.bz2
# vi /etc/httpd/conf/httpd.conf
// Alias /php /home/phpMyAdmin-2.6.4-pl3
// Run http://IP-Address/php and use phpMyAdmin to modify permission and password of Ser service.
5. Add SIP users
# export SIP_DOMAIN=”porter10.mydomain.intra” serctl add
# /usr/local/sbin/serctl add 230 230 230@192.168.1.1
# /usr/local/sbin/serctl add 232 232 232@192.168.1.1
2005年9月26日
Booting from CF card
Using CF card or micro hardisk to construct a simple embedded system:
1. Format CF card (The CF card is connected to Slave IDE-1.)
# fdisk /dev/hdc
// d 1 (Delete the partition)→ n (Create a new partition)→ w (Confirm the change and store the setting.)
# mke2fs /dev/hdc1 (Do Ext2 format) or
# mke2fs –j /dev/hdc1 (Do Ext3 format) or
# mkfs.ext3 /dev/hdc1 (Do Ext3 format)
2. Create new directories and files
# cd /mnt
# mkdir CF
# mount –t ext2 /dev/hdc1 CF
# mkdir CF/boot
# mkdir CF/boot/grub
# cp /boot/grub/* CF/boot/grub/
// Copy all grub relevance files to CF card.
3. Modify grub.conf and menu.lst
{
default=0
timeout=10
#splashimage=(hd0,0)/grub/splash.xpm.gz
title Embedded Linux On CF
root (hd0,0)
kernel (hd0,0)/boot/vmlinuz ro root=/dev/hdc1
#CF card is on Slave IDE,thus the root is /dev/hdc1.
initrd (hd0,0)/boot/initrd-new.img
}
4. Construct boot sector on CF card
# grub > root (hd1,0)
// Since the CF card is not current bootup hard disk, thus the parameter here is hd1, not hd0
// The fist is hd0, 2nd is hd1, ....
# grub > setup (hd1)
// Install grub to CF card.
# grub > quit
5. Create kernel image.
The CF card is on the same x86 machine, thus we can use the original vmlinuz image which is under /boot directory.
6. Create root file system.
The CF card is on the same x86 machine, thus we can use the original initrd image which is under /boot directory.
2005年5月5日
Build ARM ToolChain - II
Do the same building test with some updated sources.
Files needed:
binutils-2.14.tar.gz
gcc-3.2.1.tar.gz
glibc-2.2.3.tar.gz
glibc-linuxthreaders-2.2.3.tar.gz
1. Binutils
// Same with Compilation - I.
2. Bootstrap compiler GCC
#cd ${PROJECT-PATH}/build-tools/
#tar zxvf gcc-3.2.1.tar.gz
#cd ${PROJECT-PATH}/build-tools/build-boot-gcc
// Do not do the compilation under the original untar directory.
#../gcc-3.2.1/configure --target=arm-linux --prefix=${PROJECT-PATH}/tools --with-headers=/usr/include --with-newlib --enable-languages=c --disable-shared
// The gcc 3.2.1 won't be created successfully without the flag "--disable-shared" for configuring.
// Headers for "--with-headers" actually should be generated by glibc building first.
3. Glibc
#cd ${PROJECT-PATH}/build-tools/
#tar zxvf glibc-2.2.3.tar.gz
#tar -zxvf glibc-linuxthreaders-2.2.3.tar.gz \ > --directory=glibc-2.2.3
#cd ${PROJECT-PATH}/build-tools/build-glibc/
// Do not do the compilation under the original untar directory.
#CC=arm-linux-gcc ../glibc-2.2.3/configure --host=arm-linux --prefix=”/usr” --enable-add-ons --with-headers=${PROJECT-PATH}/tools/arm-linux/include –-disable-profile –-without-fp
#make
// If errors on "weak precede definition" are found, we can modify the execution order of:
// ${PROJECT-PATH}/build-tools/glibc-2.2.3/sysdeps/unix/sysv/linux/arm/errlst.c (42L)
// 1. weak_alias (__old_sys_nerr, _old_sys_nerr)
// 2. strong_alias (__old_sys_nerr, _old_sys_nerr);
// 3. /*weak_alias (__old_sys_nerr, _old_sys_nerr)*/
#make install_root=${PROJECT-PATH}/tools/arm-linux \ > prefix=”” install
// If the following errors are found:
// ./stdio.texi:3269: First argument to cross-reference may not be empty.
// ./stdio.texi:3270: First argument to cross-reference may not be empty.
// Directly modify build-tools/glibc-2.2.3/manual/stdio.texi, and remove @ref{} to pass the compilation.
// Then several libraries will be generated under tools/arm-linux/lib.
// Modify ${PROJECT-PATH}/tools/arm-linux/lib/libc.so to remove absolute path, GROUP( libc.so.6 libc_nonshared.a )
4. GCC Compiler
#cd ${PROJECT-PATH}/build-tools/build-gcc/
// Do not do the compilation under the original untar directory.
#../gcc-3.2.1/configure --target=arm-linux --prefix=${PROJECT-PATH}/tools --enable-languages=c,c++ --with-headers=${PROJECT-PATH}/tools/arm-linux/include --with-libs=${PROJECT-PATH}/tools/lib --with-float=soft --enable-threads
#make all
#make install
I cannot build KS8695P-2.4.16-rmk2 kernel successfully with my arm-linux-gcc v3.2.1 tool, and will suffer hardware fp and software fp compiling errors. Didn't solve the issue yet, maybe the kernel source is too old, should have a try on 2.4.18 later version.