Renaming Sentinel to Vigilia; adjusting scripts; adding brctl option in menuconfig...
[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) Copy the compilation configuration file vigilia.config into a .config file in
44 the main folder by executing "cp vigilia.config .config".
45
46 3) Do "make defconfig" to setup the build options, then do "make world -j<number-of-proc>",
47 e.g. make world -j12.
48
49 4) After the compilation, the image will be found in
50 bin/targets/ipq806x/generic/lede-ipq806x-R7800-squashfs-factory.img. We can flash 
51 this image onto the Netgear R7800 Nighthawk X4S router using the instructions here:
52 https://lede-project.org/docs/guide-quick-start/standardflashinginstructions.
53
54 5) After flashing and booting for the first time, we need to set up the router using
55 RJ45 cables; if we plug it into the WAN connection through DHCP mechanism, we can get
56 an IP address for that WAN port instantly; to set up network configurations, we can
57 access the router by connecting a device to the router, opening a browser, and typing
58 the default router IP address: http://192.168.1.1; this will open the lUCI configuration
59 page and we can set up the router now.
60
61 6) We can set up first the LAN connection according to the LAN configuration
62 in vigilia/config/network.
63
64 7) Then we can set up a password for the system by typing "passwd" and giving it
65 a new password.
66
67 8) Reboot the system and we can login using dropbear ssh authentication by typing
68 "ssh root@128.195.204.94" and inputting the password. If we want to use SSL key
69 for the sake of convenience, then we have to do the steps here:
70 https://wiki.openwrt.org/doc/howto/dropbear.public-key.auth
71 Basically we copy our machine's public-key to the LEDE system by typing:
72 ssh root@128.195.204.94 "tee -a /etc/dropbear/authorized_keys" < ~/.ssh/id_rsa.pub
73
74 9) We need to copy the setup in dhcp, network, wireless, and hostapd-psk files in
75 vigilia_setup/config/ into the same files in /etc/config/ on the LEDE system.
76 Also we need to copy vigilia_setup/rc.local that contains the initial setup scripts
77 into /etc on the LEDE system. For the firewall file, since we do not use the
78 default firewall setup from LEDE, we can do
79 "mv /etc/config/firewall /etc/config/firewall.bak" to make it unreadable by LEDE
80 UCI when it is initializing the firewall rules when the system is booting up.
81
82 10) We need to also create /root/vigilia_setup/register and copy the scripts in
83 vigilia_setup/register/version_2 into it. These Shell scripts work with the
84 Android app that registers and deletes devices to and from the router.
85
86 11) Last, we need to copy the setup scripts in vigilia_setup/setup into /setup on
87 our LEDE system. This contains a number of scripts. 
88 - "startup.sh" will be run by the rc.local script when LEDE is booting up. This script 
89 contains the initial firewall rules for Vigilia router and a number of workaround 
90 rules to fix a few issues when disable_dgaf and proxy_arp options are activated, i.e.
91 hostapd checksum bug (for disable_dgaf feature). 
92 - "clean" and "nat" scripts are for cleaning and activating NAT(Network Address Translation) 
93 on the system.
94 - "dhcp" shows the IP address assignments to different connected devices.
95 - "show" shows the active iptables rules.
96 - "transfer" contains commands to transfer files through the "scp" command.
97
98 13) Reboot the system and we will have a working LEDE router for Vigilia system.