public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* Re: UEFI LinuxLoader app usage
       [not found] <CABymUCMj37yh5MWH+pHjqV4W3trghhVqmeanAihT5-uWrEP3=g@mail.gmail.com>
@ 2017-02-09 14:05 ` Jun Nie
  2017-02-09 14:58   ` Leif Lindholm
  2017-02-09 16:53   ` Andrew Fish
  0 siblings, 2 replies; 3+ messages in thread
From: Jun Nie @ 2017-02-09 14:05 UTC (permalink / raw)
  To: linaro-uefi, edk2-devel, Ronald.Cron, Leif Lindholm

2017-02-09 21:44 GMT+08:00 Jun Nie <jun.nie@linaro.org>:
>  I am new to UEFI and trying to boot Linux with LinuxLoader app. But I
> cannot find detail information for below questions. Could anyone point
> out where I can find related information or example code? Thanks for
> your time!
>
> 1. How to feed command line to this app so that ProcessAppCommandLine() can
> process it?
I know this app support parsing command line from shell. I am seeking
method to launch this app from BDS directly without shell but cannot
find where to specify value to LoadedImage->LoadOptions so that this
app can get command line from it.

>
> 2. And how should I generate  device path string for raw blockIO
> device with specified offset/size? UEFI 2.6 spec does not provide much
> information in 9.4.5 Media Device Path Rules.
>
> Thank you!
> Jun


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

* Re: UEFI LinuxLoader app usage
  2017-02-09 14:05 ` UEFI LinuxLoader app usage Jun Nie
@ 2017-02-09 14:58   ` Leif Lindholm
  2017-02-09 16:53   ` Andrew Fish
  1 sibling, 0 replies; 3+ messages in thread
From: Leif Lindholm @ 2017-02-09 14:58 UTC (permalink / raw)
  To: Jun Nie; +Cc: linaro-uefi, edk2-devel, Ronald.Cron

Hi Jun,

On Thu, Feb 09, 2017 at 10:05:50PM +0800, Jun Nie wrote:
> 2017-02-09 21:44 GMT+08:00 Jun Nie <jun.nie@linaro.org>:
> >  I am new to UEFI and trying to boot Linux with LinuxLoader app. But I
> > cannot find detail information for below questions. Could anyone point
> > out where I can find related information or example code? Thanks for
> > your time!
> >
> > 1. How to feed command line to this app so that ProcessAppCommandLine() can
> > process it?
>
> I know this app support parsing command line from shell. I am seeking
> method to launch this app from BDS directly without shell but cannot
> find where to specify value to LoadedImage->LoadOptions so that this
> app can get command line from it.

The LinuxLoader was a severely unreliable non-UEFI-compliant
component which was deleted from the edk2 repository in November last
year. Unless your Linux kernel is older than version 3.16 (64-bit) or
4.5 (32-bit), there is no reason to use it.

And if it is, it is worth looking for alternative solutions.

> > 2. And how should I generate  device path string for raw blockIO
> > device with specified offset/size? UEFI 2.6 spec does not provide much
> > information in 9.4.5 Media Device Path Rules.

You say raw blockIO device - what does this mean?
If the system produces a raw block device from something like an
eMMC, then I would recommend putting a partition table on it, and
finding the desired offset from this.

Best Regards,

Leif


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

* Re: UEFI LinuxLoader app usage
  2017-02-09 14:05 ` UEFI LinuxLoader app usage Jun Nie
  2017-02-09 14:58   ` Leif Lindholm
@ 2017-02-09 16:53   ` Andrew Fish
  1 sibling, 0 replies; 3+ messages in thread
From: Andrew Fish @ 2017-02-09 16:53 UTC (permalink / raw)
  To: Jun Nie; +Cc: Linaro UEFI Mailman List, edk2-devel, Ronald.Cron, Leif Lindholm


> On Feb 9, 2017, at 6:05 AM, Jun Nie <jun.nie@linaro.org> wrote:
> 
> 2017-02-09 21:44 GMT+08:00 Jun Nie <jun.nie@linaro.org>:
>> I am new to UEFI and trying to boot Linux with LinuxLoader app. But I
>> cannot find detail information for below questions. Could anyone point
>> out where I can find related information or example code? Thanks for
>> your time!
>> 
>> 1. How to feed command line to this app so that ProcessAppCommandLine() can
>> process it?
> I know this app support parsing command line from shell. I am seeking
> method to launch this app from BDS directly without shell but cannot
> find where to specify value to LoadedImage->LoadOptions so that this
> app can get command line from it.
> 

The mechanism in EFI is the NVRAM variable for the boot option. See EFI_LOAD_OPTION.
https://github.com/tianocore/edk2/blob/master/MdePkg/Include/Uefi/UefiSpec.h#L2037 <https://github.com/tianocore/edk2/blob/master/MdePkg/Include/Uefi/UefiSpec.h#L2037>

The UI to create boot variables is implementation dependent. When we designed it conceptually we thought the OS installer would be the primary entity writing the boot option as it was the entity installing the OS loader. 

I think there is a shell command to set boot options, I'm not sure if it lets you set the OptionalData in the EFI_LOAD_OPTION. 

Thanks,

Andrew Fish


>> 
>> 2. And how should I generate  device path string for raw blockIO
>> device with specified offset/size? UEFI 2.6 spec does not provide much
>> information in 9.4.5 Media Device Path Rules.
>> 
>> Thank you!
>> Jun
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel



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

end of thread, other threads:[~2017-02-09 16:53 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <CABymUCMj37yh5MWH+pHjqV4W3trghhVqmeanAihT5-uWrEP3=g@mail.gmail.com>
2017-02-09 14:05 ` UEFI LinuxLoader app usage Jun Nie
2017-02-09 14:58   ` Leif Lindholm
2017-02-09 16:53   ` Andrew Fish

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox