美文网首页
RK3399 SDK添加nginx-rtmp-module模块

RK3399 SDK添加nginx-rtmp-module模块

作者: BUG架构师 | 来源:发表于2018-07-20 09:04 被阅读0次

    0. 下载nginx-rtmp-module

    下载链接Link,点这儿

    下载下来的文件名为:

    nginx-rtmp-module-43f1e4209b7ee7b795595912943a8fdc37f2ea4a.tar.gz

    更改为:

    nginx-rtmp-43f1e4209b7ee7b795595912943a8fdc37f2ea4a.tar.gz

    然后将该文件放在rk3399_SDK/buildroot/dl目录下

    1. 在rk3399_SDK/buildroot/package目录下增加nginx-rtmp目录

    $ mkdir nginx-rtmp

    2. 在该目录下新建三个文件

    • Config.in
    config BR2_PACKAGE_NGINX_RTMP
        bool "nginx-rtmp"
        depends on BR2_PACKAGE_NGINX_HTTP
        help
          A module for nginx rtmp module
          
          https://github.com/arut/nginx-rtmp-module
    
    • nginx-rtmp.mk
    ########################################################################
    #
    # nginx-rtmp
    #
    ########################################################################
    
    NGINX_RTMP_VERSION = 43f1e4209b7ee7b795595912943a8fdc37f2ea4a
    NGINX_RTMP_SITE = $(call github,arut,nginx-rtmp-module,$(NGINX_RTMP_VERSION))
    NGINX_RTMP_LICENSE = 
    NGINX_RTMP_LICENSE_FILES = 
    
    $(eval $(generic-package))
    
    
    • nginx-rtmp.hash
    #Locally Computed:
    sha256 58420f3fddba5283ee940bb8ccb9c92e3202c6f28ce6078949602722e096bcf3  nginx-rtmp-43f1e4209b7ee7b795595912943a8fdc37f2ea4a.tar.gz
    
    

    3. 依次修改如下文件:

    • rk3399_SDK/buildroot/package/Config.in
    diff --git a/buildroot/package/Config.in b/buildroot/package/Config.in
    old mode 100644
    new mode 100755
    index 440c148..5d7cb28
    --- a/buildroot/package/Config.in
    +++ b/buildroot/package/Config.in
    @@ -1531,6 +1531,7 @@ if BR2_PACKAGE_NGINX
     menu "External nginx modules"
            source "package/nginx-naxsi/Config.in"
            source "package/nginx-upload/Config.in"
    +       source "package/nginx-rtmp/Config.in"
     endmenu
     endif
            source "package/ngircd/Config.in"
    
    • Pro_rk3399_SDK_Linux/buildroot/package/nginx/nginx.mk
    diff --git a/buildroot/package/nginx/nginx.mk b/buildroot/package/nginx/nginx.mk
    old mode 100644
    new mode 100755
    index d57f3d0..2b4f8c5
    --- a/buildroot/package/nginx/nginx.mk
    +++ b/buildroot/package/nginx/nginx.mk
    @@ -245,6 +245,11 @@ NGINX_CONF_OPTS += $(addprefix --add-module=,$(NGINX_UPLOAD_DIR))
     NGINX_DEPENDENCIES += nginx-upload
     endif
     
    +ifeq ($(BR2_PACKAGE_NGINX_RTMP),y)
    +NGINX_CONF_OPTS += $(addprefix --add-module=,$(NGINX_RTMP_DIR))
    +NGINX_DEPENDENCIES += nginx-rtmp
    +endif
    +
     # Debug logging
     NGINX_CONF_OPTS += $(if $(BR2_PACKAGE_NGINX_DEBUG),--with-debug)
    

    4. 在menuconfig中添加选项

    进入rk3399_SDK/buildroot/执行make menuconfig.

    Target packages --->
        Networking applications --->
                            [*]nginx -->
                                External nginx modules --->
                                    [*]nginx-rtmp
    

    5. 重新编译

    cd buildroot && make clean && make rockchip_rk3399_defconfig

    注:执行到此处得重新在menuconfig中选择对应的选项并编译

    相关文章

      网友评论

          本文标题:RK3399 SDK添加nginx-rtmp-module模块

          本文链接:https://www.haomeiwen.com/subject/cchfmftx.html