rv1126分布编译说明

分步编译

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

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

./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版本

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

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文件

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

  • 2
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

小昭dedug

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值