当前位置:网站首页>D1-H 开发板——哪吒 开发入门
D1-H 开发板——哪吒 开发入门
2022-07-23 22:29:00 【InfoQ】
背景简介
repo2 Tina Linux 系统介绍


3 开发入门
3.1 源码下载
3.1.1 全志客户服务平台官网:
全志客户服务平台
注册。
- 上传公钥
- 安装 repo 引导脚本
- 下载代码
3.1.2 上传公钥
ssh-keygen~/.ssh/
- 公钥和私钥文件一定要保存好,不能删除。最好备份这两个文件,误删除时可恢复。
- 客户下载代码时,如果命令行前面加了
sudo,那么生成公钥的命令 ssh-keygen 前 面也要加 sudo(也就是要么都加 sudo,要么都不加,必须保持一致)。
3.1.3 安装 repo 引导脚本
- 从全志服务器下载安装 repo 引导脚本,将 username 替换成客户下载账号的用户名
$ git clone ssh://[email protected]/git_repo/repo.git- 修改
repo/repo 文件中下面一行,将 username 替换成客户下载账号的用户名
REPO_URL='ssh://[email protected]/git_repo/repo.git'- 把 repo 引导脚本添加到自己计算机环境变量中
$ cp repo/repo /usr/bin/repo$ chmod 777 /usr/bin/repo3.1.4 代码下载
$ mkdir tina-d1-h$ cd tina-d1-h$ python2.7 /usr/bin/repo init -u ssh://<username>@sdk.allwinnertech.com/git_repo/D1_Tina_Open/manifest.git -b master -m tina-d1-h.xml$ python2.7 /usr/bin/repo sync$ python2.7 /usr/bin/repo start product-smartx-d1-h-tina-stable-v2.0 --all # 全部下载完成之后,创建分支3.2 编译环境配置
$ sudo apt-get update$ sudo apt-get install build-essential subversion git-core 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 -y$ sudo apt-get install libc6-i386 libstdc++6-i386-cross lib32ncurses6 lib32z1 -y3.3 编译和烧写
3.3.1 编译
source build/envsetup.shlunch d1_nezha-tinamake -j32packsource build/envsetup.sh :获取环境变量
lunch d1_nezha-tina 选择 d1_nezha-tina 方案,也可以不加参数直接 lunch,这样会有选项可以选择,其中 lunch d1_nezha-tina 是 d1_nezha-tina 的标准方案,lunch d1_nezha_min-tina 是只能让系统跑起来的最小系统方案。
make -j32 :编译,其中 -j 后面的数字参数为编译用的线程数,可根据开发者编译用的 PC 实际情况选择。
pack : 打包,将编译好的固件打包成一个 .img 格式的固件,固件路径 /out/d1_nezha-tina/tina_d1-nezha_uart0.img。
3.3.2 烧写

3.4 开发板硬件简介


3.5 编译第一个程序:Hello World
hello_world.c#include <stdio.h>int main(int argc, char const *argv[]){ printf("Hello NeZha\n"); return 0;}./prebuilt/gcc/linux-x86/riscv/toolchain-thead-glibc/riscv64-glibc-gcc-thead_20200702/bin/riscv64-unknown-linux-gnu-gcc -o hello_world hello_world.c- ADB 工具
- nfs 挂载文件系统
- 使用 SD 卡挂载
$ adb push hello_world ./
3.6 USB 摄像头拍照 Demo


4 参考文档
- D1-H 芯片介绍
- D1_SDK_Howto
- ADB Download - Get the latest version of ADB and fastboot
边栏推荐
- Leetcode high frequency question 62. different paths: how many paths does the robot have from the upper left corner to the lower right corner? Pure probability permutation and combination problem, not
- Introduction to I2C Principle & Application of esp32
- Mqtt connection, subscription and publishing can be realized without mqtt C library
- Yuanqi Digitalization: existing mode or open source innovation Lixia action
- Cookies and sessions
- Explain NAT technology in detail
- Introduction to database system fifth edition after class exercises - Chapter 1 Introduction
- 年化收益率6%的理财产品
- STM32单片机使用ADC功能驱动手指检测心跳模块
- 小说里的编程 【连载之十六】元宇宙里月亮弯弯
猜你喜欢

What are the product life cycle, common project functions, and information flow

Cookies and sessions

Matlab小波工具箱导入信号出错(doesn‘t contain one dimensional Singal)

Introduction to I2C Principle & Application of esp32

experimental design

达梦数据库tools包中的工具(操作达梦数据库)

Stm32+esp8266+mqtt protocol connects Alibaba cloud Internet of things platform

王学岗视频编码————MediaCodec编解码

ADB 命令结合 monkey 的简单使用,超详细

STM32单片机使用ADC功能驱动手指检测心跳模块
随机推荐
El upload realizes the preview of uploaded files
[hiflow] Tencent cloud's new generation of automation assistant, which I used to complete the enterprise epidemic prompt (no code)
如何在 pyqt 中实现桌面歌词
【golang学习笔记】并发基础
Programming in the novel [serial 16] the moon bends in the yuan universe
性能测试知识应用于实战
El select drop-down box multi selection remote search anti display
海外资深玩家的投资建议(3) 2021-05-04
The ultimate experiment of OSPF -- learn the example of OSPF century template
软件测试工作内容太简单怎么办?
Taoying collects goods in batches. How to save the babies that have not been uploaded and then import them later
Pulsar open source message queue_ Understand pulsar --- pulsar work notes 001
How can I open an account to buy financial products with a 6% income?
U++ events
QT set cache and compile output path
$, $*, [email protected], $$ Understand the meaning of 0
Investment suggestions for overseas senior players (3) 2021-05-04
年化收益率6%的理财产品
【golang学习笔记】包(package)的使用
疯狂的牛市,下半场何去何从?2021-04-30