Difference between revisions of "OpenWRT: Build Firmware Buffalo WZRHPG300NH2"

From OnnoWiki
Jump to navigation Jump to search
 
(15 intermediate revisions by the same user not shown)
Line 25: Line 25:
 
  apt-get update
 
  apt-get update
 
  apt-get install subversion gawk flex sharutils bison libz-dev zlib1g-dev patch \
 
  apt-get install subversion gawk flex sharutils bison libz-dev zlib1g-dev patch \
  fakeroot lzma git-core build-essential unzip libncurses5-dev curl
+
  fakeroot lzma git-core build-essential unzip libncurses5-dev curl php-xml-parser \
 +
libexpat1 libexpat1-dev libssl-dev
 +
 
 +
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==
 
==Compile Menggunakan Development Trunk==
Line 33: Line 41:
 
Lakukan sebagai '''user biasa'''
 
Lakukan sebagai '''user biasa'''
  
  svn co svn://svn.openwrt.org/openwrt/trunk/ ~/openwrt.trunk/trunk
+
  git clone git://git.openwrt.org/openwrt.git
  cd ~/openwrt.trunk/trunk/
+
  cd openwrt
 
  ./scripts/feeds update
 
  ./scripts/feeds update
 
  ./scripts/feeds install meshwizard openssh-server openssh-client
 
  ./scripts/feeds install meshwizard openssh-server openssh-client
Line 47: Line 55:
 
  ./scripts/feeds install libdlna libgupnp libgupnp-dlna rtorrent
 
  ./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
+
  ./scripts/feeds install 6in4 6rd 4th 6to4 6tunnel libdaemon aprx usb-modeswitch
  ./scripts/feeds install pptpd ppp-mod-pptp
+
  ./scripts/feeds install pptpd ppp-mod-pptp smstools3 picocom
 +
./scripts/feeds install kamailio4 kamailio asterisk18 asterisk11
 +
./scripts/feeds update -a
 +
./scripts/feeds install -a
 
  make defconfig
 
  make defconfig
 
  make menuconfig
 
  make menuconfig
 
  make clean
 
  make clean
  make -j 3 world
+
  sudo make -j3 world
 +
sudo make -j3 V=s world
 +
 
 +
 
 +
===hack===
 +
 
 +
cd ~/openwrt/staging_dir/toolchain-mips_34kc_gcc-5.3.0_musl-1.1.14/include
 +
cp /usr/include/curses* .
 +
cp /usr/include/ncurses* .
 +
cp /usr/include/unc* .
  
 
==Setup Menuconfig==
 
==Setup Menuconfig==
Line 69: Line 89:
 
  Target Profile > Buffalo WZR-HP-G300NH2
 
  Target Profile > Buffalo WZR-HP-G300NH2
 
  Target Images > tar.gz  
 
  Target Images > tar.gz  
 +
Base system > bridge
 
  Network >
 
  Network >
 +
    bmon
 
     chat
 
     chat
 +
    ds-lite
 +
    gre
 +
        grev4
 +
        grev6
 +
    iftop
 +
    iperf
 +
    iperf3
 +
    ipip
 +
    ipset
 +
    ipset-dns
 +
    iputils-arping
 +
    iputils-clockdiff
 +
    iputils-ping
 +
    iputils-ping6
 +
    iputils-tftpd
 +
    iputils-tracepath
 +
    iputils-tracepath6
 +
    iputils-traceroute6
 +
    iw
 
     ppp
 
     ppp
 
         ppp-mod-pppoa
 
         ppp-mod-pppoa
 
         ppp-mod-pppoe
 
         ppp-mod-pppoe
 
         ppp-mod-pppol2tp
 
         ppp-mod-pppol2tp
         ppp-mod-pptp
+
         ppp-mod-pptp
 
         ppp-mod-radius
 
         ppp-mod-radius
 
     ppp-multilink
 
     ppp-multilink
 
         pppdump  
 
         pppdump  
         pppstats        
+
         pppstats
  Network > Routing and Redirection > ip
