📁
notes
  • 目录
  • 嵌入式学习路线
  • Linux驱动开发
    • 字符设备驱动开发
    • Linux驱动开发
  • 安卓底层开发
    • 硬件抽象层
      • 安卓硬件驱动
      • 安卓硬件抽象层模块
      • 安卓硬件访问服务
      • 安卓应用
    • 智能指针
    • Logger日志系统
      • Logger日志
      • Logger写接口
      • Logcat
    • binder
      • binder
  • 操作系统
    • 操作系统的运行机制
    • 进程
  • linux一句话
    • 与网络无关的Linux
  • Linux内核0.12
    • 微型计算机组成结构
  • QT
    • 第一个QT
  • ubuntu
    • Linux使用
    • 使用notebook
    • 使用vscode
    • 使用ubuntu
    • Linux运行时格式
    • 配置samba进行win和Linux文件访问
  • shell
    • 自动打包
    • shell 概述
    • 变量
    • 条件测试
    • 控制
  • C
    • 第一条Linux_c输出
  • GTK
    • GTK入门
    • 控制件
    • 事件
    • Glade使用
  • sqlite
    • 数据库概述
    • SQL基础
    • SQLite的C编程
    • SQL语句进阶
  • web
    • CGI通用网关接口
  • 物联网
    • 物联网概述
    • 射频识别技术RFID
  • MySQL
    • MySQL的配置
  • 其他
    • Typora图床
Powered by GitBook
On this page
  • 安装ubuntu
  • 换源
  • ubuntu设置语言
  • 下载 NFS 服务
  • 下载SSH服务
  • 下载 vim 编辑软件
  • 下载 网络工具
  • window10 下 操作
  • 通过xshell6进行连接
  • 搭建 文件传输
  • 下载交叉编译
  • 添加交叉编译器
  • 添加 qemu
  • 安装KVM
  • 添加 git 工具

Was this helpful?

  1. ubuntu

使用ubuntu

Previous使用vscodeNextLinux运行时格式

Last updated 4 years ago

Was this helpful?

Nnpxmj.png

安装ubuntu

ubuntu的镜像 :

进入 vmware

点击 创建

浏览 找到 系统镜像文件, 我把它放在了 vmware文件下

设置好信息 , 记住好密码 每次开机都要输入

解压在那 设置好位置, 我设在 vmware 下创建了一个文件下

默认即可

默认即可

正在安装中, 时间比较久, 准备好咖啡 , 谈谈心

输入设置好的密码

换源

进来的第一件事就是换源, 我准备换 阿里源 , 点击那个9点

点 server for united states

点击 other 其他

找到 china

输入密码

点 X 就可以了

点 关闭 close

打开终端

进行更新源

sudo apt-get update

ubuntu设置语言

点 manage installed languages 在进入 language support 点击 install

点击 install/remove languages 里面找到 chinese

勾选 点击 apply

正在下载语言 , 喝口82年咖啡 , 等待

下翻, 找到中国 用鼠标拖到最前面

点击 apply system-wide

点击 中国 然后 点 apply system-wide , 关闭即可

进入终端 重启

sudo reboot

重新进入系统 , 建议保留旧名

下载 NFS 服务

sudo apt-get update
sudo apt-get install nfs-kernel-server rpcbind

下载SSH服务

sudo apt-get install openssh-server

下载 vim 编辑软件

sudo apt-get install vim

设置 vim 参数

sudo vim /etc/vim/vimrc
" 行号
set number
" 高亮
syntax on
" 底部显示
set showmode
" 编码
set encoding=utf-8
" 鼠标
set mouse=a
" tab = 4
set tabstop=4

下载 网络工具

sudo apt install net-tools

查看本机ip

ifconfig

window10 下 操作

通过xshell6进行连接

软件可自行 google , 这个软件收费, 具体收不收费, 看你的大显神通了 , 点到为止

点击文件 , 点击新建

设置名字, 把查到的 ip 填在 主机

点击 用户身份验证

输入ubuntu 的用户名

密码

点击连接

成功就会出现这个弹窗, 点击 接受并保存

搭建 文件传输

点击 绿色 图标

点击取消, 就可以自动弹出

查看 命令解释

help

介绍常用的命令

把 本地数据 上传到 虚拟机

put

把 虚拟机的数据 下载到 本地

get

​

下载交叉编译

我把它下载到了本地桌面上了

