From 54468ca688041d27af11d9109aeacac83f74dbe2 Mon Sep 17 00:00:00 2001 From: Yannick Gicquel Date: Thu, 29 Sep 2016 15:35:29 +0200 Subject: kernel: add usbgadget support This is conditioned by the presence of the usbgadget in DISTRO_FEATURE variable. Change-Id: Ia14deeab2431a68e6890885c1d0dd568e5713eaf Signed-off-by: Yannick Gicquel --- meta-rcar-gen2/recipes-kernel/linux/linux.inc | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/meta-rcar-gen2/recipes-kernel/linux/linux.inc b/meta-rcar-gen2/recipes-kernel/linux/linux.inc index 806be22..75a7141 100644 --- a/meta-rcar-gen2/recipes-kernel/linux/linux.inc +++ b/meta-rcar-gen2/recipes-kernel/linux/linux.inc @@ -175,6 +175,28 @@ do_configure_prepend() { kernel_configure_variable BLK_DEV_LOOP y fi + if [ "x1" = "x${@base_contains("DISTRO_FEATURES", "usbgadget", "1", "",d)}" ]; then + # activate USB-OTG & Gadget + kernel_configure_variable USB_OTG y + kernel_configure_variable USB_RENESAS_USBHS_UDC y + kernel_configure_variable CONFIGFS_FS y + kernel_configure_variable USB_GADGET y + kernel_configure_variable USB_LIBCOMPOSITE y + kernel_configure_variable USB_F_ACM y + kernel_configure_variable USB_U_SERIAL y + kernel_configure_variable USB_ETH m + kernel_configure_variable USB_G_MULTI m + kernel_configure_variable USB_G_MULTI_RNDIS n + kernel_configure_variable USB_G_MULTI_CDC y + + # ethernet over usb tethering + kernel_configure_variable NETFILTER y + kernel_configure_variable NF_CONNTRACK_IPV4 y + kernel_configure_variable NF_NAT_IPV4 y + kernel_configure_variable BRIDGE y + kernel_configure_variable IP_NF_TARGET_MASQUERADE y + fi + # Keep this the last line # Remove all modified configs and add the rest to .config sed -e "${CONF_SED_SCRIPT}" < '${WORKDIR}/defconfig' >> '${B}/.config' -- cgit 1.2.3-korg