]> git.proxmox.com Git - mirror_frr.git/blob - doc/developer/building-frr-for-openwrt.rst
Merge pull request #13235 from Orange-OpenSource/link-state
[mirror_frr.git] / doc / developer / building-frr-for-openwrt.rst
1 OpenWrt
2 =======
3
4 General info about OpenWrt buildsystem: `link <https://openwrt.org/docs/guide-developer/build-system/start>`_.
5
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 \
14 unzip zlib1g-dev subversion mercurial
15
16 For other environments, instructions can be found in the
17 `official documentation
18 <https://openwrt.org/docs/guide-developer/build-system/install-buildsystem#examples_of_package_installations>`_.
19
20
21 Get OpenWrt Sources (from Git)
22 ------------------------------
23
24 .. note::
25 The OpenWrt build will fail if you run it as root. So take care to run it as a nonprivileged user.
26
27 Clone the OpenWrt sources and retrieve the package feeds
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
35
36 Configure OpenWrt for your target and select the needed FRR packages in Network -> Routing and Redirection -> frr,
37 exit and save
38
39 ::
40
41 make menuconfig
42
43 Then, to compile either a complete OpenWrt image, or the FRR packages, run:
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
53 More information about OpenWrt buildsystem can be found `here
54 <https://openwrt.org/docs/guide-developer/build-system/use-buildsystem>`__.
55
56 Work with sources
57 -----------------
58
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
62 <https://openwrt.org/docs/guide-developer/build-system/use-patches-with-buildsystem>`__.
63
64 Usage
65 -----
66
67 Edit ``/usr/sbin/frr.init`` and add/remove the daemons name in section
68 ``DAEMONS=`` or don't install unneeded packages For example: zebra bgpd ldpd
69 isisd nhrpd ospfd ospf6d pimd ripd ripngd
70
71 Enable the service
72 ^^^^^^^^^^^^^^^^^^
73
74 - ``service frr enable``
75
76 Start the service
77 ^^^^^^^^^^^^^^^^^
78
79 - ``service frr start``