On Mon, Aug 9, 2010 at 8:17 AM, ali hagigat hagigatali@gmail.com wrote:
I want to know how coreboot.rom, means the final product is built. What rule makes it and where is it? How its format is CBFS while this format seems unknown for GNC tool chain like gcc?
The short answer is that you should check src/arch/i386/Makefile.*http://tracker.coreboot.org/trac/coreboot/browser#trunk/src/arch/i386to see how the various Coreboot-related targets are built. Many modules must be built separately, sometimes with different compilers (e.g. ASL) and with different rules, and then formed into a single image at the end. This can appear ugly at first (especially when you dive into the Makefiles), but in fact it's a relatively elegant solution for the nature of Coreboot.
You are correct that the final coreboot.rom file is not a normal executable. It is more akin to an archive -- CBFS is essentially a simple archive format.
Coreboot currently uses the Linux kernel build system. If you are truly interested in this subject, I recommend reading the Linux kernel build system documentation: http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;f=Do... . If you have lots of patience (or hair to pull), I suggest adapting the Kernel build system to configure and build a "hello world" program ;-)
There are several steps and if you are not already intimately familiar with GNU Make and the Linux kernel build system then this is not a good place to start. I do not mean to sound rude, but the Linux and Coreboot build systems are much more complicated than a make or gcc commands you may be familiar with from small projects.