aboutsummaryrefslogtreecommitdiffstats
path: root/common/recipes-bsp
diff options
context:
space:
mode:
authorAwais Belal <awais_belal@mentor.com>2016-12-13 17:08:57 +0500
committerAwais Belal <awais_belal@mentor.com>2016-12-13 17:15:36 +0500
commitcb942be5728da17dcfb51819ef73e4a91981e44c (patch)
tree606eea405f04ee71663f8a3350d66223db327e48 /common/recipes-bsp
parent9882ed4251dce121a172a45d19ed484d2dd1e26a (diff)
downloadmeta-amd-cb942be5728da17dcfb51819ef73e4a91981e44c.tar.gz
meta-amd-cb942be5728da17dcfb51819ef73e4a91981e44c.tar.bz2
meta-amd-cb942be5728da17dcfb51819ef73e4a91981e44c.zip
grub*: move to git based recipes
This enables git based grub recipes to be used for AMD BSPs. Signed-off-by: Awais Belal <awais_belal@mentor.com>
Diffstat (limited to 'common/recipes-bsp')
-rw-r--r--common/recipes-bsp/grub/files/0001-grub-core-kern-efi-mm.c-grub_efi_finish_boot_service.patch79
-rw-r--r--common/recipes-bsp/grub/files/0002-grub-core-kern-efi-mm.c-grub_efi_get_memory_map-Neve.patch43
-rw-r--r--common/recipes-bsp/grub/grub-efi_2.00.bbappend15
3 files changed, 0 insertions, 137 deletions
diff --git a/common/recipes-bsp/grub/files/0001-grub-core-kern-efi-mm.c-grub_efi_finish_boot_service.patch b/common/recipes-bsp/grub/files/0001-grub-core-kern-efi-mm.c-grub_efi_finish_boot_service.patch
deleted file mode 100644
index abf08e16..00000000
--- a/common/recipes-bsp/grub/files/0001-grub-core-kern-efi-mm.c-grub_efi_finish_boot_service.patch
+++ /dev/null
@@ -1,79 +0,0 @@
-From b258761d11946b28a847dff0768c3f271e13d60a Mon Sep 17 00:00:00 2001
-From: Awais Belal <awais_belal@mentor.com>
-Date: Thu, 8 Dec 2016 18:21:12 +0500
-Subject: [PATCH 1/2] * grub-core/kern/efi/mm.c
- (grub_efi_finish_boot_services): Try terminating EFI services several times
- due to quirks in some implementations.
-
-Upstream-status: Backport [ http://git.savannah.gnu.org/cgit/grub.git/patch/?id=e75fdee420a7ad95e9a465c9699adc2e2e970440 ]
-
-Signed-off-by: Awais Belal <awais_belal@mentor.com>
----
- grub-core/kern/efi/mm.c | 46 ++++++++++++++++++++++++++++++----------------
- 1 file changed, 30 insertions(+), 16 deletions(-)
-
-diff --git a/grub-core/kern/efi/mm.c b/grub-core/kern/efi/mm.c
-index 461deb0..b00e0bc 100644
---- a/grub-core/kern/efi/mm.c
-+++ b/grub-core/kern/efi/mm.c
-@@ -167,27 +167,41 @@ grub_efi_finish_boot_services (grub_efi_uintn_t *outbuf_size, void *outbuf,
- apple, sizeof (apple)) == 0);
- #endif
-
-- if (grub_efi_get_memory_map (&finish_mmap_size, finish_mmap_buf, &finish_key,
-- &finish_desc_size, &finish_desc_version) < 0)
-- return grub_error (GRUB_ERR_IO, "couldn't retrieve memory map");
-+ while (1)
-+ {
-+ if (grub_efi_get_memory_map (&finish_mmap_size, finish_mmap_buf, &finish_key,
-+ &finish_desc_size, &finish_desc_version) < 0)
-+ return grub_error (GRUB_ERR_IO, "couldn't retrieve memory map");
-
-- if (outbuf && *outbuf_size < finish_mmap_size)
-- return grub_error (GRUB_ERR_IO, "memory map buffer is too small");
-+ if (outbuf && *outbuf_size < finish_mmap_size)
-+ return grub_error (GRUB_ERR_IO, "memory map buffer is too small");
-
-- finish_mmap_buf = grub_malloc (finish_mmap_size);
-- if (!finish_mmap_buf)
-- return grub_errno;
-+ finish_mmap_buf = grub_malloc (finish_mmap_size);
-+ if (!finish_mmap_buf)
-+ return grub_errno;
-
-- if (grub_efi_get_memory_map (&finish_mmap_size, finish_mmap_buf, &finish_key,
-- &finish_desc_size, &finish_desc_version) <= 0)
-- return grub_error (GRUB_ERR_IO, "couldn't retrieve memory map");
-+ if (grub_efi_get_memory_map (&finish_mmap_size, finish_mmap_buf, &finish_key,
-+ &finish_desc_size, &finish_desc_version) <= 0)
-+ {
-+ grub_free (finish_mmap_buf);
-+ return grub_error (GRUB_ERR_IO, "couldn't retrieve memory map");
-+ }
-
-- b = grub_efi_system_table->boot_services;
-- status = efi_call_2 (b->exit_boot_services, grub_efi_image_handle,
-- finish_key);
-- if (status != GRUB_EFI_SUCCESS)
-- return grub_error (GRUB_ERR_IO, "couldn't terminate EFI services");
-+ b = grub_efi_system_table->boot_services;
-+ status = efi_call_2 (b->exit_boot_services, grub_efi_image_handle,
-+ finish_key);
-+ if (status == GRUB_EFI_SUCCESS)
-+ break;
-
-+ if (status != GRUB_EFI_INVALID_PARAMETER)
-+ {
-+ grub_free (finish_mmap_buf);
-+ return grub_error (GRUB_ERR_IO, "couldn't terminate EFI services");
-+ }
-+
-+ grub_free (finish_mmap_buf);
-+ grub_printf ("Trying to terminate EFI services again\n");
-+ }
- grub_efi_is_finished = 1;
- if (outbuf_size)
- *outbuf_size = finish_mmap_size;
---
-1.9.1
-
diff --git a/common/recipes-bsp/grub/files/0002-grub-core-kern-efi-mm.c-grub_efi_get_memory_map-Neve.patch b/common/recipes-bsp/grub/files/0002-grub-core-kern-efi-mm.c-grub_efi_get_memory_map-Neve.patch
deleted file mode 100644
index 0e735ffc..00000000
--- a/common/recipes-bsp/grub/files/0002-grub-core-kern-efi-mm.c-grub_efi_get_memory_map-Neve.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-From 630de45f3d5f9a2dda7fad99acd21449b8c4111d Mon Sep 17 00:00:00 2001
-From: Awais Belal <awais_belal@mentor.com>
-Date: Thu, 8 Dec 2016 18:27:01 +0500
-Subject: [PATCH 2/2] * grub-core/kern/efi/mm.c (grub_efi_get_memory_map):
- Never return a descriptor_size==0 to avoid potential divisions by zero.
-
-Upstream-status: Backport [ http://git.savannah.gnu.org/cgit/grub.git/commit/?id=69aee43fa64601cabf6efa9279c10d69b466662e ]
-
-Signed-off-by: Awais Belal <awais_belal@mentor.com>
----
- grub-core/kern/efi/mm.c | 5 +++++
- 1 file changed, 5 insertions(+)
-
-diff --git a/grub-core/kern/efi/mm.c b/grub-core/kern/efi/mm.c
-index b00e0bc..9f1d194 100644
---- a/grub-core/kern/efi/mm.c
-+++ b/grub-core/kern/efi/mm.c
-@@ -235,6 +235,7 @@ grub_efi_get_memory_map (grub_efi_uintn_t *memory_map_size,
- grub_efi_boot_services_t *b;
- grub_efi_uintn_t key;
- grub_efi_uint32_t version;
-+ grub_efi_uintn_t size;
-
- if (grub_efi_is_finished)
- {
-@@ -264,10 +265,14 @@ grub_efi_get_memory_map (grub_efi_uintn_t *memory_map_size,
- map_key = &key;
- if (! descriptor_version)
- descriptor_version = &version;
-+ if (! descriptor_size)
-+ descriptor_size = &size;
-
- b = grub_efi_system_table->boot_services;
- status = efi_call_5 (b->get_memory_map, memory_map_size, memory_map, map_key,
- descriptor_size, descriptor_version);
-+ if (*descriptor_size == 0)
-+ *descriptor_size = sizeof (grub_efi_memory_descriptor_t);
- if (status == GRUB_EFI_SUCCESS)
- return 1;
- else if (status == GRUB_EFI_BUFFER_TOO_SMALL)
---
-1.9.1
-
diff --git a/common/recipes-bsp/grub/grub-efi_2.00.bbappend b/common/recipes-bsp/grub/grub-efi_2.00.bbappend
deleted file mode 100644
index a21e3d72..00000000
--- a/common/recipes-bsp/grub/grub-efi_2.00.bbappend
+++ /dev/null
@@ -1,15 +0,0 @@
-#
-# Workaround grub boot failure by building for core2
-# rather than or btver2(steppeeagle)
-#
-TUNE_CCARGS_append_amd += "-march=core2"
-
-#
-# Make sure to use our modified cfg file
-# This fixes an issue where Grub would sometimes use
-# the wrong grub.cfg at boot time.
-#
-FILESPATH_prepend := "${THISDIR}/files:"
-
-SRC_URI_append_mel = " file://0001-grub-core-kern-efi-mm.c-grub_efi_finish_boot_service.patch \
- file://0002-grub-core-kern-efi-mm.c-grub_efi_get_memory_map-Neve.patch"