lundi 12 avril 2010

How to manage extra packages on gnu/linux when you do not have access to the system package manager.

Tipicall situations are :
- simple user of a gnu/linux desktop at work wanting to install extra packages,
- administrator wanting to install software unavailable in a particular distribution,
- administrator wanting to test a particular package outside from the main installation,

This method should work on any distribution, provided that you have access to a recent compiler on the machine and can freely download source packages.


1) Installing binary

a) stand-alone binaries
Some softwares for GNU/Linux are provided as generic binary, in particular some non-free softwares like skype are provided as an executable binary that will directly work on any distribution (just have to decompress the static-linked precompiled version).

b) distribution packages
In the case of RPMs or DEBs based distributions, you can manually download the needed package and install it in a separated tree (the /tmp/local or a ~/local directory).
To help getting right all dependences of allready installed packages, the system package data-base can be copied to another alternative place and new packages be installed with relocation options. Alternately you can simply extract the archive.

To extract file.rpm : rpm2cpio file.rpm | cpio -i
To extract file.deb : dpkg -x file.deb


rpm options: --dbpath DBPATH --prefix PATH
apt-get/dpkg options: ????
See the man pages for more details.

You probalbly will have to resolve dependences by hand, i.e.: have to recursivelly install all depending missing packages first).


2) Installing from sources

This allows also working with developpement versions of softwares/packages, under revision control (git,mercurial,svn,etc.)

First create the following directory structure :
~/local/apps
~/local/var/ports/{distfiles,build}

Install stow ! (not explained yet)

Example installing emacs 23.1 :
cd ~/local/var/ports/distfiles
wget http://gnu.c3sl.ufpr.br/ftp/emacs/emacs-23.1.tar.bz2
cd ../build
tar xjvf ../distfiles emacs-23.1.tar.bz2
cd emacs-23.1
less README
less INSTALL
./configure --help | less
export CFLAGS="-O3 -march=native"
./configure --prefix=$HOME/local/apps/emacs --with-gif=no --with-tiff=no
make && make install
cd ~/local/apps
stow emacs

making a binary package from it :


TO BE CONTINUED ... (or not)

mercredi 1 octobre 2008

Quick comparison of embeeded Processors on FPGA

PowerPC 440 (Xilinx)
7-stage pipeline
http://www.xilinx.com/products/silicon_solutions/fpgas/virtex/virtex5/capabilities/PowerPC_440.htm

1,100 DMIPS @ 550MHz (2.0 DMIPS/MHz)


PowerPC 405
5-stage

700 DMIPS @ 450MHz (1.55 DMIPS/MHz)



Altera NIOS II (f)

6-stage pipeline,

Stratix III/IV
upto 340 MIPS @290MHz, 1020 ALUTs (1.183 MIPS/MHz)

Cyclone III
upto 195 MIPS @175MHz, 1800 LEs (1.109 MIPS/MHz)


Xilinx Microblaze
5-stages, 1.19 DMIPS/MHz
http://www.xilinx.com/products/design_resources/proc_central/microblaze_per.htm

Virtex-5
280 DMIPS @235 MHz, 1,027 LUTs (no MMU)

Spartan-3
125 DMIPS @105 MHz, 1,809 LUTs


Lattice Mico32


Through the Designware license, designers can port Nios-based designs from an FPGA-platform to a mass production ASIC-device

mercredi 24 septembre 2008

Tunneling ssh to run remote application

Tunnel VNC

ssh -N -f {user}@{router-ip} -L 5901:{domain-ip}:5900
vncviewer localhost:1

to use with web browser

ssh -N -f {user}@{router-ip} -L 5801:{domain-ip}:5800
vncviewer localhost:1

Tunnel HTTP

ssh -N -f {user}@{router-ip} -L 8080:{domain-ip}:80
http://localhost:8080

it also works for remote gforge access through svn
svn checkout http://localhost:8080/svn/{project}

