grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Standalone Application in GRUB


From: Parul Aggarwal
Subject: Re: Standalone Application in GRUB
Date: Mon, 4 Jun 2012 00:30:17 +0530

Hi Vladimir,
 
I understand what you are saying and grub modules seems the right way to go.
 
Other two apparoaches I can think of is:
 
1. Make our standalone appliaction totally independent of GRUB like memtest application. This way we can go with independent application .bin running.
 
2. If we statically link the grub libraries to our standalone application. We tried hello world program using grub_printf, and linked few grup static libraries. When we run the program the application got hanged.  Seems its because of few undefined symbols used in grub_printf(). Now we are trying to link glibc (as grub_printf uses this library interally) static library which should resolve the hang issue.
 
What do you think on above approaches. Especially point 2 to link static grub libraries is that way right approach and should be followed?
 
Appreciate your response.
 
Regards,
Parul
 


 
On Thu, May 31, 2012 at 3:56 PM, Vladimir 'φ-coder/phcoder' Serbinenko <address@hidden> wrote:
On 31.05.2012 12:03, Parul Aggarwal wrote:

> Thanks Vladimir.
>
> 1. In uboot we can have standalone application (which uses uboot
> functions) compiled and run independently on uboot prompt. As I
> understand from your comments that in GRUB this is not possible. We
> wanted to run the application in a way similar to memtest in GRUB. But
> our application wants to use GRUB functions.

It's not possible because of 3 factors:
- On all platforms except EFI (and EMU) GRUB is prelinked at
predetermined address.
- All protocols except appleloader, EFI chainloader, newer linux, ia64
linux, ppc linux and sparc64 linux also load at predetermined address.
- We don't have a complete control over memory map.
Under such circumstances there is no way to ensure that there is no
overlap between GRUB and payload.
So you can't use GRUB functions.

>
> 2. If I use dynamically loaded GRUB module for my application, does that
> mean that also I cannot compile module independently. Do i need to
> compile the whole GRUB for that?

Currently dependency tracking is done at compile time and there is no
way to dependency-track 2 sets of modules at the same time. Patches are
welcome.--
Regards
Vladimir 'φ-coder/phcoder' Serbinenko


_______________________________________________
Grub-devel mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/grub-devel



reply via email to

[Prev in Thread] Current Thread [Next in Thread]