| Home | Projects | News | Japanese Site | FAQs |
|
PS2 Hardware in Linux HOWTOs - Docs
Summary | Forums | Bugs | Tasks | Docs | News | View Documentation | Submit new documentation Cross-compiling Mozilla mini HOWTO
Mozilla for PlayStation 2 Cross Compiling Mini-HOWTO 1.0by Paul A. Pietromonaco ppietro@users.playstation2-linux.comCreated: February 16, 2003Last edited: March 16, 2003OVERVIEW: There are occasions when you may not want to compile Mozilla on your PlayStation 2 - especially because of the large size of the source tree (14,000+ source files!), or because your PlayStation 2 is not available (i.e. you want to finish your game!) This Mini-HOWTO will show you how to set up a cross compilation environment to allow you to build Mozilla for the PlayStation 2 in a Red Hat 8.0 Intel environment. BEFORE YOU BEGIN: You will need to have your PlayStation 2 Linux disc 2 available, and a DVD ROM drive on your computer. If you don't have a DVD ROM drive available, you will have to start NFSD on your PlayStation 2 and export disc 2. (Don't worry - I'll explain this when we get there.) This means that you will have to have a network connection between your PlayStation 2 and your Linux box. INSTRUCTIONS: The first thing to do is decide on the location of the cross compilation environment on your Linux box. I used the directory /usr/mipsEEel-linux for this walkthrough. I strongly urge you to follow this as well - there are some scripts that depend on this structure. Regardless if you follow my advice or not, it's important to decide the location early - it has to stay consistent during this whole process! Then, follow these steps:
At this point, your cross compiler should be working. You can try building Mozilla if you'd like. If you've never built Mozilla before, there are instructions at their web page: http://www.mozilla.org/build/ Don't forget! You will need to make sure /usr/mipsEEel-linux/bin is in your path before you do any cross compiling!!! (export PATH=$PATH:/usr/mipsEEel-linux/bin) You will also have to pass some extra compiler directives to cross compile. The easiest way is by using .mozconfig. .mozconfig is a simple script file that is placed in your home directory. (i.e. ~/.mozconfig) Here's an example .mozconfig that I've used: # sh # Build configuration script # # See http://www.mozilla.org/build/unix.html for build instructions. # CROSS_COMPILE=1 GLIB_CONFIG=/usr/mipsEEel-linux/mipsEEel-linux/usr/bin/glib-config GTK_CONFIG=/usr/mipsEEel-linux/mipsEEel-linux/usr/bin/gtk-config LIBIDL_CONFIG=/usr/mipsEEel-linux/mipsEEel-linux/usr/bin/libIDL-config HOST_LIBIDL_CONFIG=/usr/bin/libIDL-config LIBS=-lc ac_add_options --prefix=/usr/mipsEEel-linux ac_add_options --target=mipsEEel-linux ac_add_options --x-includes=/usr/mipsEEel-linux/mipsEEel-linux/usr/X11R6/include ac_add_options --x-libraries=/usr/mipsEEel-linux/mipsEEel-linux/usr/X11R6/lib # Options for 'configure' (same as command-line options). # all are listed so that one can manually tweak this config file. #ac_add_options --enable-mathml #ac_add_options --enable-svg #ac_add_options --enable-extensions #ac_add_options --enable-crypto #ac_add_options --enable-logrefcnt #ac_add_options --without-system-nspr #ac_add_options --without-system-zlib #ac_add_options --without-system-jpeg #ac_add_options --without-system-png #ac_add_options --without-system-mng # Paul's options ac_add_options --disable-tests ac_add_options --disable-debug ac_add_options --enable-optimize ac_add_options --without-system-nspr ac_add_options --without-system-zlib ac_add_options --without-system-jpeg ac_add_options --without-system-png ac_add_options --without-system-mng #ac_add_options --enable-crypto #comment to disable PSM/SSL support ac_add_options --disable-freetype2 THANKS: Much of this material was adapted from Christopher Seawood's Cross Compiling Mozilla page. Also, Tyler Daniel's ps2stuff page was invaluable in getting this to work. I'm deeply indebted to both of these authors. APPENDIX: Using NFS on your PlayStation 2 to allow your PC to access Disc 2 of PlayStation 2 Linux
You will need to network the two boxes together. Each box should have a unique IP address. For the purpose of this example, we will use 10.0.0.1 for the PlayStation 2 and 10.0.0.2 for the Red Hat box.
Sharing the disc from your PlayStation 2: Connecting your RedHat box to the PlayStation 2: Now, you should be able to follow the steps above, substituting /mnt/ps2 for /mnt/cdrom. Example rpm2cpio /mnt/cdrom/SRPMS/binutils-2.9EE-3a.src.rpm | cpio -ivd becomes rpm2cpio /mnt/ps2/SRPMS/binutils-2.9EE-3a.src.rpm | cpio -ivd When you're done, you'll need to basically perform the reverse of the steps outlined above:
Disconnect the share on the PC: Stop NFS on the PlayStation 2: |