Patchwork grub-efi: Use a variable to specify built-in grub modules.

login
register
mail settings
Submitter Philip Tricca
Date April 16, 2014, 1:16 a.m.
Message ID <1397611008-7653-1-git-send-email-flihp@twobit.us>
Download mbox | patch
Permalink /patch/70605/
State New
Headers show

Comments

Philip Tricca - April 16, 2014, 1:16 a.m.
The previous behavior defines a static set of modules that are built
into the grub efi executable. This works fine for a limited set of boot
environments namely the standard linux/initrd. This patch conditionally
 assigns the same modules to a variable. This allows other meta layers
to add additional modules or completely override the defaults. The use
case driving this patch is the use of multiboot2 and related modules.

Signed-off-by: Philip Tricca <flihp@twobit.us>
---
 meta/recipes-bsp/grub/grub-efi_2.00.bb |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
Philip Tricca - May 4, 2014, 10:34 p.m.
ping ...

On 04/15/2014 09:16 PM, Philip Tricca wrote:
> The previous behavior defines a static set of modules that are built
> into the grub efi executable. This works fine for a limited set of boot
> environments namely the standard linux/initrd. This patch conditionally
>  assigns the same modules to a variable. This allows other meta layers
> to add additional modules or completely override the defaults. The use
> case driving this patch is the use of multiboot2 and related modules.
> 
> Signed-off-by: Philip Tricca <flihp@twobit.us>
> ---
>  meta/recipes-bsp/grub/grub-efi_2.00.bb |    4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/meta/recipes-bsp/grub/grub-efi_2.00.bb b/meta/recipes-bsp/grub/grub-efi_2.00.bb
> index 6944cb2..4b43749 100644
> --- a/meta/recipes-bsp/grub/grub-efi_2.00.bb
> +++ b/meta/recipes-bsp/grub/grub-efi_2.00.bb
> @@ -70,12 +70,14 @@ do_install_class-native() {
>  	install -m 755 grub-mkimage ${D}${bindir}
>  }
>  
> +GRUB_BUILDIN ?= "boot linux ext2 fat serial part_msdos part_gpt normal efi_gop iso9660 search"
> +
>  do_deploy() {
>  	# Search for the grub.cfg on the local boot media by using the
>  	# built in cfg file provided via this recipe
>  	grub-mkimage -c ../cfg -p /EFI/BOOT -d ./grub-core/ \
>  	               -O ${GRUB_TARGET}-efi -o ./${GRUB_IMAGE} \
> -	               boot linux ext2 fat serial part_msdos part_gpt normal efi_gop iso9660 search
> +	               ${GRUB_BUILDIN}
>  	install -m 644 ${B}/${GRUB_IMAGE} ${DEPLOYDIR}
>  }
>  
>
Saul Wold - May 5, 2014, 3:49 p.m.
On 05/04/2014 03:34 PM, Philip Tricca wrote:
> ping ...
>

It was merged on 4/16!

Sau!

> On 04/15/2014 09:16 PM, Philip Tricca wrote:
>> The previous behavior defines a static set of modules that are built
>> into the grub efi executable. This works fine for a limited set of boot
>> environments namely the standard linux/initrd. This patch conditionally
>>   assigns the same modules to a variable. This allows other meta layers
>> to add additional modules or completely override the defaults. The use
>> case driving this patch is the use of multiboot2 and related modules.
>>
>> Signed-off-by: Philip Tricca <flihp@twobit.us>
>> ---
>>   meta/recipes-bsp/grub/grub-efi_2.00.bb |    4 +++-
>>   1 file changed, 3 insertions(+), 1 deletion(-)
>>
>> diff --git a/meta/recipes-bsp/grub/grub-efi_2.00.bb b/meta/recipes-bsp/grub/grub-efi_2.00.bb
>> index 6944cb2..4b43749 100644
>> --- a/meta/recipes-bsp/grub/grub-efi_2.00.bb
>> +++ b/meta/recipes-bsp/grub/grub-efi_2.00.bb
>> @@ -70,12 +70,14 @@ do_install_class-native() {
>>   	install -m 755 grub-mkimage ${D}${bindir}
>>   }
>>
>> +GRUB_BUILDIN ?= "boot linux ext2 fat serial part_msdos part_gpt normal efi_gop iso9660 search"
>> +
>>   do_deploy() {
>>   	# Search for the grub.cfg on the local boot media by using the
>>   	# built in cfg file provided via this recipe
>>   	grub-mkimage -c ../cfg -p /EFI/BOOT -d ./grub-core/ \
>>   	               -O ${GRUB_TARGET}-efi -o ./${GRUB_IMAGE} \
>> -	               boot linux ext2 fat serial part_msdos part_gpt normal efi_gop iso9660 search
>> +	               ${GRUB_BUILDIN}
>>   	install -m 644 ${B}/${GRUB_IMAGE} ${DEPLOYDIR}
>>   }
>>
>>
>
Philip Tricca - May 5, 2014, 4:49 p.m.
On 05/05/2014 11:49 AM, Saul Wold wrote:
> On 05/04/2014 03:34 PM, Philip Tricca wrote:
>> ping ...
>>
> 
> It was merged on 4/16!

