rv1126 sdk 适配 正点原子1126开发板

这里使用sdk为v3.0.1,是官方evb板子的。

uboot 和 kernel

  • 增加u-boot/configs/rv1126_atk_defconfig配置,使用默认配置
    拷贝u-boot/configs/rv1126_defconfig即可。
    uboot可以不修改,想要学习uboot,请参考正点原子 imx6ull 相关资料。

修改kernel

  • 在 kernel/arch/arm/boot/dts 下增加正点原子的设备树:

      rv1126-alientek.dts
      rv1126-alientek.dtsi
    
    • 可以从正点原子的sdk中拷贝过来,需要确认电源域,否则有烧毁板子风险。

       请再次确认板级的电源域配置!!!!!!
       <<< 特别是Wi-Fi,FLASH,以太网这几路IO电源的配置 >>> !!!!!
       检查内核文件 kernel/arch/arm/boot/dts/rv1126-atk.dts 的节点 [pmu_io_domains] 
      
      
      pmuio0-supply 
      regulator-min-microvolt =  1800mV
      regulator-max-microvolt =  1800mV
      
      
      pmuio1-supply 
      regulator-min-microvolt =  3300mV
      regulator-max-microvolt =  3300mV
      
      
      vccio2-supply 
      regulator-min-microvolt =  1800mV
      regulator-max-microvolt =  3300mV
      
      
      vccio3-supply 
      regulator-min-microvolt =  1800mV
      regulator-max-microvolt =  1800mV
      
      
      vccio4-supply 
      regulator-min-microvolt =  1800mV
      regulator-max-microvolt =  1800mV
      
      
      vccio6-supply 
      regulator-min-microvolt =  1800mV
      regulator-max-microvolt =  1800mV
      
      
      vccio7-supply 
      regulator-min-microvolt =  1800mV
      regulator-max-microvolt =  1800mV
      Running build_kernel succeeded.
      
  • 摄像头驱动: kernel/drivers/media/i2c/imx335.c
    如若新增,则在kernel/drivers/media/i2c/Makefile 增加

      obj-$(CONFIG_VIDEO_IMX335)	+= imx335.o
    
  • 增加kernel/arch/arm/configs/rv1126_atk_defconfig文件,用默认配置,拷贝u-boot/configs/rv1126_defconfig即可;自定义配置则按需增删。可以kernel/arch/arm/configs/rv1126_defconfig选择imx335 sersor,如下:
    在这里插入图片描述

    • rv1126_atk_defconfig增加内核驱动(按需,这里为本人项目用到的)
      CONFIG_CAN=y
      CONFIG_CAN_FLEXCAN=y
      CONFIG_CAN_8DEV_USB=y
      CONFIG_CAN_EMS_USB=y
      CONFIG_CAN_ESD_USB2=y
      CONFIG_CAN_GS_USB=y
      CONFIG_CAN_KVASER_USB=y
      CONFIG_CAN_MCBA_USB=y
      CONFIG_CAN_PEAK_USB=y
      CONFIG_CAN_UCAN=y
      CONFIG_USB_SERIAL=y
      CONFIG_USB_SERIAL_CH341=y
      CONFIG_USB_SERIAL_PL2303=y

buildroot

增加fs-overlay-sysv-atk

  • 将buildroot/board/rockchip/rv1126_rv1109/fs-overlay-sysv拷贝,并添加为buildroot/board/rockchip/rv1126_rv1109/fs-overlay-sysv-atk
    可以在这增加自启动设置,增加静态的脚本S42ipaddr,
    buildroot/board/rockchip/rv1126_rv1109/fs-overlay-sysv-atk/etc/init.d/S42ipaddr
    #!/bin/sh
    
    IPADDR=192.168.0.116
    GWADDR=192.168.0.1
    
    case "$1" in
        start)
            ifconfig eth0 $IPADDR
            echo "ifconfig eth0 $IPADDR"     
            route add default gw $GWADDR 
            echo "ifconfig eth0 $IPADDR"  
            ;;
        stop)
            echo "stop"    
            ;;
        restart|reload)
            $0 stop
            $0 start
            ;;
        *)
            echo "Usage: -bash {start|stop}"
            exit 1
            ;;
    esac
    exit 0
    

