1OpenWrt 2======= 3 4General info about OpenWrt buildsystem: `link <https://openwrt.org/docs/guide-developer/build-system/start>`_. 5 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 \ 14 unzip zlib1g-dev subversion mercurial 15 16For 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 21Get 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 27Clone 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 36Configure OpenWrt for your target and select the needed FRR packages in Network -> Routing and Redirection -> frr, 37exit and save 38 39:: 40 41 make menuconfig 42 43Then, to compile either a complete OpenWrt image, or the FRR packages, run: 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 53More information about OpenWrt buildsystem can be found `here 54<https://openwrt.org/docs/guide-developer/build-system/use-buildsystem>`__. 55 56Work with sources 57----------------- 58 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 62<https://openwrt.org/docs/guide-developer/build-system/use-patches-with-buildsystem>`__. 63 64Usage 65----- 66 67Edit ``/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 69isisd nhrpd ospfd ospf6d pimd ripd ripngd 70 71Enable the service 72^^^^^^^^^^^^^^^^^^ 73 74- ``service frr enable`` 75 76Start the service 77^^^^^^^^^^^^^^^^^ 78 79- ``service frr start`` 80