3 -> OpenWrt system porting FRR routing protocol third-party software package records

How to migrate new software packages to your own openwrt system? Let's continue reading.

  1. After openWRT is compiled, the following files will be generated:
    and the directory staging_dir will be used as the temporary installation directory for compilation, and the final generated files will be saved in the directory bin
table of Contents meaning
dl Download the temporary directory of the software code package. Before compiling, download the original software code package to this directory
feeds Extension package directory. Put some infrequently used software packages in other code bases, and customize download and configuration through the feed mechanism
bin The final result catalog after compilation. Such as installation image file and ipk installation package
build_dir Compile the intermediate file directory.
staging_dir Compile the installation directory. The files are installed here, and the final compilation results are generated from the files here
tmp A large number of temporary files during the compilation process will be here
  1. The feeds directory The feeds directory is
    used to store the extension software package. You can use the package compilation extension mechanism for extension installation.
    Steps to transplant a new software package:
    (1). Put the software package to be migrated into the corresponding location under the feeds folder according to the package category. Establish a soft link to the corresponding location in the package directory of the main compilation directory.
$ cd package/feeds/routing
$ ln -s ../../feeds/routing/frr ./  #相对位置待移植的 FRR 

(2). After executing ./sripts/feeds install -a, the transplanted new software package will be displayed in the menuconfig configuration menu.

$ cd ../../
$ make menuconfig

Insert picture description here
3. dl directory
compiler tool chain, the target platform and other software packages need to download the files are placed dl directory
during compilation, all kinds need to download the packages are stored in this directory (the tool used in the compilation process)
when During the compilation process.
If an error occurs , the cause of the error is that a certain software package is downloaded incorrectly or is missing, you can manually download the corresponding software package (compressed file), and place it in this directory, and then recompile.

  1. build_dir directory
    Compilation intermediate file directory of the cross-compilation tool and the result file of the target platform compilation.
    Insert picture description hereSuch as: image, rootfs, uboot, dtb and other compilation results;
    Insert picture description hereafter successful compilation, the script packaging results will be executed and copied to the bin/target folder.
    Insert picture description here5. The staging_dir directory is
    used as a temporary installation directory for compilation. The content is as follows: The
    Insert picture description here
    version of the libyang library in OpenWRT-19.07 is low, and the version that FRR depends on is 1.0.184, so you need to install the PKG_VERSION:=1.0.184 libyang library, delete package/feeds Copy the Makefil file of libyang-1.0.184 to this directory for the contents under the /packages/libyang folder, and recompile the OpenWRT feeds package management tool to automatically download this version of the library file.
include $(TOPDIR)/rules.mk

PKG_NAME:=libyang
PKG_VERSION:=1.0.184
PKG_RELEASE:=1

PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/CESNET/libyang/tar.gz/v$(PKG_VERSION)?
PKG_HASH:=1a5637451b73c4c5683837eb4c51371bb084795f653bc1a5fc20fed5541b58bc

PKG_MAINTAINER:=Jakov Smolic <jakov.smolic@sartura.hr>
PKG_LICENSE:=BSD-3-Clause
PKG_LICENSE_FILES:=LICENSE

CMAKE_INSTALL:=1
PKG_BUILD_PARALLEL:=1
CMAKE_BINARY_SUBDIR:=build

include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/cmake.mk

错误内容: satisfy_dependencies_for: Cannot satisfy the following dependencies for frr-vtysh

Collected errors:
 * satisfy_dependencies_for: Cannot satisfy the following dependencies for frr-vtysh:
 * 	more
 * opkg_install_cmd: Cannot install package frr-vtysh.
package/Makefile:65: recipe for target 'package/install' failed
make[2]: *** [package/install] Error 255
make[2]: Leaving directory '/home/robot/OpenWrt/LS1046A-19.07'
package/Makefile:108: recipe for target '/home/robot/OpenWrt/LS1046A-19.07/staging_dir/target-aarch64_generic_glibc/stamp/.package_install' failed
make[1]: *** [/home/robot/OpenWrt/LS1046A-19.07/staging_dir/target-aarch64_generic_glibc/stamp/.package_install] Error 2
make[1]: Leaving directory '/home/robot/OpenWrt/LS1046A-19.07'
/home/robot/OpenWrt/LS1046A-19.07/include/toplevel.mk:225: recipe for target 'world' failed
make: *** [world] Error 2

For solutions, refer to this link:
https://www.cnblogs.com/hzijone/p/12018484.html

Summary: This article mainly records the process of transplanting the new software package; this article refers to the content of Dong Shao's blog and formed this article based on his own implementation work summary. Thank you Dong Shao.

The reference link is as follows:
https://dongshao.blog.csdn.net/article/details/102509299

Guess you like

Origin blog.csdn.net/weixin_38387929/article/details/111772008