<div dir="ltr">Hi Nico,<div><br></div><div>Following is my complete Payload setting, </div><div><br></div><div>1.Add a payload -> (GRUB2)</div><div>2.GRUB2 version -> (HEAD) <br></div><div>3.Include GRUB2 runtime config file into ROM image = Y</div><div>4.Gave the path of grub.cfg (which I copied from Fedora OS when booted is booted with other BIOS vendor).</div><div><br></div><div>Based on this, please provide your comments.</div><div><br></div><div>Thanks,</div><div>Dhanasekar</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jun 7, 2017 at 6:52 PM, Nico Huber <span dir="ltr"><<a href="mailto:nico.huber@secunet.com" target="_blank">nico.huber@secunet.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 07.06.2017 14:52, Dhanasekar Jaganathan wrote:<br>
> Hi Nico,<br>
><br>
>> where do you expect to see the menu? a display? a serial console? In the<br>
>> former case, I expect you have to add a Video BIOS to your coreboot.rom<br>
>> (CONFIG_VGA_BIOS) and configure coreboot to run it (CONFIG_VGA_ROM_RUN).<br>
>> If you use a discrete gfx card, you don't need to add the VBIOS, it<br>
>> would be read from the card. In the latter case, GRUB has to be confi-<br>
>> gured to use the serial port, as Mariusz pointed out.<br>
><br>
>> I'm a little confused here, did you add an etc/grub.cfg to the CBFS? You<br>
>> didn't say so but I wouldn't expect it to boot otherwise. If you have,<br>
>> can you please share this grub.cfg.<br>
><br>
</span>> I am using a serial console for *DISPLAY*.<br>
> I am not adding *grub.cfg* through *etc/grub.cfg*.<br>
> When I booted the board with other vendor BIOS, I have copied*<br>
> /boot/grub2/grub.cfg*  from fedora OS and using this grub.cfg in coreboot.<br>
> I have mentioned the location of grub. cfg in menuconfig *(Payload -><br>
> Include GRUB2 runtime config file into ROM image). *<br>
<br>
I see, that wasn't visible from your .config because you changed it from<br>
GRUB2 to adding a simple elf payload. Just to make sure you understood<br>
this correctly: This only points the coreboot build system to the file<br>
and the file gets copied into CBFS as etc/grub.cfg during build. So in<br>
this configuration, you have to rebuild your coreboot every time you<br>
change the grub.cfg.<br>
<br>
A more convenient solution would be to write a small intermediate<br>
grub.cfg that just loads the real grub.cfg from disk. e.g. create<br>
a new file called coreboot-grub.cfg with the single line:<br>
<br>
    configfile (ahci0,1)/grub2/grub.cfg<br>
<br>
and point the coreboot build to that coreboot-grub.cfg. I've guessed<br>
the path from your current grub.cfg, I'm not 100% sure if it's correct.<br>
<span class=""><br>
><br>
> I have attached the same.<br>
><br>
>>><br>
>>> In */boot/default/grub*, I have changed* GRUB_TIMEOUT = -1* ( which stops<br>
>>> the system indefinitely at boot menu in GRUB2). Still system is not<br>
>>> stopping at boot menu.<br>
><br>
>> AFAIK, this file only works as input to `grub-mkconfig`. You'd still<br>
>> have to generate a grub.cfg with it and configure the GRUB payload to<br>
>> use it.<br>
><br>
</span>> when ever I modify */etc/defualt/grub*, I will run *grub2-mkconfig -o<br>
> /boot/grub2/grub.cfg*.<br>
<span class="">> I forget to mention this in my previous mail.<br>
><br>
>> You have set CONFIG_ROM_SIZE and CONFIG_CBFS_SIZE to the same value<br>
>> (8MiB). This is wrong. coreboot shares the flash chip with other Intel<br>
>> firmware components (Firmware Descriptor (IFD), ME firmware etc.). Be-<br>
>> side other configuration, the IFD partitions the flash chip in regions.<br>
>> coreboot's CBFS lives in the BIOS region and should be at most of this<br>
>> region's size. You can decode the descriptor with `ifdtool -d ...` (you<br>
>> can find it in util/ifdtool/ in the coreboot source).<br>
><br>
> After setting, CONFIG_CBFS_SIZE = 6MB,  I can able to build coreboot and I<br>
> am not getting below issue,<br>
><br>
>  *lzma: Decodeing error = 1*<br>
>  *Payload not loaded.*<br>
><br>
> Is it correct to set 6MB size for CONFIG_CBFS_SIZE?.<br>
><br>
> Please correct me, If I am wrong and Provide your suggestions.<br>
<br>
</span>It has to match your firmware descriptor, I can't tell you what it's set<br>
to. In other words, don't ask me, ask `ifdtool`. The following should<br>
work with the original, vendor ROM:<br>
<br>
  $ make -C util/ifdtool/<br>
  $ util/ifdtool/ifdtool -d /path/to/vendor.rom | grep \(BIOS\)<br>
<span class="HOEnZb"><font color="#888888"><br>
Nico<br>
<br>
</font></span></blockquote></div><br></div>