diff options
author | Samuli Piippo <samuli.piippo@qt.io> | 2018-10-31 15:15:29 +0200 |
---|---|---|
committer | Samuli Piippo <samuli.piippo@qt.io> | 2018-11-01 07:55:40 +0000 |
commit | 1b57456064b33a5838882909d26f92c00982a0a0 (patch) | |
tree | 779f08ecc748ba03645563391fa195363a48ad37 /meta-intel-extras/recipes | |
parent | dd7ede32632c6452c10aa424800c60a09cc42c8a (diff) | |
download | meta-boot2qt-1b57456064b33a5838882909d26f92c00982a0a0.tar.gz |
intel: rework initramfs support
The WKS image creation ignored our old initramfs. Change to using
an existing core-image-minimal-initramfs recipe and extend it with
support for the internal MMC reader. Add separate recipe to combine
the intel microcode and the new initramfs, and add wks file to use it.
Remove all old recipes that are no longer used.
Change-Id: I4e1f244685a7f2bd304aa23d9e07580fa9dc9652
Reviewed-by: Timo Aarnipuro <timo.aarnipuro@qt.io>
Reviewed-by: Mikko Gronoff <mikko.gronoff@qt.io>
Diffstat (limited to 'meta-intel-extras/recipes')
-rw-r--r-- | meta-intel-extras/recipes/grub/grub-efi/grub.cfg | 10 | ||||
-rw-r--r-- | meta-intel-extras/recipes/images/core-image-minimal-initramfs.bbappend (renamed from meta-intel-extras/recipes/initramfs-basic/initramfs-basic.bbappend) | 1 | ||||
-rw-r--r-- | meta-intel-extras/recipes/initramfs-basic/init-basic/init-device.sh | 3 | ||||
-rw-r--r-- | meta-intel-extras/recipes/initrdscripts/initramfs-framework/rtsx_pci_sdmmc | 8 | ||||
-rw-r--r-- | meta-intel-extras/recipes/initrdscripts/initramfs-framework_1.0.bbappend (renamed from meta-intel-extras/recipes/initramfs-basic/init-basic.bbappend) | 12 | ||||
-rw-r--r-- | meta-intel-extras/recipes/microcode-initramfs/microcode-initramfs.bb (renamed from meta-intel-extras/recipes/grub/grub-efi_%.bbappend) | 39 |
6 files changed, 33 insertions, 40 deletions
diff --git a/meta-intel-extras/recipes/grub/grub-efi/grub.cfg b/meta-intel-extras/recipes/grub/grub-efi/grub.cfg deleted file mode 100644 index 287cf7c..0000000 --- a/meta-intel-extras/recipes/grub/grub-efi/grub.cfg +++ /dev/null | |||
@@ -1,10 +0,0 @@ | |||
1 | # Created by meta-b2qt | ||
2 | serial --unit=0 --speed=115200 --word=8 --parity=no --stop=1 | ||
3 | default=boot | ||
4 | timeout=0 | ||
5 | |||
6 | menuentry 'boot' { | ||
7 | linux /boot/bzImage root=LABEL=rootfs | ||
8 | initrd /boot/initramfs | ||
9 | } | ||
10 | |||
diff --git a/meta-intel-extras/recipes/initramfs-basic/initramfs-basic.bbappend b/meta-intel-extras/recipes/images/core-image-minimal-initramfs.bbappend index 1ac5f03..c1918ba 100644 --- a/meta-intel-extras/recipes/initramfs-basic/initramfs-basic.bbappend +++ b/meta-intel-extras/recipes/images/core-image-minimal-initramfs.bbappend | |||
@@ -27,4 +27,5 @@ | |||
27 | ## | 27 | ## |
28 | ############################################################################ | 28 | ############################################################################ |
29 | 29 | ||
30 | INITRAMFS_SCRIPTS += "initramfs-module-rtsx-pci-sdmmc" | ||
30 | PACKAGE_INSTALL += "kernel-module-rtsx-pci-sdmmc" | 31 | PACKAGE_INSTALL += "kernel-module-rtsx-pci-sdmmc" |
diff --git a/meta-intel-extras/recipes/initramfs-basic/init-basic/init-device.sh b/meta-intel-extras/recipes/initramfs-basic/init-basic/init-device.sh deleted file mode 100644 index 09eadbf..0000000 --- a/meta-intel-extras/recipes/initramfs-basic/init-basic/init-device.sh +++ /dev/null | |||
@@ -1,3 +0,0 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | modprobe rtsx_pci_sdmmc | ||
diff --git a/meta-intel-extras/recipes/initrdscripts/initramfs-framework/rtsx_pci_sdmmc b/meta-intel-extras/recipes/initrdscripts/initramfs-framework/rtsx_pci_sdmmc new file mode 100644 index 0000000..dd14d6d --- /dev/null +++ b/meta-intel-extras/recipes/initrdscripts/initramfs-framework/rtsx_pci_sdmmc | |||
@@ -0,0 +1,8 @@ | |||
1 | #!/bin/sh | ||
2 | rtsx_pci_sdmmc_enabled() { | ||
3 | return 0 | ||
4 | } | ||
5 | |||
6 | rtsx_pci_sdmmc_run() { | ||
7 | load_kernel_module rtsx_pci_sdmmc | ||
8 | } | ||
diff --git a/meta-intel-extras/recipes/initramfs-basic/init-basic.bbappend b/meta-intel-extras/recipes/initrdscripts/initramfs-framework_1.0.bbappend index ab69a09..cfd05cd 100644 --- a/meta-intel-extras/recipes/initramfs-basic/init-basic.bbappend +++ b/meta-intel-extras/recipes/initrdscripts/initramfs-framework_1.0.bbappend | |||
@@ -29,10 +29,14 @@ | |||
29 | 29 | ||
30 | FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" | 30 | FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" |
31 | 31 | ||
32 | SRC_URI += "file://init-device.sh" | 32 | SRC_URI += "file://rtsx_pci_sdmmc" |
33 | 33 | ||
34 | do_install_append () { | 34 | do_install_append() { |
35 | install -m 0755 ${WORKDIR}/init-device.sh ${D}/init-device | 35 | install -m 0755 ${WORKDIR}/rtsx_pci_sdmmc ${D}/init.d/20-rtsx_pci_sdmmc |
36 | } | 36 | } |
37 | 37 | ||
38 | FILES_${PN} += "/init-device" | 38 | PACKAGES += "initramfs-module-rtsx-pci-sdmmc" |
39 | |||
40 | SUMMARY_initramfs-module-rtsx-pci-sdmmc = "initramfs support for rtsx_pci_sdmmc" | ||
41 | RDEPENDS_initramfs-module-rtsx-pci-sdmmc = "${PN}-base" | ||
42 | FILES_initramfs-module-rtsx-pci-sdmmc = "/init.d/20-rtsx_pci_sdmmc" | ||
diff --git a/meta-intel-extras/recipes/grub/grub-efi_%.bbappend b/meta-intel-extras/recipes/microcode-initramfs/microcode-initramfs.bb index f3a95f2..8682c27 100644 --- a/meta-intel-extras/recipes/grub/grub-efi_%.bbappend +++ b/meta-intel-extras/recipes/microcode-initramfs/microcode-initramfs.bb | |||
@@ -1,6 +1,6 @@ | |||
1 | ############################################################################ | 1 | ############################################################################ |
2 | ## | 2 | ## |
3 | ## Copyright (C) 2016 The Qt Company Ltd. | 3 | ## Copyright (C) 2018 The Qt Company Ltd. |
4 | ## Contact: https://www.qt.io/licensing/ | 4 | ## Contact: https://www.qt.io/licensing/ |
5 | ## | 5 | ## |
6 | ## This file is part of the Boot to Qt meta layer. | 6 | ## This file is part of the Boot to Qt meta layer. |
@@ -27,33 +27,26 @@ | |||
27 | ## | 27 | ## |
28 | ############################################################################ | 28 | ############################################################################ |
29 | 29 | ||
30 | FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" | 30 | SUMMARY = "Initramfs with early load intel microcode" |
31 | SRC_URI += "file://grub.cfg" | 31 | LICENSE = "The-Qt-Company-Commercial" |
32 | LIC_FILES_CHKSUM = "file://${QT_LICENSE};md5=948f8877345cd66106f11031977a4625" | ||
32 | 33 | ||
33 | do_install[depends] += " \ | 34 | inherit deploy nopackages |
34 | virtual/kernel:do_deploy \ | 35 | |
36 | do_compile[depends] += " \ | ||
35 | ${INITRAMFS_IMAGE}:do_image_complete \ | 37 | ${INITRAMFS_IMAGE}:do_image_complete \ |
36 | ${@bb.utils.contains('MACHINE_FEATURES', 'intel-ucode', 'intel-microcode:do_deploy', '', d)} \ | 38 | ${@bb.utils.contains('MACHINE_FEATURES', 'intel-ucode', 'intel-microcode:do_deploy', '', d)} \ |
37 | " | 39 | " |
38 | |||
39 | do_deploy_prepend() { | ||
40 | 40 | ||
41 | cat > ${WORKDIR}/cfg <<EOF | 41 | do_compile() { |
42 | search.file /boot/grub2/grub.cfg root | 42 | # https://www.kernel.org/doc/Documentation/x86/microcode.txt |
43 | set prefix=/boot/grub2 | 43 | microcode="${@bb.utils.contains('MACHINE_FEATURES', 'intel-ucode', '${DEPLOY_DIR_IMAGE}/microcode.cpio ', '', d)}" |
44 | EOF | 44 | cat ${microcode} ${DEPLOY_DIR_IMAGE}/${INITRAMFS_IMAGE}-${MACHINE}.cpio.gz > ${S}/microcode-initramfs |
45 | } | 45 | } |
46 | 46 | ||
47 | do_install_append() { | 47 | do_deploy() { |
48 | 48 | install -d ${DEPLOYDIR} | |
49 | install -d ${D}/boot/grub2/ | 49 | install -m 0644 ${S}/microcode-initramfs ${DEPLOYDIR}/ |
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 | ||
56 | } | 50 | } |
57 | 51 | ||
58 | PACKAGES += "${PN}-config" | 52 | addtask deploy before do_build after do_compile |
59 | FILES_${PN}-config = "/boot/grub2/ /boot/initramfs" | ||