打开r40平台tinav2.1下接U盘(分色排版)

来源:互联网 发布:二维数组下标越界 编辑:程序博客网 时间:2024/06/05 17:35

打开r40平台tinav2.1下接U盘

2017/11/14 16:51

版本:V1.0

 

 

开发板使用:CB-S(需要给USB1供电)

 

 

0、需要打开USB1的电源使能(PI09)!

W:\ov5640_spi20_r40t\target\allwinner\azalea-m2ultra\configs\sys_config.fex

;--------------------------------

;---       USB1 CONFIG

;--------------------------------

[usbc1]

usbc1_used          = 1

usb_drv_vbus_gpio   = port:PI09<0><1><default><default>

;usb_drv_vbus_gpio   = port:PI1<0><1><default><default>

usb_host_init_state = 1

usb_regulator_io    = "nocare"

usb_wakeup_suspend  = 0

 

 

 

 

1、原始编译r40平台的tinav2.1系统:

rootroot@cm-System-Product-Name:/home/wwt/r40$ tar zxvf r40_tinav2.1_leo_20170112.tar.gz 

rootroot@cm-System-Product-Name:/home/wwt/r40$ mv tina/ r40_tinav2.1

rootroot@cm-System-Product-Name:/home/wwt/r40$ cd r40_tinav2.1/

rootroot@cm-System-Product-Name:/home/wwt/r40/r40_tinav2.1$ source build/envsetup.sh

rootroot@cm-System-Product-Name:/home/wwt/r40/r40_tinav2.1$ lunch

     13. azalea_m2ultra-tina

Which would you like?13

rootroot@cm-System-Product-Name:/home/wwt/r40/r40_tinav2.1$ make -j12

rootroot@cm-System-Product-Name:/home/wwt/r40/r40_tinav2.1$ pack

 

 

 

 

2、刷机之后,插入USB鼠标,红灯亮!DEBUG口的打印:

root@TinaLinux:/#

root@TinaLinux:/#

root@TinaLinux:/# [  532.102109] ehci_irq: highspeed device connect

[  532.130112] ohci_irq: fullspeed or lowspeed device connect

[  532.530167] usb 3-1: new low-speed USB device number 4 using sunxi-ohci

[  532.780532] input: Logitech USB Optical Mouse as /devices/soc/1c19000.ohci1-controller/usb3/3-1/3-1:1.0/input/input6

[  532.813086] hid-generic 0003:046D:C05A.0002: input: USB HID v1.11 Mouse [Logitech USB Optical Mouse] on usb-sunxi-ohci-1/input0

 

root@TinaLinux:/#

 

 

拔掉鼠标

root@TinaLinux:/#

root@TinaLinux:/# [  632.730063] ohci_irq: fullspeed or lowspeed device disconnect

[  632.736626] usb 3-1: USB disconnect, device number 5

 

root@TinaLinux:/#

 

 

插入U盘DEBUG口的打印:

root@TinaLinux:/#

root@TinaLinux:/# [  118.567048] ehci_irq: highspeed device connect

[  118.930168] usb 1-1: new high-speed USB device number 3 using sunxi-ehci

[  119.070315] usb 1-1: device descriptor read/64, error -71

[  119.310343] usb 1-1: device descriptor read/64, error -71

[  119.480413] ehci_irq: highspeed device disconnect

[  119.485746] ehci_irq: highspeed device connect

[  119.540124] usb 1-1: new high-speed USB device number 4 using sunxi-ehci

[  119.620484] ehci_irq: highspeed device disconnect

[  119.625817] ohci_irq: fullspeed or lowspeed device connect

[  120.030164] usb 3-1: new full-speed USB device number 3 using sunxi-ohci

[  120.245230] usb 3-1: Parent hub missing LPM exit latency info.  Power management will be impacted.

[  120.257779] usb 3-1: not running at top speed; connect to a high speed hub

[  120.299796] usb-storage 3-1:1.0: USB Mass Storage device detected