Whoops. Was watching the mailing list, not git. My bad.

Thanks!
Philip

> Sau!
> 
>> On 04/15/2014 09:16 PM, Philip Tricca wrote:
>>> The previous behavior defines a static set of modules that are built
>>> into the grub efi executable. This works fine for a limited set of boot
>>> environments namely the standard linux/initrd. This patch conditionally
>>>   assigns the same modules to a variable. This allows other meta layers
>>> to add additional modules or completely override the defaults. The use
>>> case driving this patch is the use of multiboot2 and related modules.
>>>
>>> Signed-off-by: Philip Tricca <flihp@twobit.us>
>>> ---
>>>   meta/recipes-bsp/grub/grub-efi_2.00.bb |    4 +++-
>>>   1 file changed, 3 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/meta/recipes-bsp/grub/grub-efi_2.00.bb
>>> b/meta/recipes-bsp/grub/grub-efi_2.00.bb
>>> index 6944cb2..4b43749 100644
>>> --- a/meta/recipes-bsp/grub/grub-efi_2.00.bb
>>> +++ b/meta/recipes-bsp/grub/grub-efi_2.00.bb
>>> @@ -70,12 +70,14 @@ do_install_class-native() {
>>>       install -m 755 grub-mkimage ${D}${bindir}
>>>   }
>>>
>>> +GRUB_BUILDIN ?= "boot linux ext2 fat serial part_msdos part_gpt
>>> normal efi_gop iso9660 search"
>>> +
>>>   do_deploy() {
>>>       # Search for the grub.cfg on the local boot media by using the
>>>       # built in cfg file provided via this recipe
>>>       grub-mkimage -c ../cfg -p /EFI/BOOT -d ./grub-core/ \
>>>                      -O ${GRUB_TARGET}-efi -o ./${GRUB_IMAGE} \
>>> -                   boot linux ext2 fat serial part_msdos part_gpt
>>> normal efi_gop iso9660 search
>>> +                   ${GRUB_BUILDIN}
>>>       install -m 644 ${B}/${GRUB_IMAGE} ${DEPLOYDIR}
>>>   }
>>>
>>>
>>

Patch

diff --git a/meta/recipes-bsp/grub/grub-efi_2.00.bb b/meta/recipes-bsp/grub/grub-efi_2.00.bb
index 6944cb2..4b43749 100644
--- a/meta/recipes-bsp/grub/grub-efi_2.00.bb
+++ b/meta/recipes-bsp/grub/grub-efi_2.00.bb
@@ -70,12 +70,14 @@  do_install_class-native() {
 	install -m 755 grub-mkimage ${D}${bindir}
 }
 
+GRUB_BUILDIN ?= "boot linux ext2 fat serial part_msdos part_gpt normal efi_gop iso9660 search"
+
 do_deploy() {
 	# Search for the grub.cfg on the local boot media by using the
 	# built in cfg file provided via this recipe
 	grub-mkimage -c ../cfg -p /EFI/BOOT -d ./grub-core/ \
 	               -O ${GRUB_TARGET}-efi -o ./${GRUB_IMAGE} \
-	               boot linux ext2 fat serial part_msdos part_gpt normal efi_gop iso9660 search
+	               ${GRUB_BUILDIN}
 	install -m 644 ${B}/${GRUB_IMAGE} ${DEPLOYDIR}
 }