All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] Grub2 and Memtest86+
@ 2015-01-29 15:06 Steve Kenton
  2015-01-29 15:50 ` Thomas Petazzoni
  0 siblings, 1 reply; 4+ messages in thread
From: Steve Kenton @ 2015-01-29 15:06 UTC (permalink / raw)
  To: buildroot

I've been tinkering with adding memtest86+ V4.20 to the
grub2 menu for my x86 target. It's straight forward.

The questions, is there interest in this and how to
do this only for x86 targets. I've not dug into how
the boot loaders are handled, yet, but it's apparently
different from regular packages. Is there anyone
who keeps track on the grub2 boot loader in buildroot?

Modify ~boot/grub2/grub.cfg to add the memtest entry
and download the memtest86+ source tarball and then
copy/rename the shipped precomp.bin file file to
/boot/memtest86+.bin (It's a bootable 486 binary)

set default="0"
set timeout="5"

menuentry "Buildroot" {
	linux /boot/bzImage root=/dev/sda1 console=tty1 quiet splash=silent
}

menuentry "Memtest86+" {
	linux16 /boot/memtest86+.bin
}

Steve Kenton

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

* [Buildroot] Grub2 and Memtest86+
  2015-01-29 15:06 [Buildroot] Grub2 and Memtest86+ Steve Kenton
@ 2015-01-29 15:50 ` Thomas Petazzoni
  2015-02-03  5:11   ` Steve Kenton
  0 siblings, 1 reply; 4+ messages in thread
From: Thomas Petazzoni @ 2015-01-29 15:50 UTC (permalink / raw)
  To: buildroot

Dear Steve Kenton,

On Thu, 29 Jan 2015 09:06:01 -0600, Steve Kenton wrote:
> I've been tinkering with adding memtest86+ V4.20 to the
> grub2 menu for my x86 target. It's straight forward.
> 
> The questions, is there interest in this and how to
> do this only for x86 targets. I've not dug into how
> the boot loaders are handled, yet, but it's apparently
> different from regular packages. Is there anyone
> who keeps track on the grub2 boot loader in buildroot?

I'm not sure I can say I "keep track of grub2", but I did add the
package last year.

> Modify ~boot/grub2/grub.cfg to add the memtest entry
> and download the memtest86+ source tarball and then
> copy/rename the shipped precomp.bin file file to
> /boot/memtest86+.bin (It's a bootable 486 binary)
> 
> set default="0"
> set timeout="5"
> 
> menuentry "Buildroot" {
> 	linux /boot/bzImage root=/dev/sda1 console=tty1 quiet splash=silent
> }
> 
> menuentry "Memtest86+" {
> 	linux16 /boot/memtest86+.bin
> }

What I would suggest is to add a package for memtest86 in Buildroot,
have it install the appropriate binary in /boot, and in its Config.in
help text, indicate how to add it to the Grub menu.

Best regards,

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

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

* [Buildroot] Grub2 and Memtest86+
  2015-01-29 15:50 ` Thomas Petazzoni
@ 2015-02-03  5:11   ` Steve Kenton
  2015-02-03  5:16     ` Steve Kenton
  0 siblings, 1 reply; 4+ messages in thread
From: Steve Kenton @ 2015-02-03  5:11 UTC (permalink / raw)
  To: buildroot

On 01/29/2015 09:50 AM, Thomas Petazzoni wrote:
> Dear Steve Kenton,
> 
> On Thu, 29 Jan 2015 09:06:01 -0600, Steve Kenton wrote:
>> I've been tinkering with adding memtest86+ V4.20 to the
>> grub2 menu for my x86 target. It's straight forward.
>>
>> The questions, is there interest in this and how to
>> do this only for x86 targets. I've not dug into how
>> the boot loaders are handled, yet, but it's apparently
>> different from regular packages. Is there anyone
>> who keeps track on the grub2 boot loader in buildroot?
> 
> I'm not sure I can say I "keep track of grub2", but I did add the
> package last year.
> 
In my experimenting with grub2 it looks like it is leaking in host information.
Here is a fragment from grub-install which is installed in ~host/usr/sbin.

When it tries to run other scripts like grub-mkimage it looks in /usr
because of the prefix. At least when the host versions were not reachble
I got an error about command not found. Does grub2 need to be configured with
a prefix other than /usr since it's run on the host and not the target?

Steve Kenton


prefix="/usr"
exec_prefix="/usr"
datarootdir="${prefix}/share"
sbindir="${exec_prefix}/sbin"
bindir="${exec_prefix}/bin"
libdir="${exec_prefix}/lib"
sysconfdir="/etc"
PACKAGE_NAME=GRUB
PACKAGE_TARNAME=grub
PACKAGE_VERSION=2.00

export TEXTDOMAIN=grub
export TEXTDOMAINDIR="${datarootdir}/locale"

host_os=linux-gnu
source_dir=
target=
datadir="${datarootdir}"
if [ "x$pkgdatadir" = x ]; then
    pkgdatadir="${datadir}/grub"
fi
localedir="${datarootdir}/locale"

self="`basename $0`"

grub_mkimage="${bindir}/`echo grub-mkimage | sed ${transform}`"
grub_probe="${sbindir}/`echo grub-probe | sed ${transform}`"
grub_editenv="${bindir}/`echo grub-editenv | sed ${transform}`"
grub_mkrelpath="${bindir}/`echo grub-mkrelpath | sed ${transform}`"

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

* [Buildroot] Grub2 and Memtest86+
  2015-02-03  5:11   ` Steve Kenton
@ 2015-02-03  5:16     ` Steve Kenton
  0 siblings, 0 replies; 4+ messages in thread
From: Steve Kenton @ 2015-02-03  5:16 UTC (permalink / raw)
  To: buildroot

On 02/02/2015 11:11 PM, Steve Kenton wrote:
>>
> In my experimenting with grub2 it looks like it is leaking in host information.
> Here is a fragment from grub-install which is installed in ~host/usr/sbin.
> 
> When it tries to run other scripts like grub-mkimage it looks in /usr
> because of the prefix. At least when the host versions were not reachble
I should say Ubuntu build host versions were not reachable to be clear

Steve
> I got an error about command not found. Does grub2 need to be configured with
> a prefix other than /usr since it's run on the host and not the target?
> 

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

end of thread, other threads:[~2015-02-03  5:16 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-29 15:06 [Buildroot] Grub2 and Memtest86+ Steve Kenton
2015-01-29 15:50 ` Thomas Petazzoni
2015-02-03  5:11   ` Steve Kenton
2015-02-03  5:16     ` Steve Kenton

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.