[  120.309136] scsi0 : usb-storage 3-1:1.0

[  121.327568] scsi 0:0:0:0: Direct-Access     SanDisk  Ultra USB 3.0    1.00 PQ: 0 ANSI: 6

[  121.351248] sd 0:0:0:0: [sda] 30375936 512-byte logical blocks: (15.5 GB/14.4 GiB)

[  121.368207] sd 0:0:0:0: [sda] Write Protect is off

[  121.373598] sd 0:0:0:0: [sda] Mode Sense: 43 00 00 00

[  121.392203] sd 0:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA

[  121.489414]  sda: sda1

[  121.536226] sd 0:0:0:0: [sda] Attached SCSI removable disk

 

root@TinaLinux:/#

root@TinaLinux:/#

root@TinaLinux:/#

root@TinaLinux:/#

root@TinaLinux:/# ll

drwxr-xr-x    1 root     root          1024 Jan  1 20:02 .

drwxr-xr-x    1 root     root          1024 Jan  1 20:02 ..

drwxr-xr-x    2 root     root          1261 Nov 14  2017 bin

drwxrwxrwx    2 root     root         16384 Jan  1  1970 boot

drwxrwxrwx    2 root     root          8192 Jan  1  1970 boot-res

drwxr-xr-x    7 root     root          3760 Jan  1 20:04 dev

drwxr-xr-x    1 root     root          1024 Jan  1 20:02 etc

drwxr-xr-x   10 root     root           794 Nov 14  2017 lib

drwx------    2 root     root         12288 Jan  1 20:02 lost+found

drwxr-xr-x    1 root     root          1024 Jan  1 20:04 mnt

drwxr-xr-x    9 root     root          1024 Jan  1 20:02 overlay

dr-xr-xr-x  100 root     root             0 Jan  1  1970 proc

drwxr-xr-x   16 root     root           211 Nov 14  2017 rom

drwxr-xr-x    1 root     root          1024 Jan  1 20:02 root

drwxr-xr-x    2 root     root           919 Nov 14  2017 sbin

dr-xr-xr-x   12 root     root             0 Jan  1 20:02 sys

drwxrwxrwt   10 root     root           280 Jan  1 20:02 tmp

drwxr-xr-x    1 root     root          1024 Jan  1 20:02 usr

lrwxrwxrwx    1 root     root             4 Nov 14  2017 var -> /tmp

drwxr-xr-x    2 root     root             3 Nov 14  2017 www

root@TinaLinux:/#

root@TinaLinux:/# df -h

Filesystem                Size      Used Available Use% Mounted on

rootfs                   42.5M    985.0K     38.2M   2% /

/dev/root                 9.0M      9.0M         0 100% /rom

tmpfs                   504.1M     32.0K    504.1M   0% /tmp

/dev/by-name/rootfs_data

                         42.5M    985.0K     38.2M   2% /overlay

overlayfs:/overlay       42.5M    985.0K     38.2M   2% /

tmpfs                   512.0K         0    512.0K   0% /dev

overlayfs:/overlay/usr

                         42.5M    985.0K     38.2M   2% /usr

/dev/by-name/UDISK        6.9G     16.1M      6.5G   0% /mnt/UDISK

/dev/by-name/boot         4.0M      3.1M    946.0K  77% /boot

/dev/by-name/boot-res

                          8.0M     39.0K      7.9M   0% /boot-res

/dev/sda1                14.0G     40.1M     13.9G   0% /mnt/exUDISK

root@TinaLinux:/#

root@TinaLinux:/#

root@TinaLinux:/# cat /proc/partitions 

