hi friends,
I have started reading on porting Linux on the ARM. I have a question. we can compile the simple project on the keil for ARM. can I compile the source code of linux(modified for that ARM) on keil???
thanks in advance.
If I am not mistaken, the linux build system is heavily dependent on gcc/binutils features. You'd have to do a lot of porting in order to build it with RealView tools.
Ok, thanks for your quick answer, but I dont want to use open source build tools. I simply want to download the linux source + the source of the library that it needs (newlib etc). Then I make a simple project of these two source in Keil and compile it. Will it not work? If not why? We can ignore the driver and other features of the kernel, consider only the kernel.
Thanks in advance.
I simply want to download the linux source + the source of the library that it needs (newlib etc). Then I make a simple project of these two source in Keil and compile it.
No, you cannot do that. Let's start with the fact that uVision lacks the functionality that's necessary to build a linux kernel.
If not why?
I told you why in my previous post, but apparently you ignored my answer. Again: the linux build system is heavily dependent on gcc/binutils/make. None of those programs are shipped by Keil. That's why.
Ok, Thanks a lot for your answer. I think I need to dig a lot more in to it.
Note that you can't ignore the drivers, since the drivers basically "are" the kernel. It's just a build flag for most drivers if they should be compiled into the kernel or compiled into modules that are loaded by the kernel.
Please look at the makefiles for the Linux kernel, and you would quickly notice that lots of configurations, Makefiles etc are generated before the actual kernel is built. That is not something that happens by the compiler so just having a compiler will not be enough to build the Linux kernel.
Next thing is that the standard ARM compiler supplied with Keil uVision is a compiler targeted at embedded processors. Most without any support for virtual memory, page protection etc. So the normal uVision license may not even be the correct license for targeting your intended processor.
Ok, thanks for your quick answer, but I dont want to use open source build tools.
Why the heck not, since you're already planning to use open source kernel source?
Then I make a simple project of these two source in Keil and compile it.
You have no idea how utterly far over your head you are with that plan. The Linux kernel is about the most un-simple project you could possibly deal with. Nobody in their right mind uses IDEs to build projects of the scale the Linux kernel is.
And that's before we consider that Linux is explicitly written to be build with GCC, in several places. There's simply no way Realview will compile that.
In a word: forget it.
By the way, Intel's compiler can build a linux kernel:
www.linuxjournal.com/.../linuxdna-supercharges-linux-intel-cc-compiler
As far as I understand, Intel implemented many GCC's features in order to make it possible. Of course, RealView developers never intended to do that.
ARM's C compiler already understands many GNUisms. I think the linker even supports gld-scripts to some degree. Translating the gas syntax is perhaps one of the remaining issues.
The question is whether being able to compile a Linux kernel with any compiler really makes a lot of sense. The numbers in the link you posted came without any context. Although I am not a Linux kernel expert, I am sure that most performance critical code paths have been implemented in architecture specific optimized ASM routines. The "40%" might have been achieved in a rarely used code path that nobody found worth optimizing.
Cheers, Marcus http://www.doulos.com/arm/