INNOSTICK6-DEBIAN/zh

From eLinux.org
Jump to: navigation, search

Debian-stretch-1024x576.jpg

远程桌面VNC登陆

Innostick 6上预装的Debian都提供了VNC Server支持。用户可以通过VNC Viewer和它建立连接,远程登陆到Debian桌面。

准备工作

操作步骤

1. 在Windows主机上安装UltraVnc Viewer
2. 安装J1跳针帽(Micro-USB供电)
3. J2跳针置空(“Normal Boot”模式)
4. 用Micro-USB电缆连接Windows主机和Innostick 6 P1口
此时Innostick 6上电启动,LED1开始闪烁。
5. 等待RNDIS Gadget设备被Windows识别
Pu6 remark.png

6. 右击USB Ethernet网卡
7. 设置TCP/IPv4属性
Pu7 remark.png

8. 启动UltraVnc Viewer
9. 设置IP地址和端口号,点击Connect登陆
Vncone.png

10. 输入用户名和密码root/root
Vnctwo.png

11. 设置WiFi和Blue tooth
Vncthree.png

手动安装Debian Stretch最小文件系统

这一节我们从头开始,安装一个全新的Debian Stretch最小文件系统。

准备工作

操作步骤

1. 将USB转串口电缆的杜邦头和Innostick 6 UART1相连
Serialconsole remark.png Usb2serial.jpg
具体连接方式如下:

杜邦头颜色 Innostick 6扩展口
绿(RX) P5-4(Tx)
蓝(TX) P5-6(Rx)
黑(GND) P5-8(GND)


2. 安装J1跳针帽(Micro-USB供电)
3. 安装J2跳针帽(J2-1和J2-2)(U盘模式)
4. 用Micro-USB电缆连接Linux主机和Innostick 6 P1口
此时Innostick 6上电启动,主板上的LED1开始闪烁。
5. 等待U盘设备被Linux主机识别

esky-sh@ubuntu:~$ lsblk
NAME   MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sdb      8:16   1 14.6G  0 disk
├─sdb2   8:18   1   14G  0 part
└─sdb1   8:17   1  500M  0 part
sr0     11:0    1 1024M  0 rom
fd0      2:0    1    4K  0 disk
sda      8:0    0   50G  0 disk
├─sda2   8:2    0    1K  0 part
├─sda5   8:5    0 1021M  0 part [SWAP]
└─sda1   8:1    0   49G  0 part /


6. 格式化Linux EXT4分区,这个例子中是“/dev/sdb2”设备

esky-sh@ubuntu:~$ sudo mkfs.ext4 -F -E nodiscard /dev/sdb2
mke2fs 1.42.13 (17-May-2015)
/dev/sdb2 contains a ext4 file system
        last mounted on /mnt/udisk on Fri Aug 24 21:46:26 2018
Creating filesystem with 3663360 4k blocks and 917504 inodes
Filesystem UUID: 2e70e95e-f14b-41e0-b756-a85ee8ef051d
Superblock backups stored on blocks:
        32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208

Allocating group tables: done
Writing inode tables: done
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done


7. 将Linux EXT4分区安装到本机

esky-sh@ubuntu:~$ sudo mount -t ext4 /dev/sdb2 /mnt/udisk


8. 将Rootfs tarball中的文件解压到Linux EXT4分区

esky-sh@ubuntu:~$ sudo tar -zxvf /mnt/hgfs/sharefd/linaro-stretch-developer-20170706-43.tar.gz --strip-components 1 -C /mnt/udisk/ binary/


9. 将FAT分区安装到本机

esky-sh@ubuntu:~$ sudo mount -t vfat /dev/sdb1 /mnt/vfat


10. 将U-Boot映像,Linux内核映像和DTB文件复制到FAT分区根目录
11. 将内核模块复制到Linux EXT4分区的/lib/modules目录

