rv1126分布编译说明

分步编译

rv1126中的SDK ,比较重要编译脚本 build.sh envsetup.sh

./build.sh -h 查看帮助信息

rv1126分布编译说明_第1张图片

./build.sh lunch 选择对应的开发板信息,编译前首先要做的,已经帮我们配置好了uboot,kernel配置信息。

./build.sh info 查看开发板配置环境的信息。

./build.sh uboot 单独编译u-boot

./build.sh kernel

./build.sh rootfs

./build.sh modules 单独编译kernel模块

./build.sh all 全部编译

./build.sh app/ 编译第三方APP

1、配置开发板信息,./buiild.sh lunch 选择21 ,我现在手里用的是1126-38 NAND 256M版本

rv1126分布编译说明_第2张图片

BoardConfig-zhao-spi-nand.mk配置文件,我是拷贝[BoardConfig-38x38-spi-nand.mk],如果要自己建新的配置文件,在device/rockchip/rv1126_rv1109/ 创建,注意一点,文件名的前缀要BoardConfig-。

rv1126分布编译说明_第3张图片

BoardConfig-zhao-spi-nand.mk 文件内容:

 #!/bin/bash
# Target chip
export RK_CHIP=RV1126
# Target arch
export RK_ARCH=arm
# Uboot defconfig
export RK_UBOOT_DEFCONFIG=rv1126  #将uboot的配置信息 选为 u-boot/configs/rv1126_defconfig 会追加_defconfig 
# Uboot defconfig fragment, config rk-sfc.config if sdcard upgrade
export RK_UBOOT_DEFCONFIG_FRAGMENT=rk-sfc.config
# Uboot update loader (spl)
export RK_LOADER_UPDATE_SPL=true
# Uboot image format type: fit(flattened image tree)
export RK_UBOOT_FORMAT_TYPE=fit
# Kernel defconfig
export RK_KERNEL_DEFCONFIG=rv1126_defconfig  #将kernel 的配置信息选为kernel/arch/arm/configs/rv1126_defconfig
# Kernel defconfig fragment
export RK_KERNEL_DEFCONFIG_FRAGMENT=
# Kernel dts
export RK_KERNEL_DTS=rv1126-zhao-38-v10-spi-nand #设备树 
# 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-fit-nand-256M.txt   # 每个分区在flash烧写的位置
# Buildroot config
export RK_CFG_BUILDROOT=rockchip_rv1126_rv1109_spi_nand  #buildroot
# Recovery config
export RK_CFG_RECOVERY=rockchip_rv1126_rv1109_spi_nand_recovery
# Recovery image format type: fit(flattened image tree)
export RK_RECOVERY_FIT_ITS=boot4recovery.its
# ramboot config
export RK_CFG_RAMBOOT=
# Pcba config
export RK_CFG_PCBA=
# Build jobs
export RK_JOBS=12
# target chip
export RK_TARGET_PRODUCT=rv1126_rv1109
# Set rootfs type, including ext2 ext4 squashfs ubi
export RK_ROOTFS_TYPE=ubi                      #文件系统格式
# rootfs image path
export RK_ROOTFS_IMG=rockdev/rootfs.${RK_ROOTFS_TYPE}
# Set ramboot image type
export RK_RAMBOOT_TYPE=
# Set oem partition type, including ext2 squashfs
export RK_OEM_FS_TYPE=ubi
# Set userdata partition type, including ext2, fat
export RK_USERDATA_FS_TYPE=ubi
#OEM config
export RK_OEM_DIR=oem_ipc
# OEM build on buildroot
export RK_OEM_BUILDIN_BUILDROOT=YES
#userdata config, if not define this, system will format by RK_USERDATA_FS_TYPE
export RK_USERDATA_DIR=
#
# Set ubifs page size, 2048(2KB) or 4096(4KB)
# Option.
# export RK_UBI_PAGE_SIZE=2048
#
# Set ubifs block size, 0x20000(128KB) or 0x40000(256KB)
# Option.
# export RK_UBI_BLOCK_SIZE=0x20000
#
# Set userdata partition size (byte) if define RK_USERDATA_DIR
# MUST, if userdata partition is grow partition.
# export RK_USERDATA_PARTITION_SIZE=0x02760000
#
# Set oem partition size (byte)
# Option. if not set, it will get from parameter auto.
# export RK_OEM_PARTITION_SIZE=0x6400000
#
#misc image
export RK_MISC=blank-misc.img
#choose enable distro module
export RK_DISTRO_MODULE=
# Define pre-build script for this board
export RK_BOARD_PRE_BUILD_SCRIPT=app-build.sh
# Define package-file for update.img
export RK_PACKAGE_FILE=rv1126-package-file-spi-nand

envsetup.sh 用来配置buildroot

配置文件在buildroot下的configs文件

rv1126分布编译说明_第4张图片

需要自定义配置文件可以在buildroot/configs目录添加。

你可能感兴趣的:(RV1126,java,开发语言)