diff options
author | Otavio Salvador <otavio@ossystems.com.br> | 2018-10-25 09:36:50 -0300 |
---|---|---|
committer | Otavio Salvador <otavio@ossystems.com.br> | 2018-10-26 14:23:37 -0300 |
commit | 1ca0fb4bb553fbc247c4e25760a771e569464930 (patch) | |
tree | c95e35447b11dc1362344c28ec279b45577cda61 | |
parent | 5a3ebf0466722abfa55e0bb5e23db78651d8eccb (diff) | |
download | meta-freescale-1ca0fb4bb553fbc247c4e25760a771e569464930.tar.gz |
linux-imx-headers: Refactor recipe
This builds on top of original recipe provided by Tom and do minor
style and simplicity rework.
- Add minor comments on the recipe for why it is doing each specific
step
- Add ALLOW_EMPTY for PN so it can be installed with SDK
- Fix minor code style issues
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
-rw-r--r-- | recipes-kernel/linux/linux-imx-headers_4.9.123.bb | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/recipes-kernel/linux/linux-imx-headers_4.9.123.bb b/recipes-kernel/linux/linux-imx-headers_4.9.123.bb index 3a5e87e8..7be9cf94 100644 --- a/recipes-kernel/linux/linux-imx-headers_4.9.123.bb +++ b/recipes-kernel/linux/linux-imx-headers_4.9.123.bb | |||
@@ -12,6 +12,7 @@ LOCALVERSION = "-${SRCBRANCH}" | |||
12 | SRC_URI = "git://source.codeaurora.org/external/imx/linux-imx.git;protocol=https;branch=${SRCBRANCH} \ | 12 | SRC_URI = "git://source.codeaurora.org/external/imx/linux-imx.git;protocol=https;branch=${SRCBRANCH} \ |
13 | file://0001-uapi-Install-custom-headers.patch" | 13 | file://0001-uapi-Install-custom-headers.patch" |
14 | SRCREV = "6a71cbc089755afd6a86c005c22a1af6eab24a70" | 14 | SRCREV = "6a71cbc089755afd6a86c005c22a1af6eab24a70" |
15 | |||
15 | S = "${WORKDIR}/git" | 16 | S = "${WORKDIR}/git" |
16 | 17 | ||
17 | do_compile[noexec] = "1" | 18 | do_compile[noexec] = "1" |
@@ -36,14 +37,21 @@ IMX_UAPI_HEADERS = " \ | |||
36 | " | 37 | " |
37 | 38 | ||
38 | do_install() { | 39 | do_install() { |
40 | # We install all headers inside of B so we can copy only the | ||
41 | # whitelisted ones, and there is no risk of a new header to be | ||
42 | # installed by mistake. | ||
39 | oe_runmake headers_install INSTALL_HDR_PATH=${B}${exec_prefix} | 43 | oe_runmake headers_install INSTALL_HDR_PATH=${B}${exec_prefix} |
44 | |||
45 | # FIXME: The ion.h is still on staging so "promote" it for now | ||
40 | cp ${S}/drivers/staging/android/uapi/ion.h ${B}${includedir}/linux | 46 | cp ${S}/drivers/staging/android/uapi/ion.h ${B}${includedir}/linux |
41 | src=${B}${includedir}/linux | 47 | |
42 | dest=${D}${includedir}/imx/linux | 48 | # Install whitelisted headers only |
43 | install -d $dest | 49 | for h in ${IMX_UAPI_HEADERS}; do |
44 | cd $src | 50 | install -D -m 0644 ${B}${includedir}/linux/$h \ |
45 | install -m 0644 ${IMX_UAPI_HEADERS} $dest | 51 | ${D}${includedir}/imx/linux/$h |
46 | cd - | 52 | done |
47 | } | 53 | } |
48 | 54 | ||
55 | ALLOW_EMPTY_${PN} = "1" | ||
56 | |||
49 | PACKAGE_ARCH = "${MACHINE_SOCARCH}" | 57 | PACKAGE_ARCH = "${MACHINE_SOCARCH}" |