5 --> OpenWrt update and modify package method

This article records the method of modifying third-party packages during the development of OpenWrt. After configuring Openwrt, after the first compilation, various source code packages will be downloaded during the compilation process. There are configuration files and patch files for each report in the package. If we need to adjust the content of these reports, what should we do?
OpenWRT's source code package management method uses release version + patch management. If we need to modify the content of this package, we also need to add content in patch mode. The patch management tool quilt of OpenWrt needs to be installed. sudo apt-get install quilt.

Briefly describe the main steps as follows:
(1). Configure the quilt working environment to meet the OpenWrt patch package management;
install

sudo apt-get install quilt 
[sudo] password for robot: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following package was automatically installed and is no longer required:
  xinetd
Use 'sudo apt autoremove' to remove it.

Configuration: vim ~/.quiltrc

#//配置内容
QUILT_DIFF_ARGS="--no-timestamps --no-index -pab --color=auto"
QUILT_REFRESH_ARGS="--no-timestamps --no-index -pab"
QUILT_PATCH_OPTS="--unified"
QUILT_DIFF_OPTS="-p"
EDITOR="vim"

(2). Decompress the source code package and patch the file;

(3). View the existing patch package code, and create a patch file with the highest number according to the patch number;
(4). Edit the package source code content, add the source code that needs to be added or deleted;
(5). Save the modified content to the patch file, and Save the patch file to the compilation environment;
(6). Compile the package or the entire project to verify the added content of the patch.

This article environment:
ubuntu16.04, openwrt-20-master version, quilt-0.63;
Example content:
> Kernel modules
–> Industrial I/O Modules
– kmod-iio-ad799x... Analog Devices AD799x ADC driver is
in the configuration, open this Analog Devices AD799x ADC driver package;

The rest of the content is to be continued.

Guess you like

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