From 65f827435691830403f2465f33f45915216b2b1e Mon Sep 17 00:00:00 2001 From: Samuli Piippo Date: Thu, 8 Mar 2018 14:07:27 +0200 Subject: nuc: enable boot from internal sd cardreader Include required kernel modules into initramfs and load them before trying to find the rootfs, if it happends to be in the internal SD cardreader. Task-number: QTBUG-61043 Change-Id: Iafc760e3a872566a819903c4776168a73577bb59 Reviewed-by: Ville Voutilainen --- .../recipes/initramfs-basic/init-basic.bbappend | 38 ++++++++++++++++++++++ .../initramfs-basic/init-basic/init-device.sh | 4 +++ .../initramfs-basic/initramfs-basic.bbappend | 30 +++++++++++++++++ .../recipes/linux/linux-yocto/b2qt.cfg | 2 ++ recipes/initramfs-basic/files/init.sh | 5 +++ 5 files changed, 79 insertions(+) create mode 100644 meta-intel-extras/recipes/initramfs-basic/init-basic.bbappend create mode 100644 meta-intel-extras/recipes/initramfs-basic/init-basic/init-device.sh create mode 100644 meta-intel-extras/recipes/initramfs-basic/initramfs-basic.bbappend diff --git a/meta-intel-extras/recipes/initramfs-basic/init-basic.bbappend b/meta-intel-extras/recipes/initramfs-basic/init-basic.bbappend new file mode 100644 index 0000000..ab69a09 --- /dev/null +++ b/meta-intel-extras/recipes/initramfs-basic/init-basic.bbappend @@ -0,0 +1,38 @@ +############################################################################ +## +## Copyright (C) 2018 The Qt Company Ltd. +## Contact: https://www.qt.io/licensing/ +## +## This file is part of the Boot to Qt meta layer. +## +## $QT_BEGIN_LICENSE:GPL$ +## Commercial License Usage +## Licensees holding valid commercial Qt licenses may use this file in +## accordance with the commercial license agreement provided with the +## Software or, alternatively, in accordance with the terms contained in +## a written agreement between you and The Qt Company. For licensing terms +## and conditions see https://www.qt.io/terms-conditions. For further +## information use the contact form at https://www.qt.io/contact-us. +## +## GNU General Public License Usage +## Alternatively, this file may be used under the terms of the GNU +## General Public License version 3 or (at your option) any later version +## approved by the KDE Free Qt Foundation. The licenses are as published by +## the Free Software Foundation and appearing in the file LICENSE.GPL3 +## included in the packaging of this file. Please review the following +## information to ensure the GNU General Public License requirements will +## be met: https://www.gnu.org/licenses/gpl-3.0.html. +## +## $QT_END_LICENSE$ +## +############################################################################ + +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" + +SRC_URI += "file://init-device.sh" + +do_install_append () { + install -m 0755 ${WORKDIR}/init-device.sh ${D}/init-device +} + +FILES_${PN} += "/init-device" 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 new file mode 100644 index 0000000..fedc607 --- /dev/null +++ b/meta-intel-extras/recipes/initramfs-basic/init-basic/init-device.sh @@ -0,0 +1,4 @@ +#!/bin/sh + +insmod /lib/modules/$(uname -r)/kernel/drivers/mfd/rtsx_pci.ko +insmod /lib/modules/$(uname -r)/kernel/drivers/mmc/host/rtsx_pci_sdmmc.ko diff --git a/meta-intel-extras/recipes/initramfs-basic/initramfs-basic.bbappend b/meta-intel-extras/recipes/initramfs-basic/initramfs-basic.bbappend new file mode 100644 index 0000000..1ac5f03 --- /dev/null +++ b/meta-intel-extras/recipes/initramfs-basic/initramfs-basic.bbappend @@ -0,0 +1,30 @@ +############################################################################ +## +## Copyright (C) 2018 The Qt Company Ltd. +## Contact: https://www.qt.io/licensing/ +## +## This file is part of the Boot to Qt meta layer. +## +## $QT_BEGIN_LICENSE:GPL$ +## Commercial License Usage +## Licensees holding valid commercial Qt licenses may use this file in +## accordance with the commercial license agreement provided with the +## Software or, alternatively, in accordance with the terms contained in +## a written agreement between you and The Qt Company. For licensing terms +## and conditions see https://www.qt.io/terms-conditions. For further +## information use the contact form at https://www.qt.io/contact-us. +## +## GNU General Public License Usage +## Alternatively, this file may be used under the terms of the GNU +## General Public License version 3 or (at your option) any later version +## approved by the KDE Free Qt Foundation. The licenses are as published by +## the Free Software Foundation and appearing in the file LICENSE.GPL3 +## included in the packaging of this file. Please review the following +## information to ensure the GNU General Public License requirements will +## be met: https://www.gnu.org/licenses/gpl-3.0.html. +## +## $QT_END_LICENSE$ +## +############################################################################ + +PACKAGE_INSTALL += "kernel-module-rtsx-pci-sdmmc" diff --git a/meta-intel-extras/recipes/linux/linux-yocto/b2qt.cfg b/meta-intel-extras/recipes/linux/linux-yocto/b2qt.cfg index 7902798..af765b5 100644 --- a/meta-intel-extras/recipes/linux/linux-yocto/b2qt.cfg +++ b/meta-intel-extras/recipes/linux/linux-yocto/b2qt.cfg @@ -1 +1,3 @@ CONFIG_HID_MULTITOUCH=m +CONFIG_MMC_REALTEK_PCI=m +CONFIG_MFD_RTSX_PCI=m diff --git a/recipes/initramfs-basic/files/init.sh b/recipes/initramfs-basic/files/init.sh index 3db235b..94eb39b 100644 --- a/recipes/initramfs-basic/files/init.sh +++ b/recipes/initramfs-basic/files/init.sh @@ -96,6 +96,11 @@ main() { early_setup read_args + + if [ -f init-device ]; then + source init-device + fi + switch_real_root } -- cgit v1.2.3-54-g00ecf