Thursday, October 25, 2007

UML on linux 2.4 kernel

Finally i was able to compile a 2.4 uml kernel on a 2.4 machine ( but it wasnt as easy as it sounds ). Picking up the right kernel version was a tough nut to crack . I had no earlier info on right gcc/kernel combination plays an important role while compling the kernel. Older gcc for older kernels would work fine but fail on newer kernels and vice versa. I always thought gcc was backward compatible , the code that compiled on older version of gcc wud still work on newer gcc.

I was on gcc 3.3 trying to build a 2.4.17 kernel with uml-patch-2.4.17.x which would compile fine but would fail eventually when trying to link the linux binary. After lot of trying, testing and reading at forums i finally landed on 2.4.24 kernel with uml-patch-2.4.24.1 which seemed to be the right combination and would complile flawlessly on gcc 3.3 , glibc-2.3.2-95.50 , binutils-2.14.90.0.4-42 i had on my CentOS 3 box . But If you really want to build an older kernel like 2.4.17 make sure your using gcc 2.9 or something older , i learnt that the hard way.

So everything worked well at the end , even the CentOS apm problem i was facing got resolved after tweaking a few things in the bios.


Wednesday, October 24, 2007

Compiling kernel 2.4 on 2.6

Not sure if its even possible to compile a 2.4 kernel on a 2.6 machine , but i still gave it a try on a my fedora 7 box. I tried to build a 2.4 kernel for ARCH=um but it failed almost all the time no matter how many different kernels and corresponding uml-patches i picked up.

My sole aim while doing all this was to check some specific functionalities 2.4 kernel offered , so i had no other choice but to setup a linux box with a native 2.4.x . Now all this boils down to finding an OS that still offered a 2.4 kernel & after a lot of searching online i picked up CentOS 3 which comes with 2.4.21.

CentOS came with its own set of problems and the worst being the apm or the advanced power management. Now i had newer problems to face , my new CentOS box will come to a standby/suspend mode after a definate period of inactivity. I tried uninstalling apmd , turned it off with chkconfig , disabled in the bios , even passed the apm=off to the boot loader , still nothing has changed.

Now I'm stuck with problems ive never thought of dealing with .

Tuesday, October 09, 2007

MPEG Standards

Whenever we're listening to music on the ipod or playing an audio cd or watching a movie on DVD we are making use of MPEG standards. The Motion Picture Experts Group or MPEG is responsible for the development of standards for Audio/Video Playback & Compression ( encoding ) . There are four such standards that MPEG has released so far namely MPEG1 , MPEG2 , MPEG4 and MPEG7.

MPEG1 (1992) ; Supports both Video and Audio, Video bitrates upto 1.5Mbps , 2 Channel Audio ( Stereo / Mono ) with sample rates 32,44,48 kHz.

MPEG2 (1994); Supports higher sampling rates up to 96khz and low bitrates , multi channel audio ( 5.1 surround sound , 5 audio channels and one channel for the woofer ). DVD’S , AAC ( Advanced Audio Coding ) are based on this standard.

MPEG Layers are supported by both MPEG2 and MPEG1 , each layer supports the features of the layers below. Higher layer provides better quality at higher bitrates.

MPEG Layer 1 ; relatively old standard designed for Digital Compact Discs.

MPEG Layer 2 or MP2 widely used within the broadcasting industry , offers high quality audio at higher bitrates.

MPEG Layer 3 or MP3 , decent ( not so bad ) audio quality at lower bitrates, this format has improved over the years. VBR and CBR are two such ways to handle bitrates improving the performance of the resulting audio.

MPEG4 (1998) ; This standard goes beyond the earlier two standards, it makes use of both MPEG1, MPEG2 standards and while adding a lot of newer features. MPEG4 is more of a audio/video encoding standard aimed for the future; providing support for a wide range of video/audio applications ( i.e web streaming , videophones , digital broadcasting ) with different bandwidth & performance requirements.

This standard is divided into parts , most notable being the

MPEG-4 Part 2 used by codecs like divX , Xvid , Quicktime 6

MPEG-4 Part 10 for next gen formats like HD-DVD and blu-ray

This standard is continuously improving

MPEG7 (2001) ; also called Multimedia Content Description Interface provides framework for managing audio data supported by past standards.