• 正文
    • docker安装
    • Tina SDK编译
    • 拿出文件
  • 相关推荐
申请入驻 产业图谱

Docker搭建D1 BSP SDK Tina系统开发环境及编译系统镜像

02/19 07:26 来源:嵌入式加油站
958
加入交流群
扫码加入
获取工程师必备礼包
参与热点资讯讨论

【平头哥Sipeed LicheeRV 86开发板试用】Docker搭建 D1 BSP SDK Tina系统开发环境,用的是官方Docker+ubuntu20物理机

准备

  • LicheeRV 86 Panel
  • 数据线
  • 具有32GB以上剩余空间的Linux系统PC一台

docker安装

命令如下:

sudo apt-get install docker.io

sudo docker pull ubuntu

安装完成后,使用docker images 或 docker image ls杳看是ubuntu的镜像。

sun@sun-ubuntu:~/licheepiRV$ sudo docker image ls

REPOSITORY            TAG       IMAGE ID       CREATED           SIZE

ubuntu                latest    2b4cba85892a   7 days ago           72.8MB

Docker镜像获取

为了方便用户自行开发,矽速整理发布了 LicheeRV 的bsp开发docker镜像,大家使用该镜像可以快速开始D1的系统级开发。

docker镜像可以从百度网盘下载:

链接:https://pan.baidu.com/s/1QJTaDw6kkTM4c_GAlmG0hg

提取码:wbef

在网盘中下载对应的docker文件后,下了一周,10G多,这个方法不可取,

解压到tar文件(我用开始在ubuntu里命令,全解压的,后面发现dockor没有导入目录的命令)在windows用7z半解压成tar包,docker才能导入,命令:

docker importdocker import licheerv_d1_compile.tar licheerv_d1_compile:latest

注不要用官方的docker importdocker import licheerv_d1_compile.tar licheerv_d1_compile:lastest,  不合规

查看镜像

sun@sun-ubuntu:~/licheepiRV$ sudo docker image ls

REPOSITORY            TAG       IMAGE ID       CREATED              SIZE

licheerv_d1_compile   latest   536eae684749   About a minute ago   16.1GB

ubuntu                latest    2b4cba85892a   7 days ago           72.8MB

我这样运行,不用密码,是root

sudo docker run -it ubuntu-docker /bin/bash

传文件加-v 挂载本地目录

官方都这样说:然后即可run该容器,用户名为nihao,密码为sipeed123, 一般用户看了也不会用.也没说方法怎么运行的用这个用户密码

建议用这个方法,应该会快(可以开始不知道,开始就看md的文档,说下载,我就下载了)直接从dockerhub拉取:

docker pull zepan/d1compile

Tina SDK编译

Docker导入的镜像里有源码,编译器及依赖编译前先把

SDKtargetallwinnerd1-nazhedefconfig

(3590行)#CONFIG_PACKAGE_alsa-plugins=y 关闭

然后依次运行

cd ~/sdk/tina-d1-open_new/

source build/envsetup.sh

lunch   #选1

