Difference between revisions of "INNOSTICK6-DEBIAN"

From eLinux.org
Jump to: navigation, search
m (enter English version)
m (add English version)
Line 30: Line 30:
 
<br>
 
<br>
  
==手动安装Debian Stretch最小文件系统==
+
==Manually install Debian Stretch with minimal Rootfs==
 +
This is a step by step illustration for how to install Debian Stretch minimal Rootfs to a bare metal Innostick 6.
 +
===Pre-requirements===
 +
*An Innostick 6 single board computer
 +
*A Linux Host machine
 +
*An USB to Serial Cable [[USB2SERIAL | USB to Serial TTL Converter]]
 +
*Pre-built U-Boot image, Linux kernel image, Linux kernel modules and DTBs
 +
*Linaro stretch-armhf-rootfs: https://releases.linaro.org/debian/images/developer-armhf/17.08/linaro-stretch-developer-20170706-43.tar.gz
 +
===Procedures===
 +
1. Connect Dupont headers of USB to Serial cable to Innostick 6 UART1<br>
 +
[[File:Serialconsole remark.png |400px]]
 +
[[File:Usb2serial.jpg]]<br>
 +
Connection details:<br>
 +
{| class="wikitable"
 +
|Dupont Header||Innostick 6 UART1
 +
|-
 +
|Green(RX)||P5-4(Tx)
 +
|-
 +
|Blue(TX)||P5-6(Rx)
 +
|-
 +
|Black(GND)||P5-8(GND)
 +
|}
 +
<br>
 +
2. Mount Jumper J1 on Innostick 6(Supply from Micro-USB cable)<br/>
 +
3. Mount Jumper J2-1 and J2-2 on Innostick 6(USB Memory Stick Mode)<br>
 +
4. Connect Micro-USB cable between Windows host and Innostick 6 P1.<br/>
 +
5. Wait until an USB mass storage gadget device recognized by Linux Kernel<br/>
 +
<syntaxhighlight lang="bash">
 +
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 /
 +
</syntaxhighlight>
 +
<br>
 +
6. Format Linux EXT4 partition, in this case it is "/dev/sdb2"<br/>
 +
<syntaxhighlight lang="bash">
 +
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
 +
</syntaxhighlight>
 +
<br>
 +
7. Mount Linux EXT4 partition<br>
 +
<syntaxhighlight lang="bash">
 +
esky-sh@ubuntu:~$ sudo mount -t ext4 /dev/sdb2 /mnt/udisk</syntaxhighlight>
 +
<br>
 +
8. Extract Rootfs tarball to this partition<br>
 +
<syntaxhighlight lang="bash">
 +
esky-sh@ubuntu:~$ sudo tar -zxvf /mnt/hgfs/sharefd/linaro-stretch-developer-20170706-43.tar.gz --strip-components 1 -C /mnt/udisk/ binary/
 +
</syntaxhighlight>
 +
<br>
 +
9. Mount FAT partition, in this case it is "/dev/sdb1"<br>
 +
<syntaxhighlight lang="bash">
 +
esky-sh@ubuntu:~$ sudo mount -t vfat /dev/sdb1 /mnt/vfat</syntaxhighlight>
 +
<br>
 +
10. Copy pre-built U-Boot image, Linux kernel image and DTBs to FAT partition<br>
 +
11. Copy Linux kernel modules to /lib/modules folder on Linux EXT4 partition<br>
 +
<syntaxhighlight lang="bash">
 +
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/
 +
</syntaxhighlight>
 +
<br>
 +
12. Plug USB to Serial cable to Linux Host<br/>
 +
Linux will automatically recognize this serial device and arrange COM port number.
 +
<syntaxhighlight lang="bash">
 +
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:/$</syntaxhighlight>
 +
<br>
 +
13. Start minicom<br/>
 +
<syntaxhighlight lang="bash">
 +
esky-sh@ubuntu:/$ sudo minicom -s</syntaxhighlight>
 +
<br>
 +
14. Select "Serial port setup"<br>
 +
<syntaxhighlight>
 +
            +-----[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        |
 +
            +--------------------------+</syntaxhighlight>
 +
<br>
 +
15. Set serial communication parameters<br>
 +
<syntaxhighlight>
 +
    +-----------------------------------------------------------------------+
 +
    | 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?                                              |
 +
    +-----------------------------------------------------------------------+</syntaxhighlight>
 +
<br>
 +
16. Exit<br>
 +
<syntaxhighlight>
 +
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</syntaxhighlight>
 +
<br>
 +
17. Remove jumper shunt J2 on Innostick 6(Normal Boot Mode)<br>
 +
18. Push the RESET button on Innostick 6 board<br>
 +
<syntaxhighlight>
 +
[  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:~#</syntaxhighlight>
 +
<br>

Revision as of 19:25, 25 August 2018

中文页面
Debian-stretch-1024x576.jpg

VNC Remote Login

Debian distribution pre-loaded with Innostick 6 has support of VNC Server. User can login to it through an VNC Viewer.

Pre-requirements

Procedures

1. Install UltraVnc Viewer on Windows host
2. Mount Jumper J1 on Innostick 6(Supply from Micro-USB cable)
3. Leave Jumper J2 open on Innostick 6(Normal Boot Mode)
4. Connect Micro-USB cable between Windows host and Innostick 6 P1
5. Wait until a RNDIS Gadget device recognized by Windows
Pu6 remark.png

6. Right click to set property of this USB Ethernet Card
7. Set property of TCP/IPv4
Pu7 remark.png

8. Start UltraVnc Viewer
9. Enter IP Address and Port number, then click "Connect"
Vncone.png

10. Enter user name and password(root/root)
Vnctwo.png

11. Setting of WiFi and Bluetooth
Vncthree.png

Manually install Debian Stretch with minimal Rootfs

This is a step by step illustration for how to install Debian Stretch minimal Rootfs to a bare metal Innostick 6.

Pre-requirements

Procedures

1. Connect Dupont headers of USB to Serial cable to Innostick 6 UART1
Serialconsole remark.png Usb2serial.jpg
Connection details:

Dupont Header Innostick 6 UART1
Green(RX) P5-4(Tx)
Blue(TX) P5-6(Rx)
Black(GND) P5-8(GND)


2. Mount Jumper J1 on Innostick 6(Supply from Micro-USB cable)
3. Mount Jumper J2-1 and J2-2 on Innostick 6(USB Memory Stick Mode)
4. Connect Micro-USB cable between Windows host and Innostick 6 P1.
5. Wait until an USB mass storage gadget device recognized by Linux Kernel

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. Format Linux EXT4 partition, in this case it is "/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. Mount Linux EXT4 partition

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


8. Extract Rootfs tarball to this partition

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


9. Mount FAT partition, in this case it is "/dev/sdb1"

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


10. Copy pre-built U-Boot image, Linux kernel image and DTBs to FAT partition
11. Copy Linux kernel modules to /lib/modules folder on Linux EXT4 partition

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. Plug USB to Serial cable to Linux Host
Linux will automatically recognize this serial device and arrange COM port number.

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. Start minicom

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


14. Select "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. Set serial communication parameters

    +-----------------------------------------------------------------------+
    | 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. Exit

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. Remove jumper shunt J2 on Innostick 6(Normal Boot Mode)
18. Push the RESET button on Innostick 6 board

[  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:~#