增加rockchip_rv1126_rv1109_atk_defconfig

增加buildroot/configs/rockchip_rv1126_rv1109_atk_defconfig配置文件;该配置有
ssh、ntp、usbutils、rkmedia、canutils、spdlog等功能

#include "base/base.config"
#include "chips/rv1126_rv1109_arm.config"
#include "multimedia/audio.config"
#include "multimedia/camera.config"
#include "multimedia/mpp.config"
#include "locale/chinese.config"
#include "locale/locale.config"
#include "debug.config"
#include "update_engine.config"
# BR2_PACKAGE_CAMERA_ENGINE is reset to default
BR2_PACKAGE_CAMERA_ENGINE_RKAIQ_IQFILE="imx415_YT10092_IR0147-60IRC-8M-F20-hdr3.xml imx335_MTV4-IR-E-P_40IRC-4MP-F16.xml"
BR2_PACKAGE_CAMERA_ENGINE_RKAIQ_RKISP_DEMO=y
BR2_PACKAGE_CAN_UTILS=y
BR2_PACKAGE_COMMON_ALGORITHM_RKAPPLUS=y
BR2_PACKAGE_DRM_DISPLAY_OUTPUT=y
BR2_PACKAGE_DROPBEAR=y
# BR2_PACKAGE_EUDEV_ENABLE_HWDB is not set
BR2_PACKAGE_FONT_AWESOME=y
BR2_PACKAGE_GHOSTSCRIPT_FONTS=y
BR2_PACKAGE_INCONSOLATA=y
BR2_PACKAGE_IPCWEB_BACKEND=y
BR2_PACKAGE_IPCWEB_BACKEND_USE_RKIPC=y
BR2_PACKAGE_IPROUTE2=y
BR2_PACKAGE_JSON_C=y
# BR2_PACKAGE_LIBMAD is reset to default
BR2_PACKAGE_LIBSOCKETCAN=y
# BR2_PACKAGE_MINIGUI_SOFTWARE_SCALE is not set
BR2_PACKAGE_NGINX=y
BR2_PACKAGE_NGINX_DEBUG=y
BR2_PACKAGE_NGINX_HTTP_FLV_LIVE=y
BR2_PACKAGE_NGINX_HTTP_FLV_MODULE=y
BR2_PACKAGE_NGINX_HTTP_SSL_MODULE=y
BR2_PACKAGE_NTP=y
# BR2_PACKAGE_NTP_NTPD is not set
BR2_PACKAGE_NTP_NTPDATE=y
BR2_PACKAGE_OEM=y
BR2_PACKAGE_OEM_PACKAGES="rkipc rkmedia ipcweb-backend"
BR2_PACKAGE_OPENCV4=y
# BR2_PACKAGE_PM_UTILS is reset to default
BR2_PACKAGE_QT5=y
BR2_PACKAGE_RKADK=y
BR2_PACKAGE_RKIPC=y
BR2_PACKAGE_RKIPC_RV1126=y
BR2_PACKAGE_RKMEDIA_ALSA=y
BR2_PACKAGE_RKMEDIA_ALSA_CAPTURE=y
BR2_PACKAGE_RKMEDIA_ALSA_PLAYBACK=y
BR2_PACKAGE_RKMEDIA_AUDIO_ALGORITHM=y
BR2_PACKAGE_RKMEDIA_AUDIO_ALGORITHM_PLUS=y
BR2_PACKAGE_RKMEDIA_AUDIO_CODEC=y
BR2_PACKAGE_RKMEDIA_AUDIO_DECODER=y
BR2_PACKAGE_RKMEDIA_AUDIO_ENCODER=y
BR2_PACKAGE_RKMEDIA_EXAMPLES=y
BR2_PACKAGE_RKMEDIA_LIVE555=y
BR2_PACKAGE_RKMEDIA_MINI=y
BR2_PACKAGE_RKMEDIA_MOVE_DETECTION=y
BR2_PACKAGE_RKMEDIA_MPP=y
BR2_PACKAGE_RKMEDIA_OCCLUSION_DETECTION=y
BR2_PACKAGE_RKMEDIA_RKIEP=y
BR2_PACKAGE_RKMEDIA_RKNN=y
BR2_PACKAGE_RKMEDIA_RKRGA=y
BR2_PACKAGE_RKMEDIA_ROCKFACE=y
BR2_PACKAGE_RKMEDIA_ROCKX=y
BR2_PACKAGE_RKMEDIA_RTSP_SERVER=y
BR2_PACKAGE_RKMEDIA_RTSP_SERVER_H264=y
BR2_PACKAGE_RKMEDIA_RTSP_SERVER_H265=y
BR2_PACKAGE_RKMEDIA_SOCKET=y
BR2_PACKAGE_RKMEDIA_USE_AIQ=y
BR2_PACKAGE_RKMEDIA_V4L2_CAPTURE=y
# BR2_PACKAGE_ROCKCHIP_MPP is reset to default
# BR2_PACKAGE_ROCKCHIP_MPP_ALLOCATOR_DRM is reset to default
# BR2_PACKAGE_ROCKCHIP_RGA is reset to default
BR2_PACKAGE_ROCKX_PERSON_DETECTION=y
BR2_PACKAGE_USBUTILS=y
BR2_PACKAGE_VENDOR_STORAGE_LIBRARY=y
BR2_ROOTFS_OVERLAY+="board/rockchip/rv1126_rv1109/fs-overlay-sysv-atk/"
BR2_TARGET_GENERIC_HOSTNAME="atk"
BR2_TARGET_GENERIC_ISSUE="Welcome to atk Buildroot"
BR2_TARGET_GENERIC_ROOT_PASSWD="root"

