Difference between revisions of "OpenWRT: Build Firmware Linksys E1700"

From OnnoWiki
Jump to navigation Jump to search
 
(45 intermediate revisions by the same user not shown)
Line 1: Line 1:
 +
==Spesifikasi==
  
E1700 1.0 Q87-E1700 Mediatek MT7620A 32 8 External SOC b/g/n 2x2:2 - 1 1 4 Gb LAN 1 Gb WAN 12V 0.5A e1700-r25139-20141022
+
Model : E1700
 +
Platform : Mediatek MT7620A
 +
RAM [MB] : 32
 +
Flash [MB] : 8
 +
Ant. Conn. Type : External
 +
WLAN NIC : SOC
 +
WLAN standard [802.11] : b/g/n 2x2:2
 +
Eth. port count : 4 Gb LAN 1 Gb WAN
 +
Power Input [V/A] 12V 0.5A
  
 +
==Siapkan Aplikasi Pendukung==
  
 +
sudo su
 +
apt-get update
 +
apt-get install subversion gawk flex sharutils bison libz-dev zlib1g-dev patch \
 +
fakeroot lzma git-core build-essential unzip libncurses5-dev curl php-xml-parser \
 +
libexpat1 libexpat1-dev libssl-dev libdaemon*
  
 +
cd /usr/local/src
 +
wget http://www.cpan.org/modules/by-module/XML/XML-Parser-2.44.tar.gz
 +
tar zxvf XML-Parser-2.44.tar.gz
 +
cd /usr/local/src/XML-Parser-2.44
 +
perl Makefile.PL
 +
make install
  
 +
==Compile Menggunakan Development Trunk==
  
 +
Development Trunk tampaknya paling '''RECOMMENDED'''
  
rt2860v2-for-openwrt-mt7620
+
Lakukan sebagai '''user biasa'''
 
 
rt2860v2_ap/rt2860v2_sta driver for openwrt trunk(3.10.x kernel) on MT7620 SOC. (Test on mt7620n 16m flash + 64M ram)
 
1. go and get the sources of openwrt trunk:
 
  
 
  svn co svn://svn.openwrt.org/openwrt/trunk/ ~/openwrt.trunk/trunk
 
  svn co svn://svn.openwrt.org/openwrt/trunk/ ~/openwrt.trunk/trunk
Line 23: Line 43:
 
  ./scripts/feeds install olsrd-mod-arprefresh olsrd-mod-watchdog olsrd-mod-tas olsrd-mod-httpinfo
 
  ./scripts/feeds install olsrd-mod-arprefresh olsrd-mod-watchdog olsrd-mod-tas olsrd-mod-httpinfo
 
  ./scripts/feeds install olsrd-mod-pgraph olsrd-mod-secure olsrd-mod-bmf
 
  ./scripts/feeds install olsrd-mod-pgraph olsrd-mod-secure olsrd-mod-bmf
  ./scripts/feeds install luci-app-upnp minidlna miniupnpc miniupnpd luci-app-minidlna rtorrent
+
  ./scripts/feeds install luci-app-upnp minidlna miniupnpc miniupnpd luci-app-minidlna
 +
./scripts/feeds install libdlna libgupnp libgupnp-dlna rtorrent
 
  ./scripts/feeds install usb-modeswitch usb-modeswitch-data usbutils multiwan
 
  ./scripts/feeds install usb-modeswitch usb-modeswitch-data usbutils multiwan
 
  ./scripts/feeds install 6in4 6rd 4th 6to4 6tunnel libdaemon aprx usb-modeswitch
 
  ./scripts/feeds install 6in4 6rd 4th 6to4 6tunnel libdaemon aprx usb-modeswitch
  ./scripts/feeds install asterisk18 kamailio4
+
  ./scripts/feeds install pptpd ppp-mod-pptp smstools3 picocom
 +
./scripts/feeds install kamailio4 kamailio asterisk18 asterisk11
 +
./scripts/feeds install quagga coova-chilli
 
  ./scripts/feeds update -a
 
  ./scripts/feeds update -a
 
  ./scripts/feeds install -a
 
  ./scripts/feeds install -a
 +
make clean
 +
make defconfig
 +
make menuconfig
 +
make clean && make -j8 world &
 +
 +
 +
Hasilnya akan berada di folder
 +
 +
~/openwrt.trunk/trunk/bin/ramips/
 +
 +
==Konfigurasi Default==
 +
 +
