Skip to content

Commit d550a6b

Browse files
committed
imx6ull
1 parent 4cb8afc commit d550a6b

File tree

13 files changed

+193
-0
lines changed

13 files changed

+193
-0
lines changed

_posts/2020-12-24-imx6ull.md

Lines changed: 193 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,193 @@
1+
---
2+
layout: post
3+
title: "LinuxLab 真板开发:IMX6ULL 上手指南"
4+
author: iosdevlog
5+
date: 2020-12-24 17:39:17 +0800
6+
description: ""
7+
cover-img: /assets/images/LinuxLab/IMX6ULL/0.png
8+
category:
9+
tags: [LinuxLab, IMX6ULL]
10+
---
11+
12+
## 原厂开机画面
13+
14+
![0.png](/assets/images/LinuxLab/IMX6ULL/0.png)
15+
16+
[[野火]i.MX Linux开发实战指南 - [野火]i.MX Linux开发实战指南 文档](/assets/images/LinuxLab/IMX6ULL/http://doc.embedfire.com/linux/imx6/base/zh/latest)
17+
18+
![1.png](/assets/images/LinuxLab/IMX6ULL/1.png)
19+
20+
## 用户
21+
22+
```bash
23+
# root
24+
username: root
25+
password: root
26+
27+
# normal
28+
username: debian
29+
password: temppwd
30+
```
31+
32+
## 串口
33+
34+
[2. 运行开发板与串口终端登录 - [野火]i.MX Linux开发实战指南 文档](/assets/images/LinuxLab/IMX6ULL/http://doc.embedfire.com/linux/imx6/base/zh/latest/linux_basis/board_startup.html)
35+
36+
[](/assets/images/LinuxLab/IMX6ULL/)
37+
38+
## SSH
39+
40+
```bash
41+
ifconfig | grep 192
42+
# inet 192.168.1.146 netmask 255.255.255.0 broadcast 192.168.1.255
43+
# inet 192.168.7.2 netmask 255.255.255.252 broadcast 192.168.7.3
44+
# TX packets 904 bytes 197373 (192.7 KiB)
45+
fire-config # enable ssh
46+
sudo apt install avahi-daemon # npi hostname
47+
```
48+
49+
Client
50+
51+
MobaXterm SSH
52+
53+
[](/assets/images/LinuxLab/IMX6ULL/https://mobaxterm.mobatek.net/download-home-edition.html)
54+
55+
![2.png](/assets/images/LinuxLab/IMX6ULL/2.png)
56+
57+
```bash
58+
# ip address
59+
ssh debian@192.168.0.xxx
60+
# npi hostname
61+
ssh debian@npi
62+
```
63+
64+
## 刷新镜像
65+
66+
[9. 烧录Debian镜像至SD卡 - [野火]i.MX Linux开发实战指南 文档](/assets/images/LinuxLab/IMX6ULL/http://doc.embedfire.com/linux/imx6/base/zh/latest/install_image/install_debian_to_sd.html#debiansd)
67+
68+
选择 “预览版”。
69+
70+
SD 卡启动后有一个 Linux Logo。
71+
72+
![S.jpg](/assets/images/LinuxLab/IMX6ULL/S.jpg)
73+
74+
usb 口能虚拟个 u盘、串口、网卡出来
75+
76+
![3.png](/assets/images/LinuxLab/IMX6ULL/3.png)
77+
78+
把boot分区做成u盘方便修改,特别是uEnv.txt文件,我们用它加载设备树
79+
80+
### macOS U盘:
81+
82+
###
83+
84+
![4.png](/assets/images/LinuxLab/IMX6ULL/4.png)
85+
86+
### Windows 10:
87+
88+
![5.png](/assets/images/LinuxLab/IMX6ULL/5.png)
89+
90+
![6.png](/assets/images/LinuxLab/IMX6ULL/6.png)
91+
92+
### 网卡禁用数字签名
93+
[http://www.win10xiazai.com/win10/8148.html](/assets/images/LinuxLab/IMX6ULL/http://www.win10xiazai.com/win10/8148.html)
94+
95+
[RNDIS.rar](/assets/images/LinuxLab/IMX6ULL/RNDIS.rar)
96+
97+
多出一个 Linux USB Ethernet
98+
99+
![7.png](/assets/images/LinuxLab/IMX6ULL/7.png)
100+
101+
Window + R 打开设备管理器
102+
103+
```bash
104+
devmgmt.msc
105+
```
106+
107+
![8.png](/assets/images/LinuxLab/IMX6ULL/8.png)
108+
109+
## 熟悉 EBF_6ULL 开发板
110+
111+
### LED
112+
113+
```bash
114+
#为方便使用echo命令修改系统文件,提升至root权限进行操作
115+
#执行该命令后,再执行exit可退回普通用户
116+
sudo -s
117+
118+
#在root权限下进行下列操作
119+
#LED灯默认可能处于亮的状态,我们先把它们全部关闭再一盏盏点亮
120+
echo 0 > /sys/class/leds/red/brightness #关闭red灯
121+
echo 0 > /sys/class/leds/blue/brightness #关闭blue灯
122+
echo 0 > /sys/class/leds/green/brightness #关闭green灯
123+
echo 255 > /sys/class/leds/red/brightness #点亮red灯
124+
echo 255 > /sys/class/leds/blue/brightness #点亮blue灯
125+
echo 255 > /sys/class/leds/green/brightness #点亮green灯
126+
```
127+
128+
脚本测试硬件
129+
130+
```bash
131+
sudo apt update
132+
sudo apt install peripheral
133+
cd ~/peripheral
134+
./led.sh
135+
```
136+
137+
## gcc & hello world
138+
139+
hello.c
140+
141+
```bash
142+
#include <stdio.h>
143+
144+
int main(int argc, char *argv[]) {
145+
printf("Hello World!\n");
146+
return 0;
147+
}
148+
```
149+
150+
make
151+
152+
```bash
153+
sudo apt install gcc make -y
154+
gcc -v
155+
# Using built-in specs.
156+
# COLLECT_GCC=gcc
157+
# COLLECT_LTO_WRAPPER=/usr/lib/gcc/arm-linux-gnueabihf/8/lto-wrapper
158+
# Target: arm-linux-gnueabihf
159+
make hello
160+
# cc hello.c -o hello
161+
./hello
162+
Hello World!
163+
```
164+
165+
readelf -h hello
166+
167+
```bash
168+
169+
ELF Header:
170+
Magic: 7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00
171+
Class: ELF32
172+
Data: 2's complement, little endian
173+
Version: 1 (current)
174+
OS/ABI: UNIX - System V
175+
ABI Version: 0
176+
Type: DYN (Shared object file)
177+
Machine: ARM
178+
Version: 0x1
179+
Entry point address: 0x3fd
180+
Start of program headers: 52 (bytes into file)
181+
Start of section headers: 6976 (bytes into file)
182+
Flags: 0x5000400, Version5 EABI, hard-float ABI
183+
Size of this header: 52 (bytes)
184+
Size of program headers: 32 (bytes)
185+
Number of program headers: 9
186+
Size of section headers: 40 (bytes)
187+
Number of section headers: 29
188+
Section header string table index: 28
189+
```
190+
191+
## Linux 基础
192+
193+
![Linux.png](/assets/images/LinuxLab/IMX6ULL/Linux.png)
2.41 MB
Loading
604 KB
Loading
94.2 KB
Loading
689 KB
Loading
152 KB
Loading
4.02 KB
Loading
3.54 KB
Loading
39.8 KB
Loading
39.8 KB
Loading

0 commit comments

Comments
 (0)