toradex 보드를 부팅하는 데 문제가 있습니다(추가 정보여기) wpa_supplicant 서비스가 "종속성" 이유로 실패했습니다. 저는 순수한 시스템 네트워크 설정을 사용하고 있습니다. 이 파일은 Wi-Fi에 사용됩니다.
- 먼저 인터페이스 이름을 바꿉니다.
root@colibri:/etc/systemd/network# cat 10-toradex-wifi-ifnames.link
[Match]
Driver=mwifiex_pcie
[Link]
NamePolicy=keep kernel
- 두 번째는 인터페이스 업그레이드를 위한 것입니다.
root@colibri:/etc/systemd/network# cat 61-wireless-mambo.network
[Match]
Name=mlan0
[Network]
DHCP=ipv4
IgnoreCarrierLoss=3s
[DHCPv4]
RouteMetric=21
- 세 번째는 wpa_supplicant용입니다(인터페이스별).
root@colibri:~# cat /etc/systemd/system/[email protected]
[Unit]
Description=WPA supplicant daemon (interface-specific version)
Requires=sys-subsystem-net-devices-%i.device
After=sys-subsystem-net-devices-%i.device
Before=network.target
Wants=network.target
# NetworkManager users will probably want the dbus version instead.
[Service]
Type=simple
ExecStart=/usr/sbin/wpa_supplicant -c/etc/wpa_supplicant/wpa_supplicant-%I.conf -i%I
[Install]
WantedBy=multi-user.target
root@colibri:~#
나는 문제를 다음과 같이 요약했습니다.
root@colibri:~# systemctl status [email protected]
○ [email protected] - WPA supplicant daemon (interface-specific version)
Loaded: loaded (/etc/systemd/system/[email protected]; enabled; vendor preset: disabled)
Active: inactive (dead)
Nov 03 11:50:02 colibri systemd[1]: Dependency failed for WPA supplicant daemon (interface-specific version).
Nov 03 11:50:02 colibri systemd[1]: [email protected]: Job [email protected]/start failed with result 'dependency'.
자세한 내용은:
Nov 03 13:30:41 colibri systemd[1]: Timed out waiting for device /sys/subsystem/net/devices/mlan0.
Nov 03 13:30:41 colibri systemd[1]: Dependency failed for WPA supplicant daemon (interface-specific version).
시작 시 로그인을 시도할 때 다음 메시지가 표시되기 때문에 시간 초과가 발생한 것을 알 수 있습니다.
pi@tt:~$ ssh [email protected]
[email protected]'s password:
"System is booting up. Unprivileged users are not permitted to log in yet. Please come back later. For technical details, see pam_nologin(8)."
Connection closed by 192.168.28.38 port 22
pi@tt:~$
systemd-analyze
또는 systemd-analyze
키 체인을 사용하면 결과가 생성되지 않습니다 systemd-analyze blame
. 내 생각엔 이것이 인터페이스 이름 변경 udev
및 경쟁 조건 과 관련이 있는 것 같습니다 systemd
.
Nov 03 13:30:41 colibri systemd[1]: sys-subsystem-net-devices-mlan0.device: Job sys-subsystem-net-devices-mlan0.device/start failed with result 'timeout'.
시간 확인: 13:30:41, 로그에 다음이 표시됩니다.
Nov 03 13:30:43 colibri systemd-networkd[656]: mlan0: udev initialized link
기기 부팅을 시도한 후 udev
초기화가 완료된 것 같습니다 .systemd
시스템이 시간 초과에 도달하고 결국 부팅되면 mlan0.service를 시작하고 다음과 같이 실행됩니다.
root@colibri:~# systemctl status [email protected]
○ [email protected] - WPA supplicant daemon (interface-specific version)
Loaded: loaded (/etc/systemd/system/[email protected]; enabled; vendor preset: disabled)
Active: inactive (dead)
Nov 03 13:30:41 colibri systemd[1]: Dependency failed for WPA supplicant daemon (interface-specific version).
Nov 03 13:30:41 colibri systemd[1]: [email protected]: Job [email protected]/start failed with result 'dependency'.
root@colibri:~# systemctl start [email protected]
root@colibri:~# systemctl status [email protected]
● [email protected] - WPA supplicant daemon (interface-specific version)
Loaded: loaded (/etc/systemd/system/[email protected]; enabled; vendor preset: disabled)
Active: active (running) since Fri 2023-11-03 13:39:49 UTC; 1s ago
Main PID: 1333 (wpa_supplicant)
Tasks: 1 (limit: 1649)
Memory: 1.6M
CGroup: /system.slice/system-wpa_supplicant.slice/[email protected]
└─ 1333 /usr/sbin/wpa_supplicant -c/etc/wpa_supplicant/wpa_supplicant-mlan0.conf -imlan0
Nov 03 13:39:49 colibri systemd[1]: Started WPA supplicant daemon (interface-specific version).
Nov 03 13:39:49 colibri wpa_supplicant[1333]: Successfully initialized wpa_supplicant
root@colibri:~# systemctl status [email protected]
● [email protected] - WPA supplicant daemon (interface-specific version)
Loaded: loaded (/etc/systemd/system/[email protected]; enabled; vendor preset: disabled)
Active: active (running) since Fri 2023-11-03 13:39:49 UTC; 5s ago
Main PID: 1333 (wpa_supplicant)
Tasks: 1 (limit: 1649)
Memory: 1.7M
CGroup: /system.slice/system-wpa_supplicant.slice/[email protected]
└─ 1333 /usr/sbin/wpa_supplicant -c/etc/wpa_supplicant/wpa_supplicant-mlan0.conf -imlan0
Nov 03 13:39:49 colibri systemd[1]: Started WPA supplicant daemon (interface-specific version).
Nov 03 13:39:49 colibri wpa_supplicant[1333]: Successfully initialized wpa_supplicant
Nov 03 13:39:51 colibri wpa_supplicant[1333]: mlan0: Trying to associate with 00:90:7f:47:66:41 (SSID='<REDACTED>' freq=5220 MHz)
Nov 03 13:39:51 colibri wpa_supplicant[1333]: mlan0: Associated with 00:90:7f:47:66:41
Nov 03 13:39:51 colibri wpa_supplicant[1333]: mlan0: CTRL-EVENT-SUBNET-STATUS-UPDATE status=0
Nov 03 13:39:51 colibri-imx8x-07330229 wpa_supplicant[1333]: mlan0: WPA: Key negotiation completed with 00:90:7f:47:66:41 [PTK=CCMP GTK=CCMP]
Nov 03 13:39:51 colibri wpa_supplicant[1333]: mlan0: CTRL-EVENT-CONNECTED - Connection to 00:90:7f:47:66:41 completed [id=0 id_str=]
root@colibri:~#
추측이 있나요? 아니면 이 문제를 해결할 수 있는 서비스 파일을 만드는 방법에 대한 팁이 있습니까?