Thursday, November 22, 2012

building linux kernel outside of source tree

This articles tells you about building the linux kernel outside the linux kernel source directory. Since if we build linux kernel from root directory of the kernel source code, compiled build  and header files are generated in the linux source tree itself. To remain linux kernel source code intact of auto generated files, we are expected to build it outside the tree. It is not very difficult to build it outside the tree. You just have to provide only one flag,
                            O=< obsolute_path_of_the_build_directory >
Here obsolute_path_of_the_build_directory  is the path of directory where you want the all the build and auto generated files. Most of the people forget to provide "O=" flag while generating the .config file. But that is the serious error and you are expected to provide it while building .config file with utilities such as menuconfig, gconfig, xconfig.

So here is a detailed process,

suppose my linux source tree  is in directory /home/rahul/linux_2.32.9
and I want to build kernel in directory /home/rahul/build, then

1> first  $cd /home/rahul/linux_2.32.9

2> /home/rahul/linux_2.32.9$ make O=/home/rahul/build menuconfig

3> /home/rahul/linux_2.32.9$ make O=/home/rahul/build

4> /home/rahul/linux_2.32.9$ make O=/home/rahul/build modules_install

5> /home/rahul/linux_2.32.9$ make O=/home/rahul/build menuconfig install

And as I think you have installed new kernel as of now. Enjoy.

Monday, August 13, 2012

Similarities between lover and developer.

Whike working as  a developer for almost 2 years I have found following facts, after reading you too may feel I am right , you just need to have loved someone !!!

1> You have to give them time and space.
2> You will have to spend something on them so they give you back what you want.
3> Do not talk with them in anger they may get heavy on you.
4> Its hard to get replacement. You cant forget them, cant forget time spent with them.

Developer is a lover, making them unHappy you wont get anything.

Friday, July 27, 2012

Postgresql: create first user and first database createdb createuser

Here I have explained how to create first database and first user for postgresql database. If you are reading article then am sure that you are newbie with postgresql.

As we need some user to create database we will create user first

1> Creating user

To create user we must login to some existing user. The existing user is postgres.
As postgres doesnt have password we must login using root.

so first login in shell as root.

domnique@domniquepc:~$sudo  su

Then from root, login into postgres

root@domniquepc:~#sudo - postgres

now Create  new user here using command createuser,

postgres@domniquepc:~$ createuser domnique


You will be asked if you are a superuser, in my case I had said yes, as I was the only one to access this computer. Do not know other options

2> Create Database

After creating new user it is much simple to create new database, I had used following command which  will set me as a owner of database

domnique@domniquepc:~$ createdb  mingle

Once you create the fist user, then using this user later you could create many databases and new users.