1 # Borrowed fragments logic from linaro kernel configuration
3 FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
4 KERNEL_CONFIG_FRAGMENTS ?= ""
6 kernel_conf_variable() {
7 CONF_SED_SCRIPT="$CONF_SED_SCRIPT /CONFIG_$1[ =]/d;"
10 echo "# CONFIG_$1 is not set" >> ${B}/.config
12 echo "CONFIG_$1=$2" >> ${B}/.config
16 do_configure_append() {
20 # kernel_conf_variable NAME y/n lines here
22 if [ -f '${WORKDIR}/defconfig' ]; then
23 sed -e "${CONF_SED_SCRIPT}" < '${WORKDIR}/defconfig' >> '${B}/.config'
25 sed -e "${CONF_SED_SCRIPT}" < '${KERNEL_DEFCONFIG}' >> '${B}/.config'
28 # Check for kernel config fragments. The assumption is that the config
29 # fragment will be specified with the absolute path. For example:
30 # * ${WORKDIR}/config1.cfg
32 # Iterate through the list of configs and make sure that you can find
33 # each one. If not then error out.
34 # NOTE: If you want to override a configuration that is kept in the kernel
35 # with one from the OE meta data then you should make sure that the
36 # OE meta data version (i.e. ${WORKDIR}/config1.cfg) is listed
37 # after the in kernel configuration fragment.
38 # Check if any config fragments are specified.
39 if [ ! -z "${KERNEL_CONFIG_FRAGMENTS}" ]
41 for f in ${KERNEL_CONFIG_FRAGMENTS}
43 # Check if the config fragment was copied into the WORKDIR from
47 echo "Could not find kernel config fragment $f"
52 # # Now that all the fragments are located merge them.
53 # ( cd ${WORKDIR} && ${S}/scripts/kconfig/merge_config.sh -m -r -O ${B} ${B}/.config ${KERNEL_CONFIG_FRAGMENTS} 1>&2 )
56 cat ${KERNEL_CONFIG_FRAGMENTS} >> ${B}/.config
59 yes '' | oe_runmake -C ${S} O=${B} oldconfig
60 oe_runmake -C ${S} O=${B} savedefconfig && cp ${B}/defconfig ${WORKDIR}/defconfig.saved
63 # Make sure these are enabled so that AGL configurations work
65 SRC_URI_append = " file://tmpfs.cfg"
66 KERNEL_CONFIG_FRAGMENTS_append = " ${WORKDIR}/tmpfs.cfg"
67 SRC_URI_append = " file://namespace.cfg"
68 KERNEL_CONFIG_FRAGMENTS_append = " ${WORKDIR}/namespace.cfg"
69 SRC_URI_append = " file://cgroup.cfg"
70 KERNEL_CONFIG_FRAGMENTS_append = " ${WORKDIR}/cgroup.cfg"
72 # Fragments common to AGL demo platform (make sure they are added)
74 # Enable support for USB HID touch display
75 SRC_URI_append = " file://touchscreen.cfg"
76 KERNEL_CONFIG_FRAGMENTS_append = " ${WORKDIR}/touchscreen.cfg"
78 # Enable support for TP-Link TL-W722N USB Wifi adapter
79 SRC_URI_append = " file://ath9k_htc.cfg"
80 KERNEL_CONFIG_FRAGMENTS_append = " ${WORKDIR}/ath9k_htc.cfg"
82 # Enable support for RTLSDR
83 SRC_URI_append = " file://rtl_sdr.cfg"
84 KERNEL_CONFIG_FRAGMENTS_append = " ${WORKDIR}/rtl_sdr.cfg"
86 # Enable support for Bluetooth HCI USB devices
87 SRC_URI_append = " file://btusb.cfg"
88 KERNEL_CONFIG_FRAGMENTS_append = " ${WORKDIR}/btusb.cfg"
90 #-------------------------------------------------------------------------
91 # smack patches for handling bluetooth
93 SRC_URI_append_smack = "\
94 file://0004-Smack-Assign-smack_known_web-label-for-kernel-thread.patch \
97 # Enable support for smack
98 KERNEL_CONFIG_FRAGMENTS_append_smack = "\
99 ${WORKDIR}/audit.cfg \
100 ${WORKDIR}/smack.cfg \
101 ${WORKDIR}/smack-default-lsm.cfg \