summaryrefslogtreecommitdiffstats
path: root/meta-intel-extras/recipes
diff options
context:
space:
mode:
authorLouai Al-Khanji <louai.al-khanji@qt.io>2016-07-28 12:25:28 -0700
committerLouai Al-Khanji <louai.al-khanji@qt.io>2016-07-29 15:42:40 +0000
commit6b5219b8034c9ffd3094657486e500119ad47325 (patch)
treefdf106cce1392c4cb73286c8d4df877f90b4836e /meta-intel-extras/recipes
parent0409e66022fb4cec06de10c355a7ab9c59aae945 (diff)
downloadmeta-boot2qt-6b5219b8034c9ffd3094657486e500119ad47325.tar.gz
intel-corei7-64: fix race in image generation
Prepending to IMAGE_CMD_ext3 in order to push files into the rootfs is flaky for a couple of reasons. First, it is conceptually inconsistent with the rest of the build system - files that go into the rootfs should really by installed by packages through the regular mechanisms. Second, and what prompted this patch, with several concurrent image generation tasks this is just unsafe. I regularly experienced .tgz image generation failures, as tar complained that the files changed from under it. Since this is related to the grub-efi packaging on this particular device, just package the microcode into the required initramfs in that recipe. Change-Id: I4e037ddbb017d1764852310b0b77900cde260dd6 Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
Diffstat (limited to 'meta-intel-extras/recipes')
-rw-r--r--meta-intel-extras/recipes/grub/grub-efi_2.00.bbappend13
1 files changed, 12 insertions, 1 deletions
diff --git a/meta-intel-extras/recipes/grub/grub-efi_2.00.bbappend b/meta-intel-extras/recipes/grub/grub-efi_2.00.bbappend
index 8a223fe..0104aab 100644
--- a/meta-intel-extras/recipes/grub/grub-efi_2.00.bbappend
+++ b/meta-intel-extras/recipes/grub/grub-efi_2.00.bbappend
@@ -30,6 +30,12 @@
30FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" 30FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
31SRC_URI += "file://grub.cfg" 31SRC_URI += "file://grub.cfg"
32 32
33do_install[depends] += " \
34 virtual/kernel:do_deploy \
35 ${INITRAMFS_IMAGE}:do_rootfs \
36 ${@bb.utils.contains('MACHINE_FEATURES', 'intel-ucode', 'intel-microcode:do_deploy', '', d)} \
37"
38
33do_deploy_prepend() { 39do_deploy_prepend() {
34 40
35cat > ${WORKDIR}/cfg <<EOF 41cat > ${WORKDIR}/cfg <<EOF
@@ -42,7 +48,12 @@ do_install_append() {
42 48
43 install -d ${D}/boot/grub2/ 49 install -d ${D}/boot/grub2/
44 install -m 644 ${WORKDIR}/grub.cfg ${D}/boot/grub2/ 50 install -m 644 ${WORKDIR}/grub.cfg ${D}/boot/grub2/
51
52 # https://www.kernel.org/doc/Documentation/x86/early-microcode.txt
53 microcode="${@bb.utils.contains('MACHINE_FEATURES', 'intel-ucode', '${DEPLOY_DIR_IMAGE}/microcode.cpio ', '', d)}"
54 cat ${microcode} ${DEPLOY_DIR_IMAGE}/${INITRAMFS_IMAGE}-${MACHINE}.cpio.gz > ${D}/boot/initramfs
55 chmod 0644 ${D}/boot/initramfs
45} 56}
46 57
47PACKAGES += "${PN}-config" 58PACKAGES += "${PN}-config"
48FILES_${PN}-config = "/boot/grub2/" 59FILES_${PN}-config = "/boot/grub2/ /boot/initramfs"