<div class="gmail_quote">On Mon, Aug 9, 2010 at 8:17 AM, ali hagigat <span dir="ltr"><<a href="mailto:hagigatali@gmail.com" target="_blank">hagigatali@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


I want to know how coreboot.rom,  means the final product is built. <br>What rule makes it and where is it? How its format is CBFS while this format seems unknown for GNC tool chain like gcc?</blockquote><div><br></div><div>


<div>The short answer is that you should check <a href="http://tracker.coreboot.org/trac/coreboot/browser#trunk/src/arch/i386">src/arch/i386/Makefile.*</a> to 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.</div>

<div><br></div><div>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.</div>
</div><div><br></div><div>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: <a href="http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;f=Documentation/kbuild/makefiles.txt;h=c375313cb12882a956364664b22a927bc96b936e;hb=HEAD" target="_blank">http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;f=Documentation/kbuild/makefiles.txt;h=c375313cb12882a956364664b22a927bc96b936e;hb=HEAD</a> . 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 ;-)</div>


<div><br></div><div>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.</div>


<div><br></div></div>-- <br>David Hendricks (dhendrix)<br>Systems Software Engineer, Google Inc.<br>