Howto build firefox on Knoppix

From ElphelWiki
Jump to: navigation, search

How to build latest software version for LiveCD(i.e FireFox)

To compile Firefox for a specific version of Knoppix requires a system with fixed versions the system libraries, utilities, etc. then identical versions used in LiveCD / DVD Knoppix. Another option is to boot from a LiveCD and compile the required packages. Booting from LiveCD, you can directly on the free hardware, or using Virtual Machine. The first option is unacceptable if it will be used to compile computer, restart which is not desirable and disconnection. In this case, you may use the virtual machine. Alternatively, perhaps using VMware Workstation for virtual machines (see http://vmware.com). In addition to the LiveCD version of the steps in setting up the same environment. Basic requirements and documentation for the compilation FireFox http://www.mozilla.org/build/ located on the site. When downloading from LiveCD need to create the swapfile, tons by the compiler uses intensively pyamyat and exhaustion free memory lead to the computer freezes. Let's start

1. Boot from LiveCD

2. Mount physical partition on the hard drive (virtual or real). Here, and as an example to be used hda1:

  knoppix$ su
  knoppix# mount /dev/hda1 /mnt/hda1

3. Create swapfile and configure it with the following commands:

  knoppix# cd /mnt/hda1
  knoppix# dd if=/dev/zero of=swapfile bs=1024 count=1024M
  knoppix# mkswap swapfile
  knoppix# swapon swapfile

Swapfile size is determined by the availability of free physical memory. For example, when downloading the LiveCD Knoppix in a virtual machine - physical limited to 160 MB of memory and built swapfile size 1 GB

4.Load distribution (source code) Firefox, untar it on mounted a physical partition:

  knoppix$ cd /mnt/hda1
  knoppix$ mkdir work
  knoppix$ cd work
  knoppix$ wget ftp://ftp.mozilla.org/pub/mozilla.org/firefox/releases/2.0.0.9/source/firefox-2.0.0.9-source.tar.bz2
  knoppix$ tar -xjf firefox-2.0.0.9-source.tar.bz2

5. Now configure and compile a package. Default packages are compiled on the /usr/local. If you want a different location after compiling the binaries - use option --prefix. For example, the generation Firefox Makefile to build the facilities and binary files in a tree /opt performed as follows:

  knoppix$ cd mozilla
  knoppix$ ./configure --prefix=/opt --enable-application=browser
  knoppix$ make
  knoppix$ sudo make install

6. After compiling and installing the compiled package (in our example, it installed in /opt) remain the only archive directory tree compiled package (/opt/firefox2.0.0.9) and received an archive of binary files used to build our LiveCD:

  knoppix$ tar -czf firefox.tgz /opt/firefox2.0.0.9

The resulting archive (if we used a virtual machine) on the ftp put to host or , if booted directly with LiveCD, rebooting in the working operating system and hunted with his /dev/hda1/work.