公司最近评估T527,使用的是盈鹏飞嵌入式的T527开发板-AHD-X527,该开发板支持4路AHD摄像头输入,也可以支持6路,不过需要增加一个转换板。恰好符合我们的应用。以下操作都是在该开发板上操作,该产品介绍如下:
AHD-X527产品特性:
- 采用Allwinner公司Cortex-A55八核A527/T527处理器,运行最高速度为2.0GHZ(T527最高1.8GHZ);
- 支持Mali-G57 MC1 GPU,支持OpenGL ES 3.2/2.0/1.0, Valkan 1.1,OpenCL 2.0
- 支持4K/25fps H.264视频编码,支持4K/15fps MJPEG编码;
- 多格式4K/60fps视频解码 (H.265,H.264,VC-1, MPEG-1/2/4, VP8) ;
- 支持双屏异显;支持HDMI 2.0B, 分辨率最高4K@60fps;支持LVDS,分辨率最高1920x1080@60fps;支持MIPI DSI,分辨率最高2.5K@60fps(与LVDS复用);
- 支持1-4G Bytes LPDDR4X SDRAM;
- 支持EMMC 8G-64G大容量电子盘,可启动;
- 支持1路USB 3.0;支持3路USB2.0 HOST和一路OTG(TYPE-C接口);
- 支持2路I2C(其中一路支持掉电唤醒)、2路PWM(应用于背光);
- 支持双路千兆以太网;
- 支持3G/4G通信;
- 支持2路UART(TTL)、支持1路RS485、支持双路CAN BUS(2.0B,仅T527支持);
- 支持MIPI CSI - 2*4-lane/4*2-lane/ 4+2*2-lane;
- 操作系统的支持,可预装Android13/LINUX 5.15/Ubuntu 22.04;
- 尺寸为146X119MM
AHD-X527产品功能:

