building a kernel (with a twist)

Hey all,

I am working on a static analysis tool and I wan't to see if it can find bugs in the linux kernel, it uses LLVM framework to analyse the instructions.

Long story short I need to build the kernel with a custom compiler. The compiler will create byte code files where binaries usually are (as well as the binaries), if I could have a single folder full of all the byte codes files that would be awesome.

I am running ubuntu 8 on a virtual box, I am a little stuck as to how I proceed.

So far I have gotten the kernel source code but I need to know how to build it. Usually I point CC and CXX env variables at the custom compiler when I am testing apps and run the configure and Makefile scripts.

If anyone has a link as to how to get started or can give me some advise that would be great. Cheers,

~ Dan

FYI - naturally if I find any bugs I will report them, all found bugs will be manually verified :slight_smile:

Usually it's

$ make <config | menuconfig | xconfig >
$ make
$ make modules
$ make modules_install

The compiler is hardcoded in the Makefile, so you'll probably have to edit that to point to your custom one.

Thanks mate,

I think this has worked its building now. Cheers