OpenWRT on RasberryPI 2
build env.
- To build SD card image using Ubuntu 14.04.2 LTS (64-bit)
I: Preparing Ubuntu:
sudo apt-get update
sudo apt-get install git-core build-essential libssl-dev
sudo apt-get install subversion mercurial
II: Download the OpenWRT with git:
git clone git://git.openwrt.org/openwrt.git
- check created a directory 'openwrt'
III: Download and install all available "feeds":
cd openwrt
./scripts/feeds update -a
./scripts/feeds install -a
iV: Make OpenWrt
make defconfig
make prereq
make menuconfig
V: Setup Wi-Fi kernel modules
- select your Wifi USB stick module on config windows
Vi: set component in LuCI->Collections
- select LuCI->Collections
Vii: Save and exit
- select save
- select exit
Viii: build
make -j 3
- if you have some errors. please check message it
make V=s 2>&1 | tee build.log | grep -i error
iX: make SD card
cd openwrt/bin/brcm2708
You will be find "openwrt-brcm2708-bcm2709-sdcard-vfat-ext4.img"
sudo dd if=openwrt-brcm2708-bcm2709-sdcard-vfat-ext4.img of=/dev/sdX bs=2M conv=fsync
- sdX - put your SD card dev (sdb, sdc, ..).
X: start OpenWRT
- Insert SD on Raspberry PI 2
- Connect UART-USB cable
- Insert WiPi stick
- Connect power.Reference Raspberry PI2 GPIO
- Pin#08: TXD0
- Pin#10: RXD0
- Pin#14: GND
Xi: setup new passwd On UART-USB console
passwd
Xii: Reboot Raspberry PI 2 On UART-USB console
reboot
Xiii: Install LuCI On UART-USB console
vi /etc/opkg.conf
- fix opkg.conf file
opkg update
opkg install luci
opkg install luci-ssl
opkg list | grep luci-i18n-
/etc/init.d/uhttpd start
/etc/init.d/uhttpd enable
- WiFi connect to use Access Point
mkdir /etc/wpa_supplicant
vi /etc/wpa_supplicant/wpa_supplicant.conf
- /etc/wpa_supplicant/wpa_supplicant.conf
update_config=1
network={
ssid="AP name"
psk="your key"
scan_ssid=1
proto=WPA RSN
key_mgmt=WPA-PSK
group=CCMP TKIP
pairwise=CCMP TKIP
priority=5
}
- Start Wi-Fi connection in background task:
wpa_supplicant -Dnl80211 -iwlan0 -c/etc/wpa_supplicant/wpa_supplicant.conf &
- Setting resolving server in /etc/resolv.conf:
vi /etc/resolv.conf
nameserver <put your router IP here>
nameserver 8.8.8.8
- Save file run:
route add default gw <put your router IP here>
댓글 없음:
댓글 쓰기