Difference between revisions of "OpenWRT: Build Firmware X86"

From OnnoWiki
Jump to navigation Jump to search
(New page: ==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 lib...)
 
 
(19 intermediate revisions by the same user not shown)
Line 2: Line 2:
  
 
  sudo su
 
  sudo su
  apt-get update
+
  apt update
  apt-get install subversion gawk flex sharutils bison libz-dev zlib1g-dev patch \
+
  apt -y install subversion gawk flex sharutils bison libz-dev zlib1g-dev patch \
  fakeroot lzma git-core build-essential unzip libncurses5-dev curl php-xml-parser \
+
  fakeroot lzma git git-core build-essential unzip libncurses5-dev curl \
  libexpat1 libexpat1-dev libssl-dev libdaemon*
+
  libexpat1 libexpat1-dev libssl-dev libdaemon* \
 +
libdaemon0-dbg libdaemon-generic-perl libdaemon0 libdaemon-dev libdaemon-doc libdaemon-control-perl
 +
 
 +
Install XML-Parser
  
 
  cd /usr/local/src
 
  cd /usr/local/src
  wget http://www.cpan.org/modules/by-module/XML/XML-Parser-2.43.tar.gz
+
  wget http://www.cpan.org/modules/by-module/XML/XML-Parser-2.44.tar.gz
  tar zxvf XML-Parser-2.43.tar.gz
+
  tar zxvf XML-Parser-2.44.tar.gz
  cd /usr/local/src/XML-Parser-2.43
+
  cd /usr/local/src/XML-Parser-2.44
 
  perl Makefile.PL
 
  perl Makefile.PL
 
  make install
 
  make install
 
  
 
==Compile Menggunakan Development Trunk==
 
==Compile Menggunakan Development Trunk==
Line 21: Line 23:
 
Lakukan sebagai '''user biasa'''
 
Lakukan sebagai '''user biasa'''
  
  svn co svn://svn.openwrt.org/openwrt/trunk/ ~/openwrt.trunk/trunk
+
  cd ~
  cd ~/openwrt.trunk/trunk/
+
git clone https://github.com/openwrt/openwrt.git
 +
  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 29: Line 32:
 
  ./scripts/feeds install luci-app-olsr-viz luci-app-freifunk-policyrouting luci-mod-freifunk
 
  ./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 luci-theme-freifunk-generic olsrd olsrd-mod-txtinfo olsrd-mod-dyn-gw
 +
./scripts/feeds install luci-i18n-olsr-en
 
  ./scripts/feeds install olsrd-mod-dyn-gw-plain olsrd-mod-dot-draw
 
  ./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-arprefresh olsrd-mod-watchdog olsrd-mod-tas olsrd-mod-httpinfo
Line 38: Line 42:
 
  ./scripts/feeds install pptpd ppp-mod-pptp smstools3 picocom
 
  ./scripts/feeds install pptpd ppp-mod-pptp smstools3 picocom
 
  ./scripts/feeds install kamailio4 kamailio asterisk18 asterisk11 coova-chilli
 
  ./scripts/feeds install kamailio4 kamailio asterisk18 asterisk11 coova-chilli
 +
./scripts/feeds install batctl batmand kmod-batman-adv
 +
./scripts/feeds install bird4-uci bird4 bird6-uci bird6 birdc4 birdc6 birdcl4 birdcl6
 +
./scripts/feeds install quagga-bgpd quagga-isisd quagga-libospf quagga-libzebra quagga-ospf6d
 +
./scripts/feeds install quagga ospfd quagga-ripd quagga-ripngd quagga-vtysh quagga-watchquagga
 +
./scripts/feeds install quagga-zebra quagga
 +
./scripts/feeds install openvpn-easy-rsa openvpn-mbedtls openvpn-nossl
 +
./scripts/feeds install openvpn-openssl openwrt-keyring
 
  ./scripts/feeds update -a
 
  ./scripts/feeds update -a
 
  ./scripts/feeds install -a
 
  ./scripts/feeds install -a
Line 43: Line 54:
 
  make defconfig
 
  make defconfig
 
  make menuconfig
 
  make menuconfig
 +
 +
 
  make world
 
  make world
 +
make -j1 -V=sc world # alternatif untuk  debugging
  
 
Hasilnya akan tersimpan di
 
Hasilnya akan tersimpan di
  
  ~/openwrt.trunk/trunk/bin/
+
  ~~/openwrt/bin/targets/x86/64
  
 
==Konfigurasi Default==
 
==Konfigurasi Default==
  
Konfigurasi untuk RaspberryPi
+
Konfigurasi untuk X86 untuk simulasi GNS3
  
  Target System (Broadcom BCM2708/BCM2835)
+
 
  Target Profile (RaspberryPi)  --->  
+
  Target System (x86) --->
 +
Subtarget (Generic)  --->
 +
  Target Profile (Generic)  --->
 
  Target Images  --->
 
  Target Images  --->
      [*] ext4 (NEW)
+
    *** Root filesystem archives ***
      [*] GZip images (NEW)
+
    [*] cpio.gz
      (100) Boot (SD Card) filesystem partition size (in MB)
+
    [*] tar.gz
      (4000) Root filesystem partition size (in MB)
+
    *** Root filesystem images ***
      [*] Include kernel in root filesystem  --->
+
    [*] ext4 --->
            [*]  include uImage (NEW)
+
    [*] iso
            [*]   include zImage
+
    [*] jffs2
            [*]  include FIT (NEW)
+
    [*] squashfs  --->
  Administration  --->
+
    -*- Build GRUB images (Linux x86 or x86_64 host only)
      <*> asterisk11-gui
+
    [*]  Use Console Terminal (in addition to Serial)
 +
    (ttyS0) Serial port device
 +
    (38400) Serial port baud rate
 +
    (5)   Seconds to wait before booting the default entry
 +
    [*] Build VirtualBox image files (VDI)
 +
    [*] Build VMware image files (VMDK)
 +
    -*- Pad images to filesystem size (for JFFS2)
 +
    [*] GZip images
 +
    *** Image Options ***
 +
    (25) Kernel partition size (in MB)
 +
    (70) Root filesystem partition size (in MB)
 +
    () Root partition on target device
 
  Kernel modules  --->
 
  Kernel modules  --->
      USB Support --->
+
    Network Devices --->
            -*- kmod-usb-core
+
      <*> kmod-3c59x
            <*> kmod-usb-hid
+
      <*> kmod-8139cp
            <*> kmod-usb-printer
+
      <*> kmod-8139too
            <*> kmod-usb-serial
+
      <*> kmod-dummy
            <*>   kmod-usb-serial-ark3116
+
      <*> kmod-e100
            <*>   kmod-usb-serial-belkin
+
      -*- kmod-e1000
            <*>  kmod-usb-serial-ch341
+
      <*> kmod-e1000e
            <*>  kmod-usb-serial-cp210
+
      -*- kmod-libphy
            <*>  kmod-usb-serial-cypress-m8
+
      -*- kmod-mii
            <*>   kmod-usb-serial-dmx_usb_module
+
      <*> kmod-natsemi
            <*>  kmod-usb-serial-ftdi
+
      <*> kmod-ne2k-pci
            <*> kmod-usb-serial-gadget
+
      <*> kmod-pcnet32
            <*> kmod-usb-serial-ipw
+
      <*> kmod-r8169
            <*> kmod-usb-serial-keyspan
+
      <*> kmod-sis900
            <*> kmod-usb-serial-mct
+
      <*> kmod-tg3
            <*> kmod-usb-serial-mos7720
+
      <*> kmod-via-rhine
            <*> kmod-usb-serial-motorola-phone
+
      <*> kmod-via-velocity
            <*> kmod-usb-serial-option
+
       <*> kmod-vmxnet3   
            <*> kmod-usb-serial-oti6858
 
            <*> kmod-usb-serial-pl2303
 
            <*> kmod-usb-serial-qualcomm
 
            <*> kmod-usb-serial-sierrawireless
 
            <*> kmod-usb-serial-ti-usb
 
            <*> kmod-usb-serial-visor
 
            -*- kmod-usb-serial-wwan
 
            -*- kmod-usb-storage
 
            <*> kmod-usb-storage-extras
 
            <*> kmod-usb2
 
            <*> kmod-usb3
 
            <*> kmod-usbmon
 
       Wireless Drivers  --->
 
            -*- kmod-ath
 
            -*- kmod-ath9k
 
            <*> kmod-ath9k-htc
 
            <*> kmod-brcmfmac
 
            -*- kmod-brcmutil
 
            <*> kmod-carl9170
 
            -*- kmod-cfg80211
 
            -*- kmod-lib80211
 
            <*> kmod-libertas-sd
 
            <*> kmod-libertas-usb
 
            -*- kmod-mac80211
 
            <*> kmod-mac80211-hwsim
 
            <*> kmod-net-rtl8188eu
 
            <*> kmod-net-zd1201
 
            -*- kmod-p54-common
 
            <*> kmod-p54-usb
 
            <*> kmod-rt2500-usb
 
            <*> kmod-rt2800-usb
 
            -*- kmod-rt2x00-lib
 
            <*> kmod-rt73-usb
 
            <*> kmod-rtl8187
 
            <*> kmod-rtl8192cu
 
            <*> kmod-zd1211rw
 
Network  --->
 
      Telephony  --->
 
            -*- asterisk11
 
            <*> sipp
 
            <*> sipsak
 
      -*- ahcpd
 
      -*- chat
 
      <*> hostapd
 
      -*- hostapd-common
 
      <*> hostapd-mini
 
      <*> hostapd-utils
 
      -*- iw
 
      <*> odhcp6c
 
      <*> odhcpd
 
      <*> ppp
 
      <*>  ppp-mod-pppoe
 
      -*- samba36-server
 
      -*- wshaper
 
      <*> wwan
 
 
  LuCI  --->
 
  LuCI  --->
 
       1. Collections  --->
 
       1. Collections  --->
Line 148: Line 120:
 
             -*- luci-base
 
             -*- luci-base
 
             -*- luci-mod-admin-full
 
             -*- luci-mod-admin-full
            <*> luci-mod-failsafe
 
            <*> luci-mod-freifunk
 
            <*> luci-mod-freifunk-community
 
            <*> luci-mod-rpc
 
 
       3. Applications  --->
 
       3. Applications  --->
            <*> luci-app-ahcp
 
            <*> luci-app-asterisk
 
            <*> luci-app-commands
 
            <*> luci-app-ddns
 
 
             -*- luci-app-firewall
 
             -*- luci-app-firewall
            <*> luci-app-freifunk-diagnostics
 
            <*> luci-app-freifunk-policyrouting
 
            <*> luci-app-multiwan
 
            <*> luci-app-mwan3
 
            -*- luci-app-olsr
 
            -*- luci-app-olsr-services
 
            <*> luci-app-olsr-viz
 
            <*> luci-app-radvd
 
            <*> luci-app-samba
 
            -*- luci-app-splash
 
            <*> luci-app-statistics
 
            <*> luci-app-upnp
 
            <*> luci-app-wshaper
 
 
       4. Themes  --->
 
       4. Themes  --->
 
             -*- luci-theme-bootstrap
 
             -*- luci-theme-bootstrap
            <*> luci-theme-freifunk-bno
 
            <*> luci-theme-freifunk-generic
 
 
             <*> luci-theme-openwrt
 
             <*> luci-theme-openwrt
 
       5. Protocols  --->
 
       5. Protocols  --->
Line 181: Line 130:
 
             -*- luci-proto-ppp
 
             -*- luci-proto-ppp
 
       6. Libraries  --->
 
       6. Libraries  --->
       9. Freifunk --->
+
 
             -*- freifunk-common
+
 
             <*>  community-profiles
+
==Konfigurasi untuk Kemampuan Routing==
             -*- freifunk-firewall
+
 
             -*- freifunk-gwcheck
+
Agar Firmware OpenWRT mempunyai kemampuan routing yang baik, ada baiknya kita masukan:
             -*- freifunk-mapupdate
+
 
             -*- freifunk-policyrouting
+
Kernel modules > Network Support >
             -*- freifunk-watchdog
+
       <*> kmod-gre
             <*> meshwizard
+
      <*> kmod-gre6
Utilities  --->
+
      -*- kmod-ip6-tunnel
       -*- collectd
+
      -*- kmod-ipip
      -*- comgt
+
      <*> kmod-ipsec
      -*- libjson-script
+
      <*>  kmod-ipsec4
      -*- px5g
+
      <*>  kmod-ipsec6
      -*- rrdtool1
+
      -*- kmod-iptunnel6
      <*> smstools3
+
      -*- kmod-ipv6
      <*> usb-modeswitch
+
  Network Network > Routing and Redirection >
      <*> usbmuxd
+
      -*- bird4
      <*> usbreset
+
      <*> bird4-uci
      <*> usbutils
+
      -*- bird6
 +
      <*> bird6-uci
 +
      <*> birdc4
 +
      <*> birdc6
 +
      <*> birdcl4
 +
      <*> birdcl6
 +
      <M> ip
 +
      <*> ip-bridge
 +
      <*> ip-full
 +
      <*> 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-pud
 +
            <*>  olsrd-mod-quagga
 +
             <*>   olsrd-mod-secure
 +
            <*>  olsrd-mod-sgwdynspeed
 +
            <*>  olsrd-mod-txtinfo
 +
            <*>   olsrd-mod-watchdog
 +
       <*> 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
 +
 
 +
==Pranala Menarik==
 +
 
 +
* [[OpenWRT]]
 +
* [[VirtualBox: Instalasi OpenWRT image]]
 +
* [[Gns3]]
 +
* [[GNS3: Download]]
 +
* [[GNS3: Instalasi]]
 +
* [[IPv6: Quagga]]

Latest revision as of 11:26, 25 December 2019

Siapkan Aplikasi Pendukung

sudo su
apt update
apt -y install subversion gawk flex sharutils bison libz-dev zlib1g-dev patch \
fakeroot lzma git git-core build-essential unzip libncurses5-dev curl \
libexpat1 libexpat1-dev libssl-dev libdaemon* \
libdaemon0-dbg libdaemon-generic-perl libdaemon0 libdaemon-dev libdaemon-doc libdaemon-control-perl

Install XML-Parser

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

cd ~
git clone https://github.com/openwrt/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 luci-i18n-olsr-en
./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 coova-chilli
./scripts/feeds install batctl batmand kmod-batman-adv
./scripts/feeds install bird4-uci bird4 bird6-uci bird6 birdc4 birdc6 birdcl4 birdcl6
./scripts/feeds install quagga-bgpd quagga-isisd quagga-libospf quagga-libzebra quagga-ospf6d
./scripts/feeds install quagga ospfd quagga-ripd quagga-ripngd quagga-vtysh quagga-watchquagga
./scripts/feeds install quagga-zebra quagga
./scripts/feeds install openvpn-easy-rsa openvpn-mbedtls openvpn-nossl
./scripts/feeds install openvpn-openssl openwrt-keyring
./scripts/feeds update -a
./scripts/feeds install -a
make clean
make defconfig
make menuconfig


make world
make -j1 -V=sc world # alternatif untuk  debugging

Hasilnya akan tersimpan di

~~/openwrt/bin/targets/x86/64

Konfigurasi Default

Konfigurasi untuk X86 untuk simulasi GNS3


Target System (x86)  --->
Subtarget (Generic)  --->
Target Profile (Generic)  --->
Target Images  --->
   *** Root filesystem archives ***
   [*] cpio.gz
   [*] tar.gz
   *** Root filesystem images ***
   [*] ext4  --->
   [*] iso
   [*] jffs2
   [*] squashfs  --->
   -*- Build GRUB images (Linux x86 or x86_64 host only)
   [*]   Use Console Terminal (in addition to Serial)
   (ttyS0) Serial port device
   (38400) Serial port baud rate
   (5)   Seconds to wait before booting the default entry
   [*] Build VirtualBox image files (VDI)
   [*] Build VMware image files (VMDK)
   -*- Pad images to filesystem size (for JFFS2)
   [*] GZip images
   *** Image Options ***
   (25) Kernel partition size (in MB)
   (70) Root filesystem partition size (in MB)
   ()  Root partition on target device
Kernel modules  --->
   Network Devices  --->
      <*> kmod-3c59x
      <*> kmod-8139cp
      <*> kmod-8139too
      <*> kmod-dummy
      <*> kmod-e100
      -*- kmod-e1000
      <*> kmod-e1000e
      -*- kmod-libphy
      -*- kmod-mii
      <*> kmod-natsemi
      <*> kmod-ne2k-pci
      <*> kmod-pcnet32
      <*> kmod-r8169
      <*> kmod-sis900
      <*> kmod-tg3
      <*> kmod-via-rhine
      <*> kmod-via-velocity
      <*> kmod-vmxnet3    
LuCI  --->
      1. Collections  --->
            -*- luci
            <*> luci-ssl
      2. Modules  --->
            -*- luci-base
            -*- luci-mod-admin-full
      3. Applications  --->
            -*- luci-app-firewall
      4. Themes  --->
            -*- luci-theme-bootstrap
            <*> luci-theme-openwrt
      5. Protocols  --->
            <*> luci-proto-3g
            <*> luci-proto-ipv6
            -*- luci-proto-ppp
      6. Libraries  --->


Konfigurasi untuk Kemampuan Routing

Agar Firmware OpenWRT mempunyai kemampuan routing yang baik, ada baiknya kita masukan:

Kernel modules > Network Support >
      <*> kmod-gre
      <*> kmod-gre6
      -*- kmod-ip6-tunnel
      -*- kmod-ipip
      <*> kmod-ipsec
      <*>   kmod-ipsec4
      <*>   kmod-ipsec6
      -*- kmod-iptunnel6
      -*- kmod-ipv6
Network Network > Routing and Redirection >
      -*- bird4
      <*> bird4-uci
      -*- bird6
      <*> bird6-uci
      <*> birdc4
      <*> birdc6
      <*> birdcl4
      <*> birdcl6
      <M> ip
      <*> ip-bridge
      <*> ip-full
      <*> 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-pud
            <*>   olsrd-mod-quagga
            <*>   olsrd-mod-secure
            <*>   olsrd-mod-sgwdynspeed
            <*>   olsrd-mod-txtinfo
            <*>   olsrd-mod-watchdog
      <*> 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

Pranala Menarik