Konfigurasi untuk E1700
 +
 +
Target System (Ralink RT288x/RT3xxx) --->
 +
Subtarget (MT7620 based boards) --->
 +
Target Profile (Linksys E1700) --->
 +
 +
Konfigurasi default yang ada dari openwrt tidak ada driver wifi.
 +
Kita dapat menambahkan paling tidak
 +
 +
* Luci
 +
* Asterisk (supaya keren)
 +
* Samba (supaya keren)
 +
* UPnP (supaya keren)
 +
* Freifunk '''_JANGAN_''' di install karena membuat masalah di Linksys E1700.
 +
 +
Administration  --->
 +
      <*> asterisk11-gui
 +
      <*> asterisk18-gui
 +
Kernel modules  --->
 +
      Network Support  --->
 +
            -*- kmod-ipv6
 +
            -*- kmod-ppp
 +
            -*-  kmod-pppoe
 +
            -*-  kmod-pppox
 +
            -*- kmod-sched
 +
            -*- kmod-sched-core
 +
      Wireless Drivers  --->
 +
            -*- kmod-cfg80211
 +
            -*- kmod-mac80211
 +
            <*> kmod-rt2800-pci
 +
            <*> kmod-rt2800-soc
 +
            -*- kmod-rt2x00-lib
 +
LuCI  --->
 +
      1. Collections
 +
              -*- luci
 +
              <*> luci-ssl
 +
      2. Modules  --->
 +
              -*- luci-base
 +
              -*- luci-mod-admin-full
 +
              <*> luci-mod-failsafe
 +
              <*> luci-mod-rpc
 +
      3. Applications
 +
              <*> luci-app-ahcp
 +
              <*> luci-app-asterisk
 +
              -*- luci-app-firewall
 +
              <*> luci-app-multiwan
 +
              <*> luci-app-pbx
 +
              <*> luci-app-radvd
 +
              <*> luci-app-samba
 +
              <*> luci-app-upnp
 +
              <*> luci-app-wshaper
 +
      4. Themes
 +
              -*- luci-theme-bootstrap
 +
              <*> luci-theme-openwrt
 +
      5. Protocols
 +
              <*> luci-proto-ipv6
 +
              -*- luci-proto-ppp
 +
Network  --->
 +
      Telephony  --->
 +
              -*- asterisk11
 +
              -*- asterisk18
 +
              <*> sipp
 +
              <*> sipsak
 +
      -*- ahcpd
 +
      -*- hostapd-common
 +
      -*- iw
 +
      -*- samba36-server
 +
      <*> wpad-mini
 +
      -*- wshaper
 +
 +
Setelah selesai, kita perlu compile
 +
 +
cd ~/openwrt.trunk/trunk
 +
make clean
 +
make defconfig
 +
make world
 +
 +
Setelah jadi, kita perlu menambahkan driver wifi dan compile ulang secara manual berikut ini.
 +
 +
==Cara Menambahkan Driver Wifi==
 +
 +
Download patch
 +
 +
cd ~
 +
rm -Rf ~/rt2860v2-for-openwrt-mt7620/
 +
git clone https://github.com/wuqiong/rt2860v2-for-openwrt-mt7620.git
 +
 +
Merge ke build directory
 +
 +
cd ~
 +
cp -r rt2860v2-for-openwrt-mt7620/ralink ~/openwrt.trunk/trunk/build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/linux-ramips_mt7620/linux-3.18.7/drivers/mtd/
 +
 +
cd ~
 +
cp -r rt2860v2-for-openwrt-mt7620/rt2860v2  rt2860v2-for-openwrt-mt7620/rt2860v2_ap  ~/openwrt.trunk/trunk/build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/linux-ramips_mt7620/linux-3.18.7/drivers/net/wireless/
  
 +
Hati-hati folder
  
  $make defconfig
+
  /linux-ramips_mt7620/linux-3.14.26
  $make menuconfig
+
  /linux-ramips_mt7620/linux-3.14.27
 +
/linux-ramips_mt7620/linux-3.14.32
 +
/linux-ramips_mt7620/linux-3.18.7
  
-------Select the following configuration------
+
mungkin akan berubah / berbeda tergantung versi kernel yang kita compile.
  
Target System: (Ralink 288x/3xxx)
 
Subtarget: (MT7620N based boards)
 
  
$make V=99
+
===Tambahkan di Kconfig dan Makefile===
  
