help-grub
[Top][All Lists]
Advanced

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

Re: About grub.cfg——Building coreboot with grub2 payload


From: KESHAV P.R.
Subject: Re: About grub.cfg——Building coreboot with grub2 payload
Date: Tue, 31 May 2011 17:23:24 +0530

2011/5/31 Cui Lei <address@hidden>:
> I am working hard at building coreboot with grub2 payload. Now  I can build
> a grub2 payload as follow:
> 1: Download the lastest grub2 source code.
> 2: ./autogen.sh
>     ./configure --with-platform=coreboot
>      make
> 3: Use grub-mkimage to generate a "payload.elf", detail:
>     ./grub-mkimage -d . -O i386-coreboot -o ../coreboot-v4/payload.elf
> --prefix='/boot/grub2'
>       memdisk cpio -m ../memdisk.tar
>
>     Accoding the coreboot website(http://www.coreboot.org/Talk:GRUB2),
> memdisk is a virtual disk
>     in grub image and it is suggested that grub.cfg is contained in a
> memdisk image. So I made
>     folders boot/grub2 in my work folder and add a new grub.cfg and some
> modules(such as
>     memdisk.mod cpio.mod ...) into the boot/grub2, then tar boot/grub2 to
> memdisk.tar(according
>     to the website tar can be used to build a memdisk image).
>
> Problems:
>     1: I don't know wether grub2 can found my grub.cfg ,if I set  "
> --prefix='/boot/grub2' " ?
>         On the coreboot website,a sample is  --prefix='(ata0)/boot/grub2'. I
> think the ata0 is hard disk.
>         but I use the memdisk image, what should I do ?
>

I use this to create a custom grub2 efi app with memdisk embedded -

/bin/grub-mkimage --directory=/usr/lib/grub/x86_64-efi
--memdisk="${memdisk_64_img}" --prefix='(memdisk)/efi/grub2'
--format=x86_64-efi --compression=xz
--output="${grub2_efi_mp}/efi/boot/bootx64.efi" ${GRUB2_MODULES}

Hope this helps.

>     2: I want my grub.cfg in memdisk to load the grub.cfg from my hard disk.
> Because I have install the
>         ubuntu11.04 on my hard disk, a grub.cfg file should be in the
> /boot/grub. So my grub.cfg just like
>         this:
>                 search -f -s /boot/grub/grub.cfg
>                 configfile /boot/grub/grub.cfg
>
>         Is this practicable?
>

Make it

 search --file --no-floppy --set=root /boot/grub/grub.cfg
 configfile (${root})/boot/grub/grub.cfg

>     3: I want the gurb can boot into the grub-shell, how to ?
>

I can't understand the question. You want grub to boot into
grub-shell? Don't create a ${prefix}/grub.cfg file.

> BRs,
>
> Rock.C
>

Regards.

Keshav



reply via email to

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