mercredi 7 mai 2008

un Nico dans une boite !

tester le !
http://www.thepocketgeek.com

samedi 3 mai 2008

Nico le maitre du bowling !

Je dégomme les quilles que je veux :)

lundi 28 avril 2008

Magic the Gathering (multiplatform)

Just a link for those wanting to play MtG online on linux or mac :
http://mindless.sourceforge.net/

It is said to be compatible with apprentice.

For non rpm based distribution, you can either build it from the source or use alien to convert the rpm file to your distribution package system

under debian or ubuntu

sudo apt-get install alien
wget downloads.sourceforge.net/mindless/mindless-1.6-1.i386.rpm
sudo alien --to-deb mindless-1.6-1.i386.rpm
sudo dpkg -i mindless-1.6-1.i386.deb

The card data base will also be needed, they are not released with the program.

here is a link http://www.magic-league.com/download/10th%20patch.zip

vendredi 18 janvier 2008

bbg33k|^{bb}

to be geek or not to be,
just a photo of me at work with some of my anti-stress

vendredi 10 août 2007

mplayer -> VLC ?

I have decided to use VLC instead of mplayer/mencoder for one single reason : VLC supports MPEG-2 TS muxing (through the libdvbpsi) while mencoder do not.

Of course it may be possible to use this lib with mplayer too, but I don't want loosing my time to hack it ...

update 17/08/2007
Mmm, it seems that it is supported in ffmpeg (and so mencoder) too but it is not documented.
The output format name option is "mpegts".
Alternatively there is apparently the Avidemux software that can do the muxing job.
I cannot test right now ... So it's a note for later ...

mardi 7 août 2007

minitutorial : video.yuv -> video.yuv.avi

Well just a small tutorial note for people working with me on video coding ...

to obtain a yuv video from any video source that mplayer can read, execute:
mplayer file.ext -ao null -vo yuv4mpeg -o file.yuv
and to pack a yuv video file into an avi container use:
mencoder file.yuv -ovc copy -o file.yuv.avi
to keep the sound in the uncompressed avi you can do:
mplayer file.ext -ao pcm -vo yuv4mpeg
mencoder stream.yuv -audiofile audiodump.wav -ovc copy -o file.yuvpcm.avi

the two actions can be done in one single command like this:
mencoder file.ext -ovc raw -nosound -of avi -o file.raw.avi
or
mencoder file.ext -ovc raw -oac pcm -of avi -o file.raw.avi

mardi 31 juillet 2007

gcc -a

in man pages of gcc 3

       -a  Generate extra code to write profile information for
basic blocks, which will record the number of times
each basic block is executed, the basic block start
address, and the function name containing the basic
block. If -g is used, the line number and filename of
the start of the basic block will also be recorded.
If not overridden by the machine description, the
default action is to append to the text file bb.out.

This data could be analyzed by a program like "tcov".
Note, however, that the format of the data is not what
"tcov" expects. Eventually GNU "gprof" should be
extended to process this data.

This option was remove from gcc4 !
In http://gcc.gnu.org/gcc-4.1/changes.html

Transition of basic block profiling to tree level implementation has been completed. The new implementation should be considerably more reliable (hopefully avoiding profile mismatch errors when using -fprofile-use or -fbranch-probabilities) and can be used to drive higher level optimizations, such as inlining.

The -ftree-based-profiling command line option was removed and -fprofile-use now implies disabling old RTL level loop optimizer (-fno-loop-optimize). Speculative prefetching optimization (originally enabled by -fspeculative-prefetching) was removed.

What is tree level implementation ?
mmmh I'm thinking about installing gcc-3.4
... done
Warg it's the same.

There is also the thread:
http://www.cygwin.com/ml/binutils/2007-05/msg00345.html
and
http://gcc.gnu.org/ml/gcc/2001-08/msg01385.html

So I have to use gcov !