+
  Network > Routing and Redirection >
 +
    babel-pinger
 +
    babeld
 +
    batmand
 +
    bird4
 +
    bird4-uci
 +
    bird6
 +
    bird6-uci
 +
    birdc4
 +
    birdc6
 +
    birdcl4
 +
    birdcl6
 +
    ip
 +
    ip-bridge
 +
    ip-full
 +
    mwan3
 
  Network > Routing and Redirection > relayd
 
  Network > Routing and Redirection > relayd
 
  Network > Routing and Redirection > olsrd
 
  Network > Routing and Redirection > olsrd
 
  Network > Routing and Redirection > olsrd >
 
  Network > Routing and Redirection > olsrd >
        olsrd-mod-arprefresh
+
    olsrd-mod-arprefresh
        olsrd-mod-bmf
+
    olsrd-mod-bmf
        olsrd-mod-dot-draw
+
    olsrd-mod-dot-draw
        olsrd-mod-dyn-gw
+
    olsrd-mod-dyn-gw
        olsrd-mod-dyn-gw-plain
+
    olsrd-mod-dyn-gw-plain
        olsrd-mod-httpinfo
+
    olsrd-mod-httpinfo
        olsrd-mod-jsoninfo
+
    olsrd-mod-jsoninfo
        olsrd-mod-mdns
+
    olsrd-mod-mdns
        olsrd-mod-nameservice
+
    olsrd-mod-nameservice
        olsrd-mod-p2pd
+
    olsrd-mod-p2pd
        olsrd-mod-pgraph
+
    olsrd-mod-pgraph
        olsrd-mod-pud
+
    olsrd-mod-quagga
        olsrd-mod-quagga
+
    olsrd-mod-secure
        olsrd-mod-secure
+
    olsrd-mod-tas
        olsrd-mod-sgwdynspeed
+
    olsrd-mod-txtinfo
        olsrd-mod-txtinfo
+
    olsrd-mod-watchdog
        olsrd-mod-watchdog
+
Network > Routing and Redirection > quagga
 +
    quagga-babeld
 +
    quagga-bgpd
 +
    quagga-isisd
 +
    quagga-libospf
 +
    quagga-libzebra
 +
    quagga-ospf6d
 +
    quagga-ospfd
 +
    quagga-ripd
 +
    quagga-ripngd
 +
    quagga-vtysh
 +
    quagga-watchquagga
 +
    quagga-zebra
 
  Network > SSH > openssh-server
 
  Network > SSH > openssh-server
Network > VPN >
 
        openvpn-easy-rsa
 
        openvpn-nossl
 
        openvpn-openssl
 
        openvpn-polarssl
 
        pptpd
 
 
  Network > Time Synchronization > ntpclient
 
  Network > Time Synchronization > ntpclient
 
  Network > Web Servers/Proxies > uhttpd
 
  Network > Web Servers/Proxies > uhttpd
Line 113: Line 175:
 
                                 uhttpd-mod-tls
 
                                 uhttpd-mod-tls
 
                                 uhttpd-mod-ubus  
 
                                 uhttpd-mod-ubus  
  Network > hostapd
+
  Network > 6in4
 +
          6rd
 +
          6to4
 +
          ahcpd                   
 +
          hostapd
 
           hostapd-mini
 
           hostapd-mini
 
           hostapd-utils
 
           hostapd-utils
Line 119: Line 185:
 
           samba36-client
 
           samba36-client
 
           samba36-server
 
           samba36-server
 +
          tayga
 
           tc
 
           tc
 
           vnstat
 
           vnstat
 
           vnstati
 
           vnstati
 
           wshaper
 
           wshaper
 +
          wwan
 +
Network > IP Addresses and Names >
 +
          bind-host
 +
          bind-server
 +
          ddns-scripts
 +
Network > VPN >
 +
          ipsec-tools
 
  LuCI > 1. Collections >
 
  LuCI > 1. Collections >
 
             luci
 
             luci
Line 129: Line 203:
 
             luci-mod-freifunk
 
             luci-mod-freifunk
 
         3. Applications >
 
         3. Applications >
            luci-app-commands
 
            luci-app-freifunk-diagnostics
 
 
             luci-app-freifunk-policyrouting
 
             luci-app-freifunk-policyrouting
 
             luci-app-meshwizard
 
             luci-app-meshwizard