Wait make command to be done.
+
Selanjutnya, tambahkan Kconfig dan Makefile obj di directory "mtd" dan "wireless"
  
When make finished. The firmware will be in the directory: $HOME/openwrt/openwrt-trunk/bin/ramips/
+
Tambahkan kalimat berikut di akhir file Kconfig sebelum endif #MTD
  
Then, you can download and burn the new firmware to the mt7620 SOC Board via TFTP in the uboot stage.
+
vi  ~/openwrt.trunk/trunk/build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/linux-ramips_mt7620/linux-3.18.7/drivers/mtd/Kconfig
  
But, unfortunately, that default configuraion don't has wifi driver support,
+
source "drivers/mtd/ralink/Kconfig"
 +
endif # MTD
  
So We cann't startup a Hotspot on our MT7620 SOC for incoming connections from Smartphones and laptops.
 
  
All steps above are the default configuarions from the openwrt official site.
+
Tambahkan kalimat berikut di akhir file makefile:
3.Now, I will guide you to port rt2860v2_ap driver to the kernel tree and build it to fix that problem.
 
  
$cd ~/
+
vi ~/openwrt.trunk/trunk/build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/linux-ramips_mt7620/linux-3.18.7/drivers/mtd/Makefile
  
$git clone https://github.com/wuqiong/rt2860v2-for-openwrt-mt7620.git
+
obj-$(CONFIG_MTD_RALINK)    += ralink/
  
$cp -r rt2860v2-for-openwrt-mt7620/ralink ~/openwrt/openwrt-trunk/build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/linux-ramips_mt7620n/linux-3.10.28/drivers/mtd/
+
Tambahkan kalimat berikut di akhir file Kconfig sebelum endif # WLAN
  
$cp -r rt2860v2-for-openwrt-mt7620/rt2860v2  rt2860v2-for-openwrt-mt7620/rt2860v2_ap ~/openwrt/openwrt-trunk/build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/linux-ramips_mt7620n/linux-3.10.28/drivers/net/wireless/
+
  vi ~/openwrt.trunk/trunk/build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/linux-ramips_mt7620/linux-3.18.7/drivers/net/wireless/Kconfig
  
After copied the driver code to the building kernel tree. Then, Let's to add Kconfig and Makefile objs in each directory of "mtd" and "wireless".
+
source "drivers/net/wireless/rt2860v2_ap/Kconfig"
 +
endif # WLAN                     
  
Add the following line before the end of Kconfig file:~/openwrt/openwrt-trunk/build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/linux-ramips_mt7620n/linux-3.10.28/drivers/mtd/Kconfig
+
Tambahkan kalimat berikut di akhir file makefile:
  
source "drivers/mtd/ralink/Kconfig"
+
vi ~/openwrt.trunk/trunk/build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/linux-ramips_mt7620/linux-3.18.7/drivers/net/wireless/Makefile
  
Add the following line before the end of makefile:~/openwrt/openwrt-trunk/build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/linux-ramips_mt7620n/linux-3.10.28/drivers/mtd/Makefile
+
obj-$(CONFIG_RT2860V2_AP)  += rt2860v2_ap/
  
  obj-$(CONFIG_MTD_RALINK)    += ralink/
+
===Tambahkan konfigurasi===
  
Add the following line before the end of Kconfig file: ~/openwrt/openwrt-trunk/build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/linux-ramips_mt7620n/linux-3.10.28/drivers/net/wireless/Kconfig
+
Jalankan
  
  source "drivers/net/wireless/rt2860v2_ap/Kconfig"
+
cd ~/openwrt.trunk/trunk
 +
make kernel_menuconfig
  
