From patchwork Fri Jun 24 20:27:05 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Stultz X-Patchwork-Id: 70843 Delivered-To: patches@linaro.org Received: by 10.140.28.4 with SMTP id 4csp21617qgy; Fri, 24 Jun 2016 13:27:11 -0700 (PDT) X-Received: by 10.98.33.138 with SMTP id o10mr10374579pfj.151.1466800030109; Fri, 24 Jun 2016 13:27:10 -0700 (PDT) Return-Path: Received: from mail-pf0-x22a.google.com (mail-pf0-x22a.google.com. [2607:f8b0:400e:c00::22a]) by mx.google.com with ESMTPS id v63si8677782pfi.110.2016.06.24.13.27.09 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 24 Jun 2016 13:27:09 -0700 (PDT) Received-SPF: pass (google.com: domain of john.stultz@linaro.org designates 2607:f8b0:400e:c00::22a as permitted sender) client-ip=2607:f8b0:400e:c00::22a; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org; spf=pass (google.com: domain of john.stultz@linaro.org designates 2607:f8b0:400e:c00::22a as permitted sender) smtp.mailfrom=john.stultz@linaro.org; dmarc=pass (p=NONE dis=NONE) header.from=linaro.org Received: by mail-pf0-x22a.google.com with SMTP id i123so42296457pfg.0 for ; Fri, 24 Jun 2016 13:27:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=I3wDfHyLtK1tn44/Un3j12slQgS9Q4e6l75iRWdz5gw=; b=i0LjGPXeOOAkTJ6PSDWhv1TdU0+2IMQkSCk2JoyQxhsKVDWURAB6uB4nW1RKXTKNLc zPSLbYvt0ic1Alzlkn7QLZv1XH5OaaRysOJBXLM/VLqoHZXEUWgH4I5FlUO7FlT+p34o TegboYutpgpBj6x6E1Mh3caQJVDQqMQC171aI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=I3wDfHyLtK1tn44/Un3j12slQgS9Q4e6l75iRWdz5gw=; b=XY8kgYvhnS/qs7lUKxy7LmNdBJFHxipK9W0dT3cLvAvaH32+VRSoRrq4eBpZ7rxVhV l5nSvi7ppzx60kEgPMDpSKvC2+Y42x8gUY/hbc5WYxLeuzk+M7IF9OEH77n45lZ7PTUI 8oKeyzFyKdptU5Aair6HJBytCqOhs2WvlaTGuim2Zr0C9o2NmfueJ1BpOnt/hc4zC1UO sbP0PJzqg3F5m7YLXfaEeaUverG92oyaFfG54vMMfNix2ohuHuf7ToO9XspGL/0wYUSj X3kj4wJ64BmEb0tA73TFOZjJSeWZ79XBjpzY8lm2yvxwDGMn+bYzT63s/lt2h178VMaA FPVw== X-Gm-Message-State: ALyK8tL0imWI7e4xYr8NDT9L495rSfpfu951sKD6IDOotNqBTtK7SWrW/4eoOGWcOvdPPb7hY9g= X-Received: by 10.98.14.140 with SMTP id 12mr10655385pfo.68.1466800029569; Fri, 24 Jun 2016 13:27:09 -0700 (PDT) Return-Path: Received: from localhost.localdomain (c-73-67-244-238.hsd1.or.comcast.net. [73.67.244.238]) by smtp.gmail.com with ESMTPSA id t4sm2006506paw.32.2016.06.24.13.27.08 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 24 Jun 2016 13:27:08 -0700 (PDT) From: John Stultz To: Rob Herring Cc: John Stultz Subject: [PATCH] linaro_generic: Add basic generic wifi settings Date: Fri, 24 Jun 2016 13:27:05 -0700 Message-Id: <1466800025-12403-1-git-send-email-john.stultz@linaro.org> X-Mailer: git-send-email 1.9.1 Add basic entries for wifi support. I suspect with a simple usb-wifi adapter on db410 this would work, but I've not been able to validate. Signed-off-by: John Stultz --- BoardConfig.mk | 6 ++++++ device.mk | 3 ++- wifi/Android.mk | 9 +++++++++ wifi/device.mk | 13 +++++++++++++ wifi/wifi.rc | 21 +++++++++++++++++++++ 5 files changed, 51 insertions(+), 1 deletion(-) create mode 100644 wifi/Android.mk create mode 100644 wifi/device.mk create mode 100644 wifi/wifi.rc -- 1.9.1 diff --git a/BoardConfig.mk b/BoardConfig.mk index 8900439..3ec97d1 100644 --- a/BoardConfig.mk +++ b/BoardConfig.mk @@ -19,3 +19,9 @@ BOARD_KERNEL_BASE := $(CONFIG_KERNEL_BASE_ADDR) BOARD_MKBOOTIMG_ARGS := --ramdisk_offset $(CONFIG_RAMDISK_OFFSET) WITH_DEXPREOPT := $(CONFIG_DEX_PREOPT) + +# generic wifi +WPA_SUPPLICANT_VERSION := VER_0_8_X +BOARD_WPA_SUPPLICANT_DRIVER := NL80211 +BOARD_HOSTAPD_DRIVER := NL80211 +CONFIG_DRIVER_NL80211 := y diff --git a/device.mk b/device.mk index 4d04298..fb15eb2 100644 --- a/device.mk +++ b/device.mk @@ -56,7 +56,7 @@ PRODUCT_COPY_FILES += \ frameworks/av/media/libstagefright/data/media_codecs_google_video.xml:system/etc/media_codecs_google_video.xml \ $(LOCAL_PATH)/media_codecs.xml:system/etc/media_codecs.xml \ -subdirs-true := +subdirs-true := wifi subdirs-$(CONFIG_ETHERNET) += ethernet subdirs-$(CONFIG_SENSOR) += sensor @@ -64,3 +64,4 @@ include $(foreach dir,$(subdirs-true), $(LOCAL_PATH)/$(dir)/device.mk) DEVICE_PACKAGE_OVERLAYS += $(foreach dir,$(subdirs-true), $(LOCAL_PATH)/$(dir)/overlay) PRODUCT_COPY_FILES += $(PRODUCT_COPY_FILES-true) + diff --git a/wifi/Android.mk b/wifi/Android.mk new file mode 100644 index 0000000..d31a80c --- /dev/null +++ b/wifi/Android.mk @@ -0,0 +1,9 @@ +LOCAL_PATH:= $(call my-dir) + +include $(CLEAR_VARS) + +LOCAL_MODULE:= wifi.rc + +LOCAL_INIT_RC := $(LOCAL_MODULE) + +include $(BUILD_PHONY_PACKAGE) diff --git a/wifi/device.mk b/wifi/device.mk new file mode 100644 index 0000000..f07d629 --- /dev/null +++ b/wifi/device.mk @@ -0,0 +1,13 @@ +#wifi items +PRODUCT_PACKAGES += \ + wifi.rc \ + libwpa_client \ + hostapd \ + dhcpcd.conf \ + wpa_supplicant \ + wpa_supplicant.conf + + +PRODUCT_PROPERTY_OVERRIDES += \ + wifi.interface=wlan0 \ + wifi.supplicant_scan_interval=15 diff --git a/wifi/wifi.rc b/wifi/wifi.rc new file mode 100644 index 0000000..8a866d9 --- /dev/null +++ b/wifi/wifi.rc @@ -0,0 +1,21 @@ +on property:init.svc.wpa_supplicant=stopped + stop dhcpcd + +service wpa_supplicant /system/bin/wpa_supplicant \ + -iwlan0 -c/data/misc/wifi/wpa_supplicant.conf \ + -e/data/misc/wifi/entropy.bin -g@android:wpa_wlan0 + socket wpa_wlan0 dgram 660 wifi wifi + class main + disabled + neshot + +service dhcpcd_wlan0 /system/bin/dhcpcd -aABDKL + class main + disabled + oneshot + +service iprenew_wlan0 /system/bin/dhcpcd -n + class main + disabled + oneshot +