linux-smarcfimx7_4.9.11.bbappend
1.65 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# Copyright (C) 2013-2016 Freescale Semiconductor
# Copyright 2017 NXP
# Released under the MIT license (see COPYING.MIT for the terms)
inherit fsl-vivante-kernel-driver-handler
IMX_UAPI_HEADERS = "mxc_asrc.h mxc_dcic.h mxcfb.h mxc_mlb.h mxc_sim_interface.h \
mxc_v4l2.h ipu.h videodev2.h pxp_device.h pxp_dma.h isl29023.h"
MORE_UAPI_HEADERS = "ion.h"
do_install_append () {
# Install i.MX specific uapi headers
oe_runmake headers_install INSTALL_HDR_PATH=${B}${exec_prefix}
install -d ${D}${exec_prefix}/include/linux
for UAPI_HDR in ${IMX_UAPI_HEADERS}; do
find ${B}${exec_prefix}/include -name ${UAPI_HDR} -exec cp {} ${D}${exec_prefix}/include/linux \;
ls ${D}${exec_prefix}/include/linux
echo "copy ${UAPI_HDR} done"
done
}
do_install_append () {
# Install some additional uapi headers
install -d ${D}${exec_prefix}/include/linux
for UAPI_HDR in ${MORE_UAPI_HEADERS}; do
find ${STAGING_KERNEL_DIR} -path '*uapi*' -name ${UAPI_HDR} -exec cp {} ${D}${exec_prefix}/include/linux \;
ls ${D}${exec_prefix}/include/linux
echo "copy ${UAPI_HDR} done"
done
}
sysroot_stage_all_append () {
# FIXME: Remove videodev2.h as conflict with linux-libc-headers
find ${D}${exec_prefix}/include -name videodev2.h -exec mv {} ${B} \;
# Install SOC related uapi headers to sysroot
sysroot_stage_dir ${D}${exec_prefix}/include ${SYSROOT_DESTDIR}${exec_prefix}/include
# FIXME: Restore videodev2 back
if [ -e ${B}/videodev2.h ]; then
mv ${B}/videodev2.h ${D}${exec_prefix}/include/linux/
fi
}
PACKAGES += "${PN}-soc-headers"
FILES_${PN}-soc-headers = "${exec_prefix}/include"