Skip to main content

软件获取

1 开发环境

请最好使用Ubuntu,Deepin 64位系统。

注意:

(1)推荐在 X86_64 Ubuntu 16.04 或者X86_64 Ubuntu 20.04系统环境下进行开发,不要使用X86_64 Ubuntu 20.04以上的版本,以下操作以mint-20.3系统为例. 
danger

以下操作不要使用root账户,避免在编译时出现问题

2 授权开通

下载我们的开发资料需要我们开通授权以后才能下载,开通步骤:

2.1 生成SSH KEY

chenwy@ubuntu:~$ ssh-keygen 

输入ssh-keygen后,使用默认配置,一路回车直到完成即可

Generating public/private rsa key pair.

Enter file in which to save the key (/home/chenwy/.ssh/id_rsa):

Created directory '/home/chenwy/.ssh'.

Enter passphrase (empty for no passphrase):

Enter same passphrase again:

Your identification has been saved in /home/chenwy/.ssh/id_rsa.

Your public key has been saved in /home/chenwy/.ssh/id_rsa.pub.

The key fingerprint is:

0a:be:c9:55:e9:ec:59:57:ce:d8:14:e7:83:b4:a9:33 chenwy@ubuntu

The key's randomart image is:

+--[ RSA 2048]----+

| |

| |

| .. .|

| . . ++ |

| . S +o..|

| . . = .B .|

| . o o .Eo + |

| . + . o .o |

| + o |

+-----------------+


2.2 授权开通

将生成好的id_rsa.pub发送给我们,其所在位置:

ingenic@ingenic:~$ cd ~/.ssh
ingenic@ingenic:~/.ssh$ cat id_rsa.pub

3 SSH本地配置

3.1 配置用户config

ingenic@ingenic:~/.ssh$ cd ~/.ssh
ingenic@ingenic:~/.ssh$ vim config
ingenic@ingenic:~/.ssh$ sudo apt install vim //系统未安装vim先安装vim
ingenic@ingenic:~/.ssh$ vim config

在config中加入以下信息:(如果当前目录下没有config,则新建一个)

Host *

KexAlgorithms +diffie-hellman-group1-sha1

3.2 配置ssh_config

ingenic@ingenic:~$ sudo vim /etc/ssh/ssh_config

找到如下一行,将注释去掉:

#Ciphers aes128-cbc,aes192-cbc,aes256-cbc,aes128-ctr,aes192-ctr,aes256-ctr,3des-cbc,arcfour128,arcfour256,arcfour,blowfish-cbc,cast128-cbc

4 Git环境安装

4.1 安装Git及Gitk

ingenic@ingenic:~$ sudo apt install git
ingenic@ingenic:~$ sudo apt install gitk

按提示完成git安装

4.2 配置Git

请将双引号里的内容替换成你自己。

ingenic@ingenic:~$git config --global user.email "you@example.com"
ingenic@ingenic:~$git config --global user.name "Your Name"
tip

请等待我们开通权限后再进行下面的操作

5 代码下载

5.1 repo工具下载

ingenic@ingenic:~$ mkdir linux                                   //创建工程目录
ingenic@ingenic:~$ cd linux/
ingenic@ingenic:~/linux$ wget http://git.ingenic.com.cn:8082/bj/repo
ingenic@ingenic:~/linux$ chmod +x repo

5.2 代码同步

ingenic@ingenic:~/linux$./repo init -u ssh://sz_halley2@119.136.25.25:29418/mirror/linux/manifest
ingenic@ingenic:~/linux$./repo sync
tip

请直接复制代码,不要修改sz_halley2的用户名

5.3 代码目录介绍

代码目录介绍,工程目录

5.4 编译依赖环境

sudo apt install python2                        //编译需要python2.x的版本,python3.x的版本会报错
sudo ln -s /usr/bin/python2 /usr/bin/python

sudo apt-get install libc6-dev
sudo apt-get install g++
sudo apt-get install u-boot-tools
sudo apt-get install libncurses5-dev
sudo apt-get install libssl-dev

配置5.1的kernel需要添加环境变量

sudo apt install gedit
gedit ~/.bashrc

添加工程目录的工具链

export PATH=/home/ingenic/linux/tools/toolchains/mips-gcc720-glibc229/bin/:$PATH   // /home/ingenic/linux是前面自己创建的工程目录