Fix Linux Kernel fragment for netboot
[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 # returns all the elements from the src uri that are .cfg files
6 def find_cfgs(d):
7     sources=src_patches(d, True)
8     sources_list=[]
9     for s in sources:
10         if s.endswith('.cfg'):
11             sources_list.append(s)
12
13     return sources_list
14
15 do_configure_append () {
16     [ ! -f .config ] && cp -a ${WORKDIR}/defconfig .config
17     merge_config.sh -m .config ${@" ".join(find_cfgs(d))}
18     yes '' | make oldconfig
19 }
20
21 # Extra configuration options for the AGL kernel
22 SRC_URI_append = "\
23             file://can-bus.cfg \
24             file://usb.cfg \
25             file://uvc.cfg \
26             file://joystick.cfg \
27             file://fanotify.cfg \
28             file://uinput.cfg \
29             file://hid.cfg \
30             file://drm.cfg \
31             file://btusb.cfg \
32             "
33 KERNEL_CONFIG_FRAGMENTS_append = " ${WORKDIR}/can-bus.cfg"
34 # Enable support for usb video class for usb camera devices
35 KERNEL_CONFIG_FRAGMENTS_append = " ${WORKDIR}/uvc.cfg"
36 # Enable support for joystick devices
37 KERNEL_CONFIG_FRAGMENTS_append = " ${WORKDIR}/joystick.cfg"
38 KERNEL_CONFIG_FRAGMENTS_append = " ${WORKDIR}/fanotify.cfg"
39 KERNEL_CONFIG_FRAGMENTS_append = " ${WORKDIR}/uinput.cfg"
40 KERNEL_CONFIG_FRAGMENTS_append = " ${WORKDIR}/hid.cfg"
41 # Enable DRM support for graphics
42 KERNEL_CONFIG_FRAGMENTS_append = " ${WORKDIR}/drm.cfg"
43 # Enable Bluetooth USB devices
44 KERNEL_CONFIG_FRAGMENTS_append = " ${WORKDIR}/btusb.cfg"
45
46 # Enable required features for the agl-netboot feature
47 SRC_URI_append_netboot = " file://nbd.cfg \
48         file://ramdisk.cfg"
49 KERNEL_CONFIG_FRAGMENTS_append_netboot = " ${WORKDIR}/nbd.cfg ${WORKDIR}/ramdisk.cfg"
50
51 # Enable support for TP-Link TL-W722N USB Wifi adapter
52 SRC_URI_append = " file://ath9k_htc.cfg"
53 KERNEL_CONFIG_FRAGMENTS_append = " ${WORKDIR}/ath9k_htc.cfg"
54
55 # Enable support for RTLSDR
56 SRC_URI_append = " file://rtl_sdr.cfg"
57 KERNEL_CONFIG_FRAGMENTS_append = " ${WORKDIR}/rtl_sdr.cfg"
58
59 # Additional drivers for virtual machines
60 # OVERRIDES save us some c'n'p below ...
61 OVERRIDES_prepend_qemux86 = "virtualmachine:"
62 OVERRIDES_prepend_qemux86-64 = "virtualmachine:"
63 SRC_URI_append_virtualmachine = " file://vbox-vmware-sata.cfg"
64 KERNEL_CONFIG_FRAGMENTS_append_virtualmachine = " ${WORKDIR}/vbox-vmware-sata.cfg"
65
66 # Enable support for smack
67 KERNEL_CONFIG_FRAGMENTS_append_smack = "\
68        ${WORKDIR}/audit.cfg \
69        ${WORKDIR}/smack.cfg \
70        ${WORKDIR}/smack-default-lsm.cfg \
71 "