make -j4(#按实际核数编译,我第1次未通过,后加参数)

出错信息:

........

 

make[1]: *** [tools/Makefile:133:

/home/nihao/sdk/tina-d1-open_new/out/d1-nezha/staging_dir/target/stamp/.tools_install_yyyynyyynyyyyyyynnnyyyyyyyyyyynnyyyyyyyynyyynyyyyy]

Error 2

 

............

用下面命令才编译通过的,依据提示:

make j4 FORCE_UNSAFE_CONFIGURE=1

编译花费了,很长时间,我的还是物理机,具体多久,不知道,编译后,我不没管它,很久才看它有没编译。

打包

编译完会,打包pack:

 

 

root@fe6633ddc2b8:/home/nihao/sdk/tina-d1-open_new# pack
--==========--
......PACK_TOPDIR /home/nihao/sdk/tina-d1-open_new
--==========--
No kernel param, parse it from d1
copying tools file
copying configs file
storage_type value is 5
rm /home/nihao/sdk/tina-d1-open_new/out/d1-nezha/image/sys_partition_nor.fex
..........
make user resource for : /home/nihao/sdk/tina-d1-open_new/out/d1-nezha/image/sys_partition.fex
handle partition user-res
no user resource partitions
APP_PART_DOWNLOAD_FILE = /home/nihao/sdk/tina-d1-open_new/out/d1-nezha/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
this is not a partition key
gpt_head->header_crc32 = 0xf45be3b4
GPT----part num 8---
gpt_entry: 128
gpt_header: 92
GPT:boot-resource: 1f8 2177
GPT:env : 2178 236f
GPT:env-redund : 2370 2567
GPT:boot : 2568 761f
GPT:dsp0 : 7620 7a0f
GPT:recovery : 7a10 e84f
GPT:rootfs : e850 100e84f
GPT:UDISK : 100e850 100e85f
update gpt file ok
update mbr file ok
====================================
show "sys_partition_for_dragon.fex" message
------------------------------------
[mbr]
mbr_size : 252 Kbyte
------------------------------------
partition_name : boot-resource
partition_size : 8064
downloadfile : boot-resource.fex
boot-resource.fex size : 718K byte
------------------------------------
partition_name : env
partition_size : 504
downloadfile : env.fex
env.fex size : 128K byte
------------------------------------
partition_name : env-redund
partition_size : 504
downloadfile : env.fex
env.fex size : 128K byte
------------------------------------
partition_name : boot
partition_size : 20664
downloadfile : boot.fex
boot.fex -> /home/nihao/sdk/tina-d1-open_new/out/d1-nezha/boot.img
boot.img size : 9.3M byte
------------------------------------
partition_name : dsp0
partition_size : 1008
downloadfile : dsp0.fex
dsp0.fex size : 258K byte
------------------------------------
partition_name : recovery
partition_size : 28224
------------------------------------
partition_name : rootfs
partition_size : 0x1000000
downloadfile : rootfs.fex
rootfs.fex -> /home/nihao/sdk/tina-d1-open_new/out/d1-nezha/rootfs.img
rootfs.img size : 100M byte
------------------------------------
partition_name : UDISK
------------------------------------
/home/nihao/sdk/tina-d1-open_new/out/host/bin/
/home/nihao/sdk/tina-d1-open_new/out/d1-nezha/image
Begin Parse sys_partion.fex
Add partion boot-resource.fex BOOT-RESOURCE_FEX
Add partion very boot-resource.fex BOOT-RESOURCE_FEX
FilePath: boot-resource.fex
FileLength=b3800Add partion env.fex ENV_FEX000000000
Add partion very env.fex ENV_FEX000000000
FilePath: env.fex
FileLength=20000Add partion env.fex ENV_FEX000000000
Add partion very env.fex ENV_FEX000000000
FilePath: env.fex
FileLength=20000Add partion boot.fex BOOT_FEX00000000
Add partion very boot.fex BOOT_FEX00000000
FilePath: boot.fex
FileLength=94c800Add partion dsp0.fex DSP0_FEX00000000
Add partion very dsp0.fex DSP0_FEX00000000
FilePath: dsp0.fex
FileLength=4059cAdd partion rootfs.fex ROOTFS_FEX000000
Add partion very rootfs.fex ROOTFS_FEX000000
FilePath: rootfs.fex
FileLength=6400000sys_config.fex Len: 0x4ec3
config.fex Len: 0x6c00
board.fex Len: 0x400
split_xxxx.fex Len: 0x200
sys_partition.fex Len: 0xc2b
sunxi.fex Len: 0xd600
boot0_nand.fex Len: 0x10000
boot0_sdcard.fex Len: 0x10000
u-boot.fex Len: 0xa0000
u-boot-crash.fex Len: 0x25
toc1.fex Len: 0x8
toc0.fex Len: 0x8
fes1.fex Len: 0xa560
boot_package.fex Len: 0xc0000
usbtool.fex Len: 0x24e00
usbtool_crash.fex Len: 0x1ec00
aultools.fex Len: 0x28a73
aultls32.fex Len: 0x25205
cardtool.fex Len: 0x11e00
cardscript.fex Len: 0x6de
sunxi_gpt.fex Len: 0x2000
sunxi_mbr.fex Len: 0x10000
dlinfo.fex Len: 0x4000
arisc.fex Len: 0xf
vmlinux.fex Len: 0x8
tinaconf.fex Len: 0xe18e
boot-resource.fex Len: 0xb3800
Vboot-resource.fex Len: 0x4
env.fex Len: 0x20000
Venv.fex Len: 0x4
env.fex Len: 0x20000
Venv.fex Len: 0x4
boot.fex Len: 0x94c800
Vboot.fex Len: 0x4
dsp0.fex Len: 0x4059c
Vdsp0.fex Len: 0x4
rootfs.fex Len: 0x6400000
Vrootfs.fex Len: 0x4
BuildImg 0
Dragon execute image.cfg SUCCESS !
----------image is for nand/emmc----------
----------image is at----------

/home/nihao/sdk/tina-d1-open_new/out/d1-nezha/tina_d1-nezha_uart0.img

pack finish

拿出文件

开始文档拿不出来,第二次用-v

sudo docker run -itv /home/tina:/home/tina licheerv-d1_compile /bin/bash

查看是否挂载成功:

root@4ba9051a0ab9:/# ls /home/tina/camera tinyhttpd-0.1.0 wav2c

yeah,成功了,

进SDK目录发现,原来编译的东西没的了,(请教大神,可以有方法让编译文件,保存下来吗?)

root@4ba9051a0ab9:/home/nihao/sdk/tina-d1-open_new# ls

1.txt Makefile device myfiles package

scripts tmpConfig.in build dl

myfiles_default prebuilt target toolchain

LicheeRV_data config lichee myfiles_waft rules.mk test.sh tools

所以在docker 编译后,马上拿出来

再次编译一下吧

这样就能把编译出来的文件, 烧录到开发板。

点赞
收藏
评论
分享
加入交流群
举报

相关推荐

登录即可解锁
  • 海量技术文章
  • 设计资源下载
  • 产业链客户资源
  • 写文章/发需求
立即登录