Line 141: Line 213:
 
             luci-app-samba
 
             luci-app-samba
 
             luci-app-statistics
 
             luci-app-statistics
            luci-app-upnp
 
 
             luci-app-vnstat
 
             luci-app-vnstat
 
             luci-app-wshaper
 
             luci-app-wshaper
Line 165: Line 236:
 
     kmod-bridge
 
     kmod-bridge
 
     kmod-pptp
 
     kmod-pptp
 +
    kmod-wprobe
 
  Kernel Modules > USB Support >
 
  Kernel Modules > USB Support >
 +
    kmod-usb-acm
 +
    kmod-usb-atm
 +
    kmod-usb-atm-cxacru
 +
    kmod-usb-atm-speedtouch
 +
    kmod-usb-atm-ueagle
 +
    kmod-usb-cm109
 +
    kmod-usb-core
 +
    kmod-usb-dwc2
 +
    kmod-usb-dwc3
 +
    kmod-usb-hid
 +
    kmod-usb-net
 +
    kmod-usb-net-asix
 +
    kmod-usb-net-cdc-eem
 +
    kmod-usb-net-cdc-ether
 +
    kmod-usb-net-cdc-mbim
 +
    kmod-usb-net-cdc-ncm
 +
    kmod-usb-net-cdc-subset
 +
    kmod-usb-net-dm9601-ether
 +
    kmod-usb-net-hso
 +
    kmod-usb-net-ipheth
 +
    kmod-usb-net-kalmia
 +
    kmod-usb-net-kaweth
 +
    kmod-usb-net-mcs7830
 +
    kmod-usb-net-pegasus
 +
    kmod-usb-net-qmi-wwan
 +
    kmod-usb-net-rndis
 +
    kmod-usb-net-rtl8150
 +
    kmod-usb-net-rtl8152
 +
    kmod-usb-net-sierrawireless
 +
    kmod-usb-net-smsc95xx 
 +
    kmod-usb-ohci
 +
    kmod-usb-ohci-pci
 +
    kmod-usb-printer
 
     kmod-usb-serial
 
     kmod-usb-serial
          kmod-usb-serial-ipw
+
    kmod-usb-serial-ark3116
          kmod-usb-serial-option
+
    kmod-usb-serial-belkin
          kmod-usb-serial-qualcomm
+
    kmod-usb-serial-ch341
          kmod-usb-serial-wwan
+
    kmod-usb-serial-cp210x
     kmod-usb-acm
+
    kmod-usb-serial-cypress-m8
 +
    kmod-usb-serial-dmx_usb_module
 +
    kmod-usb-serial-ftdi
 +
    kmod-usb-serial-garmin
 +
    kmod-usb-serial-ipw
 +
    kmod-usb-serial-keyspan
 +
    kmod-usb-serial-mct
 +
    kmod-usb-serial-mos7720
 +
    kmod-usb-serial-option
 +
    kmod-usb-serial-oti6858
 +
    kmod-usb-serial-pl2303
 +
    kmod-usb-serial-qualcomm
 +
    kmod-usb-serial-sierrawireless
 +
    kmod-usb-serial-simple
 +
    kmod-usb-serial-ti-usb
 +
    kmod-usb-serial-visor
 +
     kmod-usb-serial-wwan
 
     kmod-usb-storage
 
     kmod-usb-storage
 
     kmod-usb-storage-extras
 
     kmod-usb-storage-extras
 +
    kmod-usb-uhci
 +
    kmod-usb-wdm
 +
    kmod-usb-yealink
 +
    kmod-usb2
 +
    kmod-usb2-pci
 +
    kmod-usb3
 +
    kmod-usbip
 +
    kmod-usbip-client
 +
    kmod-usbip-server
 +
    kmod-usbmon
 +
Utilities >
 +
    gammu
 +
    iconv
 +
    iwinfo
 +
    jshn
 +
    smstools3
 +
    uboot-envtools
 +
    usb-modeswitch
 +
    usbreset
 +
    usbutils
 
  Mail > msmtp
 
  Mail > msmtp
 
         msmtp-nossl
 
         msmtp-nossl

Latest revision as of 16:51, 8 October 2017