esky-sh@ubuntu:~$ sudo mkdir /mnt/udisk/lib/modules
esky-sh@ubuntu:~$ sudo cp -R /mnt/vfat/4.9.88-ge8dbe4d/ /mnt/udisk/lib/modules/
esky-sh@ubuntu:~$ sync
esky-sh@ubuntu:~$ sudo umount /mnt/udisk/
esky-sh@ubuntu:~$ sudo umount /mnt/vfat/


12. 将USB转串口电缆插入Linux主机
此时Linux会自动识别出该串口设备,并安排端口号。

esky-sh@ubuntu:/$ dmesg | grep tty
[    0.004000] console [tty0] enabled
[    4.036753] 00:06: ttyS0 at I/O 0x3f8 (irq = 4, base_baud = 115200) is a 16550A
[    4.060119] 00:07: ttyS1 at I/O 0x2f8 (irq = 3, base_baud = 115200) is a 16550A
[27117.394172] usb 2-2.1: ch341-uart converter now attached to ttyUSB0
esky-sh@ubuntu:/$ ls /dev/ttyUSB*
/dev/ttyUSB0
esky-sh@ubuntu:/$


13. 启动minicom

esky-sh@ubuntu:/$ sudo minicom -s


14. 选择“Serial port setup”

 
            +-----[configuration]------+
            | Filenames and paths      |
            | File transfer protocols  |
            | Serial port setup        |
            | Modem and dialing        |
            | Screen and keyboard      |
            | Save setup as dfl        |
            | Save setup as..          |
            | Exit                     |
            | Exit from Minicom        |
            +--------------------------+


15. 设置通讯参数

    +-----------------------------------------------------------------------+
    | A -    Serial Device      : /dev/ttyUSB0                              |
    | B - Lockfile Location     : /var/lock                                 |
    | C -   Callin Program      :                                           |
    | D -  Callout Program      :                                           |
    | E -    Bps/Par/Bits       : 115200 8N1                                |
    | F - Hardware Flow Control : No                                        |
    | G - Software Flow Control : No                                        |
    |                                                                       |
    |    Change which setting?                                              |
    +-----------------------------------------------------------------------+


16. 退出设置

Welcome to minicom 2.7

OPTIONS: I18n
Compiled on Feb  7 2016, 13:37:32.
Port /dev/ttyUSB0, 04:43:25

Press CTRL-A Z for help on special keys


17. J2跳针置空(Normal Boot模式)
18. 按下主板上的复位按钮,此时Innostick 6重新启动,并且启动信息都显示在minicom窗口

[  OK  ] Started Daily apt download activities.
[  OK  ] Started Daily apt upgrade and clean activities.
[  OK  ] Reached target Timers.
         Starting Network Name Resolution...
         Starting Permit User Sessions...
         Starting /etc/rc.local Compatibility...
         Starting LSB: set CPUFreq kernel parameters...
[  OK  ] Started LSB: Advanced IEEE 802.11 management daemon.
[  OK  ] Started Permit User Sessions.
[  OK  ] Started /etc/rc.local Compatibility.
[  OK  ] Started Authorization Manager.
[  OK  ] Started Modem Manager.
[  OK  ] Started LSB: network benchmark.
[  OK  ] Started LSB: set CPUFreq kernel parameters.
[  OK  ] Started Serial Getty on ttymxc0.
[  OK  ] Started Getty on tty1.
[  OK  ] Reached target Login Prompts.
[  OK  ] Started Network Name Resolution.
[  OK  ] Started LSB: exim Mail Transport Agent.
[  OK  ] Reached target Multi-User System.
[  OK  ] Reached target Graphical Interface.
         Starting Update UTMP about System Runlevel Changes...
[  OK  ] Started Update UTMP about System Runlevel Changes.

Debian GNU/Linux 9 linaro-developer ttymxc0

linaro-developer login: root (automatic login)

Last login: Thu Nov  3 17:17:15 UTC 2016 on ttymxc0
Linux linaro-developer 4.9.88-ge8dbe4d #3 SMP PREEMPT Thu Aug 23 04:41:20 PDT 2018 armv7l

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
root@linaro-developer:~#