From patchwork Mon Jun 20 21:40:55 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Angelo Compagnucci X-Patchwork-Id: 1645776 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=buildroot.org (client-ip=2605:bc80:3010::133; helo=smtp2.osuosl.org; envelope-from=buildroot-bounces@buildroot.org; receiver=) Received: from smtp2.osuosl.org (smtp2.osuosl.org [IPv6:2605:bc80:3010::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4LRjlD64NKz9sGG for ; Tue, 21 Jun 2022 07:41:28 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 2693740B67; Mon, 20 Jun 2022 21:41:26 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 2693740B67 X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id zeN-VnPHhhJX; Mon, 20 Jun 2022 21:41:24 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp2.osuosl.org (Postfix) with ESMTP id 3D76C402C3; Mon, 20 Jun 2022 21:41:23 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 3D76C402C3 X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id 44DEA1BF9B9 for ; Mon, 20 Jun 2022 21:41:08 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 2D472402F7 for ; Mon, 20 Jun 2022 21:41:08 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 2D472402F7 X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id bJ6AhATd1-w0 for ; Mon, 20 Jun 2022 21:41:04 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.8.0 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 2D5B1401DF Received: from mail-ej1-x632.google.com (mail-ej1-x632.google.com [IPv6:2a00:1450:4864:20::632]) by smtp2.osuosl.org (Postfix) with ESMTPS id 2D5B1401DF for ; Mon, 20 Jun 2022 21:41:04 +0000 (UTC) Received: by mail-ej1-x632.google.com with SMTP id pk21so482050ejb.2 for ; Mon, 20 Jun 2022 14:41:04 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=8azgUmT5ugFWM53+ubIFzoE+rS0HXB0IwLwLhhKHXiM=; b=OhlePzzcuUOC2ZX165z/j7t/Fk7x/j/i29Ki/OdcfIdrwJgExeoZUR500u8iHjVo5n 2HURrMAH6ScyLny0FL43xSGDWjqev8jzc1TTz169jISzPt016V12/VHgZ2bABmo1/Dtx A2DzAht+uBFeBaKHrIwUFz7O5Oz16Cc5r2mN7DXh+E0Hr56pC8RGO0B0oXMW37S+cOr1 zSEQTALW6IVp75NPzlvzqjudHw/P48Am5vEkAgEKI3O9B/42HwqROj+Ov7tDuWfeamNN 0n2ICV4kxKhTb121CkFHPYzlfBjTGqcKgUjm/YQy3hmhUwuCRpdo3xaHxzdNyB630FwK ibDg== X-Gm-Message-State: AJIora+MHsCN/aZKJhSAIS3DcICAE0zyqY2ee81q65BKTpv7XXiR3qYd siwrgBvpRykklBtF9O+vCTAO4ceakqwlmA== X-Google-Smtp-Source: AGRyM1tngjVe+IStIjkHhfpnWJF7lYGrzRcyrN+CoHb8fkjzP1Kh1/2l7ub6dSzpyq7gincNZ+uCWA== X-Received: by 2002:a17:907:7e91:b0:721:9b87:7095 with SMTP id qb17-20020a1709077e9100b007219b877095mr11858616ejc.564.1655761262408; Mon, 20 Jun 2022 14:41:02 -0700 (PDT) Received: from localhost.localdomain (host085115199111.static.fidoka.tech. [85.115.199.111]) by smtp.gmail.com with ESMTPSA id q11-20020a056402518b00b004307c8e1c3fsm11696111edd.34.2022.06.20.14.41.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Jun 2022 14:41:02 -0700 (PDT) From: Angelo Compagnucci To: buildroot@buildroot.org Date: Mon, 20 Jun 2022 23:40:55 +0200 Message-Id: <20220620214058.1435436-2-angelo@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220620214058.1435436-1-angelo@amarulasolutions.com> References: <20220620214058.1435436-1-angelo@amarulasolutions.com> MIME-Version: 1.0 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=8azgUmT5ugFWM53+ubIFzoE+rS0HXB0IwLwLhhKHXiM=; b=qdChr0s3ZOixIT4Vpa11UI6RMwI+IYGKOlxUZl89Q+jysz2r+AjcpQmqb5eByT9oj6 RxErD3kzukTeytdzb7V9kDaI9YClyRpQfEX8/v6VrGmfTeoQWevChGmHxyIrFfXD8v2j H+I+JbcWEidUg6pW8eqwmLkf5LM0+IS4gXfSg= X-Mailman-Original-Authentication-Results: smtp2.osuosl.org; dkim=pass (1024-bit key) header.d=amarulasolutions.com header.i=@amarulasolutions.com header.a=rsa-sha256 header.s=google header.b=qdChr0s3 Subject: [Buildroot] [PATCH 1/4] system: adding options for configuring wifi X-BeenThere: buildroot@buildroot.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Angelo Compagnucci Errors-To: buildroot-bounces@buildroot.org Sender: "buildroot" These options can be used by packages to configure a wifi card to connect at boot. Signed-off-by: Angelo Compagnucci --- system/Config.in | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/system/Config.in b/system/Config.in index 888c24ce81..9a5bdb2932 100644 --- a/system/Config.in +++ b/system/Config.in @@ -418,6 +418,21 @@ comment "automatic network configuration via DHCP needs ifupdown or busybox or n depends on !(BR2_PACKAGE_BUSYBOX || BR2_PACKAGE_IFUPDOWN || \ BR2_PACKAGE_SYSTEMD_NETWORKD || BR2_PACKAGE_NETIFRC) +config BR2_SYSTEM_CONNECT_WIFI + bool "Connect to a default wifi access point" + default n + depends on BR2_PACKAGE_WPA_SUPPLICANT + +config BR2_SYSTEM_CONNECT_WIFI_SSID + string "Access point SSID" + default "" + depends on BR2_SYSTEM_CONNECT_WIFI + +config BR2_SYSTEM_CONNECT_WIFI_PASSWORD + string "Access point password" + default "" + depends on BR2_SYSTEM_CONNECT_WIFI + endif # BR2_ROOTFS_SKELETON_DEFAULT config BR2_SYSTEM_DEFAULT_PATH From patchwork Mon Jun 20 21:40:56 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Angelo Compagnucci X-Patchwork-Id: 1645777 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=buildroot.org (client-ip=140.211.166.136; helo=smtp3.osuosl.org; envelope-from=buildroot-bounces@buildroot.org; receiver=) Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4LRjlS1S4vz9sGG for ; Tue, 21 Jun 2022 07:41:39 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 1151360FC2; Mon, 20 Jun 2022 21:41:38 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 1151360FC2 X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id O418HgYsuIEE; Mon, 20 Jun 2022 21:41:37 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp3.osuosl.org (Postfix) with ESMTP id 2184060BAE; Mon, 20 Jun 2022 21:41:36 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 2184060BAE X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 5675B1BF9BA for ; Mon, 20 Jun 2022 21:41:08 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 31B6882F3D for ; Mon, 20 Jun 2022 21:41:08 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 31B6882F3D X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id oYpRsbNu124d for ; Mon, 20 Jun 2022 21:41:05 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.8.0 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org D4BBD81AD7 Received: from mail-ej1-x62a.google.com (mail-ej1-x62a.google.com [IPv6:2a00:1450:4864:20::62a]) by smtp1.osuosl.org (Postfix) with ESMTPS id D4BBD81AD7 for ; Mon, 20 Jun 2022 21:41:04 +0000 (UTC) Received: by mail-ej1-x62a.google.com with SMTP id v1so23543945ejg.13 for ; Mon, 20 Jun 2022 14:41:04 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=JoBXZedk2w0JYcCNb4K9vsPqEWa3eTn83IBb95FaRMc=; b=NcGwRTQQkFe7C2saRjcq6KLXkhM9jY0N1Qm0iGafDJ5VMYgjWUO9Rj+YN8Xtbf91yk jPr3rVIc/cUONo3C8irv9t9E4EP6ZyTiJoERKKHBvpoOpa1nHJBCkR7r77Cb6n6LJ9X8 bwgUwUR5OyqiE3saVM6go+dVLnJQ1/di2xfjhBde3F2OQ8EW5t1aLMcMp5kLqZ9PT1KB VgOm/uyEpU+xDMjvNKiF/Dg5yK6bln0NiSycF/BJYBM54r3xXtnqAvLdWfRsARginDsX 6WGIIrDTVffMBimOXbECuU1Vxtyd+ZH/bIZ7OfXO+x9m20ioAcwQtdYhM9uIB9T0suUS 5ctw== X-Gm-Message-State: AJIora+puKxWTVKlvTiLfdsMCCKlUIqOXZozIN3jCMNdJRICeDlspda0 QyhQ5chduSX6rI2Ac8OoLe4yeJK1L59EWw== X-Google-Smtp-Source: AGRyM1vO0UYVU7DHb/IJ9qqaWXE+ztZ1RjCaisRFLnCSC4li9GokHQA54lF/Iwq2rVykl3ehgURxOA== X-Received: by 2002:a17:906:2252:b0:711:d2e6:9e7e with SMTP id 18-20020a170906225200b00711d2e69e7emr23997220ejr.161.1655761263084; Mon, 20 Jun 2022 14:41:03 -0700 (PDT) Received: from localhost.localdomain (host085115199111.static.fidoka.tech. [85.115.199.111]) by smtp.gmail.com with ESMTPSA id q11-20020a056402518b00b004307c8e1c3fsm11696111edd.34.2022.06.20.14.41.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Jun 2022 14:41:02 -0700 (PDT) From: Angelo Compagnucci To: buildroot@buildroot.org Date: Mon, 20 Jun 2022 23:40:56 +0200 Message-Id: <20220620214058.1435436-3-angelo@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220620214058.1435436-1-angelo@amarulasolutions.com> References: <20220620214058.1435436-1-angelo@amarulasolutions.com> MIME-Version: 1.0 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=JoBXZedk2w0JYcCNb4K9vsPqEWa3eTn83IBb95FaRMc=; b=EDuN7cUzS32Lf/AReCl8U5QcWcfFXK9LvUm46XnKXMj5Lb8P0/aIVZfUFXo1CLSyrg YATuYmTIBLukIeS1R+DPXYgiG86tWLcZtpu+JSfuGP5GYQvsOUnXdlc4AXBKw3+ReL1E NQag5qmXchYVNCMUi9PkPWw4CXQtvWFq2d5V4= X-Mailman-Original-Authentication-Results: smtp1.osuosl.org; dkim=pass (1024-bit key) header.d=amarulasolutions.com header.i=@amarulasolutions.com header.a=rsa-sha256 header.s=google header.b=EDuN7cUz Subject: [Buildroot] [PATCH 2/4] package/wpa_supplicant: configure wifi when enabled X-BeenThere: buildroot@buildroot.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Angelo Compagnucci Errors-To: buildroot-bounces@buildroot.org Sender: "buildroot" Configure a default basic wifi setup able to automatically connect to the selected access point. Signed-off-by: Angelo Compagnucci --- 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 From patchwork Mon Jun 20 21:40:57 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Angelo Compagnucci X-Patchwork-Id: 1645778 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=buildroot.org (client-ip=140.211.166.138; helo=smtp1.osuosl.org; envelope-from=buildroot-bounces@buildroot.org; receiver=) Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4LRjlk1w4Tz9sGG for ; Tue, 21 Jun 2022 07:41:54 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id A9D2A83E63; Mon, 20 Jun 2022 21:41:51 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org A9D2A83E63 X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id TUzZsDpC41ex; Mon, 20 Jun 2022 21:41:50 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp1.osuosl.org (Postfix) with ESMTP id E03B182F3D; Mon, 20 Jun 2022 21:41:48 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org E03B182F3D X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id 5E5691BF398 for ; Mon, 20 Jun 2022 21:41:09 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 37147605A5 for ; Mon, 20 Jun 2022 21:41:08 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 37147605A5 X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ORdwydzn0rjH for ; Mon, 20 Jun 2022 21:41:05 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.8.0 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 95E7E60674 Received: from mail-ej1-x62a.google.com (mail-ej1-x62a.google.com [IPv6:2a00:1450:4864:20::62a]) by smtp3.osuosl.org (Postfix) with ESMTPS id 95E7E60674 for ; Mon, 20 Jun 2022 21:41:05 +0000 (UTC) Received: by mail-ej1-x62a.google.com with SMTP id ay16so4227731ejb.6 for ; Mon, 20 Jun 2022 14:41:05 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=lUWeFJ2fz8gjJsQbSJ0KVCvaTjQlMtc94Jse7UtcNOY=; b=p3OnZ8fsaBvqauh78JXmScmSkBaWJCeMUf7ru6zHzJ2Q92+uG+5efWPD6L8nSMCg/R aHmFzacXzzYc+DcCZIPq9mCN4CXZEMaH1CHigGxK5kitZA69ms3U3xG/XVhuEQOVnRdE dNbLGiLGaXhczdX6ZLo/1XP18hxXnjVoSkdINUaFEIDLSHMMgxdR/h/O1TxRjXC3Wdvy ngnlZYsOxa5nFXJGuBcdLiD4483CPZIrBwWxHbA2SKNf4d1Ajxc5XjVuNR4QlPLzcIN0 uZw7nykZm0L383Iec2XVWt2gdtWJWFu7Tv6hkXJzPlwNw2GdZ1fVFjw+Yt5IieE2R+dI kwsg== X-Gm-Message-State: AJIora8dNTrXwkS2dIFF7RxudrY3XhnXkhEmc2dMOOkKjXWoPYsfFib3 jSgu7IEMI90fBjvjl/HX89ftH1uxEtqi5g== X-Google-Smtp-Source: AGRyM1v+0QSxWhAK1mgyjJGXzhRkbgvrV0t6jYtrAdS/mcBB/P38svXuHYcedoO52WyEnBNcmZItSA== X-Received: by 2002:a17:906:4f:b0:712:af2:29d9 with SMTP id 15-20020a170906004f00b007120af229d9mr23319308ejg.751.1655761263836; Mon, 20 Jun 2022 14:41:03 -0700 (PDT) Received: from localhost.localdomain (host085115199111.static.fidoka.tech. [85.115.199.111]) by smtp.gmail.com with ESMTPSA id q11-20020a056402518b00b004307c8e1c3fsm11696111edd.34.2022.06.20.14.41.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Jun 2022 14:41:03 -0700 (PDT) From: Angelo Compagnucci To: buildroot@buildroot.org Date: Mon, 20 Jun 2022 23:40:57 +0200 Message-Id: <20220620214058.1435436-4-angelo@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220620214058.1435436-1-angelo@amarulasolutions.com> References: <20220620214058.1435436-1-angelo@amarulasolutions.com> MIME-Version: 1.0 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=lUWeFJ2fz8gjJsQbSJ0KVCvaTjQlMtc94Jse7UtcNOY=; b=MYKuzIDSRmIjdTMer5dzS3zc+TL7/UcNNcmGE+YALJAQuSpr2pmLK3ve2RjVtpQ/Y3 E475Ru6lcsdnOUgQ8RibJjQu3HnD59LyyjvKsyvl24FKZKUfWg+220MgdEIe9Tmga0bv PJW1BwwaBHdJQtYpDv2tLfRJEWyASU4h67+XY= X-Mailman-Original-Authentication-Results: smtp3.osuosl.org; dkim=pass (1024-bit key) header.d=amarulasolutions.com header.i=@amarulasolutions.com header.a=rsa-sha256 header.s=google header.b=MYKuzIDS Subject: [Buildroot] [PATCH 3/4] package/ifupdown-scripts: add wifi configuration when enabled X-BeenThere: buildroot@buildroot.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Angelo Compagnucci Errors-To: buildroot-bounces@buildroot.org Sender: "buildroot" Add a proper wpa-conf line to the interfaces files to let the system bringup the wifi interface and the related wpa supplicant. Signed-off-by: Angelo Compagnucci --- package/ifupdown-scripts/ifupdown-scripts.mk | 2 ++ 1 file changed, 2 insertions(+) diff --git a/package/ifupdown-scripts/ifupdown-scripts.mk b/package/ifupdown-scripts/ifupdown-scripts.mk index 5ef032142c..e3830aa1ad 100644 --- a/package/ifupdown-scripts/ifupdown-scripts.mk +++ b/package/ifupdown-scripts/ifupdown-scripts.mk @@ -28,6 +28,8 @@ define IFUPDOWN_SCRIPTS_DHCP echo " pre-up /etc/network/nfs_check"; \ echo " wait-delay 15"; \ echo " hostname \$$(hostname)"; \ + test -n "$(BR2_SYSTEM_CONNECT_WIFI)" && \ + echo " wpa-conf /etc/wpa_supplicant.conf"; \ ) >> $(TARGET_DIR)/etc/network/interfaces endef define IFUPDOWN_SCRIPTS_DHCP_OPENRC From patchwork Mon Jun 20 21:40:58 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Angelo Compagnucci X-Patchwork-Id: 1645779 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=buildroot.org (client-ip=2605:bc80:3010::136; helo=smtp3.osuosl.org; envelope-from=buildroot-bounces@buildroot.org; receiver=) Received: from smtp3.osuosl.org (smtp3.osuosl.org [IPv6:2605:bc80:3010::136]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4LRjlx3tcjz9sGG for ; Tue, 21 Jun 2022 07:42:05 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id B026B61006; Mon, 20 Jun 2022 21:42:03 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org B026B61006 X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id GQ_qMJKdfEhu; Mon, 20 Jun 2022 21:42:02 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp3.osuosl.org (Postfix) with ESMTP id B19CB61004; Mon, 20 Jun 2022 21:42:01 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org B19CB61004 X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id 74F841BF9B9 for ; Mon, 20 Jun 2022 21:41:09 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 47031401DF for ; Mon, 20 Jun 2022 21:41:09 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 47031401DF X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id jSemKIW-_Pn5 for ; Mon, 20 Jun 2022 21:41:06 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.8.0 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 44BC4402C3 Received: from mail-ej1-x633.google.com (mail-ej1-x633.google.com [IPv6:2a00:1450:4864:20::633]) by smtp2.osuosl.org (Postfix) with ESMTPS id 44BC4402C3 for ; Mon, 20 Jun 2022 21:41:06 +0000 (UTC) Received: by mail-ej1-x633.google.com with SMTP id lw20so1260196ejb.4 for ; Mon, 20 Jun 2022 14:41:06 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=8BVeG0ueQIXE7Zr4UEp8B6x5rCjjLXx/M6UNyLMD1Ws=; b=iV0aVhKqOPz5xiWOlnSOaYEUckpYf5qbGdwY8iNsFdfBlUjQEM6P9OSceKb1DKW0xY G3P+gxz7Lrhr5QoQVRqmGlDTF1e1vQrB7j5mfthTGBXECR4sBQMSbpeJVbDFgCQ7QkrR jtWN3k/qfoRE2B64QxAI0y1SjTE9tL8AJnzJsMGnroXa8FQTlDGR4h+2+6AQxG58bHmq 4GdbbbUhUTGa++N+5eeF8E6cs1qevsNG/MLCHExzCIy/Zl6s6EcnqxlbM8bTcmL0rJvN gZtcTuoD8QA25rCwOztLLdJAFzRjjx/SeR2sDGXnYLyHsC/dfLiXGncm0o028jeSricv dfXQ== X-Gm-Message-State: AJIora8Ep8OahnXC94u20bBYxiIIuR7V5vQQXaLxgY+Rocy7Yq+sZgna Dd/BBFMqdhWVxBhaenTyHxdH1oRPOpC3Kw== X-Google-Smtp-Source: AGRyM1tOsvWCC4K07NMev3PAkxyub1jlRdpHLWzujKdO3+D79b97hYCA/83e0fniG+DPjO5NX5omEQ== X-Received: by 2002:a17:906:7489:b0:722:dce1:f5d with SMTP id e9-20020a170906748900b00722dce10f5dmr2001838ejl.329.1655761264522; Mon, 20 Jun 2022 14:41:04 -0700 (PDT) Received: from localhost.localdomain (host085115199111.static.fidoka.tech. [85.115.199.111]) by smtp.gmail.com with ESMTPSA id q11-20020a056402518b00b004307c8e1c3fsm11696111edd.34.2022.06.20.14.41.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Jun 2022 14:41:04 -0700 (PDT) From: Angelo Compagnucci To: buildroot@buildroot.org Date: Mon, 20 Jun 2022 23:40:58 +0200 Message-Id: <20220620214058.1435436-5-angelo@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220620214058.1435436-1-angelo@amarulasolutions.com> References: <20220620214058.1435436-1-angelo@amarulasolutions.com> MIME-Version: 1.0 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=8BVeG0ueQIXE7Zr4UEp8B6x5rCjjLXx/M6UNyLMD1Ws=; b=c/YJXNkKsss6TDVlD+MoBNpB84UIQu63aBeHIN3rZoCDT7GAuvJzNk0f6Kiq+iY3Vv Ev8SkcqG29PvpX4/hQdFlTBOq0c9uQkzkQZgvM1CLQrWyV1E+a/hXcw17xxBz53QgaAI d/DQhJ+V6JXEWH+ou6QkiQ9aCz+wHSU6Q2YMA= X-Mailman-Original-Authentication-Results: smtp2.osuosl.org; dkim=pass (1024-bit key) header.d=amarulasolutions.com header.i=@amarulasolutions.com header.a=rsa-sha256 header.s=google header.b=c/YJXNkK Subject: [Buildroot] [PATCH 4/4] package/busybox: add service to load kernel modules at boot X-BeenThere: buildroot@buildroot.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Angelo Compagnucci Errors-To: buildroot-bounces@buildroot.org Sender: "buildroot" In cases where no hotplug is available (by choice or by the lack of a proper hotplug method for a device), this service can be used to load kernel module drivers by reading the /etc/modules file. Signed-off-by: Angelo Compagnucci --- package/busybox/S02modules | 56 ++++++++++++++++++++++++++++++++++++++ package/busybox/busybox.mk | 2 ++ 2 files changed, 58 insertions(+) create mode 100644 package/busybox/S02modules diff --git a/package/busybox/S02modules b/package/busybox/S02modules new file mode 100644 index 0000000000..f25712e1ca --- /dev/null +++ b/package/busybox/S02modules @@ -0,0 +1,56 @@ +#!/bin/sh + +MODULES="modules" + +load_unload() { + [ ! -f /etc/${MODULES} ] && echo ' OK' && exit 0 + + while read module args; do + + case "$module" in + ""|"#"*) continue ;; + esac + + if [ "$1" = "load" ]; then + modprobe -q ${module} ${args} >/dev/null && \ + printf ' %s success,' "$module" || + printf ' %s failed,' "$module" + else + rmmod ${module} >/dev/null + fi + + done < /etc/${MODULES} +} + +start() { + printf 'Starting %s:' "$MODULES" + + load_unload load + + echo ' OK' +} + +stop() { + printf 'Stopping %s: ' "$MODULES" + + load_unload unload + + echo 'OK' +} + +restart() { + stop + sleep 1 + start +} + +case "$1" in + start|stop|restart) + "$1";; + reload) + # Restart, since there is no true "reload" feature. + restart;; + *) + echo "Usage: $0 {start|stop|restart|reload}" + exit 1 +esac diff --git a/package/busybox/busybox.mk b/package/busybox/busybox.mk index 3e49de0a84..40490e866a 100644 --- a/package/busybox/busybox.mk +++ b/package/busybox/busybox.mk @@ -382,6 +382,8 @@ define BUSYBOX_INSTALL_TARGET_CMDS $(BUSYBOX_INSTALL_UDHCPC_SCRIPT) $(BUSYBOX_INSTALL_ZCIP_SCRIPT) $(BUSYBOX_INSTALL_MDEV_CONF) + $(INSTALL) -m 0755 -D package/busybox/S02modules \ + $(TARGET_DIR)/etc/init.d/S02modules; endef # Install the sysvinit scripts, for the moment, but not those that already