]> git.proxmox.com Git - mirror_frr.git/blame - doc/developer/building-frr-for-openwrt.rst
Merge pull request #12797 from jvidalallende/ubi8_minimal_dockerfile
[mirror_frr.git] / doc / developer / building-frr-for-openwrt.rst
CommitLineData
1ef8b0b1 1OpenWrt
625b8bc2
CF
2=======
3
1ef8b0b1
PD
4General info about OpenWrt buildsystem: `link <https://openwrt.org/docs/guide-developer/build-system/start>`_.
5
625b8bc2
CF
6Prepare build environment
7-------------------------
8
9For 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
16For 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 21Get 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 27Clone 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
36Configure OpenWrt for your target and select the needed FRR packages in Network -> Routing and Redirection -> frr,
625b8bc2
CF
37exit and save
38
39::
40
41 make menuconfig
42
1ef8b0b1 43Then, 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
49It may be possible that on first build ``make package/frr/compile`` not
50to work and it may be needed to run a ``make`` for the entire build
51environment. Add ``V=s`` to get more debugging output.
52
1ef8b0b1 53More information about OpenWrt buildsystem can be found `here
e869d3f0 54<https://openwrt.org/docs/guide-developer/build-system/use-buildsystem>`__.
1ef8b0b1 55
625b8bc2
CF
56Work with sources
57-----------------
58
1ef8b0b1
PD
59To update to a newer version, or change other options, you need to edit the ``feeds/packages/frr/Makefile``.
60
61More 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
64Usage
65-----
66
67Edit ``/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
69isisd nhrpd ospfd ospf6d pimd ripd ripngd
70
56f0bea7 71Enable the service
625b8bc2
CF
72^^^^^^^^^^^^^^^^^^
73
74- ``service frr enable``
75
76Start the service
77^^^^^^^^^^^^^^^^^
78
79- ``service frr start``