All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: Boot Linux through GRUB2 on AMD DB-FT3b-LC
@ 2016-12-02 15:28 Grigore Lupescu
  2016-12-02 17:06 ` Grigore Lupescu
  0 siblings, 1 reply; 8+ messages in thread
From: Grigore Lupescu @ 2016-12-02 15:28 UTC (permalink / raw)
  To: grub-devel

[-- Attachment #1: Type: text/plain, Size: 637 bytes --]

Hello Andrei,

I managed to improve the status of the *vga_text* mode. So GRUB2 was
restarting when reaching the end of the screen. I traced this to the
*screen_read_char* which is issued when the *inc_y* == ROWS (this call
would break GRUB2). I didn't go even further with the debug though. I just
clear the screen and set grub_curr_pos.y to 0 and by using set pager=1 I
can browse with enter through all the output page by page. It's not ideal
but it was fast and practical.

Linux though still doesn't boot. I am currently looking why the vga_text
mode is selected over gfxterm which is not even configured properly.

Thanks,
Grigore

[-- Attachment #2: Type: text/html, Size: 1309 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Boot Linux through GRUB2 on AMD DB-FT3b-LC
  2016-12-02 15:28 Boot Linux through GRUB2 on AMD DB-FT3b-LC Grigore Lupescu
@ 2016-12-02 17:06 ` Grigore Lupescu
  2016-12-02 17:26   ` Andrei Borzenkov
  0 siblings, 1 reply; 8+ messages in thread
From: Grigore Lupescu @ 2016-12-02 17:06 UTC (permalink / raw)
  To: grub-devel

[-- Attachment #1: Type: text/plain, Size: 1030 bytes --]

Restarting the config from scratch in Coreboot and setting Keep Vesa
framebuffer I am able to enter gfxterm in GRUB2.
So at this point *gfxterm* is selected not *vga_text. *Linux is booting
without any issue now. Apparently the vga_text mode was the source of all
problems/limitations.

On Fri, Dec 2, 2016 at 3:28 PM, Grigore Lupescu <grigore@arista.com> wrote:

> Hello Andrei,
>
> I managed to improve the status of the *vga_text* mode. So GRUB2 was
> restarting when reaching the end of the screen. I traced this to the
> *screen_read_char* which is issued when the *inc_y* == ROWS (this call
> would break GRUB2). I didn't go even further with the debug though. I just
> clear the screen and set grub_curr_pos.y to 0 and by using set pager=1 I
> can browse with enter through all the output page by page. It's not ideal
> but it was fast and practical.
>
> Linux though still doesn't boot. I am currently looking why the vga_text
> mode is selected over gfxterm which is not even configured properly.
>
> Thanks,
> Grigore
>

[-- Attachment #2: Type: text/html, Size: 2094 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Boot Linux through GRUB2 on AMD DB-FT3b-LC
  2016-12-02 17:06 ` Grigore Lupescu
