raspberry pi 2 with buildroot


<<image: https://www.raspberrypi.org/wp-content/uploads/2015/08/raspberry-pi-logo.png>>


raspberry pi2 용 buildroot config

$ make raspberrypi2_defconfig

$ make menuconfig


linux kernel config 를 변경하는 경우

$ make linux-menuconfig


ralink wifi firmware  설치

먼저sdcard를 삽입하고, /media/pi에 rootfs가 mount되었다고 할 때 다음과 같이 vendor firmware를 다운로드  받아서 설치한다

 

vendor driver download

http://www.mediatek.com/en/downloads1/downloads/mt7601u-usb/

or 

https://github.com/porjo/mt7601u.git

# cp src/mcu/bin/MT7601.bin /media/rookiecj/pi/lib/firmware/mt7601u.bin
or

# sudo wget -O /media/rookiecj/pi/lib/firmware/mt7601u.bin https://github.com/porjo/mt7601/raw/master/src/mcu/bin/MT7601.bin


target wifi driver bringup

이제 raspberry 에서  wifi 관련 driver들을 올려보자
# modprobe mac80211

# insmod ./mt7601u.ko

[  148.502757] mt7601u 1-1.2:1.0: ASIC revision: 76010001 MAC revision: 76010500

[  148.520176] mt7601u 1-1.2:1.0: Firmware Version: 0.1.00 Build: 7640 Build time: 201302052146____

[  148.926197] mt7601u 1-1.2:1.0: Warning: unsupported EEPROM version 0d

[  148.932882] mt7601u 1-1.2:1.0: EEPROM ver:0d fae:00

[  149.367447] ieee80211 phy0: Selected rate control algorithm 'minstrel_ht'

[  149.369247] usbcore: registered new interface driver mt7601u


interface 확인

# iwconfig

or

# ip link

wlan0     IEEE 802.11bgn  ESSID:off/any

          Mode:Managed  Access Point: Not-Associated   Tx-Power=0 dBm

          Retry short limit:7   RTS thr:off   Fragment thr:off

          Encryption key:off

          Power Management:on



interface up

이미 up되어 있는 경우는 무시

# ip link set wlan0 up

Or

# ifconfig wlan0 up


scan  한번해보고

# iw dev wlan0 scan

or 

# iw list


AP의  암호 입력

# wpa_passphrase your_SSID your_passphrase > /etc/wpa_your_SSID.conf

wpa_supplicant -B -i wlan0 -c /etc/wap_your_SSID.conf

or

# iw dev wlan0 connect your_SSID


dhcp up

# dhcpcd wlan0


link status check

# iw dev wlan0 link

Connected to 00:11:22:33:44:55 (on wlan0)

        SSID: AP_YOUR_HOME

        freq: 2432

        RX: 2390701 bytes (16886 packets)

        TX: 179488 bytes (448 packets)

        signal: -47 dBm

        tx bitrate: 150.0 MBit/s MCS 7 40MHz short GI


        bss flags:      short-slot-time

        dtim period:    3

        beacon int:     100



DNS server 설정

ap 와 연결 후 이미 해당  파일이  생성되어 있을것이다

Google Free DNS을 추가

# vi /etc/resolv.conf

nameserver 8.8.8.8

nameserver 8.8.4.4


ping 확인

# ping www.google.com


References

https://delog.wordpress.com/2014/10/10/wireless-on-raspberry-pi-with-buildroot/


Happy Coding~:)

+ Recent posts