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

From OnnoWiki
Jump to navigation Jump to search
 
(37 intermediate revisions by the same user not shown)
Line 1: Line 1:
WRT1900AC was announced on 6th of January 2014 as a router developed to be used with OpenWrt.
+
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 :(
 +
 
 +
==Spesifikasi==
  
Specifications:
 
 
  Model: Linksys WRT1900AC
 
  Model: Linksys WRT1900AC
 
  Technology: Wireless-AC
 
  Technology: Wireless-AC
Line 14: Line 15:
 
  Output Power: 2.4GHz: 19dBm
 
  Output Power: 2.4GHz: 19dBm
 
  5GHz: 21dBm
 
  5GHz: 21dBm
Warranty: 2 year hardware limited warranty
 
OS Compatibility: Windows, Mac
 
Minimum System Requirements: PC with CD or DVD drive, running Windows XP SP3 (32-bit), Vista SP1/SP2 (32 & 64-bit), Win7 (32-bit & 64-bit) and Win8 (32-bit & 64-bit)
 
Mac: Wi-Fi enabled with CD or DVD drive, Mac OS® X Leopard v10.5.8 or later, Snow Leopard v10.6.1 or later, Lion v10.7, or Mountain Lion v10.8 Available USB 2.0 port
 
Package Contents: Linksys Dual Band Gigabit Wi-Fi Router AC1900, WRT1900AC, Quick Start Guide, CD-ROM with Documentation, 4 Antennas, Ethernet Cable, Power Adapter, Power Cord
 
  
 
Hardware Highlights:
 
Hardware Highlights:
 
  SoC Ram Flash Network USB Serial JTag eSata
 
  SoC Ram Flash Network USB Serial JTag eSata
  Marvell MV78230 256 MiB 128 MiB 1×2.0 1×3.0 Yes
+
  Marvell MV78230 256 MiB 128 MiB 1×2.0 1×3.0 Yes
  
Serial Port:
 
1 2 3 4 5 6
 
GND ? RX ? TX ?
 
  
Useful Links:
+
==Persiapan Compile OpenWRT==
  
OpenWrt forum thread for official statement: Update on Linksys WRT1900AC support
+
Dalam contoh ini akan di perlihatkan cara compile firmware Buffalo WZR HP G450H. Beberapa aplikasi menarik yang di instalasi antara lain adalah,
  
McWRT: https://github.com/Chadster766/McWRT
+
* luci
 +
* ipv6
 +
* quagga
 +
* ipsec
 +
* iotvity
 +
* freifunk
  
Prebuilt images: https://github.com/wrt1900ac/opensource
+
Pastikan
 +
* Compile untuk Marvell Armada 37x/38x/XP
 +
* Profile Linksys WRT1900AC (Mamba)
  
jimmychungbelkin/Mamba: https://github.com/jimmychungbelkin/Mamba
+
==Siapkan Pendukung==
About these ads
 
  
 +
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==
  
openwrt
+
Development Trunk tampaknya paling '''RECOMMENDED'''
=======
 
The main build tree can be found at https://github.com/jimmychungbelkin/Mamba
 
  
This repository contains the set of patches, and prebuilt images based on the Linksys WRT1900AC.
+
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
 +
./scripts/feeds update -a
 +
./scripts/feeds install -a
 +
make clean
 +
make defconfig
 +
make menuconfig
 +
make j=4 world
  
Barrier Breaker
+
==Setup Menuconfig==
=======
 
Barrier-Breaker/openwrt-armadaxp--jffs2-128k.img - prebuilt image based on OpenWrt Barrier-Breaker
 
  
Barrier-Breaker/patch_submission_1.6.tar.gz - patch files for standard OpenWrt Package
+
Menuconfig untuk Firmware Linksys WRT1900AC
  
OpenWRT git base revision: e97be7a104e5c809ae4638cf169823249a505698
+
Target System > Marvell Armada 37x/38x/XP
 +
Target Profile > Linksys WRT1900AC (Mamba)
 +
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
  
OpenWRT svn base revision: 40006
+
==Update SVN==
  
 +
Untuk update SVN, di folder trunk lakukan
  
Attitude Adjustment
+
cd ~/openwrt.trunk/trunk/
=======
+
svn cleanup
Attitude-Adjustment/openwrt-armadaxp--jffs2-128k.img - prebuilt image based on OpenWrt Attitude-Adjustment
+
svn update
 +
./scripts/feeds update
  
=======
+
==Lokasi Image==
  
After applying the patches in this directory to the OpenWrt Build you can generate an image by doing the following:
+
Lokasi image ada di
  
Use "make menuconfig" to configure your appreciated
+
~/openwrt.trunk/trunk/bin/mvebu/
configuration for the toolchain and firmware.
 
  
For WRT1900AC:
+
==Referensi==
The "Target System" in make menuconfig should be set to "Marvell Armada XP/370"
 
The "Subtarget" in make menuconfig should be set to "Mamba"
 
In "Target Images" in make menuconfig you should enable "jffs2"
 
 
 
Instalasi aplikasi pendukung
 
 
 
apt-get install gcc binutils bzip2 flex python perl \
 
make, find, grep, diff, unzip, gawk, getopt, libz-dev and libc headers.
 
 
 
Run "./scripts/feeds update -a" to get all the latest package definitions
 
defined in feeds.conf / feeds.conf.default respectively
 
 
 
Run "./scripts/feeds install -a" to install symlinks of all of them into
 
package/feeds/.
 
 
 
Use "make menuconfig" to configure your image.
 
 
 
Simply running "make" will build your firmware.
 
It will download all sources, build the cross-compile toolchain,
 
the kernel and all choosen applications.
 
 
 
After the build completes the firmware image for the WRT1900AC will be
 
located at:
 
./bin/mvebu/openwrt-mvebu-mamba-jffs2-128k.img
 
 
 
How to update from Belkin/Linksys UI
 
  
Login into WRT1900AC local UI
+
* http://wiki.openwrt.org/doc/howto/build
  
Navigate to the Connectivity tab
+
==Pranala Menarik==
  
Select Manual firmware update
+
* [[OpenWRT]]
 +
* [[OpenWRT: Download Firmware yang sudah jadi]]
 +
* [[OpenWRT: Source Repository Download]]
 +
* [[OpenWRT: Melihat Daftar Package]]
 +
* [[OpenWRT: Mengembalikan setting default Config.in]]
  
Select image to load (e.g., openwrt-armadaxp--jffs2-128k.img)
+
===Build Firmware===
  
Select Update firmware
+
* [[OpenWRT: Build Firmware]]
 +
* [[OpenWRT: Build Firmware Download Source Pendukung]]
 +
* [[OpenWRT: Build Firmware Buffalo WZRHPG450H]]
 +
* [[OpenWRT: Build Firmware Buffalo WZRHPG300N]]
 +
* [[OpenWRT: Build Firmware Buffalo WZRHPG300NH2]]
 +
* [[Buffalo]]
 +
* [[Buffalo: WZRHPG450H Cara Recovery]]
 +
* [[Buffalo: WZRHPG450H OpenWRT mengaktifkan setelah di flash]]
 +
* '''[[Buffalo: WZRHPG450H Membuat Firmware OpenWRT Sendiri]]''' '''RECOMMENDED'''
 +
* [[Buffalo: WZRHPG450H OpenWRT instalasi aplikasi Pendukung OLSRD]]
 +
* [[OpenWRT: Build Firmware Ubiquiti NanoStation2]] '''RECOMMENDED'''
 +
* [[OpenWRT: Build Firmware Ubiquiti NanoStationM2]] '''RECOMMENDED'''
 +
* [[OpenWRT: Build Firmware Mikrotik RB433]]
 +
* [[OpenWRT: Build Firmware Linksys WRT160NL]]
 +
* [[OpenWRT: Build Firmware Linksys WRT54GL]]
  
After the firmware is updated, the unit will reboot, and the default ip address will be 192.168.200.1
+
===APRX===
  
The OpenWrt system is documented in docs/. You will need a LaTeX distribution
 
and the tex4ht package to build the documentation. Type "make -C docs/" to build it.
 
  
To build your own firmware you need to have access to a Linux, BSD or MacOSX system
+
* [[OpenWRT: Build Firmware Buffalo WZRHPG300NH2 untuk APRX]]
(case-sensitive filesystem required). Cygwin will not be supported because of
+
* [[OpenWRT: Setup APRX]]
the lack of case sensitiveness in the file system.
 
  
 +
===IPv6===
  
Sunshine!
+
* [[OpenWRT: IPv6]]
Your OpenWrt Project
+
* [[OpenWRT IPv6: Build Firmware Linksys WRT160NL]]
http://openwrt.org
+
* [[OpenWRT IPv6: Build Firmware Linksys WRT160NL Tanpa WebGUI]]
 +
* [[OpenWRT IPv6: Build Firmware Buffalo WZRHPG450H]]
 +
* [[OpenWRT IPv6: Build Firmware Buffalo WZRHPG300NH2]]
 +
* [[OpenWRT IPv6: Setup tunnel ke tunnelbroker]]
 +
* [[OpenWRT IPv6: Konfigurasi]]
 +
* [[OpenWRT IPv6: Konfigurasi WAN6 dengan radvd]]
  
 +
===Flash Firmware===
  
 +
* [[OpenWRT: Flash Linksys WRT54GL]]
 +
* [[OpenWRT: Flash Linksys WRT160NL]]
 +
* [[OpenWRT: Flash Buffalo WZRHP450H]] '''RECOMMENDED'''
 +
* [[OpenWRT: Flash Buffalo WZRHP300N]]
 +
* [[OpenWRT: Flash UBNT NanoStation2]] '''RECOMMENDED'''
 +
* [[OpenWRT: Flash UBNT NanoStation M2]] '''RECOMMENDED'''
 +
* [[OpenWRT: Flash UBNT NanoStation Loco M2]]
 +
* [[OpenWRT: Flash UBNT Bullet M2]] '''RECOMMENDED'''
 +
* [[OpenWRT: Flash Mikrotik RB433]] '''RECOMMENDED'''
 +
* [[OpenWRT: Flash Mikrotik RB450]]
  
 +
===Misc===
  
 +
* [[OpenWRT: CLI]]
 +
* [[OpenWRT: Setup WiFi]]
 +
* [[OpenWRT: Setup PPTP VPN Server]]
 +
* [[OpenWRT: Setup OLSR di UBNT via CLI]] '''RECOMMENDED'''
 +
* [[OpenWRT: Mikrotik RB433]] '''RECOMMENDED'''
 +
* [[OpenWRT: Setup OLSR Sederhana]]
 +
* [[OpenWRT: Setup OLSR via Web]] '''RECOMMENDED'''
 +
* [[OLSR - di OpenWRT]]
 +
* [[OpenWRT: 3G modem]]
 +
* [[OpenWRT: Build Firmware dengan 3G Modem Support]]
 +
* [[OpenWRT: Setup Firewall]]
 +
* [[OpenWRT: Konfigurasi UBNT NanoStation2 tanpa WebGUI]]
 +
* [[OpenWRT: OLSR nameservice plugin]]
 +
* [[OpenWRT: VLAN]]
  
 +
===UBNT===
  
 
+
* [[UBNT]]
 
+
* [[UBNT: Teknik Recovery]]
 
+
* [[UBNT: Upload Firmware]]
 
+
* [[UBNT: Rebuild Firmware]]
 
+
* [[UBNT: firmware dengan OLSR]]
 
+
* [[UBNT: openwrt]]
 
+
* [[UBNT: olsr dengan openwrt]]
 
+
* [[UBNT: olsr dengan kamikaze openwrt]]
 
+
* [[UBNT: olsr dengan backfire openwrt]]
 
+
* [[UBNT: UniFi]]
 
+
* [[UBNT: UniFi Konfigurasi Awal]]
 
+
* [[UBNT: UniFi Manajemen HotSpot]]
 
+
* [[UBNT: OLSR Pembuatan Firmware]]
 
+
* [[UBNT: OLSR Konfigurasi]]
03/05/2014
+
* [[OLSR - di UBNT]]
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+
* [[OLSR - di Ubuntu]]
CONTENTS
+
* [[OpenWRT]]
Topic -------- Section
+
* [[OLSR: NAT di UBNT dengan OLSR]]
----- -------
 
o OVERVIEW....................................................... 1.0
 
o BUILDING OPENWRT............................................... 2.0
 
o HOW TO BOOT UP TO LINUX........................................ 3.0
 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 
1.0 OVERVIEW
 
This document provides a quickstart guide on Mamba OpenWRT SDK V4.0
 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 
2.0 BUILDING OPENWRT
 
How to build the openwrt:
 
1. Setup the Linux server and install all packages for openwrt:
 
Refer: http://wiki.openwrt.org/doc/howto/buildroot.exigence
 
2. Make sure the server is connected to the Internet.
 
3. Preparation:
 
Extract the release source from tarball
 
# tar xzfv mamba-openwrt-v4.0.tar.gz
 
Extract the opensource (dl_v4.0.tar.gz) the dl folder
 
Update packages and luci for some advanced features ( such as
 
Web Management).
 
# cd mamba-openwrt-vX.Y
 
# ./scripts/feeds update packages
 
# ./scripts/feeds update luci
 
# ./scripts/feeds update routing
 
# ./scripts/feeds update xwrt
 
# ./scripts/feeds install -a -p packages
 
# ./scripts/feeds install -a -p luci
 
# ./scripts/feeds install -a -p routing
 
4. Configuration the openwrt:
 
# cd mamba-openwrt-vX.Y
 
To enable/disable packages manually:
 
# make menuconfig
 
You can also utilize the pre-config file (which enables Web Management):
 
# cp belkin/mamba_basic_config .config
 
5. Building the openwrt:
 
# cd mamba-openwrt-vX.Y
 
# make dirclean
 
# make V=s
 
6. Binary files after finish compile (or extract from release binaries):
 
# tar xzvf mamba-openwrt-vX.Y.bin.tar.gz
 
# cd mamba-openwrt-vX.Y.bin
 
# ls
 
md5sums
 
openwrt-mvebu-jffs2-128k.img
 
openwrt-mvebu-Mamba-rootfs.tar.gz
 
openwrt-mvebu-root.jffs2-128k
 
openwrt-mvebu-uImage-armada-xp-mamba
 
openwrt-mvebu-uImage-initramfs-armada-xp-mamba
 
packages/
 
Then put all the openwrt-armadaxp-*** to tftp server (/tftpboot folder)
 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 
3.0 HOW TO BOOT UP TO LINUX
 
1. Configure the ethernet:
 
Make sure the ethernet of board working, then we can get the files from tftp server for boot up Linux.
 
2. Set up environment variables required for Dual Boot (Primary Boot + Alternative Boot)
 
Mamba support Dual Boot with the following features:
 
+ Linksys and OpenWRT firmware use the same flash layout (mtdparts U-boot variable)
 
+ Linksys and OpenWRT firmware use the same kernel boot arguments (bootargs is the same and independent of the firmware)
 
+ Linksys and OpenWRT share the syscfg partition for storing configuration files.
 
+ Linksys and OpenWRT firmware can be flashed to Primary Boot partition or Alternative Boot partition (the ping-pong effect: when we upgrade firmware from Primary partition the new firmware is written to the Alternative partition, next bootcmd is set to Alternative partition. When we upgrade firmware from Alternative partition the new firmware is written to the Primary partition, next bootcmd is set to Primary partition)
 
The defaul U-boot environment variables are listed below
 
u-boot> setenv alt_kern_addr '0x3200000'
 
u-boot> setenv alt_kern_size '0x400000'
 
u-boot> setenv pri_kern_addr '0xa00000'
 
u-boot> setenv pri_kern_size '0x400000'
 
u-boot> setenv openwrt_fw_size '0x2800000'
 
u-boot> setenv default_load_addr '0x2000000'
 
u-boot> setenv console 'console=ttyS0,115200'
 
u-boot> setenv firmware_name 'openwrt-mvebu-jffs2-128k.img'
 
u-boot> setenv serverip '192.168.200.2'
 
u-boot> setenv auto_recovery 'yes'
 
u-boot> setenv boot_part '1'
 
u-boot> setenv default_mtdparts 'mtdparts=armada-nand:1024K(uboot)ro,256K(u_env),256K(s_env),1m@9m(devinfo),40m@10m(kernel),37m@13m(rootfs),40m@50m(alt_kernel),37m@53m(alt_rootfs),80m@10m(ubifs),-@90m(syscfg)'
 
u-boot> setenv jffs2_mtdparts 'mtdparts=armada-nand:1024K(uboot)ro,256K(u_env),256K(s_env),1m@9m(devinfo),40m@10m(kernel),37m@13m(rootfs),40m@50m(alt_kernel),37m@53m(alt_rootfs),80m@10m(ubifs),-@90m(syscfg)'
 
u-boot> setenv openwrt_mtdparts 'mtdparts=armada-nand:1024K(uboot)ro,256K(u_env),256K(s_env),1m@9m(devinfo),40m@10m(kernel),37m@13m(rootfs),40m@50m(alt_kernel),37m@53m(alt_rootfs),80m@10m(ubifs),-@90m(syscfg)'
 
u-boot> setenv linksys_altnandboot 'nand read $default_load_addr $alt_kern_addr $alt_kern_size; setenv bootargs $console $default_mtdparts root=/dev/mtdblock7 ro rootfstype=jffs2 init=/sbin/init; bootm $default_load_addr;'
 
u-boot> setenv linksys_nandboot 'nand read $default_load_addr $pri_kern_addr $pri_kern_size; setenv bootargs $console $default_mtdparts root=/dev/mtdblock5 ro rootfstype=jffs2 init=/sbin/init; bootm $default_load_addr;'
 
u-boot> setenv openwrt_altnandboot 'nand read $default_load_addr $alt_kern_addr $openwrt_fw_size; setenv bootargs $console $default_mtdparts root=/dev/mtdblock7 ro rootfstype=jffs2 init=/sbin/init; bootm $default_load_addr;'
 
u-boot> setenv openwrt_nandboot 'nand read $default_load_addr $pri_kern_addr $openwrt_fw_size; setenv bootargs $console $default_mtdparts root=/dev/mtdblock5 ro rootfstype=jffs2 init=/sbin/init; bootm $default_load_addr;'
 
u-boot> setenv flash_alt_image 'tftp $default_load_addr $firmware_name; nand erase $alt_kern_addr 0x2800000;nand write $default_load_addr $alt_kern_addr ${filesize};'
 
u-boot> setenv flash_pri_image 'tftp $default_load_addr $firmware_name; nand erase $pri_kern_addr 0x2800000;nand write $default_load_addr $pri_kern_addr ${filesize};'
 
u-boot> setenv update_both_images 'run flash_pri_image;run flash_alt_image'
 
u-boot> setenv altnandboot 'run linksys_altnandboot'
 
u-boot> setenv nandboot 'run linksys_nandboot'
 
u-boot> setenv bootcmd 'run nandboot'
 
# save all environment variables
 
u-boot> saveenv
 
3. Burn the Firmwares to NAND
 
# to burn firmware image to Primary Boot partition
 
u-boot> run flash_pri_image
 
# to burn firmware image to Alternative Boot partition
 
u-boot> run flash_alt_image
 
4. Boot up firmware
 
# boot firmware image from Primary Boot partition
 
u-boot> run nandboot
 
# boot firmware image from Alternative Boot partition
 
u-boot> run altnandboot
 
 
 
5. If you want to reset the OpenWRT configuration to default, there are several ways to do that
 
5.1 Erase the whole syscfg partition in U-boot
 
WARNING: this will also erase the configuration data of alternative boot
 
u-boot> setenv mtdparts $default_mtdparts
 
u-boot> nand erase.part syscfg
 
Boot up OpenWrt again. The boot script will first show "ubifs sysfs not ready yet; using ramdisk", the boot script will automatically format and create a new empty syscfg partition to store configuration data.
 
5.2 Factory reset in OpenWrt Failsafe Mode
 
If the ubifs syscfg partition is already properly formatted, this method is preferred. It only tries to remove the configuration files and leave the alternative boot configuration files intact.
 
Boot up OpenWrt. When you see the failsafe prompt as below
 
"Press the [f] key and hit [enter] to enter failsafe mode "
 
Enter "f" and then "enter" (You can also enter the failsafe mode via the HW button, then telnet to the board to have console command line)
 
When you reach the command line interface. Run one of the two command below:
 
firstboot
 
# or
 
firstboot jffs2reset
 
NOTE: If the syscfg partition is not formatted yet. The above command will try to reformat and create a new empty syscfg partition.
 
Reboot the system
 
reboot -f
 
5.3 Factory reset in OpenWrt Normal Mode
 
If the ubifs syscfg partition is already properly formatted, this method is preferred. It only tries to remove the configuration files and leave the alternative boot configuration files intact.
 
Boot up OpenWrt normally. When you reach the command line interface. Run one of the two command below
 
firstboot
 
# or
 
firstboot jffs2reset
 
Reboot the system
 
reboot
 
 
 
5.4 Factory reset via WebUI
 
Login OpenWRT WebUI, go to System > Backup/Flash Firmware > Reset to defaults, press the "Perform Reset" button and choose "Yes" when the confirmation prompt appears
 
6. Overlay on syscfg partition sequence
 
If the syscfg partition is not found (it is defined in mtdparts variable at Uboot). OpenWRT will just mount read-only root filesystem. We cannot write to the read-only file system.
 
If the syscfg partition is found and is formatted as ubifs properly (it should have one syscfg volume inside the partition), OpenWRT will mount the syscfg partition and use the directory /openwrt_overlay for storing configuration files.
 
If the syscfg partition is found but it is not formatted properly (ubifs_mount failed), the system will first use ramfs (tmpfs) for overlay the root. Later in the init script (/etc/init.d/S95done), the system will try to recover from the ubifs_mount failed by formatting the syscfg partition. So on the second boot, we should not see this ubifs_mount issue again.
 
7. OpenWRT sysupgrade behavior
 
Mamba support two partitions for booting Linux. When doing OpenWRT sysupgrade
 
+ If current firmware boot is from Primary Boot partition (boot_part=1), the new firmware is written to Alternative Boot partition. Sysupgrade also sets two U-boot environment variables for next boot "bootcmd=run altnandboot" "boot_part=2". The system is rebooted and on next boot the system will boot from Alternative Boot partition.
 
+ If current firmware boot is from Alternative Boot partition (boot_part=2), the new firmware is written to Primary Boot partition. Sysupgrade also sets two U-boot environment variables for next boot "bootcmd=run nandboot" "boot_part=1". The system is rebooted and on next boot the system will boot from Primary Boot partition.
 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
==Referensi==
 
 
 
* https://github.com/wrt1900ac/opensource
 
* http://wjianz.wordpress.com/2014/09/18/useful-links-on-building-openwrt-for-wrt1900ac/
 
* https://github.com/jimmychungbelkin/Mamba/blob/master/Mamba_Openwrt_SDK_QS_v4.8.txt
 
* https://github.com/Chadster766/McWRT/releases
 
* http://support.linksys.com/en-us/support/routers/WRT1900AC
 
* https://github.com/wrt1900ac/opensource
 

Latest revision as of 09:44, 12 July 2015

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

Spesifikasi

Model: 	Linksys WRT1900AC
Technology: 	Wireless-AC
Standards: 	802.11a, 802.11b, 802.11g, 802.11n. 802.11ac
Frequency: 	Dual
Bands: 	Simultaneous: 2.4 GHz (Wireless-N), 5.0 GHz (Wireless-AC)
Security: 	WEP 64/128-bit, WPA2-Personal & Enterpise (AES/TKIP), WPS
Antennas: 	4x External Detachable Antennas
Antenna Gain (peak): 	2.4GHz: 2.5dBi
5GHz: 3.8dBi
Antenna Type: 	Dipole
Output Power: 	2.4GHz: 19dBm
5GHz: 21dBm

Hardware Highlights:

SoC 	Ram 	Flash 	Network 	USB 	Serial 	JTag 	eSata
Marvell MV78230 	256 MiB 	128 MiB 		1×2.0 1×3.0 	Yes


Persiapan Compile OpenWRT

Dalam contoh ini akan di perlihatkan cara compile firmware Buffalo WZR HP G450H. Beberapa aplikasi menarik yang di instalasi antara lain adalah,

  • luci
  • ipv6
  • quagga
  • ipsec
  • iotvity
  • freifunk

Pastikan

  • Compile untuk Marvell Armada 37x/38x/XP
  • Profile Linksys WRT1900AC (Mamba)

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

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
./scripts/feeds update -a
./scripts/feeds install -a
make clean
make defconfig
make menuconfig
make j=4 world

Setup Menuconfig

Menuconfig untuk Firmware Linksys WRT1900AC

Target System > Marvell Armada 37x/38x/XP
Target Profile > Linksys WRT1900AC (Mamba)
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/mvebu/

Referensi

Pranala Menarik

Build Firmware

APRX

IPv6

Flash Firmware

Misc

UBNT