从Gitee / GitCode上获取Astra SDK源码并编译
从 Gitee 开源平台下载 Astra SDK
安装 repo 工具
可参考深蕾半导体开发者网站指导链接: 安装 repo 工具
使用 repo 工具拉取代码
1# 初始化
2repo init -u https://gitee.com/senarytech-opensource/astra-manifest.git -m astra_1.4.0.xml -b v1.4.0 --repo-url=https://gitee.com/oschina/repo.git --no-repo-verify
3
4# 下载代码到本地
5repo sync --no-tags -c --no-clone-bundle --force-sync

下载 downloads.tar
和 sstate-cache.tar
压缩包
外部客户可通过新建例如名为 script.sh
的脚本,通过FTP下载。
1 # script.sh脚本内容如下
2sftp -oHostkeyAlgorithms=+ssh-dss -oKexAlgorithms=diffie-hellman-group1-sha1,diffie-hellman-group14-sha1 yocto_build_mirror@sftp.senarytech.com <<EOF
3cd yocto_3.0/
4get downloads.tar
5get sstate-cache.tar
6exit
7EOF
会让输入 password: 26df9rQZ
;文件较大。

downloads.tar
和 sstate-cache.tar
压缩包下载完成后,放到和 meta-qt5
、 syna-release
等同级目录下并解压。

修改 */meta-synaptics/
目录下某些文件
① 修改 */meta-synaptics/conf/layer.conf
文件

1include syna-sources-git.conf 修改为 include syna-sources-local.conf
该部分实际代表 */syna-release/
目录下的内容是否已经存在或者需要从 github 上下载,
由于我们已经从 Gitee 上下载了该部分,本地已经存在,故修改为后者。
② 修改 */meta-synaptics/setup/conf/local.conf.sample
文件文件


1# Yocto Project download Mirror
2#
3# Specifies additional paths from which the OpenEmbedded build system gets source code
4#
5
6PREMIRRORS:prepend = "\
7 git://.*/.* https://gitee.com/mirrors/ \
8 ftp://.*/.* https://gitee.com/mirrors/ \
9 http://.*/.* https://gitee.com/mirrors/ \
10 https://.*/.* https://gitee.com/mirrors/ "
11
12#
③ 修改 */meta-synaptics/recipes-devtools/syna_connectivity/
目录内容
将 broadcom-4070e7161f2f1a1a22027a744eb868500688f0b6.tar.gz
压缩包添加到
*/meta-synaptics/recipes-devtools/syna_connectivity/brcm-patchram-plus
目录下

使用新的 brcm-patchram-plus_git.bb
脚本替换

这里可以下载 brcm-patchram-plus_git.bb
脚本和 broadcom-4070e7161f2f1a1a22027a744eb868500688f0b6.tar.gz
压缩包:
从 GitCode 开源平台下载 Astra SDK
从 GitCode 开源平台下载 astra v1.4.0 sdk
和从 Gitee 开源平台上下载类似;只在 “ 使用 repo 工具拉取代码 “ 章节存在差异。
使用 repo 工具拉取代码
1# 初始化
2repo init -u https://gitcode.com/astra_sdk/astra_manifest.git --depth=1 -m astra_1.4.0.xml -b v1.4.0 --repo-url=https://gitcode.com/gh_mirrors/gitre/git-repo.git --no-repo-verify
3
4# 下载代码到本地
5repo sync --no-tags -c --no-clone-bundle --force-sync
备注
使用 repo 工具从 GitCode 平台拉取 astra sdk 代码时,repo init
时需要指定 --depth=1
,
含义为:只保留最近的 commit 版本,否则会因为 */syna-release/
目录下的 linux_5_15-main
仓库项目过大拉取不成功。

Astra SDK 代码编译
安装 docker 工具
可参考深蕾半导体开发者网站指导链接: 安装 docker
启动 docker
在下载的 astra v1.4.0 sdk
第一级目录下执行下面指令运行 docker
1docker run --rm -it -v $(pwd):$(pwd) ghcr.io/synaptics-astra/crops:1.0.0 --workdir=$(pwd)

配置编译环境
1source meta-synaptics/setup/setup-environment


执行编译指令
1bitbake astra-media
以编译 sl1620
机器镜像为例,最终生成的镜像文件为 */build-sl1620/tmp/deploy/images/sl1620/SYNAIMG