Difference between revisions of "Elphel Software Kit for Ubuntu"

From ElphelWiki
Jump to: navigation, search
(How building latest version software for LiveCD(i.e FireFox))
(How building latest version software for LiveCD(i.e FireFox))
Line 106: Line 106:
 
   knoppix$ tar -xjf 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:
+
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 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''.
  
 
===Sources & packages===
 
===Sources & packages===

Revision as of 02:34, 22 November 2007

All Elphel cameras are packaged with a DVD what can be used as a Live DVD or installed on the disc. This DVD is kubuntu based GNU/Linux distribution with some additional softwares and preconfigured settings. This page describe the content of the DVD, how to use and customize it.

The idea is to bring to our customers a GNU/Linux distribution what whey can use with our cameras installing it on they computers or using it as LiveDVD. On the other side it provide more advanced users and developers with many tools to cros-compile, simulate FPGA code, reflash the camera etc..


DVD content:

Our DVD differ from standard kubuntu in several way:

  • it include all softwares needed by users of our cameras
  • we added some video editing & images processing softwares
  • it include softwares for software and hardware developers
  • some configuration file are modified to suit our needs
  • some OpenSource applications for Windows (R)

User software

For users we provide:

  • flashit icon on the desktop to reflash our cameras with the latest firmware
  • Firefox web browser with mplayer and genres plugin to provide live view of our cameras
  • LAMP based DVR to provide a simple way to record video and audio from our cameras

Video Applications:

  • mplayer
  • genres
  • VLC
  • gstreamer
  • cinerella
  • cinepaint
  • ImageMagick
  • gocr
  • mjpegtools
  • avifie-utils
  • ElphelSrv
  • DVR software

Elphel SDK

We provide our clients with a complete SDK to develop software, FPGA code and even to redesign the hardware.

IDE:

  • Eclipse IDE
  • VDT verilog plugin for Eclipse IDE

CAD:

  • Qcad
  • Varicad (demo)
  • Kicad

FPGA:

  • iverilog
  • GNURadio
  • GTKWave

Other:

  • dash shell is replaced with bash to comply with Axis SDK
  • LAMP preinstalled on the DVD
  • GNUeda
  • Gerbview

OpenSource applications for Windows (R)

If you insert our DVD into a windows computer you will be able to install opensource softwares to use with our camera:

  • Mozills FireFox
  • mplayer-win
  • VLC


Special configurations

  • ...
  • ...

How building latest version software 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 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. Booting from LiveCD

2. Mounting 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 connect him to do so to comply 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 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 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.

Sources & packages

Here is the list of additional debian/ubuntu packages and sources used on our DVD:

AXIS SDK http://www.axis.com/ftp/pub/axis/tools/cris/compiler-kit/cris-dist_1.64-1_i386.deb http://www.axis.com/ftp/pub/axis/dev/soft_dist/R2_10/devboard-R2_10.tar.gz

Elphel's VDT plugin for Eclipse http://sourceforge.net/project/showfiles.php?group_id=105686&package_id=184538

Another Verilog & VHDL editor for Eclipse http://sourceforge.net/project/showfiles.php?group_id=103963

Icarus Verilog ftp://ftp.icarus.com/pub/eda/verilog/snapshots/verilog-20070608.tar.gz

GTKWave http://home.nc.rr.com/gtkwave/gtkwave-3.0.29.tar.gz

MPlayer (patched) http://dfn.dl.sourceforge.net/sourceforge/elphel/mplayer_1.0pre7-elphel-2_i386.deb

LIVES ftp://ftp-mirror.internap.com/pub/www.getdeb.net/li/lives_0.9.8.5-1~getdeb1_i386.deb

Kicad http://iut-tice.ujf-grenoble.fr/cao/kicad-2007-05-25.tgz

Remastering the DVD:

Our distribution is based on Kubuntu GNU/Linux. You can remaster it from Live session with an external hard-drive or after installing our base distribution on your computer. Here i suppose what it's installed and you have sufficient space (~6 GO).

So here is the modification process:


prepare the environment:

sudo su
cd
mount /media/cdrom
mkdir remaster-root remaster-iso  remaster-new-files tmp
cp -R /media/cdrom/* remaster-iso
mount -t squashfs -o loop,ro remaster-iso/casper/filesystem.squashfs tmp
cp -R tmp/* remaster-root
umount tmp
rmdir tmp

modify the distribution:

mount --bind /proc remaster-root/proc
mount --bind /sys remaster-root/sys
mount --bind /dev remaster-root/dev
chroot remaster-root
#install your softwares, remove unneeded softwares modify configuration files, ...
apt-get remove nano
apt-get install vim
apt-get clean
exit
umount remaster-root/dev
umount remaster-root/sys
umount remaster-root/proc

rebuild the DVD:

chroot . dpkg-query -W --showformat='${Package} ${Version}\n' > ../remaster-iso/casper/filesystem.manifest
chroot . dpkg-query -W --showformat='${Package} ${Version}\n' > ../remaster-iso/casper/filesystem.manifest-desktop
mksquashfs .  ../remaster-iso/casper/filesystem.squashfs
cd ../remaster-iso
find . -type f -print0 |xargs -0 md5sum |sudo tee md5sum.txt
mkisofs -o ../remaster-new-files/Elphel-Software-Kit.iso -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -r -V "Elphel Software Kit" -cache-inodes -J -l .


What's all :) you have a new DVD image in /root/remaster-new-files/Elphel-Software-Kit.iso


links:

- ubuntu

- opencores

- openhardware.de

- Olimex hardware can be added to Elphel 353

- Electronics under Ubuntu