Add the following line before the end of makefile: ~/openwrt/openwrt-trunk/build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/linux-ramips_mt7620n/linux-3.10.28/drivers/net/wireless/Makefile
+
Masukan konfigurasi berikut
  
   obj-$(CONFIG_RT2860V2_AP+= rt2860v2_ap/
+
Machine selection  ---> 
 +
      System type (Ralink based machines)  --->
 +
      Ralink SoC selection (MT7620/8)  --->
 +
      Devicetree selection (None)  --->
 +
 +
Device Driver -->
 +
      <*> Memory Technology Device (MTD) support  --->
 +
              Ralink Flash Type support  --->
 +
                    [*] Ralink MTD support 
 +
 +
Device Driver -->
 +
      [*] Network device support  --->
 +
              [*]   Wireless LAN  --->
 +
                      <*>  Ralink RT2860 802.11n AP support
 +
                      [*]    LED Support
 +
                      [ ]    WSC (WiFi Simple Config)
 +
                      [*]    LLTD (Link Layer Topology Discovery Protocol)
 +
                      [*]    WDS
 +
                      [*]    MBSSID
 +
                      [*]      New MBSSID MODE
 +
                      [*]    AP-CLient Support
 +
                      [*]      MAC Repeater Support
 +
                      [ ]    IGMP snooping (NEW)
 +
                      [ ]    NETIF Block (NEW)
 +
                      [ ]    DFS (NEW)
 +
                      [*]    Carrier Detect
 +
                      [ ]    DLS ((Direct-Link Setup) Support (NEW)
 +
                      [ ]    IDS (Intrusion Detection System) Support (NEW)
 +
                      [*]    CoC Support (NEW)
 +
                      [ ]    Memory Optimization (NEW)
 +
                      [ ]    Video Turbine support (NEW)
 +
                      [ ]    802.11n Draft3 (NEW)
 +
                      [ ]    Adjust Power Consumption Support (NEW
 +
                      [ ]    Single SKU (NEW)
 +
                      Choose Power Design (Internal PA and Internal LNA)  --->
 +
                      [ ]   TSSI Compensation (NEW)
 +
                      [ ]  Temperature Compensation (NEW)
  
4. Okey, Driver Code Configuration Finished.
+
Pastikan pilih (*) untuk membuat driver masuk ke kernel, bukan kernel module.
  
Go back to the ~/openwrt/openwrt-trunk directory. And run the shell command:
+
===Buat lagi firmware===
  
    $make kernel_menuconfig
+
Ulangi lagi pembuatan firmware. Tapi
  
Enter this menu:
+
'''JANGAN LAKUKAN make clean'''
  
  A:
+
  cd ~/openwrt.trunk/trunk/
    Device Driver --> 
+
  make world
                    <\*> Memory Technology Device (MTD) support 
 
                        ---> Ralink Flash Type support 
 
                            --->  [\*] Ralink MTD support  
 
  
B:
+
Hasilnya ada di folder
Device Driver
 
    -->  [\*] Network device support
 
        --->  [\*]  Wireless LAN
 
            ---><\*>  Ralink RT2860 802.11n AP support
 
                    [\*]    LED Support
 
                    [ ]    WSC (WiFi Simple Config)
 
                    [\*]    LLTD (Link Layer Topology Discovery Protocol)
 
                    [\*]    WDS
 
                    [\*]    MBSSID
 
                    [\*]      New MBSSID MODE
 
                    [\*]    AP-CLient Support
 
                    [\*]      MAC Repeater Support
 
                    [ ]    IGMP snooping
 
                    [ ]    NETIF Block
 
                    [ ]    DFS
 
                    [\*]    Carrier Detect
 
                    [ ]    DLS ((Direct-Link Setup) Support
 
                    [ ]    IDS (Intrusion Detection System) Support
 
                    [\*]    CoC Support
 
                    [ ]    Memory Optimization
 
                    [ ]    Video Turbine support
 
                    [ ]    802.11n Draft3
 
                    [ ]    Adjust Power Consumption Support
 
                    [ ]    Single SKU
 
                        Choose Power Design (Internal PA and Internal LNA)  --->
 
                    [ ]  TSSI Compensation
 
                    [ ]  Temperature Compensation
 
  
We select "*" to building the driver into the kernel, not a kernel module.
+
~/openwrt.trunk/trunk/bin/ramips
  
After selecting the configration. save and exit menuconfig.
+
openwrt-ramips-mt7620-e1700-squashfs-factory.bin
5.Now. Just Hit "Make V=99" to build.
+
openwrt-ramips-mt7620-e1700-squashfs-sysupgrade.bin
 +
openwrt-ramips-mt7620-root.squashfs
 +
openwrt-ramips-mt7620-uImage.bin
 +
openwrt-ramips-mt7620-vmlinux.bin
 +
openwrt-ramips-mt7620-vmlinux.elf
  
we have added and configured the wifi driver code to the kernel build tree.
+
==Flash Linksys E1700==
  
just type the make V=99 command in directory:~/openwrt/openwrt-trunk ,
+
Flash image yang di hasilkan ke router. Cara flash yang sederhana menggunakan Web,
  
$make V=99
+
* Masuk ke web
 +
* Masuk ke menu system
 +
* Masuk ke menu firmware upgrade
 +
* Pilih file .bin berikut
  
And wait for some minutes to be builded.
+
openwrt-ramips-mt7620-e1700-squashfs-factory.bin
6. After builded, burn the new firmware with wifi driver.
 
  
You will found out that, wifi device ra0 will be appeared.
+
* Flash, jangan sampai listrik mati & sambungan LAN putus.
  
test with:
+
 
 +
Device ra0 akan muncul
  
 
  ifconfig ra0
 
  ifconfig ra0
 +
atau
 +
ifconfig wlan0
 +
 +
Kita tidak bisa mengkonfigurasi
 +
 +
ifconfig ra0 up.
 +
atau
 +
ifconfig wlan0 up
 +
 +
Karena kita tidak memiliki file
 +
 +
/etc/Wireless/RT2860/RT2860.dat
 +
 +
Atau symbol link ke /tmp/RT2860.dat.
 +
 +
File tersebut di buat oleh script di directory /lib/wifi/ yang pertama kali di perkenalkan oleh lintel. Setelah kita mempunyai file
 +
 +
RT2860.dat
 +
 +
Masukan di
 +
 +
/etc/Wireless/RT2860/RT2860.dat
 +
/tmp/RT2860.dat
 +
 +
Agar operasional Linksys E1700 menjadi stabil.
 +
 +
==Cara Membuat / Mengambil file RT2860.dat==
 +
 +
Cara paling gampang.
 +
Download yang sudah jadi
 +
 +
wget https://gitorious.org/wive-rtnl-ralink-rt305x-routers-firmware/wive-rtnl-ralink-rt305x-routers-firmware/raw/a5879610328768271faad102fc0ab80de56ff813:etc/Wireless/RT2860/RT2860.dat
 +
 +
Cara yang lebih susah.
 +
Ambil file rt2860v2.sh dari
 +
 +
https://raw.githubusercontent.com/wuqiong/rt2860v2-for-openwrt-mt7620/master/rt2860v2.sh
  
But your cann't successfully ifconfig ra0 up.
+
Untuk MAC address WLAN bisa di set menggunakan file
  
Because we lack the /etc/Wireless/RT2860/RT2860.dat file(or symbol link to /tmp/RT2860.dat),
+
/etc/config/wireless
  
Which generated by an scripts file in /lib/wifi directory which first introduced by lintel.
+
dengan parameter
  
7. Enjoy DIY with your hands.
+
macaddr '1a:1a:1a:1a:1a:1a'
  
I will not provide the dat file or script file. you need to scratch up those file by yourself.
+
atau menggunakan factory default mac dari eeprom yang dapat diambil menggunakan perintah
  
Last commit, I havn't shared the script file.
+
hexdump -s 4 -n 6 -C /dev/mtd2 | head -n 1 | sed 's/\ \ /:/g' | cut -d: -f 2 | sed 's/\ /:/g'
  
This Time, I shared the script file named: rt2860v2.sh.
+
Masukan hasil-nya ke parameter di  RT2860.dat
  
I fixed the wrong default mac address problem via shell command in this script file, you know, it's not the best, but works well.
+
MacAddress=
  
Your can define your perefered mac addres in /etc/config/wireless file with option macaddr '1a:1a:1a:1a:1a:1a';
+
Setelah kita mempunyai file  
  
Or you can read out the factory default mac address in eeprom, using this shell:
+
RT2860.dat
  
hexdump -s 4 -n 6 -C /dev/mtd2 | head -n 1 | sed 's/\ \ /:/g' | cut -d: -f 2 | sed 's/\ /:/g'
+
Masukan di
  
substitute and eval this shell in the appropriate place in rt2860v2.sh file. you can get everything automatically.
+
mkdir -p /etc/wireless/RT2860
Where is the best and perfect firmware?
+
mkdir -p /etc/Wireless/RT2860
I will not to Share out any more.
+
cp RT2860.dat /etc/Wireless/RT2860/RT2860.dat
Dive into the code and fix it by yourself, it's so easy.
+
cp RT2860.dat /etc/wireless/RT2860/RT2860.dat
8. Say thanks to me as much as you can.
+
cp RT2860.dat /tmp/RT2860.dat
  
sorry for these Chinglish, wish you can read it.
+
Agar operasional Linksys E1700 menjadi stabil.
  
 +
==Lebih Lanjut==
  
 +
* file [[rt2860v2.sh]]
 +
* [[Linksys E1700: Isi file RT2860.dat]]
  
 
==Referensi==
 
==Referensi==
  
 
* https://github.com/wuqiong/rt2860v2-for-openwrt-mt7620/blob/master/README.md
 
* https://github.com/wuqiong/rt2860v2-for-openwrt-mt7620/blob/master/README.md
 +
* http://openwrt.diandian.com/post/2014-11-21/40064463207

Latest revision as of 08:41, 18 July 2015

Spesifikasi

Model : E1700
Platform : Mediatek MT7620A
RAM [MB] : 32
Flash [MB] : 8
Ant. Conn. Type : External
WLAN NIC : SOC
WLAN standard [802.11] : b/g/n 2x2:2
Eth. port count : 4 Gb LAN 1 Gb WAN
Power Input [V/A] 12V 0.5A

Siapkan Aplikasi Pendukung

sudo su
apt-get update
apt-get install subversion gawk flex sharutils bison libz-dev zlib1g-dev patch \
fakeroot lzma git-core build-essential unzip libncurses5-dev curl php-xml-parser \
libexpat1 libexpat1-dev libssl-dev libdaemon*
cd /usr/local/src
wget http://www.cpan.org/modules/by-module/XML/XML-Parser-2.44.tar.gz
tar zxvf XML-Parser-2.44.tar.gz
cd /usr/local/src/XML-Parser-2.44
perl Makefile.PL
make install

Compile Menggunakan Development Trunk

Development Trunk tampaknya paling RECOMMENDED

Lakukan sebagai user biasa

svn co svn://svn.openwrt.org/openwrt/trunk/ ~/openwrt.trunk/trunk
cd ~/openwrt.trunk/trunk/
./scripts/feeds update
./scripts/feeds install meshwizard openssh-server openssh-client
./scripts/feeds install freifunk-common freifunk-gwcheck freifunk-mapupdate
./scripts/feeds install luci luci-app-meshwizard luci-app-olsr luci-app-olsr-services
./scripts/feeds install luci-app-olsr-viz luci-app-freifunk-policyrouting luci-mod-freifunk
./scripts/feeds install luci-theme-freifunk-generic olsrd olsrd-mod-txtinfo olsrd-mod-dyn-gw
./scripts/feeds install olsrd-mod-dyn-gw-plain olsrd-mod-dot-draw
./scripts/feeds install olsrd-mod-arprefresh olsrd-mod-watchdog olsrd-mod-tas olsrd-mod-httpinfo
./scripts/feeds install olsrd-mod-pgraph olsrd-mod-secure olsrd-mod-bmf
./scripts/feeds install luci-app-upnp minidlna miniupnpc miniupnpd luci-app-minidlna
./scripts/feeds install libdlna libgupnp libgupnp-dlna rtorrent
./scripts/feeds install usb-modeswitch usb-modeswitch-data usbutils multiwan
./scripts/feeds install 6in4 6rd 4th 6to4 6tunnel libdaemon aprx usb-modeswitch
./scripts/feeds install pptpd ppp-mod-pptp smstools3 picocom
./scripts/feeds install kamailio4 kamailio asterisk18 asterisk11
./scripts/feeds install quagga coova-chilli
./scripts/feeds update -a
./scripts/feeds install -a
make clean
make defconfig
make menuconfig
make clean && make -j8 world &


Hasilnya akan berada di folder

~/openwrt.trunk/trunk/bin/ramips/

Konfigurasi Default

Konfigurasi untuk E1700

Target System (Ralink RT288x/RT3xxx) --->
Subtarget (MT7620 based boards) --->
Target Profile (Linksys E1700) --->

Konfigurasi default yang ada dari openwrt tidak ada driver wifi. Kita dapat menambahkan paling tidak

  • Luci
  • Asterisk (supaya keren)
  • Samba (supaya keren)
  • UPnP (supaya keren)
  • Freifunk _JANGAN_ di install karena membuat masalah di Linksys E1700.
Administration  ---> 
      <*> asterisk11-gui
      <*> asterisk18-gui
Kernel modules  --->
      Network Support  --->
            -*- kmod-ipv6
            -*- kmod-ppp
            -*-   kmod-pppoe
            -*-   kmod-pppox
            -*- kmod-sched
            -*- kmod-sched-core
      Wireless Drivers  --->
            -*- kmod-cfg80211
            -*- kmod-mac80211
            <*> kmod-rt2800-pci
            <*> kmod-rt2800-soc
            -*- kmod-rt2x00-lib
LuCI  --->
      1. Collections
             -*- luci
             <*> luci-ssl
      2. Modules  --->
             -*- luci-base
             -*- luci-mod-admin-full
             <*> luci-mod-failsafe
             <*> luci-mod-rpc
      3. Applications
             <*> luci-app-ahcp
             <*> luci-app-asterisk
             -*- luci-app-firewall
             <*> luci-app-multiwan
             <*> luci-app-pbx
             <*> luci-app-radvd
             <*> luci-app-samba
             <*> luci-app-upnp
             <*> luci-app-wshaper
      4. Themes
             -*- luci-theme-bootstrap
             <*> luci-theme-openwrt
      5. Protocols
             <*> luci-proto-ipv6
             -*- luci-proto-ppp
Network  --->
      Telephony  --->
             -*- asterisk11
             -*- asterisk18
             <*> sipp
             <*> sipsak
      -*- ahcpd
      -*- hostapd-common
      -*- iw
      -*- samba36-server
      <*> wpad-mini
      -*- wshaper

Setelah selesai, kita perlu compile

cd ~/openwrt.trunk/trunk
make clean
make defconfig
make world

Setelah jadi, kita perlu menambahkan driver wifi dan compile ulang secara manual berikut ini.

Cara Menambahkan Driver Wifi

Download patch

cd ~
rm -Rf ~/rt2860v2-for-openwrt-mt7620/
git clone https://github.com/wuqiong/rt2860v2-for-openwrt-mt7620.git

Merge ke build directory

cd ~
cp -r rt2860v2-for-openwrt-mt7620/ralink ~/openwrt.trunk/trunk/build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/linux-ramips_mt7620/linux-3.18.7/drivers/mtd/
cd ~
cp -r rt2860v2-for-openwrt-mt7620/rt2860v2  rt2860v2-for-openwrt-mt7620/rt2860v2_ap  ~/openwrt.trunk/trunk/build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/linux-ramips_mt7620/linux-3.18.7/drivers/net/wireless/

Hati-hati folder

/linux-ramips_mt7620/linux-3.14.26
/linux-ramips_mt7620/linux-3.14.27 
/linux-ramips_mt7620/linux-3.14.32
/linux-ramips_mt7620/linux-3.18.7

mungkin akan berubah / berbeda tergantung versi kernel yang kita compile.


Tambahkan di Kconfig dan Makefile

Selanjutnya, tambahkan Kconfig dan Makefile obj di directory "mtd" dan "wireless"

Tambahkan kalimat berikut di akhir file Kconfig sebelum endif #MTD

vi  ~/openwrt.trunk/trunk/build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/linux-ramips_mt7620/linux-3.18.7/drivers/mtd/Kconfig 
source "drivers/mtd/ralink/Kconfig"
endif # MTD


Tambahkan kalimat berikut di akhir file makefile:

vi ~/openwrt.trunk/trunk/build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/linux-ramips_mt7620/linux-3.18.7/drivers/mtd/Makefile
obj-$(CONFIG_MTD_RALINK)    += ralink/

Tambahkan kalimat berikut di akhir file Kconfig sebelum endif # WLAN

vi ~/openwrt.trunk/trunk/build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/linux-ramips_mt7620/linux-3.18.7/drivers/net/wireless/Kconfig 
source "drivers/net/wireless/rt2860v2_ap/Kconfig"
endif # WLAN                      

Tambahkan kalimat berikut di akhir file makefile:

vi ~/openwrt.trunk/trunk/build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/linux-ramips_mt7620/linux-3.18.7/drivers/net/wireless/Makefile 
obj-$(CONFIG_RT2860V2_AP)   += rt2860v2_ap/

Tambahkan konfigurasi

Jalankan

cd ~/openwrt.trunk/trunk
make kernel_menuconfig

Masukan konfigurasi berikut

Machine selection  --->  
     System type (Ralink based machines)  --->
     Ralink SoC selection (MT7620/8)  --->
     Devicetree selection (None)  --->

Device Driver -->
      <*> Memory Technology Device (MTD) support  --->
             Ralink Flash Type support  --->
                   [*] Ralink MTD support  

Device Driver -->
      [*] Network device support  --->
             [*]   Wireless LAN  ---> 
                     <*>   Ralink RT2860 802.11n AP support
                     [*]     LED Support
                     [ ]     WSC (WiFi Simple Config)
                     [*]     LLTD (Link Layer Topology Discovery Protocol)
                     [*]     WDS
                     [*]     MBSSID
                     [*]       New MBSSID MODE
                     [*]     AP-CLient Support
                     [*]       MAC Repeater Support
                     [ ]     IGMP snooping (NEW)
                     [ ]     NETIF Block (NEW)
                     [ ]     DFS (NEW)
                     [*]     Carrier Detect
                     [ ]     DLS ((Direct-Link Setup) Support (NEW)
                     [ ]     IDS (Intrusion Detection System) Support (NEW)
                     [*]     CoC Support (NEW)
                     [ ]     Memory Optimization (NEW)
                     [ ]     Video Turbine support (NEW)
                     [ ]     802.11n Draft3 (NEW)
                     [ ]     Adjust Power Consumption Support (NEW
                     [ ]     Single SKU (NEW)
                     Choose Power Design (Internal PA and Internal LNA)  --->
                     [ ]   TSSI Compensation (NEW)
                     [ ]   Temperature Compensation (NEW)

Pastikan pilih (*) untuk membuat driver masuk ke kernel, bukan kernel module.

Buat lagi firmware

Ulangi lagi pembuatan firmware. Tapi

JANGAN LAKUKAN make clean

cd ~/openwrt.trunk/trunk/
make world

Hasilnya ada di folder

~/openwrt.trunk/trunk/bin/ramips
openwrt-ramips-mt7620-e1700-squashfs-factory.bin
openwrt-ramips-mt7620-e1700-squashfs-sysupgrade.bin
openwrt-ramips-mt7620-root.squashfs
openwrt-ramips-mt7620-uImage.bin
openwrt-ramips-mt7620-vmlinux.bin
openwrt-ramips-mt7620-vmlinux.elf

Flash Linksys E1700

Flash image yang di hasilkan ke router. Cara flash yang sederhana menggunakan Web,

  • Masuk ke web
  • Masuk ke menu system
  • Masuk ke menu firmware upgrade
  • Pilih file .bin berikut
openwrt-ramips-mt7620-e1700-squashfs-factory.bin
  • Flash, jangan sampai listrik mati & sambungan LAN putus.


Device ra0 akan muncul

ifconfig ra0

atau

ifconfig wlan0

Kita tidak bisa mengkonfigurasi

ifconfig ra0 up.

atau

ifconfig wlan0 up

Karena kita tidak memiliki file

/etc/Wireless/RT2860/RT2860.dat

Atau symbol link ke /tmp/RT2860.dat.

File tersebut di buat oleh script di directory /lib/wifi/ yang pertama kali di perkenalkan oleh lintel. Setelah kita mempunyai file

RT2860.dat

Masukan di

/etc/Wireless/RT2860/RT2860.dat
/tmp/RT2860.dat

Agar operasional Linksys E1700 menjadi stabil.

Cara Membuat / Mengambil file RT2860.dat

Cara paling gampang. Download yang sudah jadi

wget https://gitorious.org/wive-rtnl-ralink-rt305x-routers-firmware/wive-rtnl-ralink-rt305x-routers-firmware/raw/a5879610328768271faad102fc0ab80de56ff813:etc/Wireless/RT2860/RT2860.dat

Cara yang lebih susah. Ambil file rt2860v2.sh dari

https://raw.githubusercontent.com/wuqiong/rt2860v2-for-openwrt-mt7620/master/rt2860v2.sh

Untuk MAC address WLAN bisa di set menggunakan file

/etc/config/wireless

dengan parameter

macaddr '1a:1a:1a:1a:1a:1a'

atau menggunakan factory default mac dari eeprom yang dapat diambil menggunakan perintah

hexdump -s 4 -n 6 -C /dev/mtd2 | head -n 1 | sed 's/\ \ /:/g' | cut -d: -f 2 | sed 's/\ /:/g'

Masukan hasil-nya ke parameter di RT2860.dat

MacAddress=

Setelah kita mempunyai file

RT2860.dat

Masukan di

mkdir -p /etc/wireless/RT2860
mkdir -p /etc/Wireless/RT2860
cp RT2860.dat /etc/Wireless/RT2860/RT2860.dat
cp RT2860.dat /etc/wireless/RT2860/RT2860.dat
cp RT2860.dat /tmp/RT2860.dat

Agar operasional Linksys E1700 menjadi stabil.

Lebih Lanjut

Referensi