@ 2016-12-02 17:26   ` Andrei Borzenkov
  0 siblings, 0 replies; 8+ messages in thread
From: Andrei Borzenkov @ 2016-12-02 17:26 UTC (permalink / raw)
  To: grub-devel

02.12.2016 20:06, Grigore Lupescu пишет:
> Restarting the config from scratch in Coreboot and setting Keep Vesa
> framebuffer I am able to enter gfxterm in GRUB2.

I assume "Keep Vesa framebuffer" is coreboot setting?

> So at this point *gfxterm* is selected not *vga_text. *Linux is booting
> without any issue now. Apparently the vga_text mode was the source of all
> problems/limitations.
> 

We still want to fix it. I appreciate if you could try to determine more
closely where the problem happens.

> On Fri, Dec 2, 2016 at 3:28 PM, Grigore Lupescu <grigore@arista.com> wrote:
> 
>> Hello Andrei,
>>
>> I managed to improve the status of the *vga_text* mode. So GRUB2 was
>> restarting when reaching the end of the screen. I traced this to the
>> *screen_read_char* which is issued when the *inc_y* == ROWS (this call

I am sorry, I do not understand it. Normally y should never exceed
ROWS-1 (this is the last coordinate). And screen_read_char is called in
a loop where y < ROWS - 1 and so (y + 1) will not exceed ROWS - 1 again.

How is it possible for y to be equal ROWS if you mean that?

>> would break GRUB2). I didn't go even further with the debug though. I just
>> clear the screen and set grub_curr_pos.y to 0 and by using set pager=1 I

Could you please attach your patch?

>> can browse with enter through all the output page by page. It's not ideal
>> but it was fast and practical.
>>
>> Linux though still doesn't boot. I am currently looking why the vga_text
>> mode is selected over gfxterm which is not even configured properly.
>>
>> Thanks,
>> Grigore
>>
> 
> 
> 
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> https://lists.gnu.org/mailman/listinfo/grub-devel
> 



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Boot Linux through GRUB2 on AMD DB-FT3b-LC
@ 2016-12-03  7:52 Grigore Lupescu
  0 siblings, 0 replies; 8+ messages in thread
From: Grigore Lupescu @ 2016-12-03  7:52 UTC (permalink / raw)
  To: grub-devel

[-- Attachment #1: Type: text/plain, Size: 1295 bytes --]

Hello Andrei,

The "Keep VESA framebuffer" is a setting in Coreboot and without it the
*gfxterm* mode is not properly configured or unusable. As a consequence
*vga_text* mode is set which causes the restart issue and boot problems
with Linux.

Also as a consequence of the below error, by setting "set debug=all" GRUB2
would output a lot of text and become unusable (with the below code) - as
opposed to other modules where by setting "set pager=1" would make it quite
usable.

Regarding the restart issue I traced the cause to the function
call screen_read_char() from ./grub-core/term/i386/pc/vga_text.c. This gets
called when (grub_curr_pos.y == ROWS - 1) -- my bad on forgetting the -1.

static void
inc_y (void)
{
  grub_curr_pos.x = 0;
  if (grub_curr_pos.y < ROWS - 1)
    grub_curr_pos.y++;
  else
    {
#if 0
      int x, y;
      for (y = 0; y < ROWS - 1; y++)
        for (x = 0; x < COLS; x++)
*          screen_write_char (x, y, screen_read_char (x, y + 1)); //
restart happens on this call*
      for (x = 0; x < COLS; x++)
        screen_write_char (x, ROWS - 1, ' ' | (cur_color << 8));
#else
     int x, y;
      for (y = 0; y < ROWS; y++)
        for (x = 0; x < COLS; x++)
          screen_write_char (x, y, ' ');
        grub_curr_pos.y = 0;
#endif
    }
}

Regards,
Grigore

[-- Attachment #2: Type: text/html, Size: 1843 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Boot Linux through GRUB2 on AMD DB-FT3b-LC
  2016-11-30 15:59 Grigore Lupescu
@ 2016-11-30 16:53 ` Andrei Borzenkov
  0 siblings, 0 replies; 8+ messages in thread
From: Andrei Borzenkov @ 2016-11-30 16:53 UTC (permalink / raw)
  To: The development of GNU GRUB

30.11.2016 18:59, Grigore Lupescu пишет:
> Hello Andrei,
> 
> Unfortunately not - I cannot attach a serial. My only options excluding
> HDMI output are LPC (ordered header) and USB (with hacks, don't want to try
> this one yet). Any suggestions on debug would definitely help.
> 
> From the looks of it it might be a Coreboot problem rather than a GRUB2
> problem but I am trying to wage out the possibility of something in the
> middle.
> 
> Problem1 - Overflow each time I reach end of screen

I cannot reproduce it using grub-qemu (the closest to coreboot platform
I could build in short time). If you explain how to create coreboot+grub
for booting in qemu, I'll try it. I have some old notebooks that I can
use for testing, so I may try coreboot on real hardware if I get
detailed enough how-to.

