기본 콘텐츠로 건너뛰기

Wifi Dongle Driver Porting RTL8188CUS to embedded Linux

여러가지를 고려하여 kernel 에서 제공되는 Wifi Dongle을 선정했으나
kernel source에서 제공되는 driver로는 driver로딩은 되었지만 wlan0가 보이지 않음.
realtek site를에서 linux driver를 받아서
http://www.realtek.com.tw/downloads/downloadsView.aspx?Langid=1&PNid=48&PFid=48&Level=5&Conn=4&DownTypeID=3&GetDown=false&Downloads=true#RTL8192CU
nvs3320 kernel device driver 빌드조건을 추가수정하여
Makefile
73 CONFIG_PLATFORM_ARM_NVS3320 = y
..
513 ifeq ($(CONFIG_PLATFORM_ARM_NVS3320), y)
514 EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN
    EXTRA_CFLAGS += -DCONFIG_IOCTL_CFG80211 -DRTW_USE_CFG80211_STA_EVENT
515 ARCH := arm
516 CROSS_COMPILE := arm-cortex_a9-linux-gnueabi-
517 KVER  := 3.4.39
518 KSRC:= ~/git_local/myproject/kernel/kernel-3.4.39/
519 endif


빌드하여 kernel driver를 생성한후
보드에 복사한 후 insmod를 통해서 device driver를 로딩하면 wlan 이 보임.
# insmod 8192cu.ko
[   26.500000] rtl8192cu driver version=v4.0.2_9000.20130911
[   26.500000] build time: Jan 18 2016 16:18:46
[   26.510000]
[   26.510000] usb_endpoint_descriptor(0):
[   26.510000] bLength=7
[   26.510000] bDescriptorType=5
[   26.520000] bEndpointAddress=81
[   26.520000] wMaxPacketSize=200
[   26.520000] bInterval=0
[   26.530000] RT_usb_endpoint_is_bulk_in = 1
[   26.530000]
[   26.530000] usb_endpoint_descriptor(1):
[   26.540000] bLength=7
[   26.540000] bDescriptorType=5
[   26.550000] bEndpointAddress=2
[   26.550000] wMaxPacketSize=200
[   26.550000] bInterval=0
[   26.550000] RT_usb_endpoint_is_bulk_out = 2
[   26.560000]
[   26.560000] usb_endpoint_descriptor(2):
[   26.560000] bLength=7
[   26.570000] bDescriptorType=5
[   26.570000] bEndpointAddress=3
[   26.570000] wMaxPacketSize=200
[   26.580000] bInterval=0
[   26.580000] RT_usb_endpoint_is_bulk_out = 3
[   26.580000]
[   26.580000] usb_endpoint_descriptor(3):
[   26.590000] bLength=7
[   26.590000] bDescriptorType=5
[   26.590000] bEndpointAddress=84
[   26.600000] wMaxPacketSize=40
[   26.600000] bInterval=1
[   26.600000] RT_usb_endpoint_is_int_in = 4, Interval = 1
[   26.610000] nr_endpoint=4, in_num=2, out_num=2
[   26.610000]
[   26.610000] USB_SPEED_HIGH
[   26.610000] CHIP TYPE: RTL8188C_8192C
[   26.620000] register rtw_netdev_ops to netdev_ops
[   26.620000] Chip Version ID: VERSION_NORMAL_TSMC_CHIP_88C.
[   26.630000] RF_Type is 3!!
[   26.630000] EEPROM type is E-FUSE
[   26.640000] ====> ReadAdapterInfo8192C
[   26.640000] Boot from EFUSE, Autoload OK !
[   26.780000] EEPROMVID = 0x0bda
[   26.780000] EEPROMPID = 0x8176
[   26.780000] EEPROMCustomerID : 0x00
[   26.790000] EEPROMSubCustomerID: 0x00
[   26.790000] RT_CustomerID: 0x00
[   26.790000] _ReadMACAddress MAC Address from EFUSE = 90:9f:33:ec:f5:93
[   26.800000] EEPROMRegulatory = 0x0
[   26.800000] _ReadBoardType(0)
[   26.810000] BT Coexistance = disable
[   26.810000] mlmepriv.ChannelPlan = 0x02
[   26.810000] _ReadPSSetting...bHWPwrPindetect(0)-bHWPowerdown(0) ,bSupportRemo
teWakeup(0)
[   26.820000] ### PS params=>  power_mgnt(1),usbss_enable(0) ###
[   26.830000] ### AntDivCfg(0)
[   26.830000] readAdapterInfo_8192CU(): REPLACEMENT = 1
[   26.840000] <==== ReadAdapterInfo8192C in 200 ms
[   26.840000] rtw_macaddr_cfg MAC Address  = 90:9f:33:ec:f5:93
[   26.850000] bDriverStopped:1, bSurpriseRemoved:0, bup:0, hw_init_completed:0
[   26.870000] _rtw_drv_register_netdev, MAC Address (if1) = 90:9f:33:ec:f5:93
# lsmod
    Tainted: G
