parent
eb46f68e97
commit
054c0cb32d
|
@ -110,3 +110,59 @@ unzip device-tree-compiler python-pip ncurses-dev python-pyelftools
|
|||
# 打包固件:生成 update image,完整固件会保存到 rockdev/pack/ 目录
|
||||
./build.sh updateimg
|
||||
```
|
||||
|
||||
## 5. 系统配置
|
||||
|
||||
### 5.1. Buildroot 系统
|
||||
|
||||
- 用户:root
|
||||
- 密码:firefly
|
||||
|
||||
#### 5.1.1. 以太网配置
|
||||
|
||||
Buildroot 的网络配置需要使用到 /etc/network/interfaces 配置文件,配置完成之后,运行:
|
||||
|
||||
```bash
|
||||
/etc/init.d/S40network restart
|
||||
```
|
||||
|
||||
即可重启网络。手动调试可以直接使用:
|
||||
|
||||
```bash
|
||||
ifdown -a
|
||||
# 和
|
||||
ifup -a
|
||||
```
|
||||
|
||||
来重启网络。
|
||||
|
||||
配置文件举例:
|
||||
|
||||
如下配置文件将 eth0 网卡设置为动态 IP 地址,将 eth1 设置为静态 IP 地址
|
||||
|
||||
```bash
|
||||
auto lo
|
||||
iface lo inet loopback
|
||||
|
||||
auto eth0
|
||||
iface eth0 inet dhcp
|
||||
|
||||
auto eth1
|
||||
iface eth1 inet static
|
||||
address 192.168.2.2
|
||||
netmask 255.255.255.0
|
||||
broadcast 192.168.2.255
|
||||
gateway 192.168.2.1
|
||||
```
|
||||
|
||||
注意:/etc/network/interfaces 的文件格式要求比较严格,如果遇到:
|
||||
|
||||
```bash
|
||||
Error: either "local" is duplicate, or "/24" is a garbage.
|
||||
```
|
||||
|
||||
那么很有可能是配置文件中多了一个空格。
|
||||
|
||||
#### 5.1.2. SSH
|
||||
|
||||
官方发布的 SDK 默认已开启 ssh,用户为”root”,密码为”firefly”。
|
||||
|
|
Loading…
Reference in New Issue