From: Angelo Compagnucci <angelo@amarulasolutions.com>
To: buildroot@buildroot.org
Cc: br015@umbiko.net, Angelo Compagnucci <angelo@amarulasolutions.com>
Subject: [Buildroot] [PATCH v3 2/5] package/wpa_supplicant: configure wifi on systemv when enabled
Date: Tue, 5 Jul 2022 09:32:03 +0200 [thread overview]
Message-ID: <20220705073206.1442280-3-angelo@amarulasolutions.com> (raw)
In-Reply-To: <20220705073206.1442280-1-angelo@amarulasolutions.com>
Configure a default basic wifi setup able to automatically connect to
the selected access point.
Signed-off-by: Angelo Compagnucci <angelo@amarulasolutions.com>
---
package/wpa_supplicant/wpa_supplicant.mk | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/package/wpa_supplicant/wpa_supplicant.mk b/package/wpa_supplicant/wpa_supplicant.mk
index afcd6502e3..09971654fe 100644
--- a/package/wpa_supplicant/wpa_supplicant.mk
+++ b/package/wpa_supplicant/wpa_supplicant.mk
@@ -264,6 +264,19 @@ define WPA_SUPPLICANT_INSTALL_IFUP_SCRIPTS
endef
endif
+ifeq ($(BR2_SYSTEM_CONNECT_WIFI),y)
+define WPA_SUPPLICANT_ENABLE_WIFI
+ $(SED) '/network={/,/}/d' $(TARGET_DIR)/etc/wpa_supplicant.conf; \
+ ( echo "network={"; \
+ echo " scan_ssid=1"; \
+ echo " key_mgmt=WPA-PSK"; \
+ echo " ssid=\"$(BR2_SYSTEM_CONNECT_WIFI_SSID)\""; \
+ echo " psk=\"$(BR2_SYSTEM_CONNECT_WIFI_PASSWORD)\""; \
+ echo "}"; \
+ ) >> $(TARGET_DIR)/etc/wpa_supplicant.conf
+endef
+endif
+
define WPA_SUPPLICANT_INSTALL_TARGET_CMDS
$(INSTALL) -m 0755 -D $(@D)/$(WPA_SUPPLICANT_SUBDIR)/wpa_supplicant \
$(TARGET_DIR)/usr/sbin/wpa_supplicant
@@ -275,6 +288,7 @@ define WPA_SUPPLICANT_INSTALL_TARGET_CMDS
$(WPA_SUPPLICANT_INSTALL_WPA_CLIENT_SO)
$(WPA_SUPPLICANT_INSTALL_IFUP_SCRIPTS)
$(WPA_SUPPLICANT_ENABLE_CTRL_IFACE)
+ $(WPA_SUPPLICANT_ENABLE_WIFI)
endef
define WPA_SUPPLICANT_INSTALL_INIT_SYSTEMD
--
2.25.1
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
next prev parent reply other threads:[~2022-07-05 7:32 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-05 7:32 [Buildroot] [PATCH v3 0/5] Configure default wifi through kconfig Angelo Compagnucci
2022-07-05 7:32 ` [Buildroot] [PATCH v3 1/5] system: adding options for configuring wifi Angelo Compagnucci
2022-09-18 9:57 ` Peter Korsgaard
2022-10-03 15:42 ` Angelo Compagnucci
2022-10-04 9:05 ` Andreas Ziegler
2022-10-04 9:14 ` Angelo Compagnucci
2022-07-05 7:32 ` Angelo Compagnucci [this message]
2022-07-05 7:32 ` [Buildroot] [PATCH v3 3/5] package/wpa_supplicant: configure wifi on systemd when enabled Angelo Compagnucci
2022-09-18 10:00 ` Peter Korsgaard
2022-10-03 15:44 ` Angelo Compagnucci
2022-07-05 7:32 ` [Buildroot] [PATCH v3 4/5] package/ifupdown-scripts: add wifi configuration " Angelo Compagnucci
2022-09-18 10:03 ` Peter Korsgaard
2022-10-03 15:50 ` Angelo Compagnucci
2022-07-05 7:32 ` [Buildroot] [PATCH v3 5/5] package/initscripts: add service to load kernel modules at boot Angelo Compagnucci
2022-09-18 10:10 ` Peter Korsgaard
2022-10-03 15:53 ` Angelo Compagnucci
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220705073206.1442280-3-angelo@amarulasolutions.com \
--to=angelo@amarulasolutions.com \
--cc=br015@umbiko.net \
--cc=buildroot@buildroot.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox