Project

General

Profile

Bug #249 » Compiling_Openwrt_CC_Batman-adv.sh

Instructions used to compile the firmware - Alvaro Antelo, 03/25/2016 12:16 AM

 
1
#!/bin/bash
2

    
3
# Ubuntu x86_64 14.04
4

    
5
# Install prereqs
6
sudo apt-get update
7
sudo apt-get -y upgrade
8
sudo apt-get install -y autoconf binutils bison build-essential ccache flex gawk gettext git libncurses5-dev libssl-dev ncurses-term quilt sharutils subversion texinfo xsltproc zlib1g-dev 
9

    
10
#export build_dir=/home/ubuntu/trunk
11
export build_dir=/home/ubuntu/openwrt
12
cd ~
13
# Download OpenWRT source (select Barrier Breaker or Trunk)
14
# git clone git://git.openwrt.org/14.07/openwrt.git # Barrier Breaker
15
git clone git://git.openwrt.org/15.05/openwrt.git # Chaos Calmer
16
# git clone git://git.openwrt.org/openwrt.git # Trunk
17
cd $build_dir
18
git pull
19

    
20
# update and install feeds
21
./scripts/feeds update -a
22
# add batman-adv development branch
23
echo "src-git batman https://git.open-mesh.org/openwrt-feed-batman-adv.git" >> feeds.conf.default
24
./scripts/feeds update -a
25
./scripts/feeds install -a 
26

    
27
# CONFIGURE OPENWRT BUILD
28
make defconfig
29
make prereq
30
make menuconfig
31
# select 'Target System' - <*> Atheros AR7XXX/AR9XXX
32
# select 'Target Profile' - <*> TP-LINK TL-WDR3600
33
# select 'Administration' - <*> htop
34
# select 'Kernel Modules' - 'Network Support' <*> kmod-batman-adv-devel (enable BLA/DAT/Mult/BatmanV/gpsd)
35
# select 'Kernel Modules' - USB Support - <*> kmod-usb-core
36
# select 'Kernel Modules' - USB Support - <*> kmod-usb-ohci
37
# select 'Kernel Modules' - USB Support - <*> kmod-usb-uhci
38
# select 'Kernel Modules' - USB Support - <*> kmod-usb2
39
# select 'Kernel Modules' - Wireless Drivers - <*> kmod-ath9k
40
# select 'Kernel Modules' - Wireless Drivers - <*> kmod-cfg80211
41
# select 'Kernel Modules' - Wireless Drivers - <*> kmod-mac80211
42
# select 'Network' - 'Routing and Redirection' - <*> ip (minimal)
43
# select 'Network' - <*> alfred (enable vis/bat-hosts)
44
# select 'Network' - <*> batctl-devel
45
# select 'Network' - <*> bmon
46
# Select 'Network' - <*> ethtool
47
# select 'Network' - <*> gpsd
48
# Select 'Network' - <*> hostapd
49
# select 'Network' - <*> iperf
50
# select 'Network' - <*> snmpd
51
# select 'Network' - <*> tcpdump
52
# Select 'Network' - <*> wpad
53
# Desselect 'Network' - < > wpad-mini
54
# select 'Utilities' - <*> iwinfo
55
# select 'Utilities' - <*> usbutils
56
# save and exit
57

    
58
# Compile
59
cd $build_dir
60
make -j${nproc} V=s
61

    
62
# CHECK SHA256 OF COMPILED IMAGE
63
cd $build_dir/bin/ar71xx
64
grep openwrt-ar71xx-generic-tl-wdr3600-v1-squashfs-sysupgrade.bin sha256sums | tee /proc/self/fd/2 | sha256sum --check -
(2-2/5)