> Problem2 - Linux doesn't boot. I execute the below to boot:
> grub> set root=(hd0,gpt2)
> grub> linux /boot/vmlinuz-4.4...-generic root=/dev/sda2
> grub> initrd /boot/initrd.img-4.4...-generic

set debug=all

> grub> boot
> 

Well, if system really resets you may not have time to actually read
debugging output ... recently there was discussion about using serial
PCI card on help-grub; do you have USB-to-serial adapter?

> I use a USB to SATA drive where I have the SSD plugged in (and legacy
> Ubuntu Linux x64 4.4 on it).
> 
> ### 1 ### Everything works
> AMI BIOS 2.17.1246
> Core Version 4.6.5.4
> UEFI 2.3.1; PI 1.2
> AMI BIOS + GRUB2.02beta2-36ubuntu3.1 => terminal_output=gfxterm, see
> USB-SATA SSD as (hd0), (hd0, gpt0).., works both on USB2.0 and USB3.0.
> 
> ### 1 ### Overflow screen + cannot boot Linux
> Coreboot latest + GRUB2.02beta3 => terminal_output=vga_text, see USB-SATA
> SSD as (usb0), (usb0, gpt0).., works only on USB2.0.
> 
> Thank you,
> Grigore
> 
> 
> 
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> https://lists.gnu.org/mailman/listinfo/grub-devel
> 



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Boot Linux through GRUB2 on AMD DB-FT3b-LC
@ 2016-11-30 15:59 Grigore Lupescu
  2016-11-30 16:53 ` Andrei Borzenkov
  0 siblings, 1 reply; 8+ messages in thread
From: Grigore Lupescu @ 2016-11-30 15:59 UTC (permalink / raw)
  To: grub-devel

[-- Attachment #1: Type: text/plain, Size: 1151 bytes --]

Hello Andrei,

Unfortunately not - I cannot attach a serial. My only options excluding
HDMI output are LPC (ordered header) and USB (with hacks, don't want to try
this one yet). Any suggestions on debug would definitely help.

From the looks of it it might be a Coreboot problem rather than a GRUB2
problem but I am trying to wage out the possibility of something in the
middle.

Problem1 - Overflow each time I reach end of screen
Problem2 - Linux doesn't boot. I execute the below to boot:
grub> set root=(hd0,gpt2)
grub> linux /boot/vmlinuz-4.4...-generic root=/dev/sda2
grub> initrd /boot/initrd.img-4.4...-generic
grub> boot

I use a USB to SATA drive where I have the SSD plugged in (and legacy
Ubuntu Linux x64 4.4 on it).

### 1 ### Everything works
AMI BIOS 2.17.1246
Core Version 4.6.5.4
UEFI 2.3.1; PI 1.2
AMI BIOS + GRUB2.02beta2-36ubuntu3.1 => terminal_output=gfxterm, see
USB-SATA SSD as (hd0), (hd0, gpt0).., works both on USB2.0 and USB3.0.

### 1 ### Overflow screen + cannot boot Linux
Coreboot latest + GRUB2.02beta3 => terminal_output=vga_text, see USB-SATA
SSD as (usb0), (usb0, gpt0).., works only on USB2.0.

Thank you,
Grigore

[-- Attachment #2: Type: text/html, Size: 1507 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Boot Linux through GRUB2 on AMD DB-FT3b-LC
  2016-11-28 18:19 Grigore Lupescu
@ 2016-11-29 17:55 ` Andrei Borzenkov
  0 siblings, 0 replies; 8+ messages in thread
From: Andrei Borzenkov @ 2016-11-29 17:55 UTC (permalink / raw)
  To: The development of GNU GRUB

