rv1126rv1109开发环境搭建

rv1126rv1109开发环境搭建

本文采用知识共享署名 4.0 国际许可协议进行许可,转载时请注明原文链接,图片在使用时请保留全部内容,可适当缩放并在引用处附上图片所在的文章链接。

  • 开发环境搭建
    • 搭建编译环境
  • 编译
    • 编译问题
  • 部分buildroot 修改(非必要)
    • 修改HOSTNAME
    • 其他修改

开发环境搭建

FTP 下载 RV1126/RV1109 Linux SDK

搭建编译环境

sudo apt-get install repo git-core gitk git-gui gcc-arm-linux-gnueabihf \
u-boot-tools device-tree-compiler gcc-aarch64-linux-gnu mtools parted \
libudev-dev libusb-1.0-0-dev python-linaro-image-tools linaro-image-tools \
autoconf autotools-dev libsigsegv2 m4 intltool libdrm-dev curl sed make \
binutils build-essential gcc g++ bash patch gzip gawk bzip2 perl tar \
cpio python unzip rsync file bc wget libncurses5 libqt4-dev libglib2.0-dev \
libgtk2.0-dev libglade2-dev cvs git mercurial rsync openssh-client \
subversion asciidoc w3m dblatex graphviz python-matplotlib libc6:i386 \
libssl-dev expect fakeroot cmake flex bison liblz4-tool libtool keychain
sudo apt-get install lib32gcc-7-dev g++-7 libstdc++-7-dev

编译

编译问题

2021-03-08T14:35:37 --2021-03-08 14:35:37--  https://www.openssl.org/source/openssl-1.1.1h.tar.gz
2021-03-08T14:35:37 Connecting to 127.0.0.1:46635... failed: Connection refused.
2021-03-08T14:35:37 --2021-03-08 14:35:37--  http://sources.buildroot.net/openssl-1.1.1h.tar.gz
2021-03-08T14:35:37 Connecting to 127.0.0.1:46635... failed: Connection refused.
2021-03-08T14:35:37 package/pkg-generic.mk:166: recipe for target '/mnt/DG/DATA/Partners/Rockchip/rv1126/code/rv1126_rv1109_linux_201230/buildroot/output/rockchip_rv1126_rv1109_uvcc/build/host-libopenssl-1.1.1h/.stamp_downloaded' failed
2021-03-08T14:35:37 make[1]: *** [/mnt/DG/DATA/Partners/Rockchip/rv1126/code/rv1126_rv1109_linux_201230/buildroot/output/rockchip_rv1126_rv1109_uvcc/build/host-libopenssl-1.1.1h/.stamp_downloaded] Error 1
2021-03-08T14:35:37 /mnt/DG/DATA/Partners/Rockchip/rv1126/code/rv1126_rv1109_linux_201230/buildroot/output/rockchip_rv1126_rv1109_uvcc/Makefile:16: recipe for target '_all' failed
2021-03-08T14:35:37 make: *** [_all] Error 2
Command exited with non-zero status 1
you take 29:55.47 to build builroot
ERROR: Running build_buildroot failed!
ERROR: exit code 1 from line 348:
    /usr/bin/time -f "you take %E to build builroot" $COMMON_DIR/mk-buildroot.sh $BOARD_CONFIG
zyh@zyh rv1126_rv1109_linux_201230 $ cat /etc/profile

这里是代理问题的锅

$ env|grep -I proxy

http_proxy=http://127.0.0.1:8118
ftp_proxy=http://127.0.0.1:8118
https_proxy=http://127.0.0.1:8118

我们需要把/etc/profile中的代理注释掉在进行 以下操作

unset http_proxy
unset ftp_proxy
unset https_proxy

重新编译

部分buildroot 修改(非必要)

修改HOSTNAME

device/rockchip/rv1126_rv1109/BoardConfig-uvcc.mk

# Kernel defconfig
export RK_KERNEL_DEFCONFIG=rv1126_defconfig
# Kernel defconfig fragment
export RK_KERNEL_DEFCONFIG_FRAGMENT=
# EMMC EVB BOARD Kernel dts
export RK_KERNEL_DTS=rv1126-evb-ddr3-v13
# Logic/npu/vepu merge emmc board kernel dts
#export RK_KERNEL_DTS=rv1126-ai-cam-ddr3-v1
# NPU 800m+ logic separate from npu/vepu emmc board kernel dts
#export RK_KERNEL_DTS=rv1126-ai-cam-plus
# boot image type
export RK_BOOT_IMG=zboot.img
# kernel image path
export RK_KERNEL_IMG=kernel/arch/arm/boot/zImage
# parameter for GPT table
export RK_PARAMETER=parameter-buildroot-fit.txt
# Buildroot config
export RK_CFG_BUILDROOT=rockchip_rv1126_rv1109_uvcc

其他修改

kernel/arch/arm/configs/rv1126_defconfig

zyh@zyh kernel (default) $ git diff arch/arm/configs/rv1126_defconfig
diff --git a/arch/arm/configs/rv1126_defconfig b/arch/arm/configs/rv1126_defconfig
old mode 100644
new mode 100755
index e70409b5a527..78f0aef08ac0
--- a/arch/arm/configs/rv1126_defconfig
+++ b/arch/arm/configs/rv1126_defconfig
@@ -211,6 +211,10 @@ CONFIG_MEDIA_SUPPORT=y
 CONFIG_MEDIA_CAMERA_SUPPORT=y
 CONFIG_MEDIA_CONTROLLER=y
 CONFIG_VIDEO_V4L2_SUBDEV_API=y
+CONFIG_MEDIA_USB_SUPPORT=y
+CONFIG_USB_VIDEO_CLASS=y
+CONFIG_USB_VIDEO_CLASS_INPUT_EVDEV=y
+CONFIG_USB_GSPCA=m
 CONFIG_V4L_PLATFORM_DRIVERS=y
 CONFIG_VIDEO_ROCKCHIP_CIF=y
 CONFIG_VIDEO_ROCKCHIP_ISP=y

buildroot/configs/rockchip/rv1126_rv1109_arm.config

zyh@zyh rockchip (default) $ git diff rv1126_rv1109_arm.config
diff --git a/configs/rockchip/rv1126_rv1109_arm.config b/configs/rockchip/rv1126_rv1109_arm.config
old mode 100644
new mode 100755
index 640c11c663..20ea5f1084
--- a/configs/rockchip/rv1126_rv1109_arm.config
+++ b/configs/rockchip/rv1126_rv1109_arm.config
@@ -2,7 +2,7 @@
 #include "gcc8.config"
 BR2_TARGET_GENERIC_GETTY_PORT="ttyFIQ0"
 BR2_TARGET_GENERIC_GETTY_BAUDRATE_1500000=y
-BR2_TARGET_GENERIC_HOSTNAME="RV1126_RV1109"
+BR2_TARGET_GENERIC_HOSTNAME="DeepGlint"
 BR2_TARGET_GENERIC_ISSUE="Welcome to RV1126_RV1109 Buildroot"
 BR2_PACKAGE_RV1126_RV1109=y
 BR2_ROOTFS_OVERLAY="board/rockchip/rv1126_rv1109/fs-overlay/"

你可能感兴趣的:(#,RV1126,开发笔记,linux)