打印本地位置

lpwd

切换本地目录

lcd

打印 虚拟机 文件

ls

切换虚拟机目录

cd cpucode/tools/

打印 虚拟机 文件

ls

把本地的 交叉编译器文件 上传到 虚拟机

put gcc-linaro-7.5.0-2019.12-x86_64_arm-linux-gnueabihf.tar.xz

查看文件

ls

添加交叉编译器

创建目录: /usr/local/arm

sudo mkdir /usr/local/arm

把交叉编译器复制到/usr/local/arm 中

sudo cp gcc-linaro-7.5.0-2019.12-x86_64_arm-linux-gnueabihf.tar.xz /usr/local/arm/ -f

进入到 /usr/local/arm 目录

cd /usr/local/arm/

对交叉编译工具进行解压

sudo tar -vxf gcc-linaro-7.5.0-2019.12-x86_64_arm-linux-gnueabihf.tar.xz

查看交叉编译器的路径

cd gcc-linaro-7.5.0-2019.12-x86_64_arm-linux-gnueabihf/bin/
pwd

修改环境变量,使用 VIM 打开/etc/profile 文件

sudo vim /etc/profile

添加交叉编译的路径 :

export PATH=$PATH:/usr/local/arm/gcc-linaro-7.5.0-2019.12-x86_64_arm-linux-gnueabihf/bin

下载需要的库:

sudo apt-get install lsb-core lib32stdc++6

重启

sudo reboot

查看交叉编译器

arm-linux-gnueabihf-gcc -v

测试交叉编译器

写 test.c 程序

vim test.c
arm-linux-gnueabihf-gcc test.c

查看文件属性

file a.out

添加 qemu

安装KVM

安装kvm加速qemu运行,在终端下执行如下命令:

更新源 :

sudo apt-get update

安装 kvm :

sudo apt-get install qemu qemu-kvm libvirt-bin bridge-utils virt-manager

添加 git 工具

添加 韦东山老师的 qemu 的软件

git  clone  https://e.coding.net/weidongshan/ubuntu-18.04_imx6ul_qemu_system.git

然后等待, 继续喝一口82年咖啡

可以看看使用教程qemu的

./install_sdl.sh
./qemu-imx6ull-gui.sh
root
  • @Author: cpu_code

  • @Date: 2020-07-29 21:15:11

  • @LastEditTime: 2020-07-30 16:52:19

  • @FilePath: \notes\ubuntu\use_ubuntu.md

image-20200730164412170
image-20200730164453553

image-20200730164733336
image-20200730141335265
image-20200730141419907
image-20200730141530945
image-20200730141618328
image-20200730141658591
image-20200730141719673
image-20200730141159390
image-20200730141815631
image-20200730141958236
image-20200730142123770
image-20200730142257136
image-20200730142359620
image-20200730142432286
image-20200730142459685
image-20200730142537825
image-20200730142621049
image-20200730142709783
image-20200730143040751
image-20200730143200178
image-20200730143217832
image-20200730100557569
image-20200730143451380
image-20200730143604074
image-20200730143643401
image-20200730143803567
image-20200730143903210
image-20200730101401834
image-20200730101500815
image-20200730102008031
image-20200730104338664
image-20200730104411362
image-20200730160626629
image-20200730160707963
image-20200730161120046
image-20200730160817133
image-20200730160837784
image-20200730160903922
image-20200730161328042
image-20200730161353569
image-20200730161448097
image-20200730161524257

image-20200730163112883
image-20200730161823031
image-20200730161929285
image-20200730162747864
image-20200730102135075
image-20200730102427600
image-20200730102410909
image-20200730102551073
image-20200730102713949
image-20200730102809714
image-20200730104447743
image-20200730104257384
image-20200730160235343
image-20200730145352905
image-20200730145446613

image-20200730145812647
image-20200730150843317
image-20200730151021668

@Gitee:

@Github:

@CSDN:

@Gitbook:

http://mirrors.aliyun.com/ubuntu-releases/
https://www.vmware.com/products/workstation-player/workstation-player-evaluation.html
https://releases.linaro.org/components/toolchain/binaries/latest-7/arm-linux-gnueabihf/
http://wiki.100ask.org/Qemu
https://gitee.com/cpu_code
https://github.com/CPU-Code
https://blog.csdn.net/qq_44226094
https://923992029.gitbook.io/cpucode/