增加自定义包:使用rkmedia接口

参考以下链接以及官方例程rkmedia
https://gitee.com/wu_yumin/demo_h264_rkmedia

device/rockchip

device/rockchip/rv1126_rv1109/rockchip_atk_defconfig修改如下:

RK_BUILDROOT_BASE_CFG="rv1126_rv1109_atk"
RK_ROOTFS_TYPE="ext4"

RK_UBOOT_CFG="rv1126_atk"
RK_UBOOT_OPTS="--spl-new"

RK_KERNEL_DTS_NAME="rv1126-alientek"
RK_KERNEL_CFG="rv1126_atk_defconfig"
RK_RECOVERY_BASE_CFG="rv1126_rv1109_atk"
RK_USE_FIT_IMG=y
RK_PARAMETER="parameter-buildroot-ext.txt"

RK_EXTRA_PARTITION_NUM=3
RK_EXTRA_PARTITION_1=y
RK_EXTRA_PARTITION_2=y
RK_EXTRA_PARTITION_3=y
#
# Extra partition 3
#
RK_EXTRA_PARTITION_3_DEV="ext"
RK_EXTRA_PARTITION_1_SRC="empty"
RK_EXTRA_PARTITION_3_SRC="ctd"

增加device/rockchip/rv1126_rv1109/parameter-buildroot-ext.txt

FIRMWARE_VER: 8.1
MACHINE_MODEL: RV1126
MACHINE_ID: 007
MANUFACTURER: RV1126
MAGIC: 0x5041524B
ATAG: 0x00200800
MACHINE: 0xffffffff
CHECK_MASK: 0x80
PWR_HLD: 0,0,A,0,1
TYPE: GPT
CMDLINE: mtdparts=rk29xxnand:0x00002000@0x00004000(uboot),0x00002000@0x00006000(misc),0x00010000@0x00008000(boot),0x00014000@0x00018000(recovery),0x00010000@0x0002C000(backup),0x00400000@0x0003C000(rootfs),0x00060000@0x0043C000(oem),0x00200000@0x0049C000(userdata),0x00200000@0x0069C000(media),-@0x0089C000(ext:grow)
uuid:rootfs=614e0000-0000-4b53-8000-1d28000054a9

app

app 以及 其他应用根据实际情况修改即可。

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值