]>
Commit | Line | Data |
---|---|---|
1ef8b0b1 | 1 | OpenWrt |
625b8bc2 CF |
2 | ======= |
3 | ||
1ef8b0b1 PD |
4 | General info about OpenWrt buildsystem: `link <https://openwrt.org/docs/guide-developer/build-system/start>`_. |
5 | ||
625b8bc2 CF |
6 | Prepare build environment |
7 | ------------------------- | |
8 | ||
9 | For Debian based distributions, run: | |
10 | ||
11 | :: | |
12 | ||
13 | sudo apt-get install git build-essential libssl-dev libncurses5-dev \ | |
7d9a2e6d | 14 | unzip zlib1g-dev subversion mercurial |
625b8bc2 CF |
15 | |
16 | For other environments, instructions can be found in the | |
17 | `official documentation | |
1ef8b0b1 | 18 | <https://openwrt.org/docs/guide-developer/build-system/install-buildsystem#examples_of_package_installations>`_. |
625b8bc2 CF |
19 | |
20 | ||
1ef8b0b1 | 21 | Get OpenWrt Sources (from Git) |
625b8bc2 CF |
22 | ------------------------------ |
23 | ||
24 | .. note:: | |
1ef8b0b1 | 25 | The OpenWrt build will fail if you run it as root. So take care to run it as a nonprivileged user. |
625b8bc2 | 26 | |
1ef8b0b1 | 27 | Clone the OpenWrt sources and retrieve the package feeds |
625b8bc2 CF |
28 | |
29 | :: | |
30 | ||
31 | git clone https://github.com/openwrt/openwrt.git | |
32 | cd openwrt | |
33 | ./scripts/feeds update -a | |
34 | ./scripts/feeds install -a | |
1ef8b0b1 PD |
35 | |
36 | Configure OpenWrt for your target and select the needed FRR packages in Network -> Routing and Redirection -> frr, | |
625b8bc2 CF |
37 | exit and save |
38 | ||
39 | :: | |
40 | ||
41 | make menuconfig | |
42 | ||
1ef8b0b1 | 43 | Then, to compile either a complete OpenWrt image, or the FRR packages, run: |
625b8bc2 CF |
44 | |
45 | :: | |
46 | ||
47 | make or make package/frr/compile | |
48 | ||
49 | It may be possible that on first build ``make package/frr/compile`` not | |
50 | to work and it may be needed to run a ``make`` for the entire build | |
51 | environment. Add ``V=s`` to get more debugging output. | |
52 | ||
1ef8b0b1 | 53 | More information about OpenWrt buildsystem can be found `here |
e869d3f0 | 54 | <https://openwrt.org/docs/guide-developer/build-system/use-buildsystem>`__. |
1ef8b0b1 | 55 | |
625b8bc2 CF |
56 | Work with sources |
57 | ----------------- | |
58 | ||
1ef8b0b1 PD |
59 | To update to a newer version, or change other options, you need to edit the ``feeds/packages/frr/Makefile``. |
60 | ||
61 | More information about working with patches in OpenWrt buildsystem can be found `here | |
e869d3f0 | 62 | <https://openwrt.org/docs/guide-developer/build-system/use-patches-with-buildsystem>`__. |
625b8bc2 CF |
63 | |
64 | Usage | |
65 | ----- | |
66 | ||
67 | Edit ``/usr/sbin/frr.init`` and add/remove the daemons name in section | |
56f0bea7 | 68 | ``DAEMONS=`` or don't install unneeded packages For example: zebra bgpd ldpd |
625b8bc2 CF |
69 | isisd nhrpd ospfd ospf6d pimd ripd ripngd |
70 | ||
56f0bea7 | 71 | Enable the service |
625b8bc2 CF |
72 | ^^^^^^^^^^^^^^^^^^ |
73 | ||
74 | - ``service frr enable`` | |
75 | ||
76 | Start the service | |
77 | ^^^^^^^^^^^^^^^^^ | |
78 | ||
79 | - ``service frr start`` |