17 Jun 2007

Using Eclipse for GRUB 2 development


As I have been using Eclipse for some time now I decided to give forthcoming Eclipse Europa release a try. Eclipse Europa is still in release candidate state (rc4) but it should be stable enough to be used. Final release of Europa should be within this month.

I am currently using Ubuntu 7.04 for my GRUB 2 development activities so I needed to download GTK+ version of the Europa SDK. I also like to use Sun's Java so I also installed several sun-java6 packages from Ubuntu's package manager. After this, rest was quite easy. Extracted Europa SDK under /opt and gave access rights to my normal user to that directory so I could install additional plug-ins.

After starting up Eclipse I installed CDT 4.0 (C/C++ Development Tools) from Europa repository. All went nicely without an issue. I noticed that they finally added this automatic mirror selection functionality to Eclipse! I have been waiting for this feature for a looooong time.

Setting up a GRUB project was quite easy. First I downloaded up to date version from grub's developer ssh. Then I copied it to under my workspace and created a C project for it. While configuring C project, I noticed that Linux version of the Eclipse doesn't have managed build support at all. Well for this project it is not issue, but would be nice addition in future. I don't really like to play with makefiles or such, sometimes they are necessary evil. After running configure for grub2 all was ready from source for development activities. From Eclipse side, first I configured project settings (seems that they have changed how CDT's preferences looks) and added grub2's include directory to include search path. Then I added make target for building 'all'. I noticed that CVS team synchronization worked out of the box as .cvs folders was present. Tried up team synchronization, needed to add couple of folders and files to ignore to make list of files clean. All seems to be OK, so I tries to build all target. Surprisingly everything seems to work nicely. I event got warnings and errors list populated correctly. Now that those GRUB2's build files would reside on own directory......

No comments: