이걸 만들어야 해무선 네트워크 드라이버Apine 3.12 x86_64의 경우. 다음을 통해 gcc 및 Linux 헤더를 설치했습니다.
apk add --update alpine-sdk linux-headers
하지만 모듈을 빌드하려고 하면 실패하고 다음 오류가 반환됩니다.
localhost:~/rtl8188eus# make all
make ARCH=x86_64 CROSS_COMPILE= -C /lib/modules/5.4.43-1-lts/build M=/root/rtl8188eus modules
make[1]: *** /lib/modules/5.4.43-1-lts/build: No such file or directory. Stop.
make: *** [Makefile:1911: modules] Error 2
알파인의 솔기 코어 헤더는 다른 dsitro와 완전히 다른 구조를 가지고 있습니다. 다른 커널 헤더 패키지를 검색했지만 linux-headers
.
Alpine Linux에서 모드(특히 드라이버)를 컴파일한 경험이 있는 사람이 있으면 단계별로 설명해주세요.
답변1
커널 소스가 아닌 헤더만 설치했기 때문에 빌드가 작동하지 않습니다. 출력을 보면 linux-lts 커널을 사용하고 있으므로 linux-lts-dev를 설치해야 합니다.
따라할 수 있는 간단한 "방법"이 있습니다.
- 필수 패키지를 설치합니다:
~# apk add alpine-sdk linux-lts-dev
- 저장소를 복제하고 빌드를 시작합니다.
~# git clone https://github.com/lwfinger/rtl8188eu.git
~# cd rtl8188eu
~# make all
~/rtl8188eu# make all
make ARCH=x86_64 CROSS_COMPILE= -C /lib/modules/5.4.43-1-lts/build M=/root/rtl8188eu modules
make[1]: Entering directory '/usr/src/linux-headers-5.4.43-1-lts'
CC [M] /root/rtl8188eu/core/rtw_ap.o
CC [M] /root/rtl8188eu/core/rtw_br_ext.o
CC [M] /root/rtl8188eu/core/rtw_cmd.o
CC [M] /root/rtl8188eu/core/rtw_debug.o
CC [M] /root/rtl8188eu/core/rtw_efuse.o
...
...
LD [M] /root/rtl8188eu/8188eu.o
Building modules, stage 2.
MODPOST 1 modules
CC [M] /root/rtl8188eu/8188eu.mod.o
LD [M] /root/rtl8188eu/8188eu.ko
make[1]: Leaving directory '/usr/src/linux-headers-5.4.43-1-lts'
- 모듈을 설치합니다:
~# make install
install -p -m 644 8188eu.ko /lib/modules/5.4.43-1-lts/kernel/drivers/net/wireless
cp rtl8188eufw.bin /lib/firmware/.
/sbin/depmod -a 5.4.43-1-lts
mkdir -p /lib/firmware/rtlwifi
cp rtl8188eufw.bin /lib/firmware/rtlwifi/.
이것은 modinfo의 출력입니다.
# modinfo 8188eu
filename: /lib/modules/5.4.43-1-lts/kernel/drivers/net/wireless/8188eu.ko
version: v4.1.4_6773.20130222
author: Realtek Semiconductor Corp.
description: Realtek Wireless Lan Driver
license: GPL
srcversion: 8F9A46E87B6F34EB9DB744D
alias: usb:v0B05p18F0d*dc*dsc*dp*ic*isc*ip*in*
alias: usb:v2C4Ep0102d*dc*dsc*dp*ic*isc*ip*in*
alias: usb:v2357p0111d*dc*dsc*dp*ic*isc*ip*in*
alias: usb:v2357p010Cd*dc*dsc*dp*ic*isc*ip*in*
alias: usb:v056Ep4008d*dc*dsc*dp*ic*isc*ip*in*
alias: usb:v2001p331Bd*dc*dsc*dp*ic*isc*ip*in*
alias: usb:v2001p3311d*dc*dsc*dp*ic*isc*ip*in*
alias: usb:v2001p3310d*dc*dsc*dp*ic*isc*ip*in*
alias: usb:v2001p330Fd*dc*dsc*dp*ic*isc*ip*in*
alias: usb:v0DF6p0076d*dc*dsc*dp*ic*isc*ip*in*
alias: usb:v07B8p8179d*dc*dsc*dp*ic*isc*ip*in*
alias: usb:v0BDApF179d*dc*dsc*dp*ic*isc*ip*in*
alias: usb:v0BDAp0179d*dc*dsc*dp*ic*isc*ip*in*
alias: usb:v0BDAp8179d*dc*dsc*dp*ic*isc*ip*in*
depends: usbcore
retpoline: Y
name: 8188eu
vermagic: 5.4.43-1-lts SMP mod_unload modversions
parm: rtw_ips_mode:The default IPS mode (int)
parm: ifname:The default name to allocate for first interface (charp)
parm: if2name:The default name to allocate for second interface (charp)
parm: rtw_initmac:charp
parm: rtw_channel_plan:int
parm: rtw_chip_version:int
parm: rtw_rfintfs:int
parm: rtw_lbkmode:int
parm: rtw_network_mode:int
parm: rtw_channel:int
parm: rtw_mp_mode:int
parm: rtw_wmm_enable:int
parm: rtw_vrtl_carrier_sense:int
parm: rtw_vcs_type:int
parm: rtw_busy_thresh:int
parm: rtw_led_enable:int
parm: rtw_ht_enable:int
parm: rtw_cbw40_enable:int
parm: rtw_ampdu_enable:int
parm: rtw_rx_stbc:int
parm: rtw_ampdu_amsdu:int
parm: rtw_lowrate_two_xmit:int
parm: rtw_rf_config:int
parm: rtw_power_mgnt:int
parm: rtw_smart_ps:int
parm: rtw_low_power:int
parm: rtw_wifi_spec:int
parm: rtw_antdiv_cfg:int
parm: rtw_antdiv_type:int
parm: rtw_enusbss:int
parm: rtw_hwpdn_mode:int
parm: rtw_hwpwrp_detect:int
parm: rtw_hw_wps_pbc:int
parm: rtw_max_roaming_times:The max roaming times to try (uint)
parm: rtw_fw_iol:FW IOL (int)
parm: rtw_mc2u_disable:int
parm: rtw_80211d:Enable 802.11d mechanism (int)
parm: rtw_notch_filter:0:Disable, 1:Enable, 2:Enable only for P2P (uint)
parm: debug:Set debug level (1-9) (default 1) (int)
도움이 되었기를 바랍니다.
.: 프란시스코