WARNING: ini akan membutuhkan banyak akses ke Internet untuk download, termasuk waktu proses make. Termasuk download kernel linux, waktu compile toolchain :( ... Tampaknya tidak bisa OFFLINE :(



Dalam contoh ini akan di perlihatkan cara compile firmware Buffalo WZR HP G300NH2 untuk keperluah MESH dengan OLSRD. oleh karenanya membutuhkan aplikasi seperti

  • luci
  • olsrd
  • freifunk

Pastikan

  • Compile untuk AR71xx
  • Profile WZR HP G300NH2
  • Driver wireless Atheros AR9381? di install.
  • Network olsrd


Siapkan Pendukung

Lakukan

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
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

git clone git://git.openwrt.org/openwrt.git
cd openwrt
./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 update -a
./scripts/feeds install -a
make defconfig
make menuconfig
make clean
sudo make -j3 world
sudo make -j3 V=s world


hack

cd ~/openwrt/staging_dir/toolchain-mips_34kc_gcc-5.3.0_musl-1.1.14/include
cp /usr/include/curses* .
cp /usr/include/ncurses* .
cp /usr/include/unc* .

Setup Menuconfig

Menuconfig untuk Firmware Buffalo WZRHPG300GNH2 untuk

  • OLSR
  • WebGUI LuCI
  • Modem 3G
  • PPTP untuk VPN
  • UPnP dan miniDLNA untuk Media Server

Lebih detail-nya adalah:

Target System > Atheros AR7xxx/AR9xxx
Subtarget > Generic 
Target Profile > Buffalo WZR-HP-G300NH2
Target Images > tar.gz 
Base system > bridge
Network >
    bmon
    chat
    ds-lite
    gre
       grev4
       grev6
    iftop
    iperf
    iperf3
    ipip
    ipset
    ipset-dns
    iputils-arping
    iputils-clockdiff
    iputils-ping
    iputils-ping6
    iputils-tftpd
    iputils-tracepath
    iputils-tracepath6
    iputils-traceroute6
    iw
    ppp
       ppp-mod-pppoa
       ppp-mod-pppoe
       ppp-mod-pppol2tp
       ppp-mod-pptp  
       ppp-mod-radius
    ppp-multilink
       pppdump 
       pppstats
Network > Routing and Redirection >
    babel-pinger
    babeld
    batmand
    bird4
    bird4-uci
    bird6
    bird6-uci
    birdc4
    birdc6
    birdcl4
    birdcl6
    ip
    ip-bridge
    ip-full
    mwan3
Network > Routing and Redirection > relayd
Network > Routing and Redirection > olsrd
Network > Routing and Redirection > olsrd >
    olsrd-mod-arprefresh
    olsrd-mod-bmf
    olsrd-mod-dot-draw
    olsrd-mod-dyn-gw
    olsrd-mod-dyn-gw-plain
    olsrd-mod-httpinfo
    olsrd-mod-jsoninfo
    olsrd-mod-mdns
    olsrd-mod-nameservice
    olsrd-mod-p2pd
    olsrd-mod-pgraph
    olsrd-mod-quagga
    olsrd-mod-secure
    olsrd-mod-tas
    olsrd-mod-txtinfo
    olsrd-mod-watchdog
Network > Routing and Redirection > quagga
    quagga-babeld
    quagga-bgpd
    quagga-isisd
    quagga-libospf
    quagga-libzebra
    quagga-ospf6d
    quagga-ospfd
    quagga-ripd
    quagga-ripngd
    quagga-vtysh
    quagga-watchquagga
    quagga-zebra
Network > SSH > openssh-server
Network > Time Synchronization > ntpclient
Network > Web Servers/Proxies > uhttpd
                                uhttpd-mod-lua
                                uhttpd-mod-tls
                                uhttpd-mod-ubus 
Network > 6in4
          6rd
          6to4
          ahcpd                    
          hostapd
          hostapd-mini
          hostapd-utils
          multiwan
          samba36-client
          samba36-server
          tayga
          tc
          vnstat
          vnstati
          wshaper
          wwan
Network > IP Addresses and Names >
          bind-host
          bind-server
          ddns-scripts
Network > VPN >
          ipsec-tools
LuCI > 1. Collections >
            luci
            luci-ssl
       2. Modules >
            luci-mod-freifunk
       3. Applications >
            luci-app-freifunk-policyrouting
            luci-app-meshwizard
            luci-app-multiwan
            luci-app-ntpc
            luci-app-olsr
            luci-app-olsr-services
            luci-app-olsr-viz
            luci-app-p2pblock
            luci-app-samba
            luci-app-statistics
            luci-app-vnstat
            luci-app-wshaper
       4. Themes >
            luci-theme-bootstrap
            luci-theme-freifunk-bno
            luci-theme-freifunk-generic
       6. Protocols >
            luci-proto-3g
       7. Server Interfaces >
            luci-sgi-uhttpd
       9. Freifunk >
            luci-mod-freifunk-community
            meshwizard
Kernel modules > Filesystems >
    kmod-fs-ntfs
    kmod-fs-vfat
Kernel modules > Wireless Drivers > 
    kmod-ath9k-htc
    kmod-ath9k-common
    kmod-ath9k
Kernel modules > Network Support >
    kmod-bridge
    kmod-pptp
    kmod-wprobe
Kernel Modules > USB Support >
    kmod-usb-acm
    kmod-usb-atm
    	kmod-usb-atm-cxacru
    	kmod-usb-atm-speedtouch
    	kmod-usb-atm-ueagle
    kmod-usb-cm109
    kmod-usb-core
    kmod-usb-dwc2
    kmod-usb-dwc3
    kmod-usb-hid
    kmod-usb-net
    	kmod-usb-net-asix
    	kmod-usb-net-cdc-eem
    	kmod-usb-net-cdc-ether
    	kmod-usb-net-cdc-mbim
    	kmod-usb-net-cdc-ncm
    	kmod-usb-net-cdc-subset
    	kmod-usb-net-dm9601-ether
    	kmod-usb-net-hso
    	kmod-usb-net-ipheth
    	kmod-usb-net-kalmia
    	kmod-usb-net-kaweth
    	kmod-usb-net-mcs7830
    	kmod-usb-net-pegasus
    	kmod-usb-net-qmi-wwan
    	kmod-usb-net-rndis
    	kmod-usb-net-rtl8150
    	kmod-usb-net-rtl8152
    	kmod-usb-net-sierrawireless
    	kmod-usb-net-smsc95xx  
    kmod-usb-ohci
    kmod-usb-ohci-pci
    kmod-usb-printer
    kmod-usb-serial
    	kmod-usb-serial-ark3116
    	kmod-usb-serial-belkin
    	kmod-usb-serial-ch341
    	kmod-usb-serial-cp210x
    	kmod-usb-serial-cypress-m8
    	kmod-usb-serial-dmx_usb_module
    	kmod-usb-serial-ftdi
    kmod-usb-serial-garmin
    kmod-usb-serial-ipw
    kmod-usb-serial-keyspan
    kmod-usb-serial-mct
    kmod-usb-serial-mos7720
    kmod-usb-serial-option
    kmod-usb-serial-oti6858
    kmod-usb-serial-pl2303
    kmod-usb-serial-qualcomm
    kmod-usb-serial-sierrawireless
    kmod-usb-serial-simple
    kmod-usb-serial-ti-usb
    kmod-usb-serial-visor
    kmod-usb-serial-wwan
    kmod-usb-storage
    kmod-usb-storage-extras
    kmod-usb-uhci
    kmod-usb-wdm
    kmod-usb-yealink
    kmod-usb2
    kmod-usb2-pci
    kmod-usb3
    kmod-usbip
    kmod-usbip-client
    kmod-usbip-server
    kmod-usbmon
Utilities >
    gammu
    iconv
    iwinfo
    jshn
    smstools3
    uboot-envtools
    usb-modeswitch
    usbreset
    usbutils
Mail > msmtp
       msmtp-nossl
       msmtp-queue

Update SVN

Untuk update SVN, di folder trunk lakukan

cd ~/openwrt.trunk/trunk/
svn cleanup
svn update
./scripts/feeds update

Lokasi Image

Lokasi image ada di

~/openwrt.trunk/trunk/bin/ar71xx/

Referensi

Pranala Menarik

Build Firmware

Flash Firmware

Misc

UBNT