BLFS文档错误纠正

c8510288-1095-44ab-9dac-f8fd62587740.jpg

1. 关于LFS的无线网卡驱动

在官方说明文档中需要自行安装驱动固件的,只需要将固件放到/lib/firmware/目录,系统内核在启动时会自动寻找并加载

On some recent PCs it can be necessary, or desirable, to load firmware
to make them work at their best. There is a directory, /lib/firmware,
where the kernel or kernel drivers look for firmware images.

将官方下载的网卡驱动固件放到/lib/firmware/,系统日志显示

Apr 8 05:55:12 LFS-12 kernel: [ 0.316323] iwlwifi 0000:00:14.3: no
suitable firmware found!

将驱动编译到内核,虽然找到了驱动,但是在启动网卡时遇到错误

linux failed to initialize Smart Fifo

https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/tree/下载所有iwlwifi-9000相关的驱动都编译到内核,问题解决


2. 关于wpa_supplicant自动生成配置文件

在BLFS中wpa_supplicant自动生成配置文件的代码如下

To connect to an access point that uses a password, you need to put
the pre-shared key in /etc/wpa_supplicant/wpa_supplicant-wifi0.conf.
SSID is the string that the access point/router transmits to identify
itself. Run the following command as the root user:
install -v -dm755 /etc/wpa_supplicant && wpa_passphrase SSID SECRET_PASSWORD /etc/wpa_supplicant/wpa_supplicant-wifi0.conf

生成的配置文件如下

 network={
  ssid="SSID"
  #psk="SECRET_PASSWORD"
  psk=85c24e8ac598bf1ab19511eaf16191a3706bcc01b1f0698c13ab4bd5301e3fb3
 }

PSK前有注释符号#这时候启动服务是无法连入目标网络的
需要手动进入wpa_supplicant/wpa_supplicant-wifi0.conf中,去掉注释符号


3. 关于启动wpa_supplicant服务

配置好conf文件后,依照BLFS的说明应该执行以下操作

You can connect to the wireless access point by running the following
command as the root user:
systemctl start wpa_supplicant@wlan0
To connect to the wireless access point at boot, simply enable the
appropriate wpa_supplicant service by running the following command as
the root user:
systemctl enable wpa_supplicant@wlan0

但是服务无法启动,显示未找到相关配置文件
wpa_supplicant-wifi0.conf文件名称改为wpa_supplicant-wlan0.conf
问题解决

可能原因:wpa_supplicant-wifi0.conf这个配置文件是为systemV版本配置的