INNOSTICK6-DEBIAN

From eLinux.org
Jump to: navigation, search

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

Connect via USB

Linux distributions shipped with Innostick 6 single board computer are all pre-configured with USB RNDIS Gadget support. This allows us to connect to Innostick 6 whenever an USB link been built with a host machine.

Pre-requirements

Procedures

1. Mount Jumper J1 on Innostick 6(Power supply from Micro-USB cable)
In case of some models like BeadaPanel with LCD Display, Innostick 6 has a shorter soldered in this position with shipment. Customer can skip this step and go directly to step 2
Outline partial J1.png

2. Leave Jumper J2 open on Innostick 6(Normal Boot Mode)
Outline partial J2.png

3. Connect Micro-USB cable between Windows host and Innostick 6 P1.
4. Wait until a RNDIS Gadget device recognized by Windows.
Pu6 remark.png

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

9. Then connection built successfully.

VNC Remote Login

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

Pre-requirements

Procedures

1. Install UltraVnc Viewer on Windows host
2. Connect Innostick 6 via USB
3. Start UltraVnc Viewer
4. Enter IP Address and Port number, then click "Connect"
Vncone.png

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

6. 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 shunt on Innostick 6 Jumper J1(Supply from Micro-USB cable)
3. Mount shunt on Innostick 6 Jumper J2-1 and J2-2(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 shunt on Innostick 6 Jumper J2(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:~#