Tina-SDK开发
开发环境搭建
获取TinaSDK源码
Tina-SDKV2.0源码网盘链接:https://pan.baidu.com/s/13uKlqDXImmMl9cgKc41tZg?pwd=qcw7
D1s-CVBS开发板扩展补丁:https://github.com/DongshanPI/D1s-CVBS_TinaSDK
上传到ubuntu,创建文件夹用来保存源码:
ubuntu@ubuntu1804:~$ mkdir Tina_SDK
ubuntu@ubuntu1804:~$ cd Tina_SDK/
ubuntu@ubuntu1804:~/Tina_SDK$ tree -L 1
.
├── tina-d1-h.tar.bz2.00
├── tina-d1-h.tar.bz2.01
├── tina-d1-h.tar.bz2.02
├── tina-d1-h.tar.bz2.03
├── tina-d1-h.tar.bz2.04
├── tina-d1-h.tar.bz2.05
├── tina-d1-h.tar.bz2.06
├── tina-d1-h.tar.bz2.07
└── tina-d1-h.tar.bz2.08
0 directories, 9 files
查看所有文件MD5校验值:
ubuntu@ubuntu1804:~/Tina_SDK$ md5sum tina-d1-h.tar.bz2.*
e755bae00cd76afc3fb276b4e3fd86ba tina-d1-h.tar.bz2.00
cb60ecfdb51c624ff3cbd7b24552866f tina-d1-h.tar.bz2.01
54e56a4cf1cef46ca0a94b85ea1d33a1 tina-d1-h.tar.bz2.02
4988fa08827c0f7af2dc170145e24b26 tina-d1-h.tar.bz2.03
a0463bcf8e73db27b5ecafaac593a919 tina-d1-h.tar.bz2.04
a87382ca16a8c12b3a94f1cad99ce77e tina-d1-h.tar.bz2.05
5973530baa3b282108351818641c27fd tina-d1-h.tar.bz2.06
ccd63e1d16534b364a101d2d44416261 tina-d1-h.tar.bz2.07
e0d72713565f4424ea43c07e15a38139 tina-d1-h.tar.bz2.08
确保校验值对上。否则需要重新上传。
解压源码:
ubuntu@ubuntu1804:~/Tina_SDK$ cat tina-d1-h.tar.bz2.* | tar -jxv
等待一段时间,即可解压完成。
ubuntu@ubuntu1804:~/Tina_SDK$ tree -L 1
.
├── tina-d1-h
├── tina-d1-h.tar.bz2.00
├── tina-d1-h.tar.bz2.01
├── tina-d1-h.tar.bz2.02
├── tina-d1-h.tar.bz2.03
├── tina-d1-h.tar.bz2.04
├── tina-d1-h.tar.bz2.05
├── tina-d1-h.tar.bz2.06
├── tina-d1-h.tar.bz2.07
└── tina-d1-h.tar.bz2.08
1 directory, 9 files
ubuntu@ubuntu1804:~/Tina_SDK$ mv tina-d1-h ../
获取扩展支持仓库,然后加以应用:
ubuntu@ubuntu1804:~$ git clone https://github.com/DongshanPI/D1s-CVBS_TinaSDK.git
ubuntu@ubuntu1804:~$ cd D1s-CVBS_TinaSDK
ubuntu@ubuntu1804:~/D1s-CVBS_TinaSDK$ git submodule update --init
ubuntu@ubuntu1804:~/D1s-CVBS_TinaSDK$ cp ./* -rfvd ~/tina-d1-h
编译固件之前,先安装一些依赖,否则编译会报错:
sudo apt-get install build-essential subversion git libncurses5-dev zlib1g-dev gawk flex quilt libssl-dev xsltproc libxml-parser-perl mercurial bzr ecj cvs unzip lib32z1 lib32z1-dev lib32stdc++6 libstdc++6 libc6:i386 libstdc++6:i386 lib32ncurses5 lib32z1 -y
编译出固件
进入源码目录,执行source build/envsetup.sh
、lunch
之后,选择3
:
ubuntu@ubuntu1804:~/tina-d1-h$ source build/envsetup.sh
Setup env done! Please run lunch next.
ubuntu@ubuntu1804:~/tina-d1-h$ lunch
You're building on Linux
Lunch menu... pick a combo:
1. d1-h_nezha_min-tina
2. d1-h_nezha-tina
3. d1s_cvbs-tina
4. d1s_nezha-tina
5. t113_100ask_devkit-tina
6. t113_100ask-tina
Which would you like? [Default t113_100ask_devkit]: 3
============================================
TINA_BUILD_TOP=/home/ubuntu/tina-d1-h
TINA_TARGET_ARCH=riscv
TARGET_PRODUCT=d1s_cvbs
TARGET_PLATFORM=d1s
TARGET_BOARD=d1s-cvbs
TARGET_PLAN=cvbs
TARGET_BUILD_VARIANT=tina
TARGET_BUILD_TYPE=release
TARGET_KERNEL_VERSION=5.4
TARGET_UBOOT=u-boot-2018
TARGET_CHIP=sun20iw1p1
============================================
clean buildserver
[1] 121700
ubuntu@ubuntu1804:~/tina-d1-h$
接着make
编译、pack
打包:
ubuntu@ubuntu1804:~/tina-d1-h$ make
...
make[5]: Leaving directory '/home/ubuntu/tina-d1-h/target/allwinner/generic/image'
make[4]: Leaving directory '/home/ubuntu/tina-d1-h/target/allwinner/d1s-cvbs'
make[3]: Leaving directory '/home/ubuntu/tina-d1-h/target/allwinner'
make[2]: Leaving directory '/home/ubuntu/tina-d1-h'
export MAKEFLAGS= ;make -w -r package/index
make[2]: Entering directory '/home/ubuntu/tina-d1-h'
Generating package index...
Signing key has not been configured
make[2]: Leaving directory '/home/ubuntu/tina-d1-h'
make[1]: Leaving directory '/home/ubuntu/tina-d1-h'
[2]+ Done $T/tools/build/buildserver --path $T 2> /dev/null 1>&2
#### make completed successfully (26:53 (mm:ss)) ####
ubuntu@ubuntu1804:~/tina-d1-h$ pack
--==========--
PACK_CHIP sun20iw1p1
PACK_PLATFORM tina
PACK_BOARD d1s-cvbs
PACK_KERN
PACK_DEBUG uart3
PACK_SIG none
PACK_SECURE none
PACK_MODE normal
PACK_FUNC android
PACK_PROGRAMMER none
PACK_TAR_IMAGE none
PACK_TOPDIR /home/ubuntu/tina-d1-h
--==========--
No kernel param, parse it from d1s
copying tools file
copying configs file
storage_type value is 5
rm /home/ubuntu/tina-d1-h/out/d1s-cvbs/image/sys_partition_nor.fex
rm /home/ubuntu/tina-d1-h/out/d1s-cvbs/image/image_nor.cfg
copying boot resource
LZMA 4.65 : Igor Pavlov : Public domain : 2009-02-03
copying boot file
make user resource for : /home/ubuntu/tina-d1-h/out/d1s-cvbs/image/sys_partition.fex
handle partition user-res
no user resource partitions
APP_PART_DOWNLOAD_FILE = /home/ubuntu/tina-d1-h/out/d1s-cvbs/image/app.fex
Need size of filesystem
no data resource partitions
don't build dtbo ...
update_chip
pack boot package
GetPrivateProfileSection read to end
content_count=3
LICHEE_REDUNDANT_ENV_SIZE config in BoardConfig.mk
--mkenvimage create redundant env data!--
---redundant env data size 0x20000---
packing for tina linux
normal
mbr count = 4
partitation file Path=/home/ubuntu/tina-d1-h/out/d1s-cvbs/image/sys_partition.bin
mbr_name file Path=/home/ubuntu/tina-d1-h/out/d1s-cvbs/image/sunxi_mbr.fex
download_name file Path=/home/ubuntu/tina-d1-h/out/d1s-cvbs/image/dlinfo.fex
mbr size = 16384
mbr magic softw411
disk name=boot-resource
disk name=env
disk name=env-redund
disk name=boot
disk name=rootfs
disk name=recovery
disk name=rootfs_data
this is not a partition key
update_for_part_info 0
crc 0 = 8b52d09e
crc 1 = 1eef81c3
crc 2 = 7b597465
crc 3 = eee42538
gpt_head->header_crc32 = 0x33ca0f56
GPT----part num 8---
gpt_entry: 128
gpt_header: 92
GPT:boot-resource: 12000 121f7
GPT:env : 121f8 123ef
GPT:env-redund : 123f0 125e7
GPT:boot : 125e8 175e7
GPT:rootfs : 175e8 233e7
GPT:recovery : 233e8 28b67
GPT:rootfs_data : 28b68 2b367
GPT:UDISK : 2b368 ffffffde
update gpt file ok
update mbr file ok
temp = 20
mbr count = 4 total_sectors = 15269888 logic_offset = 40960
partitation file Path=/home/ubuntu/tina-d1-h/out/d1s-cvbs/image/sys_partition.bin
mbr_name file Path=/home/ubuntu/tina-d1-h/out/d1s-cvbs/image/sunxi_mbr.fex
download_name file Path=/home/ubuntu/tina-d1-h/out/d1s-cvbs/image/dlinfo.fex
mbr size = 16384
mbr magic softw411
disk name=boot-resource
disk name=env
disk name=env-redund
disk name=boot
disk name=rootfs
disk name=recovery
disk name=rootfs_data
this is not a partition key
update_for_part_info 0
crc 0 = 8b52d09e
crc 1 = 1eef81c3
crc 2 = 7b597465
crc 3 = eee42538
gpt_head->header_crc32 = 0xa9cea6c4
GPT----part num 8---
gpt_entry: 128
gpt_header: 92
GPT:boot-resource: 12000 121f7
GPT:env : 121f8 123ef
GPT:env-redund : 123f0 125e7
GPT:boot : 125e8 175e7