summaryrefslogtreecommitdiffstats
path: root/recipes-bsp/formfactor
diff options
context:
space:
mode:
authorSaul Wold <sgw@linux.intel.com>2017-11-07 18:32:26 (GMT)
committerSaul Wold <sgw@linux.intel.com>2017-11-20 23:33:02 (GMT)
commitd53dbb38c43da3fd04fed9a55e7b3b9e2c512b9a (patch)
treefbe372dba00d45bbf9fbfbb3726708dc2590daeb /recipes-bsp/formfactor
parent5adbf6df4fd89e7531ccccfb9cec7a5314d635f0 (diff)
downloadmeta-intel-d53dbb38c43da3fd04fed9a55e7b3b9e2c512b9a.tar.gz
meta-intel: Reorganize the layout to remove common
Remove the concept of the common directory and move all the recipes-* dirs to the top level as a normal layer would be. layer.conf is updated appropriately Signed-off-by: Saul Wold <sgw@linux.intel.com>
Diffstat (limited to 'recipes-bsp/formfactor')
-rw-r--r--recipes-bsp/formfactor/formfactor/machconfig39
-rw-r--r--recipes-bsp/formfactor/formfactor_0.0.bbappend1
2 files changed, 40 insertions, 0 deletions
diff --git a/recipes-bsp/formfactor/formfactor/machconfig b/recipes-bsp/formfactor/formfactor/machconfig
new file mode 100644
index 0000000..73695fa
--- /dev/null
+++ b/recipes-bsp/formfactor/formfactor/machconfig
@@ -0,0 +1,39 @@
1# Note: superuser permission is required to run usbhid-dump
2# successfully.
3
4# HEX keys are according to the USB HID spec and USB HID usage table
5# We can add more keys as needed in the future.
6
7# This test may not be very accurate, as we only look for the first
8# two lines of a descriptor section. Example:
9#
10# 001:003:000:DESCRIPTOR 1460501386.337809
11# 05 01 09 02 A1 01 09 01 A1 00 05 09 19 01 29 03
12# 15 00 25 01 95 03 75 01 81 02 .. .. .. .. .. ..
13# .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. ..
14#
15# By doing so we eliminate false matches when HEX keys are in the lines
16# in the middle of the whole descriptor section.
17
18if type usbhid-dump &>/dev/null; then
19 if USBHID_DUMP_OUTPUT=$(usbhid-dump -e descriptor 2>/dev/null|grep -A1 DESCRIPTOR); then
20 # checker for generic USB HID keyboard
21 USBHID_KBD_CMD="grep -E '^ 05 01 09 06'"
22
23 # checker for touch screen
24 USBHID_TS_CMD="grep -E '^ 05 0D 09 04'"
25
26 if echo "$USBHID_DUMP_OUTPUT"|eval $USBHID_TS_CMD &>/dev/null; then
27 HAVE_TOUCHSCREEN=1
28 fi
29
30 if echo "$USBHID_DUMP_OUTPUT"|eval $USBHID_KBD_CMD &>/dev/null; then
31 HAVE_KEYBOARD=1
32 else
33 # config script in OE will set HAVE_KEYBOARD=1
34 # if we don't set any value. We have to explicitly
35 # tell it when keyboard is not detected.
36 HAVE_KEYBOARD=0
37 fi
38 fi
39fi
diff --git a/recipes-bsp/formfactor/formfactor_0.0.bbappend b/recipes-bsp/formfactor/formfactor_0.0.bbappend
new file mode 100644
index 0000000..6dd422a
--- /dev/null
+++ b/recipes-bsp/formfactor/formfactor_0.0.bbappend
@@ -0,0 +1 @@
FILESEXTRAPATHS_prepend_intel-x86-common := "${THISDIR}/${PN}:"