meta-agl-bsp: extend qemux86-64 hardware support
[AGL/meta-agl.git] / meta-agl-bsp / recipes-kernel / linux / linux-agl.inc
1 FILESEXTRAPATHS_prepend := "${THISDIR}/linux:"
2
3 DEPENDS += "kern-tools-native"
4
5 # canbus qdisc pfifo change
6 SRC_URI_append = " file://net-sch_generic-Use-pfifo_fast-as-fallback-scheduler.patch"
7
8 # bbe target has this upstream patch already
9 SRC_URI_remove_bbe = " file://net-sch_generic-Use-pfifo_fast-as-fallback-scheduler.patch"
10
11 # returns all the elements from the src uri that are .cfg files
12 def find_cfgs(d):
13     sources=src_patches(d, True)
14     sources_list=[]
15     for s in sources:
16         if s.endswith('.cfg'):
17             sources_list.append(s)
18
19     return sources_list
20
21 do_configure_append () {
22     [ ! -f .config ] && cp -a ${WORKDIR}/defconfig .config
23     merge_config.sh -m .config ${@" ".join(find_cfgs(d))}
24     yes '' | make oldconfig
25 }
26
27 # Extra configuration options for the AGL kernel
28 SRC_URI_append = "\
29             file://can-bus.cfg \
30             file://usb.cfg \
31             file://uvc.cfg \
32             file://joystick.cfg \
33             file://fanotify.cfg \
34             file://uinput.cfg \
35             file://hid.cfg \
36             file://drm.cfg \
37             file://btusb.cfg \
38             file://usbaudio.cfg \
39             file://usbmodem.cfg \
40             file://i2c-led.cfg \
41             file://nfc.cfg \
42             "
43 KERNEL_CONFIG_FRAGMENTS_append = " ${WORKDIR}/can-bus.cfg"
44 # Enable support for usb video class for usb camera devices
45 KERNEL_CONFIG_FRAGMENTS_append = " ${WORKDIR}/uvc.cfg"
46 # Enable support for joystick devices
47 KERNEL_CONFIG_FRAGMENTS_append = " ${WORKDIR}/joystick.cfg"
48 KERNEL_CONFIG_FRAGMENTS_append = " ${WORKDIR}/fanotify.cfg"
49 KERNEL_CONFIG_FRAGMENTS_append = " ${WORKDIR}/uinput.cfg"
50 KERNEL_CONFIG_FRAGMENTS_append = " ${WORKDIR}/hid.cfg"
51 # Enable DRM support for graphics
52 KERNEL_CONFIG_FRAGMENTS_append = " ${WORKDIR}/drm.cfg"
53 # Enable Bluetooth USB devices
54 KERNEL_CONFIG_FRAGMENTS_append = " ${WORKDIR}/btusb.cfg"
55 # Enable USB audio devices
56 KERNEL_CONFIG_FRAGMENTS_append = " ${WORKDIR}/usbaudio.cfg"
57 # Enable I2C and LED for demontrator
58 KERNEL_CONFIG_FRAGMENTS_append = " ${WORKDIR}/i2c-led.cfg"
59 # Enable NFC devices
60 KERNEL_CONFIG_FRAGMENTS_append = " ${WORKDIR}/nfc.cfg"
61
62 # Enable required features for the agl-netboot feature
63 SRC_URI_append_netboot = " file://nbd.cfg \
64         file://ramdisk.cfg"
65 KERNEL_CONFIG_FRAGMENTS_append_netboot = " ${WORKDIR}/nbd.cfg ${WORKDIR}/ramdisk.cfg"
66
67 # Enable support for TP-Link TL-W722N USB Wifi adapter
68 SRC_URI_append = " file://ath9k_htc.cfg"
69 KERNEL_CONFIG_FRAGMENTS_append = " ${WORKDIR}/ath9k_htc.cfg"
70
71 # Enable support for RTLSDR
72 SRC_URI_append = " file://rtl_sdr.cfg"
73 KERNEL_CONFIG_FRAGMENTS_append = " ${WORKDIR}/rtl_sdr.cfg"
74
75 # Additional drivers for virtual machines
76 # OVERRIDES save us some c'n'p below ...
77 OVERRIDES_prepend_qemux86 = "virtualmachine:"
78 OVERRIDES_prepend_qemux86-64 = "virtualmachine:"
79 SRC_URI_append_virtualmachine = " file://vbox-vmware-sata.cfg"
80 KERNEL_CONFIG_FRAGMENTS_append_virtualmachine = " ${WORKDIR}/vbox-vmware-sata.cfg"
81
82 # Extra configuration for using qemux86-64 image on physical hardware
83 SRC_URI_append_qemux86-64 = "\
84     file://x86-extra-graphic-devices.cfg \
85     file://x86-net-devices.cfg \
86     file://x86-security-tpm.cfg \
87     file://x86-usb-devices.cfg \
88     file://x86-upsquare.cfg \
89 "
90 KERNEL_CONFIG_FRAGMENTS_append_qemux86-64 = "\
91     ${WORKDIR}/x86-extra-graphic-devices.cfg \
92     ${WORKDIR}/x86-net-devices.cfg \
93     ${WORKDIR}/x86-security-tpm.cfg \
94     ${WORKDIR}/x86-usb-devices.cfg \
95     ${WORKDIR}/x86-upsquare.cfg \
96 "
97
98 # Enable support for smack
99 KERNEL_CONFIG_FRAGMENTS_append_with-lsm-smack = "\
100        ${WORKDIR}/audit.cfg \
101        ${WORKDIR}/smack.cfg \
102        ${WORKDIR}/smack-default-lsm.cfg \
103 "
104
105 # ALSA support and other sound related configuration
106 SRC_URI_append = " file://sound.cfg"
107 KERNEL_CONFIG_FRAGMENTS_append = " ${WORKDIR}/sound.cfg"
108
109 # iio-dummy-device support for test iiodevice
110 SRC_URI_append = " file://iiodevice.cfg"
111 KERNEL_CONFIG_FRAGMENTS_append = " ${WORKDIR}/iiodevice.cfg"
112
113 # external rtc support via e.g. http://wiki.seeedstudio.com/Grove-RTC/
114 SRC_URI_append = " file://rtc.cfg"
115 KERNEL_CONFIG_FRAGMENTS_append = " ${WORKDIR}/rtc.cfg"
116
117 # netfilter options
118 SRC_URI_append = " file://netfilter.cfg"
119 KERNEL_CONFIG_FRAGMENTS_append = " ${WORKDIR}/netfilter.cfg"