Popular Posts

Thursday, August 21, 2008

GNU/Linux from eight miles high

This an excellent article released recently by embedded.com:

http://www.embedded.com/design/opensource/208404045?pgno=1

The article is a bit advanced. But anyone with good understanding of computer architecture should be able to go through it!

Friday, August 1, 2008

GUC Students' Blogs

Here are some blogs by students of the GUC. Currently they are all in Germany for their bachelor projects. I am really proud that I had a chance to work with such amazing and wonderful people! Enjoy:

http://husfahmy.blogspot.com/
http://thoughtsandtips.blogspot.com/
http://lewjee.blogspot.com/

Sunday, July 6, 2008

Add Circular Scrolling (and more!) to your laptop touchpad

From the Chinese Linux University!

http://www.chineselinuxuniversity.net/articles/13049.shtml

Add to /etc/X11/xorg.conf (or whatever your xorg.conf is at)

Section "InputDevice"
Identifier "Synaptics Touchpad"
Driver "synaptics"
Option "SendCoreEvents" "true"
Option "Device" "/dev/psaux"
Option "Protocol" "auto-dev"
Option "CircularScrolling" "on"
Option "CircScrollTrigger" "3"
EndSection

Be sure to have Synaptics added to the Server Layout

Section "ServerLayout"
Identifier "Default Layout"
Screen "Default Screen"
InputDevice "Generic Keyboard"
InputDevice "Configured Mouse"
InputDevice "Synaptics Touchpad"
EndSection

Tuesday, July 1, 2008

Dealing with Debian source packages

I found this interesting post, quoting:

apt-get build-dep glibc
apt-get source -b glibc

should work

or, if you already have the build-dependencies and source files
downloaded (.orig.tar.gz, .diff.gz, and .dsc):

dpkg-source -x glibc*.dsc
cd glibc-*
make -f debian/rules build

randolph
--
Randolph Chung
Debian GNU/Linux Developer, hppa/ia64 ports
http://www.tausq.org/
The dpkg-source utility is found in dpkg-dev package.

Sunday, June 29, 2008

Compiling over NFS

Ever needed to compile over exported NFS system in Linux. I needed it to compile some programs on my PC using a compiler in a virtual box ;-)

On the NFS server

add the following line to /etc/exports (Debian/Ubuntu systems)

/path/to/exported/directory *(rw,no_subtree_check,insecure,no_root_squash)



On the client machine (the one that will compile)

add the following line to /etc/fstab

10.0.2.2:/path/to/exported/directory /path/to/mnt/point nfs user,rw,exec 0 0


Note: replace 10.0.2.2 with the server IP or hostname

Warning: this setup is TOTALLY INSECURE!!

but who cares ;-)

Tuesday, June 17, 2008

What is linux-gate.so.1?

Check this excellent article by Johan Petersson. Be sure to equip yourself with good knowledge about ABIs before reading!!

http://www.trilithium.com/johan/2005/08/linux-gate/

Thursday, June 12, 2008

BUG! -- the Biomedical Unix Geeks club

Biomedical Engineering make extensive use of software. Signal processing algorithms and other aspects of the biomedical engineering needs extensive study of computer science and software engineering. Unix platform is of special importance in the medical field due to its stability and ubiquity.
This club is for all biomedical engineers who love Unix, Software Engineering and Computer Science.

IMHO, Unix provides the best environment for the study of algorithms and computer science. The Unix tools and development also implements important point of the software engineering. Hence, came the idea of this club.

Please share your ideas with me on how this should go!

Sunday, May 18, 2008

Thursday, April 17, 2008

Name Mangling

Did you ever hear about Name Mangling? I didn't myself! But it is important to take a look at :)

Sunday, April 13, 2008

Cross Compiling the hard way...

This tutorial contains many hints about cross compiling. You'll never need to understand all this stuff, but it is worth reading anyway! In practice, cross compilers are already built and you'll just use them!
http://www.landley.net/ols/ols2007/tutorial.txt

Predefined Macros in gcc

From the gcc man page:

-dCHARS
CHARS is a sequence of one or more of the following characters, and must not be preceded by a space. Other characters are interpreted by the compiler proper, or reserved for future versions of GCC, and so are silently ignored. If you specify characters whose behavior conflicts, the result is undefined.

M Instead of the normal output, generate a list of #define directives for all the macros defined during the execution of the preprocessor, including predefined macros. This gives you a way of finding out what is predefined in your version of the preprocessor. Assuming you have no file foo.h, the command



touch foo.h; cpp -dM foo.h



will show all the predefined macros.

Compiling 32-bit Applications on 64-bit Linux Hosts

You need to install the gcc-mutlilib package. Then:
$ gcc -o hello -m32 hello.c

the -m32 flag tells the compiler to target the 32-bit architecture instead of the 64-bit architecture

Also, you may need to take a look at this looooooong discussion:
http://ubuntuforums.org/showthread.php?t=24575

For kernel compiling, you will need to explicitly specify the architecture:

$ make ARCH=i386 menuconfig

$ make ARCH=i386 bzImage

Happy compiling :)

*** Returning to this issue with Makefiles

just run:

$make CFLAGS=-m32 LDFLAGS=-m32

this adds the -m32 option to both the compiler flags and the linker flags