diff options
author | Louai Al-Khanji <louai.al-khanji@theqtcompany.com> | 2016-03-14 16:53:56 -0700 |
---|---|---|
committer | Louai Al-Khanji <louai.al-khanji@qt.io> | 2016-05-10 15:26:17 +0000 |
commit | a42496a9498739cb7362d11dd7c22d08b39ccbb9 (patch) | |
tree | b6a6e84fcc9c69f81689979a043234ff748bab8d /meta-renesas-extras/classes | |
parent | 4a0beee17a7b3be144771363920419604f1facec (diff) | |
download | meta-boot2qt-a42496a9498739cb7362d11dd7c22d08b39ccbb9.tar.gz |
Add Support for Renesas R-Car Gen2 Devices
I have only personally tested the porter build as it's the only
device I have, but getting the others to work as well should be
straight forward.
Please see the note in conf/distro/include/rcar-gen2.inc about
the binary drivers. The documentation we ship with Qt Creator
should expand on how to install the drivers. Additionally we
must check with Renesas how we could redistribute prebuilt
images if we want to do that.
Change-Id: I82e03aad9b43bee068aaa0472aeac4d394f049a8
Reviewed-by: Samuli Piippo <samuli.piippo@qt.io>
Diffstat (limited to 'meta-renesas-extras/classes')
-rw-r--r-- | meta-renesas-extras/classes/renesas-module.bbclass | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/meta-renesas-extras/classes/renesas-module.bbclass b/meta-renesas-extras/classes/renesas-module.bbclass new file mode 100644 index 0000000..49ccc51 --- /dev/null +++ b/meta-renesas-extras/classes/renesas-module.bbclass | |||
@@ -0,0 +1,71 @@ | |||
1 | ############################################################################## | ||
2 | ## | ||
3 | ## Copyright (C) 2016 The Qt Company Ltd. | ||
4 | ## Contact: http://www.qt.io/licensing/ | ||
5 | ## | ||
6 | ## This file is part of the Boot to Qt meta layer. | ||
7 | ## | ||
8 | ## $QT_BEGIN_LICENSE:COMM$ | ||
9 | ## | ||
10 | ## Commercial License Usage | ||
11 | ## Licensees holding valid commercial Qt licenses may use this file in | ||
12 | ## accordance with the commercial license agreement provided with the | ||
13 | ## Software or, alternatively, in accordance with the terms contained in | ||
14 | ## a written agreement between you and The Qt Company. For licensing terms | ||
15 | ## and conditions see http://www.qt.io/terms-conditions. For further | ||
16 | ## information use the contact form at http://www.qt.io/contact-us. | ||
17 | ## | ||
18 | ## $QT_END_LICENSE$ | ||
19 | ## | ||
20 | ############################################################################## | ||
21 | |||
22 | ### Unfortunately the kernel module recipes in meta-renesas/meta-rcar-gen2 | ||
23 | ### are fairly broken, as they tend to install their include files into the | ||
24 | ### staging area. That breaks when recompiling the kernel and is just flaky | ||
25 | ### in general. Try to make things work reliably. | ||
26 | |||
27 | inherit module | ||
28 | addtask shared_workdir after do_compile | ||
29 | |||
30 | EXTRA_OEMAKE += "ARCH=${ARCH}" | ||
31 | |||
32 | export BUILDDIR = "${STAGING_DIR_HOST}" | ||
33 | export LIBSHARED = "${STAGING_LIBDIR}" | ||
34 | export KERNELSRC = "${STAGING_KERNEL_DIR}" | ||
35 | export CROSS_COMPILE = "${TARGET_PREFIX}" | ||
36 | export KERNELDIR = "${STAGING_KERNEL_BUILDDIR}" | ||
37 | export LDFLAGS = "" | ||
38 | export CP = "cp" | ||
39 | |||
40 | MODULE_SOURCE_DIR ?= "${S}/drv/" | ||
41 | |||
42 | do_compile() { | ||
43 | cd ${MODULE_SOURCE_DIR} | ||
44 | module_do_compile | ||
45 | cd - | ||
46 | } | ||
47 | |||
48 | deploy_build_deps() { | ||
49 | targetdir="$1" | ||
50 | |||
51 | install -d ${targetdir}/include | ||
52 | install ${MODULE_SOURCE_DIR}/Module.symvers $targetdir/include/${MODULE_NAME}.symvers | ||
53 | |||
54 | for header in ${MODULE_HEADERS} ; do | ||
55 | install -t ${targetdir}/include ${S}/${header} | ||
56 | done | ||
57 | } | ||
58 | |||
59 | do_shared_workdir () { | ||
60 | deploy_build_deps ${STAGING_KERNEL_BUILDDIR} | ||
61 | } | ||
62 | |||
63 | do_install() { | ||
64 | install -D ${MODULE_SOURCE_DIR}/${MODULE_NAME}${KERNEL_OBJECT_SUFFIX} ${D}/lib/modules/${KERNEL_VERSION}/extra/${MODULE_NAME}${KERNEL_OBJECT_SUFFIX} | ||
65 | deploy_build_deps ${D}/usr/src/kernel | ||
66 | } | ||
67 | |||
68 | FILES_${PN}-dev = " \ | ||
69 | /usr/src/kernel/include/${MODULE_NAME}.symvers \ | ||
70 | /usr/src/kernel/include/*.h \ | ||
71 | " | ||