summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSamuli Piippo <samuli.piippo@qt.io>2018-03-08 14:07:27 +0200
committerSamuli Piippo <samuli.piippo@qt.io>2018-03-08 14:05:22 +0000
commit65f827435691830403f2465f33f45915216b2b1e (patch)
treea02fc29e0e7961502baa3162437525853a71712d
parentf5baecf4a633d8a4b4117d9c0f9910118c18256a (diff)
downloadmeta-boot2qt-65f827435691830403f2465f33f45915216b2b1e.tar.gz
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 <ville.voutilainen@qt.io>
-rw-r--r--meta-intel-extras/recipes/initramfs-basic/init-basic.bbappend38
-rw-r--r--meta-intel-extras/recipes/initramfs-basic/init-basic/init-device.sh4
-rw-r--r--meta-intel-extras/recipes/initramfs-basic/initramfs-basic.bbappend30
-rw-r--r--meta-intel-extras/recipes/linux/linux-yocto/b2qt.cfg2
-rw-r--r--recipes/initramfs-basic/files/init.sh5
5 files changed, 79 insertions, 0 deletions
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 @@
1############################################################################
2##
3## Copyright (C) 2018 The Qt Company Ltd.
4## Contact: https://www.qt.io/licensing/
5##
6## This file is part of the Boot to Qt meta layer.
7##
8## $QT_BEGIN_LICENSE:GPL$
9## Commercial License Usage
10## Licensees holding valid commercial Qt licenses may use this file in
11## accordance with the commercial license agreement provided with the
12## Software or, alternatively, in accordance with the terms contained in
13## a written agreement between you and The Qt Company. For licensing terms
14## and conditions see https://www.qt.io/terms-conditions. For further
15## information use the contact form at https://www.qt.io/contact-us.
16##
17## GNU General Public License Usage
18## Alternatively, this file may be used under the terms of the GNU
19## General Public License version 3 or (at your option) any later version
20## approved by the KDE Free Qt Foundation. The licenses are as published by
21## the Free Software Foundation and appearing in the file LICENSE.GPL3
22## included in the packaging of this file. Please review the following
23## information to ensure the GNU General Public License requirements will
24## be met: https://www.gnu.org/licenses/gpl-3.0.html.
25##
26## $QT_END_LICENSE$
27##
28############################################################################
29
30FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
31
32SRC_URI += "file://init-device.sh"
33
34do_install_append () {
35 install -m 0755 ${WORKDIR}/init-device.sh ${D}/init-device
36}
37
38FILES_${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 @@
1#!/bin/sh
2
3insmod /lib/modules/$(uname -r)/kernel/drivers/mfd/rtsx_pci.ko
4insmod /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 @@
1############################################################################
2##
3## Copyright (C) 2018 The Qt Company Ltd.
4## Contact: https://www.qt.io/licensing/
5##
6## This file is part of the Boot to Qt meta layer.
7##
8## $QT_BEGIN_LICENSE:GPL$
9## Commercial License Usage
10## Licensees holding valid commercial Qt licenses may use this file in
11## accordance with the commercial license agreement provided with the
12## Software or, alternatively, in accordance with the terms contained in
13## a written agreement between you and The Qt Company. For licensing terms
14## and conditions see https://www.qt.io/terms-conditions. For further
15## information use the contact form at https://www.qt.io/contact-us.
16##
17## GNU General Public License Usage
18## Alternatively, this file may be used under the terms of the GNU
19## General Public License version 3 or (at your option) any later version
20## approved by the KDE Free Qt Foundation. The licenses are as published by
21## the Free Software Foundation and appearing in the file LICENSE.GPL3
22## included in the packaging of this file. Please review the following
23## information to ensure the GNU General Public License requirements will
24## be met: https://www.gnu.org/licenses/gpl-3.0.html.
25##
26## $QT_END_LICENSE$
27##
28############################################################################
29
30PACKAGE_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 @@
1CONFIG_HID_MULTITOUCH=m 1CONFIG_HID_MULTITOUCH=m
2CONFIG_MMC_REALTEK_PCI=m
3CONFIG_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() {
96 96
97 early_setup 97 early_setup
98 read_args 98 read_args
99
100 if [ -f init-device ]; then
101 source init-device
102 fi
103
99 switch_real_root 104 switch_real_root
100} 105}
101 106