2. Development Environment

2.1. current

thiscopyfiledescriptionLinuxDevelopment Environment. LinuxDevelopment Environmentset upU-boot, Linux Kernel, Root File System(rootfs)andinkernelandRoot File Systemburning, andcreatenetworkDevelopment Environmentandboot Linux development.

This document helps users quickly set up a Linux environment and port their applications to the Linux operating system.

2.2. How to Build the Kernel

  • To build the SDK in the Ubuntu environment on the host, install the following tools.

请参阅CV184X SDK 编译使用手册 – Chapter 2 建构CVITEK软件编译环境
  • Set the environment variables (using cv1842hp_wevb_0014a_spinor as an example).

$ source build/envsetup_soc.sh
 -------------------------------------------------------------------------------------------------------
   Usage:
   (1) menuconfig - Use menu to configure your board.
       ex: $ menuconfig

   (2) defconfig $CHIP_ARCH - List EVB boards($BOARD) by CHIP_ARCH.
      ** cv184x ** -> ['cv184x', 'cv1841c', 'cv1842cp', 'cv1842hp', 'cv1843hp']
       ex: $ defconfig cv184x

  (3) defconfig $BOARD - Choose EVB board settings.
       ex: $ defconfig cv1842hp_wevb_0014a_spinor
       ex: $ defconfig cv1842cp_wevb_0015a_spinand
  • Select EVB cv1842hp_wevb_0014a_spinor.

$ defconfig cv1842hp_wevb_0014a_spinor
====== Environment Variables =======
PROJECT: cv1842hp_wevb_0014a_spinor, DDR_CFG=ddr3_2133_x16
CHIP_ARCH: CV184X, DEBUG=0
SDK VERSION: musl_arm, RPC=0
ATF options: ATF_KEY_SEL=default, BL32=1
Linux source folder:linux_5.10, Uboot source folder: u-boot-2021.10
ENABLE_DUAL_OS: y
CROSS_COMPILE_PREFIX: arm-none-linux-musleabihf-
ENABLE_BOOTLOGO: 0
Flash layout xml: build/boards/cv184x/cv1842hp_wevb_0014a_spinor/partition/partition_spinor.xml
Sensor tuning bin: cvsens_cv2003
Output path: install/soc_cv1842hp_wevb_0014a_spinor
  • Build the Linux kernel.

$ build_kernel
 Run build_kernel() function
 ......
 [TARGET] kernel-dts
 ......
 [TARGET] kernel-build
 ......
  • Generate the programming files boot.{spinor, spinand, emmc}.

$ ls install/soc_cv1842hp_wevb_0014a_spinor/boot.spinor
 install/soc_cv1842hp_wevb_0014a_spinor/boot.spinor