These are my personal instructions for setting ip on debian linux witht he standard intel ixp toolchain and the newest libraries.
As usual with these type of ports they are very messy.
If you have any more concise instructions/improvement/experiences i'll add them to the page.
x86 Linux
Our platform is based upon mozilla, which requires a number of packages. If you are confident you have the packages below, you can skip to section G.
Installation Instructions
A
1. pkg-config
2. ftp://ftp.gtk.org/pub/gtk/v2.2/dependencies/
3. download latest pkg-config and extract it
4. ./configure
5. make
6. make install
7. rm /usr/bin/pkg-config
8. ln -s /usr/local/bin/pkg-config /usr/bin/pkg-config
B
1. glib v2.0+
2. ftp://ftp.gtk.org/pub/gtk/v2.2/
3. download latest glib* and extract it
4. ./configure
5. make
6. make install
7. set in .login/.bash_profile etc..
8. LD_LIBRARY_PATH=/usr/local/lib:/usr/lib
9. export LD_LIBRARY_PATH
C
1. atk
2. ftp://ftp.gtk.org/pub/gtk/v2.2/
3. download latest atk* and extract it
4. ./configure
5. make
6. make install
D
1. pango
2. ftp://ftp.gtk.org/pub/gtk/v2.2/
3. download latest pango* and extract it
4. ./configure
5. make
6. make install
E
1. tiff
2. ftp://ftp.gtk.org/pub/gtk/v2.0/dependencies/
3. download latest tiff* and extract it
4. ./configure
5. make
6. make install
F
1. gtk v2.2+
2. ftp://ftp.gtk.org/pub/gtk/v2.2/
3. download latest gtk+-*.*extract it
4. ./configure
5. make
6. make install
G
1. lib-IDL
2. http://ftp.linux.org.uk/mirrors/ftp.gnome.org/sources/libIDL/0.8/download
3. latest src and extract it
4. ./configure
5. make
6. make install
H
1. Decide where you want opencom to be installed...we suggest /opt
2. execute the following commands...
CVSROOT=:pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot cvs -z 3 co mozilla/client.mk cd mozilla gmake -f client.mk pull_all BUILD_MODULES=xpcom ./configure --enable-standalone-modules=xpcom --enable-default-toolkit=gtk2 export LD_LIBRARY_PATH=/usr/local/lib:/opt/mozilla/dist/sdk/xpcom/bin
3. This will download and configure xpcom, if this fails, check you have the correct libraries, from stage A.
4. Download our stable distribution from here, extract it into the /opt/mozilla/xpcom folder...
5. Edit /opt/mozilla/xpcom/Makefile.in ---add the netkit folder to the dir list i.e.
DIRS = \ MoreFiles \ typelib \ string \ glue \ base \ ds \ io \ components \ threads \ reflect \ proxy \ build \ tools \ netkit \ $(NULL)
6. cd to /opt/mozilla run gmake 7. The netkit distribution should now be built.
7. the test
export LD_LIBRARY_PATH=/opt/mozilla/xpcom/build:/opt/mozilla/nsprpub/lib/ds:/opt/mozilla/nsprpub/lib/libc/src:/opt/mozilla/nsprpub/pr/src/
export MOZILLA_FIVE_HOME=/opt/mozilla/dist/bin
cd /opt/mozilla/xpcom/netkit
run ./nsTestOCM ----and hopefully it will work :-)
StrongARM
The distribution for StrongARM will be built in the /opt/strongarm
We use a method called cross-compilation to compile code on the x86 host.
We are assuming that you have followed the instructions in the ixp setup section.
1. Get a new copy of mozilla for strongarm usage
mkdir /opt/strongarm
cd to /opt/strongarm and run the following...
CVSROOT=:pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot cvs -z 3 co mozilla/client.mk
cd mozilla
gmake -f client.mk pull_all BUILD_MODULES=xpcom
Download our stable distribution from here, extract it into the /opt/mozilla/xpcom folder...
chmod 777 -R netkit
Edit /opt/mozilla/xpcom/Makefile.in ---add the netkit folder to the dir list i.e.
DIRS = \ MoreFiles \ typelib \ string \ glue \ base \ ds \ io \ components \ threads \ reflect \ proxy \ build \ tools \ netkit \ $(NULL)
2. Building the required libaries
2.a start with glib
cd to your glib src tree
make clean
create a file called arm.cache which contains
glib_cv_stack_grows=no glib_cv_uscore=no ac_cv_func_posix_getpwuid_r=0 glib_cv_use_pid_surrogate=0run the lengthy command below
CC="armv4b-unknown-linux-gcc -mbig-endian -mapcs-32 -fPIC" CXX="armv4b-unknown-linux-g++
-mbig-endian -mapcs-32 -fPIC" LD=armv4b-unknown-linux-ld AS=armv4b-unknown-linux-as
./configure --build=armv4b-unknown-linux --target=$/usr/local/armbe/armv4b-unknown-linux
--exec=/usr/local/armbe/armv4b-unknown-linux --host=i386-linux --cache-file=arm.cache
due to some errors in the glib files, it fails to find the SSIZE_MAX value, therefore just comment out the relavent code.
emacs glib/giounix.c lines 182+183
make
make install
the libaries will be copied to /usr/local/armbe/armv4b-unknown-linux
2.b now cross compile lib-idl
cd to your lib-idl folder
make clean
create a file called arm.cache which contains
libIDL_cv_long_long_format=0
export CROSS_LIB_PATH=/usr/local/armbe/armv4b-unknown-linux/lib
LDFLAGS="-L/usr/local/armbe/armv4b-unknown-linux/lib" CC="armv4b-unknown-linux-gcc
-mbig-endian" CXX="armv4b-unknown-linux-g++ -mbig-endian" LD=armv4b-unknown-linux-ld
AS=armv4b-unknown-linux-as ./configure --build=armv4b-unknown-linux --target=$/usr/local/armbe/armv4b-unknown-linux
--exec=/usr/local/armbe/armv4b-unknown-linux --host=i386-linux --cache-file=arm.cache
then run
make
make install
the libaries will be copied to /usr/local/armbe/armv4b-unknown-linux
2.c now cross compile GTK+ (may not actually be necessary due to disables at the mozilla command line (i.e. only needed for X))
cd to your gtk src tree
edit configure :
line 23988...
if test ! -f $srcdir/gtk/stock-icons/gtkstockpixbufs.h &&
test "x$REBUILD_PNGS" = "x#" ; then
{ { echo "$as_me:$LINENO: error:
*** gtkstockpixbufs.h is not in the tree, and cannot be built
*** because you don't have libpng, or (when cross-compiling) you
*** don't have a prebuilt gdk-pixbuf-csource on the host system." >&5
echo "$as_me: error:
*** gtkstockpixbufs.h is not in the tree, and cannot be built
*** because you don't have libpng, or (when cross-compiling) you
*** don't have a prebuilt gdk-pixbuf-csource on the host system." >&2;}
# { (exit 1); exit 1; }; }
}
fi
export PKG_CONFIG_PATH=/usr/local/armbe/lib/pkgconfig
make clean
ac_cv_path_GDK_PIXBUF_CSOURCE=1
GDK_PIXBUF_CSOURCE=1
LDFLAGS="-L/usr/local/armbe/armv4b-unknown-linux/lib"
CC="armv4b-unknown-linux-gcc -mbig-endian" CXX="armv4b-unknown-linux-g++
-mbig-endian" LD=armv4b-unknown-linux-ld AS=armv4b-unknown-linux-as ./configure
--build=armv4b-unknown-linux --target=$/usr/local/armbe/armv4b-unknown-linux
--exec=/usr/local/armbe/armv4b-unknown-linux --host=i386-linux --without-libtiff
--without-libjpeg --without-libpng
make -i (installs ignoring any errors)
make install -i
2.d now cross compile mozilla
firstly your will need to replace the file /usr/local/armbe/armv4b-unknown-linux/lib/libiberty.so with this one which has been specially compiled for the ixp1200.
edit mozilla/xpcom/autoconf.mk change LIBIDL_LIB path
cd to the mozilla src tree at /opt/strongarm/mozilla
make clean
rm config.cache
export CC="armv4b-unknown-linux-gcc -mbig-endian -fPIC -I/usr/local/include/glib-2.0/
-I/usr/local/include/libIDL-2.0/ -I/usr/local/lib/glib-2.0/include/"
export CXX="armv4b-unknown-linux-g++ -mbig-endian -fPIC"
export CROSS_COMPILE=1
export LIBIDL_CONFIG=/usr/local/armbe/armv4b-unknown-linux/bin/libIDL-config-2
export HOST_LIBIDL_CONFIG=/usr/local/bin/libIDL-config-2
export CROSS_LIB_PATH=/usr/local/armbe/armv4b-unknown-linux/lib
export LD_LIBRARY_PATH=/usr/local/lib
./configure --target=armv4b-unknown-linux --prefix=/usr/local/armbe --enable-standalone-modules=xpcom
--enable-default-toolkit=gtk2 --with-x=no --disable-libIDL
test
make -i
________________________________
emacs octypes.h //comment out line 30
rm /opt/strongarm/mozilla/dist/bin/components/*.xpt
emacs MetaArchImpl.cpp coment out //*pcElems++;
2.e run the netkit test on strongarm
chmod -R 777 mozilla/
chmod -R 777 opt/strongarm/mozilla/dist/bin/components/
go to your minicom window...
export LD_LIBRARY_PATH=/nfs/strongarm/mozilla/xpcom/build:/nfs/strongarm/mozilla/nsprpub/lib/ds:/nfs/strongarm/mozilla/nsprpub/lib/libc/src:/nfs/strongarm/mozilla/nsprpub/pr/src/:/nfs/strongarm/mozilla/dist/lib
export MOZILLA_FIVE_HOME=/nfs/strongarm/mozilla/dist/bin
cd /nfs/strongarm/mozilla/xpcom/netkit
run ./nsTestOCM ----and hopefully it will work :-)
The cd to demos/occalculator
run ./nsTestCalculator
3. information on developing a opencom application
To run host_xpidl use LD_LIBRARY_PATH=/usr/local/lib ./host_xpidl
to recompile libnsOCM.so (already done for you above), get from gcc cvs to do it yourself.
armv4b-unknown-linux-g++ -mbig-endian -mapcs-32 -fPIC -fno-rtti -fno-exceptions
-Wall -Wconversion -Wpointer-arith -Wcast-align -Woverloaded-virtual -Wsynth
-Wno-ctor-dtor-privacy -Wno-long-long -DTRACING -g -fno-inline -fPIC -shared
-Wl,-h -Wl,libnsOCM.so -o libnsOCM.so Globals.o xpcom_debug.o Debug.o MetaIntfImpl.o
MetaArchImpl.o xpcom_ocm.o OCMImpl.o OCM_Module.o nsTestOCM.o -L../../dist/bin
-L/opt/strongarm/mozilla/dist/lib -lnspr4