From 1c46fcd4f482be6c114a815d9501adf4b7588d2c Mon Sep 17 00:00:00 2001 From: Takashi Matsuzawa Date: Wed, 28 Jun 2017 15:55:13 +0900 Subject: Fix i.MX6 Bug-AGL: SPEC-704 This is part of the fixe to make i.MX6 buildable again. Following fixes are included in this change: - adding build target imx6qsabreauto - fixing qt5.8 build error - refine bblayers.conf layer order (for dynamic-layers) - meta-fsl-arm -> meta-freescale layer name change - weston.ini lines (use fbdev-backend.so) - /dev/galcore permission (by /etc/udev/rules.d/zz-dri.rules) - kernel configuraion to include smack, etc. Follwings are stil not addressed yet: - bblayer.conf layer order still have issue re. dynamic-layers - built and booted on imx6qsabreauto only yet. following existing community boards may need update (i have imx6qsabrelite, but no notrogen6x) Note, this fix is prepared independently of nxp or fsl-community, who should follow-up if there are mistakes to be fixed, or updates that they find needed. Update: Refined on review comment regarding tune settings and kernel configurations. The board successfully boots and shows AGL homescreen. But I found I still have problem with USB. lsusb says 'unable to initialize libusb: -99' error which I am still faling to find the cause. Update2: usb issue may be related to dtb configuration in linux-fslc-imx better to be tracked separately Change-Id: If5fa4e5f0450385bcb2648d57e63dc1fc14b0574 Signed-off-by: Takashi Matsuzawa Reviewed-on: https://gerrit.automotivelinux.org/gerrit/9871 Tested-by: Jenkins Job builder account ci-image-build: Jenkins Job builder account Reviewed-by: Jan-Simon Moeller --- .../recipes-kernel/linux/linux-fslc-imx_%.bbappend | 103 +++++++++++++++++++++ 1 file changed, 103 insertions(+) create mode 100644 meta-agl-bsp/meta-freescale-layer/recipes-kernel/linux/linux-fslc-imx_%.bbappend (limited to 'meta-agl-bsp/meta-freescale-layer/recipes-kernel/linux/linux-fslc-imx_%.bbappend') diff --git a/meta-agl-bsp/meta-freescale-layer/recipes-kernel/linux/linux-fslc-imx_%.bbappend b/meta-agl-bsp/meta-freescale-layer/recipes-kernel/linux/linux-fslc-imx_%.bbappend new file mode 100644 index 000000000..5fe15cb97 --- /dev/null +++ b/meta-agl-bsp/meta-freescale-layer/recipes-kernel/linux/linux-fslc-imx_%.bbappend @@ -0,0 +1,103 @@ +# Borrowed fragments logic from linaro kernel configuration + +FILESEXTRAPATHS_prepend := "${THISDIR}/files:" +KERNEL_CONFIG_FRAGMENTS ?= "" + +kernel_conf_variable() { + CONF_SED_SCRIPT="$CONF_SED_SCRIPT /CONFIG_$1[ =]/d;" + if test "$2" = "n" + then + echo "# CONFIG_$1 is not set" >> ${B}/.config + else + echo "CONFIG_$1=$2" >> ${B}/.config + fi +} + +do_configure_append() { + + CONF_SED_SCRIPT="" + + # kernel_conf_variable NAME y/n lines here + + if [ -f '${WORKDIR}/defconfig' ]; then + sed -e "${CONF_SED_SCRIPT}" < '${WORKDIR}/defconfig' >> '${B}/.config' + else + sed -e "${CONF_SED_SCRIPT}" < '${KERNEL_DEFCONFIG}' >> '${B}/.config' + fi + + # Check for kernel config fragments. The assumption is that the config + # fragment will be specified with the absolute path. For example: + # * ${WORKDIR}/config1.cfg + # * ${S}/config2.cfg + # Iterate through the list of configs and make sure that you can find + # each one. If not then error out. + # NOTE: If you want to override a configuration that is kept in the kernel + # with one from the OE meta data then you should make sure that the + # OE meta data version (i.e. ${WORKDIR}/config1.cfg) is listed + # after the in kernel configuration fragment. + # Check if any config fragments are specified. + if [ ! -z "${KERNEL_CONFIG_FRAGMENTS}" ] + then + for f in ${KERNEL_CONFIG_FRAGMENTS} + do + # Check if the config fragment was copied into the WORKDIR from + # the OE meta data + if [ ! -e "$f" ] + then + echo "Could not find kernel config fragment $f" + exit 1 + fi + done + +# # Now that all the fragments are located merge them. +# ( cd ${WORKDIR} && ${S}/scripts/kconfig/merge_config.sh -m -r -O ${B} ${B}/.config ${KERNEL_CONFIG_FRAGMENTS} 1>&2 ) +# + + cat ${KERNEL_CONFIG_FRAGMENTS} >> ${B}/.config + fi + + yes '' | oe_runmake -C ${S} O=${B} oldconfig + oe_runmake -C ${S} O=${B} savedefconfig && cp ${B}/defconfig ${WORKDIR}/defconfig.saved +} + +# Make sure these are enabled so that AGL configurations work + +SRC_URI_append = " file://tmpfs.cfg" +KERNEL_CONFIG_FRAGMENTS_append = " ${WORKDIR}/tmpfs.cfg" +SRC_URI_append = " file://namespace.cfg" +KERNEL_CONFIG_FRAGMENTS_append = " ${WORKDIR}/namespace.cfg" +SRC_URI_append = " file://cgroup.cfg" +KERNEL_CONFIG_FRAGMENTS_append = " ${WORKDIR}/cgroup.cfg" + +# Fragments common to AGL demo platform (make sure they are added) + +# Enable support for USB HID touch display +SRC_URI_append = " file://touchscreen.cfg" +KERNEL_CONFIG_FRAGMENTS_append = " ${WORKDIR}/touchscreen.cfg" + +# Enable support for TP-Link TL-W722N USB Wifi adapter +SRC_URI_append = " file://ath9k_htc.cfg" +KERNEL_CONFIG_FRAGMENTS_append = " ${WORKDIR}/ath9k_htc.cfg" + +# Enable support for RTLSDR +SRC_URI_append = " file://rtl_sdr.cfg" +KERNEL_CONFIG_FRAGMENTS_append = " ${WORKDIR}/rtl_sdr.cfg" + +# Enable support for Bluetooth HCI USB devices +SRC_URI_append = " file://btusb.cfg" +KERNEL_CONFIG_FRAGMENTS_append = " ${WORKDIR}/btusb.cfg" + +#------------------------------------------------------------------------- +# smack patches for handling bluetooth + +SRC_URI_append_smack = "\ + file://0004-Smack-Assign-smack_known_web-label-for-kernel-thread.patch \ +" + +# Enable support for smack +KERNEL_CONFIG_FRAGMENTS_append_smack = "\ + ${WORKDIR}/audit.cfg \ + ${WORKDIR}/smack.cfg \ + ${WORKDIR}/smack-default-lsm.cfg \ +" + -- cgit 1.2.3-korg