8192cu 566202 0 - Live 0x7f0ed000 (O)
vfat 10855 0 - Live 0x7f0e6000
fat 60909 1 vfat, Live 0x7f0d1000
nc_gfb 19539 0 - Live 0x7f0c9000 (O)
nx_vpu 410125 0 - Live 0x7f05f000 (O)
vr 217673 0 - Live 0x7f019000 (O)
nc_base 819 0 - Live 0x7f015000 (O)
# ifconfig wlan0
wlan0     Link encap:Ethernet  HWaddr 90:9F:33:EC:F5:93
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
wifi dongle firmware
wget https://git.kernel.org/cgit/linux/kernel/git/firmware/linux-firmware.git/tree/rtlwifi/rtl8192cufw.bin
kernel source 및 userfs에 포함된 driver 에서는 요구하나 realtek site에서 받은 driver에서도 요구하는지는 확인되지 않았습니다.
다운로드 받은 파일은 /lib/firmware/rtlwifi 폴더에 아래에 위치시켜야 인식을 하며,
ramdisk는 항상 지워지므로 rootfs을 만들때 포함시켜야합니다.

댓글

이 블로그의 인기 게시물

DELL의 새게이밍 노트북, Inspiron 15 7000 Gaming, Dual Display 문제

Dell New 게이밍노트북 7567  I7 Notebook http://www.dell.com/kr/p/inspiron-15-7567-laptop/pd?ref=PD_OC 7th Generation Intel® Core™ i7 프로세서 8GB 메모리 1TB 하드 드라이브 + 128GB 솔리드 스테이트 드라이브 NVIDIA® GeForce® GTX 1050 Ti (4GB GDDR5 그래픽 메모리 포함) 상세 사양 리눅스 개발환경이 필요해서 여러대 구매한 노트북입니다. 기본적으로 ubuntu 16.04 가 설치되어 있는데, 필요한 개발환경이 ubuntu 이고 별도의 windows 개발용 PC가 있기 때문에 구매를 결정하게 되었습니다. Slim하지 않지만 I7 HQ CPU와 1050TI spec 이 결정하는데 주요했고, 받은 후에 빌드환경 구축후 8 thread compile을 만끽하던중 치명적인 문제를 Display쪽 문제를 발견하고, Dell express 쪽과 전화통화도 하고 문의 메일도 보내서 지원을 받고(진행)중입니다. 추가 :  시간낭비하지 말라고 중간에 업데이트합니다.  해결되었고, 해결방법은  Windows 을 설치한 후 Fn+F8을 눌러서 모드를 확장모드를 선택합니다. 디스플레이 설정이나 드라이버 재설치 같은 방법으로는 조정이 불가능했습니다. --------------------------------------------------------------------- 요즘 다들 Dual monitor 환경일텐데, Dual Monitor를 복제형태로만 지원을 합니다. 14.04 설치후 업데이트시 375.66 Driver가 설치됩니다. nVidia driver가 설치되었으나, 모니터 인식에 문제가 있어서 해상도 확장설정자체를 할 수 없습니다. 기본 ubuntu라서 driver 문제인가 확인하기 위해서 우분투 64bit 환경 NVIDIA...

우분투에서 성가신 자동 실행 처리

우분투운서비스는 종료된지 예전인데 script에 남아 있어서 항상 실행된다 apt-get 패키지가 제거되어도 etc/xdg/autostart 폴더에서 삭제해야 실행되지 않는다. /etc/xdg/autostart$ ls at-spi-dbus-bus.desktop              gnome-settings-daemon.desktop                print-applet.desktop bluetooth-applet-unity.desktop       gnome-sound-applet.desktop                   pulseaudio-kde.desktop bluetooth-applet.desktop             gnome-user-share.desktop                     pulseaudio.desktop deja-dup-monitor.desktop             gsettings-data-convert.desktop               telepathy-indicator.desktop gdu-notification-daemon.desktop      gwibber.desktop                             ...

llama 계열 gguf 제공되는 경우 가져와서 사용하는 예제

llama 계열의 모델이 친절하게 gguf 형태로 제공되는 경우 어떻게 다운받고 어떻게 ollama에 추가하는지 예전에 gguf 파일을 등록하는 유튜브 강의를 보고 메모해두것을 기반으로 2024년 12월31일 추운 겨울 밤 기억을 백업해 봅니다 수동으로 작성한 것은 지우고 copilot으로 포맷을 정리해서 업데이트합니다. Bllossom/llama-3.2-Korean-Bllossom-3B-gguf-Q4_K_M 한국어 모델 추가하기 시작 : MS Copilot과의 질의응답 중 llama 3.2 기반의 한국어 학습 모델을 발견. 현재 사용 모델 : EEVE-Korean-10.8B (약 7.7 GB) 모델 사용 중. llama 3.2 기반 한국어 모델 소개 : 모델 설명 링크 gguf 파일 다운로드 링크 deepseek-ai/DeepSeek-R1-Distill-Qwen-7B  기반 한국어 모델 소개 : 모델 설명 링크 gguf 파일 다운로드 링크 모델 설정 파일 (Modelfile) : FROM llama-3.2-Korean-Bllossom-3B-gguf-Q4_K_M.gguf PARAMETER temperature 0.6 PARAMETER top_p 0.9 TEMPLATE """<|start_header_id|>system<|end_header_id|> Cutting Knowledge Date : December 2023 {{ if .System }}{{ .System }} {{- end }} {{- if .Tools }} When you receive a tool call response, use the output to format an answer to the orginal user question. You are a helpful assistant with tool calling capabilities. {{- end }} <|eot_id|> {{- range $i , $_ := .Messa...