Linux系统镜像编译与生成
2.1、配置编译选项
在LinuxSDK根目录下,执行如下命令,进行编译环境配置。配置完后,根据提示可以使用快捷键命令进行目录切换。
Host# source ./build/envsetup.sh
ping@embfly-server:~/work/a527_t527/TinaLinux$ source build/envsetup.sh
NOTE: The SDK(/home/ping/work/a527_t527/TinaLinux) was successfully loaded
load buildroot,dragonboard,bsp...ok
Invoke . build/quick.sh from your shell to add the following functions to your environment:
croot / cl - Changes directory to the top of the tree
cbrandy - Changes directory to the brandy
cspl / cboot0 - Changes directory to the spl
csbi[10|14] / copensbi[10|14] - Changes directory to the opensbi
cu / cuboot / cboot - Changes directory to the uboot
cubsp / cubootbsp / cbootbsp - Changes directory to the uboot-bsp
carisc - Changes directory to the arisc
ck / ckernel - Changes directory to the kernel
cbsp - Changes directory to the bsp
cbsptest - Changes directory to the bsptest
cdts - Changes directory to the kernel's dts
cchip / cchips - Changes directory to the chip
cbin - Changes directory to the chip's bin
cboard / cconfigs / cbd - Changes directory to the board
crootfs - Changes directory to the rootfs
cdsp - Changes directory to the dsp
crtos - Changes directory to the rtos
crtoshal / crtos-hal - Changes directory to the rtos-hal
cbuild - Changes directory to the build
cbr - Changes directory to the buildroot
copenssl - Changes directory to the product's openssl-1.0.0
cout - Changes directory to the product's output
ckout / ckernelout - Changes directory to the kernel output
Usage: build.sh [args]
build.sh - default build all
build.sh bootloader - only build bootloader
build.sh kernel - only build kernel
build.sh buildroot_rootfs - only build buildroot
build.sh uboot_menuconfig - edit uboot menuconfig
build.sh uboot_saveconfig - save uboot menuconfig
build.sh menuconfig - edit kernel menuconfig
build.sh saveconfig - save kernel menuconfig
build.sh recovery_menuconfig - edit recovery menuconfig
build.sh recovery_saveconfig - save recovery menuconfig
build.sh buildroot_menuconfig - edit buildroot menuconfig
build.sh buildroot_saveconfig - save buildroot menuconfig
build.sh clean - clean all
build.sh distclean - distclean all
build.sh pack - pack firmware
build.sh pack_debug - pack firmware with debug info output to card0
build.sh pack_secure - pack firmware with secureboot
Usage: pack [args]
pack - pack firmware
pack -d - pack firmware with debug info output to card0
pack -s - pack firmware with secureboot
pack -sd - pack firmware with secureboot and debug info output to card0
ping@embfly-server:~/work/a527_t527/TinaLinux$
执行如下命令,配置内核平台、文件系统类型、芯片型号等信息。当./build.sh config完成之后,编译系统会生成一个方案的编译规则,其保存在在longan根目录中的.buildconfig文件里面,系统会按照该文件的编译规则进行系统编译。
Host#./build.sh config
ping@embfly-server:~/work/a527_t527/TinaLinux$ ./build.sh config
========ACTION List: mk_config ;========
options :
All available platform:
0. android
1. linux
Choice [linux]: 1
All available linux_dev:
0. bsp
1. dragonboard
2. buildroot
3. debian
Choice [buildroot]: 2
All available ic:
0. a523
1. a527
2. t527
Choice [t527]: 2
All available board:
0. ahd_t527
1. demo_linux_aiot
2. demo_linux_aiot_nand
3. demo_linux_aiot_spinand
Choice [ahd_t527]: 0
All available flash:
0. default
1. nor
Choice [default]: 0
All available kern_name:
0. linux-5.10
1. linux-5.15
Choice [linux-5.15]: 1
Setup BSP files
INFO: kernel relative recovery defconfig: ../../../../../device/config/chips/t527/configs/ahd_t527/linux-5.15/bsp_recovery_defconfig
INFO: kernel absolute recovery defconfig: /home/ping/work/a527_t527/TinaLinux/device/config/chips/t527/configs/ahd_t527/linux-5.15/bsp_recovery_defconfig
INFO: Prepare toolchain ...
INFO: kernel defconfig: generate /home/ping/work/a527_t527/TinaLinux/out/t527/kernel/build/.config by /home/ping/work/a527_t527/TinaLinux/device/config/chips/t527/configs/ahd_t527/linux-5.15/bsp_defconfig
INFO: Prepare toolchain ...
make: Entering directory '/home/ping/work/a527_t527/TinaLinux/kernel/linux-5.15'
make[1]: Entering directory '/home/ping/work/a527_t527/TinaLinux/out/t527/kernel/build'
GEN Makefile
*** Default configuration is based on '../../../../../device/config/chips/t527/configs/ahd_t527/linux-5.15/bsp_defconfig'
#
# No change to .config
#
make[1]: Leaving directory '/home/ping/work/a527_t527/TinaLinux/out/t527/kernel/build'
make: Leaving directory '/home/ping/work/a527_t527/TinaLinux/kernel/linux-5.15'
make: Entering directory '/home/ping/work/a527_t527/TinaLinux/buildroot/buildroot-202205'
GEN /home/ping/work/a527_t527/TinaLinux/out/t527/ahd_t527/buildroot/buildroot/Makefile
Config.in.legacy:232:warning: choice value used outside its choice group
#
# configuration written to /home/ping/work/a527_t527/TinaLinux/out/t527/ahd_t527/buildroot/buildroot/.config
#
make: Leaving directory '/home/ping/work/a527_t527/TinaLinux/buildroot/buildroot-202205'
INFO: buildroot defconfig is sun55iw3p1_aiot_t527_defconfig
INFO: clean buildserver
INFO: prepare_buildserver
备注(1):
All available linux_dev:
0. bsp
1. dragonboard
2. buildroot
3. debian
Choice [buildroot]: 2
本处是选择根文件系统,可以选择使用debian根文件系统,也可以使用buildroot的根文件系统,还可以选择dragonboard根文件系统(测试主板用的根文件系统)。因为我们是要使用buildroot的根文件系统,因此选择2;
备注(2):
All available ic:
0. a523
1. a527
2. t527
Choice [t527]: 2
本处是处理器,A527和T527是PIN TO PIN兼容的,如果您的产品是基于A527处理器的,那么请选择A527;
备注(3):
All available board:
0. ahd_t527
1. demo_linux_aiot
2. demo_linux_aiot_nand
3. demo_linux_aiot_spinand
这个步骤是选择您的板型,例如我司的板型是AHD_T527(基于T527的板子)。选择了板型,也就选择了板型对应的相关配置文件,例如dts文件等。ahd_t527的相关配置文件目录在
<SDK>/device/config/chips/t527/configs/ahd_t527,该目录的内容如下:
ping@embfly-server:~/work/x527_aiot_v14/TinaLinux/device/config/chips/t527/configs/ahd_t527$ tree -L 1
.
├── arisc.config
├── bin
├── BoardConfig_c906.mk
├── BoardConfig.mk
├── board.dts -> linux-5.15/board.dts
├── boottone.fex
├── buildroot
├── debian
├── dragonboard
├── dtbo
├── linux-5.10
├── linux-5.15
├── sys_config_ddr_2GB.fex
├── sys_config.fex
└── uboot-board.dts
备注(4):
如过程中出现提示"Python:python: command not found",表示系统没有找到Python,参考如下步骤解决:
1. 检查是否安装了Python:
Host# python --version
如果没有安装,可以执行如下命令进行安装Python(推荐安装Python3)。
Host# sudo apt update
Host# sudo apt install python3 -y
2. 执行如下命令,创建一个符号链接使系统将python指向python3。
Host# sudo ln -s /usr/bin/python3 /usr/bin/python
备注(5):
配置完成后,在<SDK>根目录下会生成一个.buildconfig文件,该文件保存了本次配置的参数。这些配置参数包括内核的编译配置文件、bootloader的编译配置文件、还有buildroot的配置参数(如选择buildroot根文件系统)等,可以通过核对该文件的内容保证配置的正确。例如:以下的配置指定了处理器器是a527,见LICHEE_IC=a527;指定的板型是ahd_a527,见LICHEE_BOARD=ahd_a527;指定了buildroot的编译配置是sun55iw3p1_aiot_a527_defconfig,见LICHEE_BR_DEFCONF=
sun55iw3p1_aiot_a527_defconfig;指定了u-boot的编译配置是buildroot的编译配置是sun55iw3p1_a527_axp717b_defconfig ,见
LICHEE_BRANDY_DEFCONF=sun55iw3p1_a527_axp717b_defconfig
export LICHEE_PLATFORM=linux
export LICHEE_LINUX_DEV=buildroot
export LICHEE_IC=a527
export LICHEE_BOARD=ahd_a527
export LICHEE_FLASH=default
export LICHEE_KERN_NAME=linux-5.15
export LICHEE_KERNEL_ARCH=arm64
export LICHEE_ARCH=arm64
export LICHEE_KERN_VER=linux-5.15
export LICHEE_KERNEL_VERSION=5.15.147
export LICHEE_KERN_DEFCONF=bsp_defconfig
export LICHEE_KERN_DEFCONF_RT=
export LICHEE_BUILDING_SYSTEM=buildroot
export LICHEE_BR_VER=202205
export LICHEE_BR_DEFCONF=sun55iw3p1_aiot_a527_d

1384

被折叠的 条评论
为什么被折叠?