28.11.2016 21:19, Grigore Lupescu пишет:
> Hello,
> 
> I am trying to run Linux through the GRUB2 payload. I am using Coreboot and
> AMD FT3B-LC and execute GRUB2 as a payload.
> 
> I have the latest Coreboot/GRUB2 sources, set config accordingly in
> Coreboot, getting an image on HDMI and the GRUB2 payload is executing.
> In GRUB2 payload I seem to have an overflow issue possibly related to the
> *vga_text* mode. If I put a proprietary AMI BIOS, GRUB2 works without issue
> in gfxterm mode and boots Linux without issue.
> 
> Using Coreboot every time the screen gets full of text, GRUB2 re-executes.
> If I though set the terminal_output to cbmemc then commands would execute
> but Linux still fails to execute - at the end GRUB2 would restart.
> 
> Also the GRUB2 payload on Coreboot does see the drive/files and attempts to
> execute - I looks like a GRUB2/Coreboot config/code problem.
> 
> I execute the below in GRUB2 (which work on AMI BIOS + GRUB2).
> grub> set root=(hd0,gpt2)
> grub> linux /boot/vmlinuz-3.13.0-29-generic root=/dev/sda2
> grub> initrd /boot/initrd.img-3.13.0-29-generic
> grub> boot
> 
> 1. Would anyone have any recommendation about the overflow in GRUB2 payload
> ? (when executed through Coreboot)
> 2. Any suggestions on debug the Linux boot given this board's limitations
> on output (HDMI only) in GRUB2 ?
> 

Do you have possibility to attach serial console? It would make
debugging more convenient.


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Boot Linux through GRUB2 on AMD DB-FT3b-LC
@ 2016-11-28 18:19 Grigore Lupescu
  2016-11-29 17:55 ` Andrei Borzenkov
  0 siblings, 1 reply; 8+ messages in thread
From: Grigore Lupescu @ 2016-11-28 18:19 UTC (permalink / raw)
  To: grub-devel

[-- Attachment #1: Type: text/plain, Size: 1267 bytes --]

Hello,

I am trying to run Linux through the GRUB2 payload. I am using Coreboot and
AMD FT3B-LC and execute GRUB2 as a payload.

I have the latest Coreboot/GRUB2 sources, set config accordingly in
Coreboot, getting an image on HDMI and the GRUB2 payload is executing.
In GRUB2 payload I seem to have an overflow issue possibly related to the
*vga_text* mode. If I put a proprietary AMI BIOS, GRUB2 works without issue
in gfxterm mode and boots Linux without issue.

Using Coreboot every time the screen gets full of text, GRUB2 re-executes.
If I though set the terminal_output to cbmemc then commands would execute
but Linux still fails to execute - at the end GRUB2 would restart.

Also the GRUB2 payload on Coreboot does see the drive/files and attempts to
execute - I looks like a GRUB2/Coreboot config/code problem.

I execute the below in GRUB2 (which work on AMI BIOS + GRUB2).
grub> set root=(hd0,gpt2)
grub> linux /boot/vmlinuz-3.13.0-29-generic root=/dev/sda2
grub> initrd /boot/initrd.img-3.13.0-29-generic
grub> boot

1. Would anyone have any recommendation about the overflow in GRUB2 payload
? (when executed through Coreboot)
2. Any suggestions on debug the Linux boot given this board's limitations
on output (HDMI only) in GRUB2 ?

Thank you,
Grigore

[-- Attachment #2: Type: text/html, Size: 2328 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2016-12-03  7:53 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-12-02 15:28 Boot Linux through GRUB2 on AMD DB-FT3b-LC Grigore Lupescu
2016-12-02 17:06 ` Grigore Lupescu
2016-12-02 17:26   ` Andrei Borzenkov
  -- strict thread matches above, loose matches on Subject: below --
2016-12-03  7:52 Grigore Lupescu
2016-11-30 15:59 Grigore Lupescu
2016-11-30 16:53 ` Andrei Borzenkov
2016-11-28 18:19 Grigore Lupescu
2016-11-29 17:55 ` Andrei Borzenkov

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.