<p dir="ltr"><br>
On 15 Feb 2016 19:09, "Thomas Huth" <<a href="mailto:thuth@redhat.com">thuth@redhat.com</a>> wrote:<br>
><br>
> On 10.02.2016 13:19, Thomas Huth wrote:<br>
> > On 10.02.2016 01:33, Alexey Kardashevskiy wrote:<br>
> >> On 02/09/2016 11:54 PM, Dinar Valeev wrote:<br>
> >>> On Mon, Feb 8, 2016 at 6:50 PM, Thomas Huth <<a href="mailto:thuth@redhat.com">thuth@redhat.com</a>> wrote:<br>
> >>>> On 08.02.2016 15:10, Dinar Valeev wrote:<br>
> >>>>> Hi,<br>
> >>>>><br>
> >>>>> I have long standing issue with SLOF. During start SLOF prints cp<br>
> >>>>> codes with backspace:<br>
> >>>>> <a href="https://github.com/aik/SLOF/blob/master/lib/libbootmsg/bootmsg_lvl.S#L61-L64">https://github.com/aik/SLOF/blob/master/lib/libbootmsg/bootmsg_lvl.S#L61-L64</a><br>
> >>>>><br>
> >>>>> We start a VM and record log, this is fine. But then when we look at<br>
> >>>>> the log through WebUI, because of backspace, Mozilla thinks this is a<br>
> >>>>> binary file.<br>
> >>>>><br>
> >>>>> At devconf I discussed this with Thomas, and he proposed to use nvram<br>
> >>>>> variable here. But it seems QEMU's --prom-env seems to be OpenBIOS<br>
> >>>>> specific.<br>
> >>>>><br>
> >>>>> Any comments for bring --prom-env support to SLOF? Or are there other<br>
> >>>>> options I can use,<br>
> >>>>> to change libbootmsg behaviour?<br>
> > ...<br>
> >>>> So I'd suggest to introduce a new environment variable into<br>
> >>>> slof/fs/envvar_defaults.fs and then check the contents of the variable<br>
> >>>> during the "cp" Forth function, so that it only prints the backslashes<br>
> >>>> if the envvar has the right value.<br>
> >>><br>
> >>> Yep. Did it. But it seems a problem is envvar initialized a way after<br>
> >>> we start printing cp codes.<br>
> ><br>
> > Oh, I see, envvar.fs is included very late in OF.fs. You could try to<br>
> > move it to an earlier spot, but I guess that will break the boot due to<br>
> > various dependencies between the Forth files, e.g. SLOF likely has to<br>
> > parse the flattened device tree from QEMU first to know how to access<br>
> > the NVRAM ... :-/<br>
> ><br>
> > The only other possibility to pass information to SLOF is currently the<br>
> > flattened device tree from QEMU - but that likely also does not work<br>
> > here since fdt.fs is also included quite late in OF.fs.<br>
><br>
> Just a completely different idea, but would the following patch also fix<br>
> your issue?<br>
Hi, thanks I'll give it a try. But only in a week. I'm in the middle of nowhere with very limited internet access.</p>
<p dir="ltr">My test case would be:<br>
osc co openSUSE: Factory:PowerPC/some-dummy-package</p>
<p dir="ltr">osc build --vm-type kvm </p>
<p dir="ltr">The open saved log with Firefox.</p>
<p dir="ltr">About plugins, I'm already using something called open with. But my intention to fix it for all users who might access logs from OBS.<br>
><br>
> diff --git a/lib/libbootmsg/bootmsg_lvl.S b/lib/libbootmsg/bootmsg_lvl.S<br>
> index 2e4c135..14ce4bf 100644<br>
> --- a/lib/libbootmsg/bootmsg_lvl.S<br>
> +++ b/lib/libbootmsg/bootmsg_lvl.S<br>
> @@ -58,10 +58,8 @@ ENTRY(bootmsg_cp)<br>
> bl io_putchar // print character<br>
> mr r3, r9<br>
> bl io_printhex16 // print checkpoint ID<br>
> - .rept 5<br>
> - li r3,'\b'<br>
> - bl io_putchar // print backspaces<br>
> - .endr<br>
> + li r3,'\r'<br>
> + bl io_putchar // go back<br>
> mtlr r11<br>
> blr<br>
><br>
> Replacing 5 '\b's with one '\r' should IMHO be ok here since the<br>
> checkpoints should always be printed at the beginning of a line...<br>
><br>
> Thomas<br>
><br>
><br>
</p>