major minor  #blocks  name

 

 179        0    7634944 mmcblk0

 179        1    7507968 mmcblk0p1

 179        2       1024 mmcblk0p2

 179        3          1 mmcblk0p3

 179        5       1024 mmcblk0p5

 179        6       4096 mmcblk0p6

 179        7      16384 mmcblk0p7

 259        0      49152 mmcblk0p8

 259        1       1024 mmcblk0p9

 259        2      16384 mmcblk0p10

 259        3       1024 mmcblk0p11

 179       16       4096 mmcblk0boot1

 179        8       4096 mmcblk0boot0

   8        0   15187968 sda

   8        1   14657536 sda1

root@TinaLinux:/#

root@TinaLinux:/#

root@TinaLinux:/# mount

rootfs on / type rootfs (rw)

/dev/root on /rom type squashfs (ro,noatime)

proc on /proc type proc (rw,nosuid,nodev,noexec,noatime)

sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,noatime)

cgroup on /sys/fs/cgroup type cgroup (rw,nosuid,nodev,noexec,relatime,cpu)

tmpfs on /tmp type tmpfs (rw,nosuid,nodev,noatime)

/dev/by-name/rootfs_data on /overlay type ext4 (rw,sync,relatime,data=ordered)

overlayfs:/overlay on / type overlayfs (rw,noatime,lowerdir=/,upperdir=/overlay)

tmpfs on /dev type tmpfs (rw,nosuid,relatime,size=512k,mode=755)

devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,mode=600)

overlayfs:/overlay/usr on /usr type overlayfs (rw,relatime,lowerdir=/usr,upperdir=/overlay/usr)

debugfs on /sys/kernel/debug type debugfs (rw,noatime)

/dev/by-name/UDISK on /mnt/UDISK type ext4 (rw,relatime,data=ordered)

/dev/by-name/boot on /boot type vfat (ro,sync,relatime,fmask=0000,dmask=0000,allow_utime=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)

/dev/by-name/boot-res on /boot-res type vfat (ro,sync,relatime,fmask=0000,dmask=0000,allow_utime=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)

/dev/sda1 on /mnt/exUDISK type fuseblk (rw,nosuid,nodev,noatime,user_id=0,group_id=0,allow_other,blksize=4096)

root@TinaLinux:/#

root@TinaLinux:/#

root@TinaLinux:/#

root@TinaLinux:/# cd /mnt/

root@TinaLinux:/mnt#

root@TinaLinux:/mnt#

root@TinaLinux:/mnt# ll

drwxr-xr-x    1 root     root          1024 Jan  1 20:04 .

drwxr-xr-x    1 root     root          1024 Jan  1 20:02 ..

drwxr-xr-x    3 root     root          4096 Jan  1 20:02 UDISK

drwxrwxrwx    1 root     root          4096 Oct 10  2017 exUDISK

root@TinaLinux:/mnt#

root@TinaLinux:/mnt#

root@TinaLinux:/mnt# cd exUDISK/

root@TinaLinux:/mnt/exUDISK#

root@TinaLinux:/mnt/exUDISK#

root@TinaLinux:/mnt/exUDISK# ll

drwxrwxrwx    1 root     root          4096 Oct 10  2017 .

drwxr-xr-x    1 root     root          1024 Jan  1 20:04 ..

drwxrwxrwx    1 root     root             0 Oct 10  2017 GHO

drwxrwxrwx    1 root     root             0 Oct 10  2017 ISO

drwxrwxrwx    1 root     root             0 Oct 10  2017 System Volume Information

-rwxrwxrwx    1 root     root        547328 Oct 10  2017 张印_SPIDEV驱动问题汇总.doc

root@TinaLinux:/mnt/exUDISK#

root@TinaLinux:/mnt/exUDISK#

root@TinaLinux:/mnt/exUDISK#

root@TinaLinux:/mnt/exUDISK# cat test.txt 

root@TinaLinux:/# spidev20_test

spi mode: 0

bits per word: 8

max speed: 500000 Hz (500 KHz)

 

 

CityBrand WelCome U!

 

CityBrand WelCome U!

 

CityBrand WelCome U!

 

root@TinaLinux:/#

 

root@TinaLinux:/mnt/exUDISK#

