[PATCH V0] linux-yocto-efi-test: Use custom LINUX_VERSION_EXTENSION
by Megha Dey
Poky has recently made the LINUX_VERSION_EXTENSION weaker in commit
9cc5cf0a64d("linux-yocto: Make LINUX_VERSION_EXTENSION weaker").
Use the custom LUV kernel extension in the LUV kernel recipe to remove
the actual nvdimm drivers and keep only the testing drivers.
Signed-off-by: Megha Dey <megha.dey(a)linux.intel.com>
---
meta-luv/recipes-kernel/linux/linux-yocto-efi-test_4.14.bb | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/meta-luv/recipes-kernel/linux/linux-yocto-efi-test_4.14.bb b/meta-luv/recipes-kernel/linux/linux-yocto-efi-test_4.14.bb
index faa9c6a..38d635e 100644
--- a/meta-luv/recipes-kernel/linux/linux-yocto-efi-test_4.14.bb
+++ b/meta-luv/recipes-kernel/linux/linux-yocto-efi-test_4.14.bb
@@ -124,8 +124,8 @@ KCONFIG_MODE = 'alldefconfig'
KBUILD_DEFCONFIG = "defconfig"
KBUILD_DEFCONFIG_x86 = "i386_defconfig"
KBUILD_DEFCONFIG_x86-64 = "x86_64_defconfig"
-LINUX_VERSION ?= "4.14"
-LINUX_VERSION_EXTENSION ?= "-efitest"
+LINUX_VERSION = "4.14"
+LINUX_VERSION_EXTENSION = "-efitest"
# Override SRCREV to point to a different commit in a bbappend file to
# build a different release of the Linux kernel.
@@ -143,8 +143,8 @@ do_install_append() {
if [ "${TARGET_ARCH}" = "x86_64" ]; then
# There are 2 copies of the NVDIMM modules which are built. This is a
# temporary fix to make sure the correct set of modules are used.
- rm -rf ${D}/lib/modules/${LINUX_VERSION}.0-yocto-standard/kernel/drivers/nvdimm/
- rm -rf ${D}/lib/modules/${LINUX_VERSION}.0-yocto-standard/kernel/drivers/dax/
- rm -rf ${D}/lib/modules/${LINUX_VERSION}.0-yocto-standard/kernel/drivers/acpi/
+ rm -rf ${D}/lib/modules/${LINUX_VERSION}.0${LINUX_VERSION_EXTENSION}/kernel/drivers/nvdimm/
+ rm -rf ${D}/lib/modules/${LINUX_VERSION}.0${LINUX_VERSION_EXTENSION}/kernel/drivers/dax/
+ rm -rf ${D}/lib/modules/${LINUX_VERSION}.0${LINUX_VERSION_EXTENSION}/kernel/drivers/acpi/
fi
}
--
1.9.1
4 years, 4 months
[PATCH] fwts: Update fwts v17.12.00
by Naresh Bhat
Update FWTS to version v17.12.00
Signed-off-by: Naresh Bhat <naresh.bhat(a)linaro.org>
---
meta-luv/recipes-core/fwts/fwts_git.bb | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/meta-luv/recipes-core/fwts/fwts_git.bb b/meta-luv/recipes-core/fwts/fwts_git.bb
index affe840..3f52dce 100644
--- a/meta-luv/recipes-core/fwts/fwts_git.bb
+++ b/meta-luv/recipes-core/fwts/fwts_git.bb
@@ -4,9 +4,9 @@ HOMEPAGE = "https://wiki.ubuntu.com/Kernel/Reference/fwts"
LICENSE = "GPLv2+"
LIC_FILES_CHKSUM = "file://src/main.c;beginline=1;endline=16;md5=31da590f3e9f3bd34dcdb9e4db568519"
-PV = "V17.11.00+git${SRCPV}"
+PV = "V17.12.00+git${SRCPV}"
-SRCREV = "0ec5075e19e14b6f7a81732ee4c7f1481e1ed523"
+SRCREV = "df2784c6fbff02288c736f85354b22f46dc193f4"
SRC_URI = "git://kernel.ubuntu.com/hwe/fwts.git \
file://0001-acpi-madt-only-inspect-Local-APIC-x2APIC-SAPIC-table.patch \
file://luv-parser-fwts \
--
2.7.4
4 years, 5 months
Linux UEFI Validation Project v2.2-rc2 release
by Megha Dey
Hello,
This is to announce the release of LUV v2.2-rc2.
This release comes approximately 7 weeks after our last 2.2-rc1 release
and we are further working to have releases more frequently. It mostly
includes updates to yocto, meta-oe, various test suites and kernel
version and bug fixes. We have also added a new test in bits to detect
Machine Check Errors and provide the user the option to dump the list of
device specific methods.
== New features
1. Dump list of Device-Specific Methods
DSM (Device Specific Method) as defined in ACPI spec is a control method
that enables devices to provide device specific control functions that
are consumed by the device driver. DSM's are optional on a platform and
they are optional to be consumed by OS. Both these points mean that a
kernel developer might be unaware of these DSM's and hence might never
use them in their device driver. By adding this feature, LUV could be
used as a vehicle to educate kernel developers about these DSM's. A
device driver developer, from the list of DSM's provided by LUV, could
then evaluate the usefulness of a DSM and then decide if it needs to be
used or left as an option.
2. Add tests in bits to detect Machine Check Errors
Machine Check Error (MCE) test is a way to find the errors generated by
the hardware or any specific subsystem(s). The value of these tests is
that it detects any MCEs that might have occurred before Linux starts to
boot. Hence, if detected, they were caused by hardware or possibly BIOS.
== Updated yocto version
Rocko is the latest release of the yocto Project. Upcoming features
require us to have the latest and greatest code from the yocto Project.
Also, it is also good as we get to have new features and security
updates.
== Updated meta-oe version
LUV has migrated to the rocko release from meta-openembedded. This
ensures compatibility with the updated yocto release and ensures we have
the latest and greatest code from the meta-openembedded project.
== Updated kernel version
Naresh Bhat updated the LUV kernel to v4.14 which is the latest mainline
kernel to be released.
== Updated test suites
We include fwts v17.11.00 and chipsec v1.3.5, the latest versions
available as of this week.
== Binary images for x86:
The release images for x86 (disk and network) are available on
https://01.org/linux-uefi-validation/v2.2
== Known issues:
Results are overwritten by horizontal line in luv.html file
https://github.com/01org/luv-yocto/issues/118
Sometimes bits-python-native fails to build
https://github.com/01org/luv-yocto/issues/101
Unstable behavior on i386 images
https://github.com/01org/luv-yocto/issues/76
Strange error while running live image using qemu
https://github.com/01org/luv-yocto/issues/64
== Fixed Issues:
LUV incorrectly reports MTRR across all processors are inconsistent
https://github.com/01org/luv-yocto/issues/127
Network issue delays running the testsuites in luv-netboot-image
https://github.com/01org/luv-yocto/issues/124
luv.reboot not rebooting in LUV v2.1-rc2
https://github.com/01org/luv-yocto/issues/120
Unify common parts of luv-live-image.bb and luv-netboot-image.bb
https://github.com/01org/luv-yocto/issues/114
Get rid of License warnings in linux firmware
https://github.com/01org/luv-yocto/issues/103
Tests suites that are executed needs to be configurable.
https://github.com/01org/luv-yocto/issues/29
== Short log:
Many thanks to all the contributors of this release. This is how the
short log looks like:
Gayatri Kammela (5):
fwts: bump to v17.11.00
luv-tests: Design/build LUV such that each testsuite is enabled or
disabled independently.
Bits: Skip the BITS testsuite if and when needed
Meta-luv/README: Update the README file on the new parameter
"LUV_TESTS"
bits: Add tests for Machine Check Errors
Megha Dey (23):
Merge master of git://git.yoctoproject.org/poky
Merge master of git://git.openembedded.org/meta-openembedded
grub: Update to 2.02
dhcp: Update to 4.3.6
systemd: Update to v234
qemu: Update to 2.10.0
bdwgc: add new recipe for autogen
guile: add new recipe for autogen
autogen-native: add new recipe for bits
bits: add the autogen dependency
bits: ensure bits builds with gcc7
luv: increase the maximum size of the initramfs
linux-yocto-efi-test: Use custom LINUX_VERSION_EXTENSION
linux-firmware: Get rid of License warnings
luv-test: Merge various packages into a single package
luv-test: Ensure luv.reboot and luv.poweroff work
core-image-efi-initramfs: Install iasl and acpixtract
systemd: Use ConditionKernelCommandLine to enable tty1
systemd: Remove networking.service
systemd: Selectively start systemd-networkd-wait-online service
grub-efi: Add aarch64 to the compatible target list
chipsec: Fix missing gcc issue
Merge branch rocko of git://git.yoctoproject.org/poky
Naresh Bhat (3):
linux-yocto-efi-test: Bump kernel and linux-libc-headers to v4.14
AArch64: Build grub-efi v2.02 for AArch64
linux-yocto-efi-test: Increase number of CPUS
Ricardo Neri (4):
pstore-test: delete prev_uuid only in post-reboot tests
fwts: acpi: madt: only inspect Local APIC/x2APIC/SAPIC tables if
enabled
chipsec: bump to v1.3.5
linux-yocto-efi-test: x86/mttr: Update only valid variable-range
MTRRs
Sai Praneeth (9):
efivarfs: Fix build error by dropping a patch to efivarfs
meta-luv: Remove iasl recipe
luv-dmesg-acpi-tables-dump: Add support to list _DSM's
luv-xxxx-image: Unify common parts of luv-live-image and
luv-netboot-image
luv-live-image: Get rid of LIC_FILES_CHKSUM build warning
fwts: Fix build warning installed-vs-shipped files
grub: Remove unused grub patch
luv-netboot-image: Don't populate bits twice
grub: Change default tsc calibration method to pmtimer on EFI
systems
Thanks,
Megha
4 years, 6 months
[PATCH V2] luv-netboot-image: Don't populate bits twice
by Sai Praneeth Prakhya
From: Sai Praneeth <sai.praneeth.prakhya(a)intel.com>
In do_populate_image() of luv-netboot-image we call build_hddimg(),
which in-turn calls efi_populate_bits(). So avoid calling
efi_populate_bits() again from do_populate_image() of luv-netboot-image.
build_hddimg() calls efi_populate_bits() through this call chain
build_hddimg() -> efi_hddimg_populate() -> efi_populate() ->
efi_populate_bits()
This also fixes luv-netboot-image not booting after LUV being updated to
rocko. The issue I observed was, LUV netboot image doesn't boot Linux.
Grub calls efi_finish_exit_boot_services() which returns successfully
and grub calls a function that transfers control to Linux but we aren't
sure if Linux has actually started booting (earlyprintk doesn't print
anything). Debugging this issue, I found that it happens with
5bc10b1bce13 ("linux-yocto-efi-test: Use custom LINUX_VERSION_EXTENSION")
and when LINUX_VERSION_EXTENSION is renamed to "-efi-test" or
"yocto-standard" or "-efi-test-test1", netboot image boots. I have also
noticed that, a booting luv-netboot-image.efi is ~117 MB where as a
buggy luv-netboot-image.efi is ~101 MB.
Apart from these symptoms of the issue, I am not sure _how_/_why_ this
patch resolves the above issue. A theory could be that bitbake might be
overwriting some parts of Linux kernel when it populates bits second time.
Cc: Naresh Bhat <naresh.bhat(a)linaro.org>
Cc: Megha Dey <megha.dey(a)linux.intel.com>
Cc: Ricardo Neri <ricardo.neri-calderon(a)linux.intel.com>
Signed-off-by: Sai Praneeth Prakhya <sai.praneeth.prakhya(a)intel.com>
---
Changes since V1:
1. Make commit message more verbose detailing about the issue I observed.
meta-luv/recipes-core/images/luv-netboot-image.bb | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/meta-luv/recipes-core/images/luv-netboot-image.bb b/meta-luv/recipes-core/images/luv-netboot-image.bb
index facb24aa562b..e78aff9c216c 100644
--- a/meta-luv/recipes-core/images/luv-netboot-image.bb
+++ b/meta-luv/recipes-core/images/luv-netboot-image.bb
@@ -74,9 +74,7 @@ do_bootimg[noexec] = "1"
do_populate_image() {
install -d ${HDDDIR}${EFIDIR}
- if [ "${TARGET_ARCH}" != "aarch64" ]; then
- efi_populate_bits ${HDDDIR}
- else
+ if [ "${TARGET_ARCH}" = "aarch64" ]; then
echo "${DEST_EFI_LOADER_IMAGE}" > ${HDDDIR}${EFIDIR}/startup.nsh
install -m 0644 ${DEPLOY_DIR_IMAGE}/${GRUB_EFI_LOADER_IMAGE} ${HDDDIR}${EFIDIR}/${DEST_EFI_LOADER_IMAGE}
fi
--
2.1.4
4 years, 6 months
[PATCH] luv-netboot-image: Don't populate bits twice
by Sai Praneeth Prakhya
From: Sai Praneeth <sai.praneeth.prakhya(a)intel.com>
In do_populate_image() of luv-netboot-image we call build_hddimg(),
which in-turn calls efi_populate_bits(). So avoid calling
efi_populate_bits() again from do_populate_image() of luv-netboot-image.
This also fixes luv-netboot-image booting issue.
build_hddimg() calls efi_populate_bits() through this call chain
build_hddimg() -> efi_hddimg_populate() -> efi_populate() ->
efi_populate_bits()
Cc: Naresh Bhat <naresh.bhat(a)linaro.org>
Cc: Megha Dey <megha.dey(a)linux.intel.com>
Cc: Ricardo Neri <ricardo.neri-calderon(a)linux.intel.com>
Signed-off-by: Sai Praneeth Prakhya <sai.praneeth.prakhya(a)intel.com>
---
meta-luv/recipes-core/images/luv-netboot-image.bb | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/meta-luv/recipes-core/images/luv-netboot-image.bb b/meta-luv/recipes-core/images/luv-netboot-image.bb
index facb24aa562b..e78aff9c216c 100644
--- a/meta-luv/recipes-core/images/luv-netboot-image.bb
+++ b/meta-luv/recipes-core/images/luv-netboot-image.bb
@@ -74,9 +74,7 @@ do_bootimg[noexec] = "1"
do_populate_image() {
install -d ${HDDDIR}${EFIDIR}
- if [ "${TARGET_ARCH}" != "aarch64" ]; then
- efi_populate_bits ${HDDDIR}
- else
+ if [ "${TARGET_ARCH}" = "aarch64" ]; then
echo "${DEST_EFI_LOADER_IMAGE}" > ${HDDDIR}${EFIDIR}/startup.nsh
install -m 0644 ${DEPLOY_DIR_IMAGE}/${GRUB_EFI_LOADER_IMAGE} ${HDDDIR}${EFIDIR}/${DEST_EFI_LOADER_IMAGE}
fi
--
2.1.4
4 years, 6 months
[PATCH] grub: Remove unused grub patch
by Sai Praneeth Prakhya
From: Sai Praneeth <sai.praneeth.prakhya(a)intel.com>
As we updated grub to v2.02 it already has patch "51f375d68852: efidisk:
Respect block_io_protocol buffer alignment". Also, we don't apply this
patch to grub in grub recipe. So, remove this patch from LUV repo.
Cc: Naresh Bhat <naresh.bhat(a)linaro.org>
Cc: Megha Dey <megha.dey(a)linux.intel.com>
Cc: Ricardo Neri <ricardo.neri-calderon(a)linux.intel.com>
Signed-off-by: Sai Praneeth Prakhya <sai.praneeth.prakhya(a)intel.com>
---
...espect-block_io_protocol-buffer-alignment.patch | 135 ---------------------
1 file changed, 135 deletions(-)
delete mode 100644 meta-luv/recipes-bsp/grub/files/0015-efidisk-Respect-block_io_protocol-buffer-alignment.patch
diff --git a/meta-luv/recipes-bsp/grub/files/0015-efidisk-Respect-block_io_protocol-buffer-alignment.patch b/meta-luv/recipes-bsp/grub/files/0015-efidisk-Respect-block_io_protocol-buffer-alignment.patch
deleted file mode 100644
index 47f53ae474a4..000000000000
--- a/meta-luv/recipes-bsp/grub/files/0015-efidisk-Respect-block_io_protocol-buffer-alignment.patch
+++ /dev/null
@@ -1,135 +0,0 @@
-From 20bd730fe7184635f5cbd57a6f5af91421ce1754 Mon Sep 17 00:00:00 2001
-From: Ricardo Neri <ricardo.neri-calderon(a)linux.intel.com>
-Date: Tue, 24 May 2016 08:33:58 -0700
-Subject: [PATCH] efidisk: Respect block_io_protocol buffer alignment
-
-This a backport of:
-
-commit 51f375d688529b7c1819ba40188ee52b9333887c
-Author: Leif Lindholm <leif.lindholm(a)linaro.org>
-Date: Sat Feb 27 13:44:59 2016 +0100
-
- efidisk: Respect block_io_protocol buffer alignment
-
-from the grub development tree. Paraphrasing Leif's words, the
-grub_efi_block_io_media contains the io_align field, which describes
-the minimum alignment required for buffers used in data transfers
-with device. Lief's approach is to create a temporary buffer for
-the data transfers that meets the alignment requireements of the
-device.
-
-Recent updates to firmware implementations, including Tianocore,
-enforce this alignment (i.e. EFI_INVALID_PARAMETER is returned on
-unaligned buffers). Thus, it is necessary to backport this fix to
-our grub.
-
-Signed-off-by: Ricardo Neri <ricardo.neri-calderon(a)linux.intel.com>
----
- grub-core/disk/efi/efidisk.c | 59 +++++++++++++++++++++++++++++++++++++++-----
- 1 file changed, 53 insertions(+), 6 deletions(-)
-
-diff --git a/grub-core/disk/efi/efidisk.c b/grub-core/disk/efi/efidisk.c
-index d9d788c..07f1eab 100644
---- a/grub-core/disk/efi/efidisk.c
-+++ b/grub-core/disk/efi/efidisk.c
-@@ -515,8 +515,15 @@ grub_efidisk_open (const char *name, struct grub_disk *disk)
- m = d->block_io->media;
- /* FIXME: Probably it is better to store the block size in the disk,
- and total sectors should be replaced with total blocks. */
-- grub_dprintf ("efidisk", "m = %p, last block = %llx, block size = %x\n",
-- m, (unsigned long long) m->last_block, m->block_size);
-+ grub_dprintf ("efidisk",
-+ "m = %p, last block = %llx, block size = %x, io align = %x\n",
-+ m, (unsigned long long) m->last_block, m->block_size,
-+ m->io_align);
-+
-+ /* Ensure required buffer alignment is a power of two (or is zero). */
-+ if (m->io_align & (m->io_align - 1))
-+ return grub_error (GRUB_ERR_IO, "invalid buffer alignment %d", m->io_align);
-+
- disk->total_sectors = m->last_block + 1;
- if (m->block_size & (m->block_size - 1) || !m->block_size)
- return grub_error (GRUB_ERR_IO, "invalid sector size %d",
-@@ -546,6 +553,8 @@ grub_efidisk_read (struct grub_disk *disk, grub_disk_addr_t sector,
- struct grub_efidisk_data *d;
- grub_efi_block_io_t *bio;
- grub_efi_status_t status;
-+ grub_size_t io_align, num_bytes;
-+ char *aligned_buf = 0;
-
- d = disk->data;
- bio = d->block_io;
-@@ -554,10 +563,30 @@ grub_efidisk_read (struct grub_disk *disk, grub_disk_addr_t sector,
- "reading 0x%lx sectors at the sector 0x%llx from %s\n",
- (unsigned long) size, (unsigned long long) sector, disk->name);
-
-+ /* Set alignment to 1 if 0 specified */
-+ io_align = bio->media->io_align ? bio->media->io_align : 1;
-+ num_bytes = size << disk->log_sector_size;
-+
-+ if ((grub_addr_t) buf & (io_align - 1))
-+ {
-+ aligned_buf = grub_memalign (io_align, num_bytes);
-+ if (! aligned_buf)
-+ return GRUB_ERR_OUT_OF_MEMORY;
-+ }
-+ else
-+ aligned_buf = buf;
-+
- status = efi_call_5 (bio->read_blocks, bio, bio->media->media_id,
- (grub_efi_uint64_t) sector,
-- (grub_efi_uintn_t) size << disk->log_sector_size,
-- buf);
-+ (grub_efi_uintn_t) num_bytes,
-+ aligned_buf);
-+
-+ if ((grub_addr_t) buf & (io_align - 1))
-+ {
-+ grub_memcpy (buf, aligned_buf, num_bytes);
-+ grub_free (aligned_buf);
-+ }
-+
- if (status != GRUB_EFI_SUCCESS)
- return grub_error (GRUB_ERR_READ_ERROR,
- N_("failure reading sector 0x%llx from `%s'"),
-@@ -575,6 +604,8 @@ grub_efidisk_write (struct grub_disk *disk, grub_disk_addr_t sector,
- struct grub_efidisk_data *d;
- grub_efi_block_io_t *bio;
- grub_efi_status_t status;
-+ grub_size_t io_align, num_bytes;
-+ char *aligned_buf = 0;
-
- d = disk->data;
- bio = d->block_io;
-@@ -583,10 +614,26 @@ grub_efidisk_write (struct grub_disk *disk, grub_disk_addr_t sector,
- "writing 0x%lx sectors at the sector 0x%llx to %s\n",
- (unsigned long) size, (unsigned long long) sector, disk->name);
-
-+ /* Set alignment to 1 if 0 specified */
-+ io_align = bio->media->io_align ? bio->media->io_align : 1;
-+ num_bytes = size << disk->log_sector_size;
-+
-+ if ((grub_addr_t) buf & (io_align - 1))
-+ {
-+ aligned_buf = grub_memalign (io_align, num_bytes);
-+ if (! aligned_buf)
-+ return GRUB_ERR_OUT_OF_MEMORY;
-+ grub_memcpy (aligned_buf, buf, num_bytes);
-+ }
-+
- status = efi_call_5 (bio->write_blocks, bio, bio->media->media_id,
- (grub_efi_uint64_t) sector,
-- (grub_efi_uintn_t) size << disk->log_sector_size,
-- (void *) buf);
-+ (grub_efi_uintn_t) num_bytes,
-+ aligned_buf ? aligned_buf : (void *)buf);
-+
-+ if ((grub_addr_t) buf & (io_align - 1))
-+ grub_free (aligned_buf);
-+
- if (status != GRUB_EFI_SUCCESS)
- return grub_error (GRUB_ERR_WRITE_ERROR,
- N_("failure writing sector 0x%llx to `%s'"),
---
-2.8.1
-
--
2.1.4
4 years, 6 months
[PATCH] grub-efi: Add aarch64 to the compatible target list
by Megha Dey
The latest grub v2.02 has support for aarch64 as well. Hence, it should
be added to the compatible target list.
This change needs to be sent to the yocto project mailing list. Once
accepted there, this patch can be dropped in LUV.
Signed-off-by: Megha Dey <megha.dey(a)linux.intel.com>
---
meta/recipes-bsp/grub/grub-efi_2.02.bb | 3 +++
1 file changed, 3 insertions(+)
diff --git a/meta/recipes-bsp/grub/grub-efi_2.02.bb b/meta/recipes-bsp/grub/grub-efi_2.02.bb
index b949beb..9bc6290 100644
--- a/meta/recipes-bsp/grub/grub-efi_2.02.bb
+++ b/meta/recipes-bsp/grub/grub-efi_2.02.bb
@@ -21,6 +21,9 @@ python __anonymous () {
elif re.match('i.86', target):
grubtarget = 'i386'
grubimage = "grub-efi-bootia32.efi"
+ elif re.match('aarch64', target):
+ grubtarget = 'arm64'
+ grubimage = "grub-efi-bootaa64.efi"
else:
raise bb.parse.SkipPackage("grub-efi is incompatible with target %s" % target)
d.setVar("GRUB_TARGET", grubtarget)
--
1.9.1
4 years, 6 months
[PATCH] AArch64: Build grub-efi v2.02 for AArch64
by Megha Dey
From: Naresh Bhat <naresh.bhat(a)linaro.org>
We are trying to build and use grub across x86/ARM64 architecture.
Earlier there was no support of AArch64 in grub-efi, Hence AArch64
was dependent on upstream grub git repository. The LUV project use
to pull and build grub git repository whenever we build the project
for AArch64. But recently poky updated meta layer with grub v2.02
and LUV is rebased on top of poky. Hence we can use a common grub
across all the architecture. The luv-netboot-image also depends on
the _RDEPENDS variable.
Signed-off-by: Naresh Bhat <naresh.bhat(a)linaro.org>
Signed-off-by: Megha Dey <megha.dey(a)linux.intel.com>
---
meta-luv/classes/luv-efi.bbclass | 12 +-----------
meta-luv/recipes-bsp/grub/grub-efi_2.02.bbappend | 12 ++++++++++--
meta-luv/recipes-core/images/luv-netboot-image.bb | 2 +-
3 files changed, 12 insertions(+), 14 deletions(-)
diff --git a/meta-luv/classes/luv-efi.bbclass b/meta-luv/classes/luv-efi.bbclass
index a941a29..8c1b892 100644
--- a/meta-luv/classes/luv-efi.bbclass
+++ b/meta-luv/classes/luv-efi.bbclass
@@ -16,17 +16,7 @@ def get_bits_depends(d):
return ""
_BITSDEPENDS = "${@get_bits_depends(d)}"
-# The x86 build is depends on grub-efi and AArch64 build depends on grub_git
-def get_grub_depends(d):
- import re
- deps = d.getVar('TARGET_PREFIX', True)
- if re.search("(x86_64|i.86).*",deps):
- return "${MLPREFIX}grub-efi"
- if re.search("aarch64",deps):
- return "${MLPREFIX}grub"
-
-_RDEPENDS = "${@get_grub_depends(d)}"
-do_bootimg[depends] += "${_RDEPENDS}:do_deploy \
+do_bootimg[depends] += "${MLPREFIX}grub-efi:do_deploy \
sbsigntool-native:do_populate_sysroot"
GRUB_EFI_LOADER_IMAGE_x86-64 = "grub-efi-bootx64.efi"
diff --git a/meta-luv/recipes-bsp/grub/grub-efi_2.02.bbappend b/meta-luv/recipes-bsp/grub/grub-efi_2.02.bbappend
index de68f3d..3c11924 100644
--- a/meta-luv/recipes-bsp/grub/grub-efi_2.02.bbappend
+++ b/meta-luv/recipes-bsp/grub/grub-efi_2.02.bbappend
@@ -13,7 +13,7 @@ python __anonymous(){
d.appendVar("GRUB_BUILDIN", ' memdisk -m ${GRUB_MEMDISK}')
}
-SRC_URI += "file://0001-pe32.h-add-header-structures-for-TE-and-DOS-executab.patch \
+COMMON_GRUB_x86 += "file://0001-pe32.h-add-header-structures-for-TE-and-DOS-executab.patch \
file://0002-shim-add-needed-data-structures.patch \
file://0003-efi-chainloader-implement-an-UEFI-Exit-service-for-s.patch \
file://0004-efi-chainloader-port-shim-to-grub.patch \
@@ -26,7 +26,15 @@ SRC_URI += "file://0001-pe32.h-add-header-structures-for-TE-and-DOS-executab.pat
file://0011-grub-core-loader-extend-loader-options.patch \
file://0012-grub-core-loader-add-support-for-memdisks.patch \
file://0013-grub-core-loader-pass-current-disk-device-to-loaded-.patch \
- file://0014-grub-util-set-prefix-to-EFI-BOOT-when-booting-f.patch \
+ "
+
+# Add grub-efi patches for x86/x86-64/arm64
+SRC_URI_append_x86 = "${COMMON_GRUB_x86} \
+ "
+SRC_URI_append_x86-64 = "${COMMON_GRUB_x86} \
+ "
+
+SRC_URI += "file://0014-grub-util-set-prefix-to-EFI-BOOT-when-booting-f.patch \
"
GRUB_BUILDIN = "boot linux ext2 fat serial part_msdos part_gpt \
diff --git a/meta-luv/recipes-core/images/luv-netboot-image.bb b/meta-luv/recipes-core/images/luv-netboot-image.bb
index 88381a7..26b18c2 100644
--- a/meta-luv/recipes-core/images/luv-netboot-image.bb
+++ b/meta-luv/recipes-core/images/luv-netboot-image.bb
@@ -64,4 +64,4 @@ addtask do_deploy before do_build after do_mkimage
addtask image_ext4 before do_bootimg before do_build
do_mkimage[depends] += "${INITRD_IMAGE_LIVE}:do_build"
-do_deploy[depends] += "${_RDEPENDS}:do_deploy"
+do_deploy[depends] += "${MLPREFIX}grub-efi:do_deploy"
--
1.9.1
4 years, 6 months
[PATCH 2/3] AArch64: Build grub-efi v2.02 for AArch64
by Naresh Bhat
We are trying to build and use grub across x86/ARM64 architecture.
Earlier there was no support of AArch64 in grub-efi, Hence AArch64
was dependent on upstream grub git repository. The LUV project use
to pull and build grub git repository whenever we build the project
for AArch64. But recently poky updated meta layer with grub v2.02
and LUV is rebased on top of poky. Hence we can use a common grub
across all the architecture. The luv-netboot-image also depends on
the _RDEPENDS variable.
Signed-off-by: Naresh Bhat <naresh.bhat(a)linaro.org>
---
meta-luv/classes/luv-efi.bbclass | 12 +-----------
meta-luv/recipes-bsp/grub/grub-efi_2.02.bbappend | 12 ++++++++++--
meta-luv/recipes-core/images/luv-netboot-image.bb | 2 +-
meta/recipes-bsp/grub/grub-efi_2.02.bb | 3 +++
4 files changed, 15 insertions(+), 14 deletions(-)
diff --git a/meta-luv/classes/luv-efi.bbclass b/meta-luv/classes/luv-efi.bbclass
index 441ab39..db7c886 100644
--- a/meta-luv/classes/luv-efi.bbclass
+++ b/meta-luv/classes/luv-efi.bbclass
@@ -16,17 +16,7 @@ def get_bits_depends(d):
return ""
_BITSDEPENDS = "${@get_bits_depends(d)}"
-# The x86 build is depends on grub-efi and AArch64 build depends on grub_git
-def get_grub_depends(d):
- import re
- deps = d.getVar('TARGET_PREFIX', True)
- if re.search("(x86_64|i.86).*",deps):
- return "${MLPREFIX}grub-efi"
- if re.search("aarch64",deps):
- return "${MLPREFIX}grub"
-
-_RDEPENDS = "${@get_grub_depends(d)}"
-do_bootimg[depends] += "${_RDEPENDS}:do_deploy \
+do_bootimg[depends] += "${MLPREFIX}grub-efi:do_deploy \
sbsigntool-native:do_populate_sysroot"
GRUB_EFI_LOADER_IMAGE_x86-64 = "grub-efi-bootx64.efi"
diff --git a/meta-luv/recipes-bsp/grub/grub-efi_2.02.bbappend b/meta-luv/recipes-bsp/grub/grub-efi_2.02.bbappend
index de68f3d..3c11924 100644
--- a/meta-luv/recipes-bsp/grub/grub-efi_2.02.bbappend
+++ b/meta-luv/recipes-bsp/grub/grub-efi_2.02.bbappend
@@ -13,7 +13,7 @@ python __anonymous(){
d.appendVar("GRUB_BUILDIN", ' memdisk -m ${GRUB_MEMDISK}')
}
-SRC_URI += "file://0001-pe32.h-add-header-structures-for-TE-and-DOS-executab.patch \
+COMMON_GRUB_x86 += "file://0001-pe32.h-add-header-structures-for-TE-and-DOS-executab.patch \
file://0002-shim-add-needed-data-structures.patch \
file://0003-efi-chainloader-implement-an-UEFI-Exit-service-for-s.patch \
file://0004-efi-chainloader-port-shim-to-grub.patch \
@@ -26,7 +26,15 @@ SRC_URI += "file://0001-pe32.h-add-header-structures-for-TE-and-DOS-executab.pat
file://0011-grub-core-loader-extend-loader-options.patch \
file://0012-grub-core-loader-add-support-for-memdisks.patch \
file://0013-grub-core-loader-pass-current-disk-device-to-loaded-.patch \
- file://0014-grub-util-set-prefix-to-EFI-BOOT-when-booting-f.patch \
+ "
+
+# Add grub-efi patches for x86/x86-64/arm64
+SRC_URI_append_x86 = "${COMMON_GRUB_x86} \
+ "
+SRC_URI_append_x86-64 = "${COMMON_GRUB_x86} \
+ "
+
+SRC_URI += "file://0014-grub-util-set-prefix-to-EFI-BOOT-when-booting-f.patch \
"
GRUB_BUILDIN = "boot linux ext2 fat serial part_msdos part_gpt \
diff --git a/meta-luv/recipes-core/images/luv-netboot-image.bb b/meta-luv/recipes-core/images/luv-netboot-image.bb
index 88381a7..26b18c2 100644
--- a/meta-luv/recipes-core/images/luv-netboot-image.bb
+++ b/meta-luv/recipes-core/images/luv-netboot-image.bb
@@ -64,4 +64,4 @@ addtask do_deploy before do_build after do_mkimage
addtask image_ext4 before do_bootimg before do_build
do_mkimage[depends] += "${INITRD_IMAGE_LIVE}:do_build"
-do_deploy[depends] += "${_RDEPENDS}:do_deploy"
+do_deploy[depends] += "${MLPREFIX}grub-efi:do_deploy"
diff --git a/meta/recipes-bsp/grub/grub-efi_2.02.bb b/meta/recipes-bsp/grub/grub-efi_2.02.bb
index b949beb..fa9c6a9 100644
--- a/meta/recipes-bsp/grub/grub-efi_2.02.bb
+++ b/meta/recipes-bsp/grub/grub-efi_2.02.bb
@@ -21,6 +21,9 @@ python __anonymous () {
elif re.match('i.86', target):
grubtarget = 'i386'
grubimage = "grub-efi-bootia32.efi"
+ elif re.match('aarch64', target):
+ grubtarget = 'arm64'
+ grubimage = "grub-efi-bootaa64.efi"
else:
raise bb.parse.SkipPackage("grub-efi is incompatible with target %s" % target)
d.setVar("GRUB_TARGET", grubtarget)
--
2.7.4
4 years, 6 months