raspberrypi-linux: add smack patchset to 4.9 bbappend
[AGL/meta-agl.git] / meta-agl-bsp / meta-raspberrypi / recipes-kernel / linux / linux-raspberrypi_%.bbappend
1 FILESEXTRAPATHS_prepend := "${THISDIR}/${BPN}:"
2
3 SRC_URI_append = "\
4         ${@base_conditional('USE_FAYTECH_MONITOR', '1', 'file://0002-faytech-fix-rpi.patch', '', d)} \
5 "
6
7 do_configure_append_smack() {
8     # SMACK and Co
9     kernel_configure_variable IP_NF_SECURITY m
10     kernel_configure_variable IP6_NF_SECURITY m
11     kernel_configure_variable EXT2_FS_SECURITY y
12     kernel_configure_variable EXT3_FS_SECURITY y
13     kernel_configure_variable EXT4_FS_SECURITY y
14     kernel_configure_variable SECURITY y
15     kernel_configure_variable SECURITY_SMACK y
16     kernel_configure_variable TMPFS_XATTR y
17     kernel_configure_variable DEFAULT_SECURITY "smack"
18     kernel_configure_variable DEFAULT_SECURITY_SMACK y
19     kernel_configure_variable FANOTIFY_ACCESS_PERMISSIONS y
20 }
21
22 do_configure_append_netboot() {
23     # NBD for netboot
24     kernel_configure_variable BLK_DEV_NBD y
25     # ramblk for inird
26     kernel_configure_variable BLK_DEV_RAM y
27 }
28
29 do_configure_append_sota() {
30     # ramblk for inird
31     kernel_configure_variable BLK_DEV_RAM y
32 }
33
34 do_configure_append() {
35
36     # VC4 Wayland/Weston
37     kernel_configure_variable I2C_BCM2835 y
38     kernel_configure_variable DRM y
39     kernel_configure_variable DRM_PANEL_RASPBERRYPI_TOUCHSCREEN y
40     kernel_configure_variable DRM_VC4 y
41     kernel_configure_variable FB_BCM2708 n
42
43     # Enable support for TP-Link TL-W722N USB Wifi adapter
44     kernel_configure_variable CONFIG_ATH_CARDS m
45     kernel_configure_variable CONFIG_ATH9K_HTC m
46
47     # Enable support for RTLSDR
48     kernel_configure_variable CONFIG_MEDIA_USB_SUPPORT y
49     kernel_configure_variable CONFIG_MEDIA_DIGITAL_TV_SUPPORT y
50     kernel_configure_variable CONFIG_DVB_USB_V2 m
51     kernel_configure_variable CONFIG_DVB_USB_RTL28XXU m
52
53     # KEEP until fixed upstream:
54       # Keep this the last line
55       # Remove all modified configs and add the rest to .config
56       sed -e "${CONF_SED_SCRIPT}" < '${WORKDIR}/defconfig' >> '${B}/.config'
57
58       yes '' | oe_runmake oldconfig
59       kernel_do_configure
60 }
61
62 CMDLINE_DEBUG = ""
63 CMDLINE_append = " usbhid.mousepoll=0"
64
65 # Add options to allow CMA to operate
66 CMDLINE_append = ' ${@base_conditional("ENABLE_CMA", "1", "coherent_pool=6M smsc95xx.turbo_mode=N", "", d)}'
67
68 KERNEL_MODULE_AUTOLOAD += "snd-bcm2835"
69 KERNEL_MODULE_AUTOLOAD += "hid-multitouch"
70
71 RDEPENDS_${PN} += "kernel-module-snd-bcm2835"
72 PACKAGES += "kernel-module-snd-bcm2835"