Adding (empty) devices.dat as this is needed by the phone app to start.
[lede.git] / README
1 This is the buildsystem for the LEDE Linux distribution.
2
3 Please use "make menuconfig" to choose your preferred
4 configuration for the toolchain and firmware.
5
6 You need to have installed gcc, binutils, bzip2, flex, python, perl, make,
7 find, grep, diff, unzip, gawk, getopt, subversion, libz-dev and libc headers.
8
9 Run "./scripts/feeds update -a" to get all the latest package definitions
10 defined in feeds.conf / feeds.conf.default respectively
11 and "./scripts/feeds install -a" to install symlinks of all of them into
12 package/feeds/.
13
14 Use "make menuconfig" to configure your image.
15
16 Simply running "make" will build your firmware.
17 It will download all sources, build the cross-compile toolchain, 
18 the kernel and all choosen applications.
19
20 To build your own firmware you need to have access to a Linux, BSD or MacOSX system
21 (case-sensitive filesystem required). Cygwin will not be supported because of
22 the lack of case sensitiveness in the file system.
23
24
25 Sunshine!
26         Your LEDE Community
27         http://www.lede-project.org
28
29 ================================================================================
30
31 This LEDE lede-17.01 branch was taken in July 2017 from the LEDE github
32 repository for Vigilia system. A few things have been added including a patch
33 for hostapd to make disable_dgaf and proxy_arp options work properly.
34
35 The followings are the steps to be done to install this correctly on a NETGEAR R7800
36 Nighthawk X4S router:
37
38 1) Do "git clone ssh://plrg.eecs.uci.edu/home/git/lede" to download this LEDE
39 onto your local repository. Then execute "git checkout lede-17.01" to checkout
40 the right branch---this is a detached branch (there is no master branch), so we 
41 have to do this to make sure that we can push and pull changes correctly.
42
43 2) Run "./scripts/feeds update -a" to get all the latest package definitions
44 defined in feeds.conf / feeds.conf.default respectively and "./scripts/feeds 
45 install -a" to install symlinks of all of them into package/feeds/.
46 Run "make menuconfig", choose "< Load >", and load "vigilia.config". Then save
47 this configuration as ".config".
48
49 3) Do "make world -j<number-of-proc>", e.g. make world -j12.
50
51 4) After the compilation, the image will be found in
52 bin/targets/ipq806x/generic/lede-ipq806x-R7800-squashfs-factory.img. We can flash 
53 this image onto the Netgear R7800 Nighthawk X4S router using the instructions here:
54 https://lede-project.org/docs/guide-quick-start/standardflashinginstructions.
55
56 5) After flashing and booting for the first time, we need to set up the router using
57 RJ45 cables; if we plug it into the WAN connection through DHCP mechanism, we can get
58 an IP address for that WAN port instantly; to set up network configurations, we can
59 access the router by connecting a device to the router, opening a browser, and typing
60 the default router IP address: http://192.168.1.1; this will open the lUCI configuration
61 page and we can set up the router now.
62
63 6) We can set up first the LAN connection according to the LAN configuration
64 in vigilia/config/network.
65
66 7) Then we can set up a password for the system by typing "passwd" and giving it
67 a new password.
68
69 8) Reboot the system and we can login using dropbear ssh authentication by typing
70 "ssh root@128.195.204.94" and inputting the password. If we want to use SSL key
71 for the sake of convenience, then we have to do the steps here:
72 https://wiki.openwrt.org/doc/howto/dropbear.public-key.auth
73 Basically we copy our machine's public-key to the LEDE system by typing:
74 ssh root@128.195.204.94 "tee -a /etc/dropbear/authorized_keys" < ~/.ssh/id_rsa.pub
75
76 9) We need to copy the setup in dhcp, network, wireless, and hostapd-psk files in
77 vigilia_setup/config/ into the same files in /etc/config/ on the LEDE system.
78 Also we need to copy vigilia_setup/rc.local that contains the initial setup scripts
79 into /etc on the LEDE system. For the firewall file, since we do not use the
80 default firewall setup from LEDE, we can do
81 "mv /etc/config/firewall /etc/config/firewall.bak" to make it unreadable by LEDE
82 UCI when it is initializing the firewall rules when the system is booting up.
83
84 10) We need to also create /root/vigilia_setup/register and copy the scripts and files in
85 vigilia_setup/register/version_3 into it. These Shell scripts work with the
86 Android app that registers and deletes devices to and from the router.
87
88 11) Last, we need to copy the setup scripts in vigilia_setup/setup into /setup on
89 our LEDE system. This contains a number of scripts. 
90 - "startup.sh" will be run by the rc.local script when LEDE is booting up. This script 
91 contains the initial firewall rules for Vigilia router and a number of workaround 
92 rules to fix a few issues when disable_dgaf and proxy_arp options are activated, i.e.
93 hostapd checksum bug (for disable_dgaf feature). 
94 - "clean" and "nat" scripts are for cleaning and activating NAT(Network Address Translation) 
95 on the system.
96 - "dhcp" shows the IP address assignments to different connected devices.
97 - "show" shows the active iptables rules.
98 - "transfer" contains commands to transfer files through the "scp" command.
99
100 13) Reboot the system and we will have a working LEDE router for Vigilia system.