root@TinaLinux:/mnt/exUDISK# vi test2.txt

root@TinaLinux:/mnt/exUDISK# ll

drwxrwxrwx    1 root     root          4096 Jan  1 20:14 .

drwxr-xr-x    1 root     root          1024 Jan  1 20:04 ..

drwxrwxrwx    1 root     root             0 Oct 10  2017 GHO

drwxrwxrwx    1 root     root             0 Oct 10  2017 ISO

drwxrwxrwx    1 root     root             0 Oct 10  2017 System Volume Information

-rwxrwxrwx    1 root     root           195 Nov 14  2017 test.txt

-rwxrwxrwx    1 root     root             4 Jan  1 20:14 test2.txt

-rwxrwxrwx    1 root     root        547328 Oct 10  2017 张印_SPIDEV驱动问题汇总.doc

root@TinaLinux:/mnt/exUDISK#

root@TinaLinux:/mnt/exUDISK#

root@TinaLinux:/mnt/exUDISK# cat test2.txt 

123

root@TinaLinux:/mnt/exUDISK#

root@TinaLinux:/mnt/exUDISK# cd ..

root@TinaLinux:/mnt#

root@TinaLinux:/mnt# umount /mnt/exUDISK/

root@TinaLinux:/mnt#

root@TinaLinux:/mnt# ll

drwxr-xr-x    1 root     root          1024 Jan  1 20:04 .

drwxr-xr-x    1 root     root          1024 Jan  1 20:02 ..

drwxr-xr-x    3 root     root          4096 Jan  1 20:02 UDISK

drwxr-xr-x    2 root     root          1024 Jan  1 20:04 exUDISK

root@TinaLinux:/mnt#

root@TinaLinux:/mnt# cd exUDISK/

root@TinaLinux:/mnt/exUDISK# ll

drwxr-xr-x    2 root     root          1024 Jan  1 20:04 .

drwxr-xr-x    1 root     root          1024 Jan  1 20:04 ..

root@TinaLinux:/mnt/exUDISK#

 

 

拔掉U盘(请umount一下U盘先!)

root@TinaLinux:/mnt/exUDISK#

root@TinaLinux:/mnt/exUDISK# cd ..

root@TinaLinux:/mnt#

root@TinaLinux:/mnt#

root@TinaLinux:/mnt# ll

drwxr-xr-x    1 root     root          1024 Jan  1 20:04 .

drwxr-xr-x    1 root     root          1024 Jan  1 20:02 ..

drwxr-xr-x    3 root     root          4096 Jan  1 20:02 UDISK

drwxrwxrwx    1 root     root          4096 Jan  1 20:09 exUDISK

root@TinaLinux:/mnt#

root@TinaLinux:/mnt#

root@TinaLinux:/mnt# [  454.857992] ohci_irq: fullspeed or lowspeed device disconnect

[  454.864632] usb 3-1: USB disconnect, device number 3

 

root@TinaLinux:/mnt#

root@TinaLinux:/mnt# ll

drwxr-xr-x    1 root     root          1024 Jan  1 20:04 .

drwxr-xr-x    1 root     root          1024 Jan  1 20:02 ..

drwxr-xr-x    3 root     root          4096 Jan  1 20:02 UDISK

drwxr-xr-x    2 root     root          1024 Jan  1 20:04 exUDISK

root@TinaLinux:/mnt#

root@TinaLinux:/mnt# cd exUDISK/

root@TinaLinux:/mnt/exUDISK#

root@TinaLinux:/mnt/exUDISK#

root@TinaLinux:/mnt/exUDISK# ll

drwxr-xr-x    2 root     root          1024 Jan  1 20:04 .

drwxr-xr-x    1 root     root          1024 Jan  1 20:04 ..

root@TinaLinux:/mnt/exUDISK#

root@TinaLinux:/mnt/exUDISK#

 

 

阅读全文
0 0
原创粉丝点击