[百问网100ask的imx6ull]拿到百问网100ask的imx6ull开发板之后,如何熟悉单板
查询uboot的信息
I2C
=> i2c bus 0
Bus 0: i2c@021a0000 (active 0)
=> i2c bus 1
Bus 1: i2c@021a4000 (active 1)
SPI接口flash
=> sf probe
SF: unrecognized JEDEC id bytes: ff, ff, ff
Failed to initialize SPI flash at 0:0 (error -2)
网卡相关
=> mii info
NULL device name!
No such device:
NULL device name!
No such device:
mmc相关
=> mmc list
FSL_SDHC: 0 (SD)
FSL_SDHC: 1 (eMMC)
=> mmc dev 0 //选中0 = SD卡
switch to partitions #0, OK
mmc0 is current device
=> mmc info //SD卡信息
Device: FSL_SDHC
Manufacturer ID: 9f
OEM: 5449
Name: SD32G
Bus Speed: 50000000
Mode : SD High Speed (50MHz)
Rd Block Len: 512
SD version 3.0
High Capacity: Yes
Capacity: 29.1 GiB
Bus Width: 4-bit
Erase Group Size: 512 Bytes
=> mmc part //SD卡分区
Partition Map for MMC device 0 -- Partition Type: DOS
Part Start Sector Num Sectors UUID Type
1 1024 20480 4bab40be-01 0c
2 21504 8388608 4bab40be-02 83
=> mmc dev 1 //选中1 = MMC
switch to partitions #0, OK
mmc1(part 0) is current device
=> mmc info //MMC的信息
Device: FSL_SDHC
Manufacturer ID: 13
OEM: 14e
Name: Q2J54
Bus Speed: 52000000
Mode : MMC High Speed (52MHz)
Rd Block Len: 512
MMC version 5.0
High Capacity: Yes
Capacity: 3.6 GiB
Bus Width: 4-bit
Erase Group Size: 512 KiB
HC WP Group Size: 8 MiB
User Capacity: 3.6 GiB WRREL
Boot Capacity: 2 MiB ENH
RPMB Capacity: 512 KiB ENH
=> mmc part //MMC的分区
Partition Map for MMC device 1 -- Partition Type: DOS
Part Start Sector Num Sectors UUID Type
1 20480 102400 00000000-01 0c
2 122880 4194304 00000000-02 83
=>
查询linux系统的信息
busybox 支持的命令
[root@imx6ull:~]# busybox --help
BusyBox v1.29.3 (2020-04-22 14:57:46 CST) multi-call binary.
BusyBox is copyrighted by many authors between 1998-2015.
Licensed under GPLv2. See source distribution for detailed
copyright notices.
Usage: busybox [function [arguments]...]
or: busybox --list[-full]
or: busybox --install [-s] [DIR]
or: function [arguments]...
BusyBox is a multi-call binary that combines many common Unix
utilities into a single executable. Most people will create a
link to busybox for each function they wish to use and BusyBox
will act like whatever it was invoked as.
Currently defined functions:
[, [[, addgroup, adduser, ar, arch, arp, arping, ash, awk, basename, blkid, bunzip2, bzcat, cat, chattr, chgrp, chmod, chown, chroot, chrt, chvt, cksum, clear, cmp, cp,
cpio, crond, crontab, cut, date, dc, dd, deallocvt, delgroup, deluser, depmod, devmem, df, diff, dirname, dmesg, dnsd, dnsdomainname, dos2unix, du, dumpkmap, echo, egrep,
eject, env, ether-wake, expr, factor, fallocate, false, fbset, fdflush, fdformat, fdisk, fgrep, find, flock, fold, free, freeramdisk, fsck, fsfreeze, fstrim, fuser, getopt,
getty, grep, gunzip, gzip, halt, hdparm, head, hexdump, hexedit, hostid, hostname, hwclock, i2cdetect, i2cdump, i2cget, i2cset, id, ifconfig, ifdown, ifup, inetd, init,
insmod, install, ip, ipaddr, ipcrm, ipcs, iplink, ipneigh, iproute, iprule, iptunnel, kill, killall, killall5, klogd, last, less, link, linux32, linux64, linuxrc, ln,
loadfont, loadkmap, logger, login, logname, losetup, ls, lsattr, lsmod, lsof, lspci, lsscsi, lsusb, lzcat, lzma, lzopcat, makedevs, md5sum, mdev, mesg, microcom, mkdir,
mkdosfs, mke2fs, mkfifo, mknod, mkpasswd, mkswap, mktemp, modinfo, modprobe, more, mount, mountpoint, mt, mv, nameif, netstat, nice, nl, nohup, nproc, nslookup, nuke, od,
openvt, partprobe, passwd, paste, patch, pidof, ping, pipe_progress, pivot_root, poweroff, printenv, printf, ps, pwd, rdate, readlink, readprofile, realpath, reboot, renice,
reset, resize, resume, rm, rmdir, rmmod, route, run-init, run-parts, runlevel, sed, seq, setarch, setconsole, setfattr, setkeycodes, setlogcons, setpriv, setserial, setsid,
sh, sha1sum, sha256sum, sha3sum, sha512sum, shred, sleep, sort, start-stop-daemon, strings, stty, su, sulogin, svc, svok, swapoff, swapon, switch_root, sync, sysctl,
syslogd, tail, tar, tc, tee, telnet, test, tftp, time, top, touch, tr, traceroute, true, truncate, tty, ubirename, udhcpc, uevent, umount, uname, uniq, unix2dos, unlink,
unlzma, unlzop, unxz, unzip, uptime, usleep, uudecode, uuencode, vconfig, vi, vlock, w, watch, watchdog, wc, wget, which, who, whoami, xargs, xxd, xz, xzcat, yes, zcat
[root@imx6ull:~]#
[root@imx6ull:~]#
7zip基准跑分
[root@imx6ull:~]# ./7zzs b
7-Zip (z) 21.07 (armt) : Copyright (c) 1999-2021 Igor Pavlov : 2021-12-26
32-bit arm_v:7 thumb:2 locale=C UTF8=- Threads:1
Compiler: 9.2.1 20191025 GCC 9.2.1
Linux : 4.9.88 : #1 SMP PREEMPT Wed Apr 22 15:53:26 CST 2020 : armv7l
PageSize:4KB hwcap:1FB0D6:NEON hwcap2:0
LE
1T CPU Freq (MHz): 714 782 783 782 781 780 783
RAM size: 491 MB, # CPU hardware threads: 1
RAM usage: 437 MB, # Benchmark threads: 1
Compressing | Decompressing
Dict Speed Usage R/U Rating | Speed Usage R/U Rating
KiB/s % MIPS MIPS | KiB/s % MIPS MIPS
22: 458 100 448 446 | 7638 100 654 652
23: 431 100 441 439 | 7520 100 653 651
24: 413 100 446 444 | 7396 100 652 649
[ 1363.145269] 7zzs invoked oom-killer: gfp_mask=0x26080c2(GFP_KERNEL|__GFP_HIGHMEM|__GFP_ZERO|__GFP_NOTRACK), nodemask=0, order=0, oom_score_adj=0
...//crash 了,上面跑分可以参考对比
启动脚本:
cat /etc/init.d/rcS
[root@imx6ull:/proc]# cat /etc/os-release
NAME=Buildroot
VERSION=2019.02-g4946908395-dirty
ID=buildroot
VERSION_ID=2019.02
PRETTY_NAME="Buildroot 2019.02"
[root@imx6ull:/sys]# lsmod
Module Size Used by
inv_mpu6050_spi 2052 0
inv_mpu6050 10948 2 inv_mpu6050_spi
evbug 2078 0
100ask_adxl345_spi 3963 0
100ask_spidev 9333 0
100ask_irda 3442 0
100ask_rc_nec 1146 0
100ask_dht11 3948 0
100ask_ds18b20 4174 0
8723bu 1823356 0
[root@imx6ull:/sys]#
[root@imx6ull:/proc]# cat cpuinfo
processor : 0
model name : ARMv7 Processor rev 5 (v7l)
BogoMIPS : 3.00
Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae
CPU implementer : 0x41
CPU architecture: 7
CPU variant : 0x0
CPU part : 0xc07
CPU revision : 5
Hardware : Freescale i.MX6 UltraLite (Device Tree)
Revision : 0000
Serial : 0000000000000000
[root@imx6ull:/proc]# cat meminfo
MemTotal: 503392 kB
MemFree: 309756 kB
MemAvailable: 376664 kB
Buffers: 3752 kB
Cached: 67880 kB
SwapCached: 0 kB
Active: 44200 kB
Inactive: 53348 kB
Active(anon): 26692 kB
Inactive(anon): 1076 kB
Active(file): 17508 kB
Inactive(file): 52272 kB
Unevictable: 0 kB
Mlocked: 0 kB
HighTotal: 0 kB
HighFree: 0 kB
LowTotal: 503392 kB
LowFree: 309756 kB
SwapTotal: 0 kB
SwapFree: 0 kB
Dirty: 8 kB
Writeback: 0 kB
AnonPages: 25952 kB
Mapped: 37540 kB
Shmem: 1852 kB
Slab: 12124 kB
SReclaimable: 3932 kB
SUnreclaim: 8192 kB
KernelStack: 848 kB
PageTables: 920 kB
NFS_Unstable: 0 kB
Bounce: 0 kB
WritebackTmp: 0 kB
CommitLimit: 251696 kB
Committed_AS: 39004 kB
VmallocTotal: 1556480 kB
VmallocUsed: 0 kB
VmallocChunk: 0 kB
CmaTotal: 327680 kB
CmaFree: 252872 kB
[root@imx6ull:/proc]# cat mounts
/dev/root / ext4 rw,relatime,data=ordered 0 0
devtmpfs /dev devtmpfs rw,relatime,size=87344k,nr_inodes=21836,mode=755 0 0
proc /proc proc rw,relatime 0 0
devpts /dev/pts devpts rw,relatime,gid=5,mode=620,ptmxmode=666 0 0
tmpfs /dev/shm tmpfs rw,relatime,mode=777 0 0
tmpfs /tmp tmpfs rw,relatime 0 0
tmpfs /run tmpfs rw,nosuid,nodev,relatime,mode=755 0 0
sysfs /sys sysfs rw,relatime 0 0
debugfs /sys/kernel/debug debugfs rw,relatime 0 0
[root@imx6ull:/proc]#
[root@imx6ull:/proc]# uname -a
Linux imx6ull 4.9.88 #1 SMP PREEMPT Wed Apr 22 15:53:26 CST 2020 armv7l GNU/Linux
[root@imx6ull:/proc]# cat cmdline
console=ttymxc0,115200 root=/dev/mmcblk1p2 rootwait rw
[root@imx6ull:/proc]# cat interrupts
CPU0
16: 9289 GPC 55 Level i.MX Timer Tick
19: 22 GPC 33 Level 2010000.ecspi
20: 9050 GPC 26 Level 2020000.serial
21: 0 GPC 98 Level sai
22: 0 GPC 50 Level 2034000.asrc
40: 0 GPC 4 Level 20cc000.snvs:snvs-powerkey
41: 2884 GPC 120 Level 20b4000.ethernet
42: 0 GPC 121 Level 20b4000.ethernet
43: 0 GPC 80 Level 20bc000.wdog
44: 0 GPC 49 Level imx_thermal
49: 0 GPC 19 Level rtc alarm
55: 0 GPC 2 Level sdma
60: 1 GPC 43 Level 2184000.usb
61: 1551 GPC 42 Level 2184200.usb
62: 0 GPC 118 Level 2188000.ethernet
63: 0 GPC 119 Level 2188000.ethernet
64: 0 GPC 22 Level mmc0
65: 4778 GPC 23 Level mmc1
66: 1 GPC 100 Level 2198000.adc
67: 0 GPC 36 Level 21a0000.i2c
68: 291 GPC 37 Level 21a4000.i2c
70: 3 GPC 5 Level 21c8000.lcdif
71: 0 GPC 8 Level pxp-dmaengine-legacy
72: 0 GPC 18 Level pxp-dmaengine-std
73: 0 GPC 28 Level 21ec000.serial
74: 0 GPC 17 Level 21fc000.serial
75: 0 GPC 46 Level dcp-vmi-irq
76: 0 GPC 47 Level dcp-irq
78: 2 GPC 6 Level imx-rng
80: 0 gpio-mxc 1 Edge inv_mpu
97: 0 gpio-mxc 18 Edge SII902x_det
98: 0 gpio-mxc 19 Edge 2190000.usdhc cd
189: 0 gpio-mxc 14 Edge User2 Button
208: 0 gpio-mxc 1 Edge User1 Button
IPI0: 0 CPU wakeup interrupts
IPI1: 0 Timer broadcast interrupts
IPI2: 0 Rescheduling interrupts
IPI3: 0 Function call interrupts
IPI4: 0 CPU stop interrupts
IPI5: 3858 IRQ work interrupts
IPI6: 0 completion interrupts
Err: 0
[root@imx6ull:/proc]# cat devices
[ 400.697322] random: crng init done
Character devices:
1 mem
4 /dev/vc/0
4 tty
5 /dev/tty
5 /dev/console
5 /dev/ptmx
7 vcs
10 misc
13 input
29 fb
81 video4linux
89 i2c
90 mtd
108 ppp
116 alsa
128 ptm
136 pts
166 ttyACM
180 usb
188 ttyUSB
189 usb_device
207 ttymxc
216 rfcomm
226 drm
241 adxl345
242 spidevx
243 irda
244 dht11
245 ds18b20
246 ttyGS
247 ttyLP
248 watchdog
249 tee
250 iio
251 ptp
252 pps
253 rtc
254 gpiochip
Block devices:
1 ramdisk
259 blkext
7 loop
8 sd
31 mtdblock
65 sd
66 sd
67 sd
68 sd
69 sd
70 sd
71 sd
128 sd
129 sd
130 sd
131 sd
132 sd
133 sd
134 sd
135 sd
179 mmc
[root@imx6ull:/proc]#
[root@imx6ull:/proc]#
[root@imx6ull:/proc]# cat uptime
411.42 393.86
[root@imx6ull:/proc]# df -h
Filesystem Size Used Available Use% Mounted on
/dev/root 1.9G 433.6M 1.4G 23% /
devtmpfs 85.3M 0 85.3M 0% /dev
tmpfs 245.8M 0 245.8M 0% /dev/shm
tmpfs 245.8M 1.6M 244.2M 1% /tmp
tmpfs 245.8M 168.0K 245.6M 0% /run
[root@imx6ull:/proc]# fdisk -l
Disk /dev/mmcblk0: 29 GB, 31267487744 bytes, 61069312 sectors //32GB的SD卡信息
954208 cylinders, 4 heads, 16 sectors/track
Units: sectors of 1 * 512 = 512 bytes
Device Boot StartCHS EndCHS StartLBA EndLBA Sectors Size Id Type
/dev/mmcblk0p1 0,16,17 1,86,21 1024 21503 20480 10.0M c Win95 FAT32 (LBA)
/dev/mmcblk0p2 1,86,22 523,128,53 21504 8410111 8388608 4096M 83 Linux
Disk /dev/mmcblk1: 3728 MB, 3909091328 bytes, 7634944 sectors //4GB的mmc信息
119296 cylinders, 4 heads, 16 sectors/track
Units: sectors of 1 * 512 = 512 bytes
Device Boot StartCHS EndCHS StartLBA EndLBA Sectors Size Id Type
/dev/mmcblk1p1 1,70,6 7,165,30 20480 122879 102400 50.0M c Win95 FAT32 (LBA)
/dev/mmcblk1p2 7,165,31 268,186,46 122880 4317183 4194304 2048M 83 Linux
Disk /dev/mmcblk1boot1: 2 MB, 2097152 bytes, 4096 sectors //mmcblk1boot1 分区信息
64 cylinders, 4 heads, 16 sectors/track
Units: sectors of 1 * 512 = 512 bytes
Disk /dev/mmcblk1boot1 doesn't contain a valid partition table
Disk /dev/mmcblk1boot0: 2 MB, 2097152 bytes, 4096 sectors //mmcblk1boot0 分区信息
64 cylinders, 4 heads, 16 sectors/track
Units: sectors of 1 * 512 = 512 bytes
Disk /dev/mmcblk1boot0 doesn't contain a valid partition table
[root@imx6ull:~]# lsblk //默认mmc中的linux系统不支持
-sh: lsblk: command not found
[root@imx6ull:/proc]# cat iomem
00905000-0091ffff : 905000.sram
01804000-01805fff : /soc/dma-apbh@01804000
02010000-02013fff : /soc/aips-bus@02000000/spba-bus@02000000/ecspi@02010000
02020000-02023fff : /soc/aips-bus@02000000/spba-bus@02000000/serial@02020000
0202c000-0202ffff : /soc/aips-bus@02000000/spba-bus@02000000/sai@0202c000
02034000-02037fff : /soc/aips-bus@02000000/spba-bus@02000000/asrc@02034000
02080000-02083fff : /soc/aips-bus@02000000/pwm@02080000
02084000-02087fff : /soc/aips-bus@02000000/pwm@02084000
02088000-0208bfff : /soc/aips-bus@02000000/pwm@02088000
0208c000-0208ffff : /soc/aips-bus@02000000/pwm@0208c000
02090000-02093fff : /soc/aips-bus@02000000/can@02090000
0209c000-0209ffff : /soc/aips-bus@02000000/gpio@0209c000
020a0000-020a3fff : /soc/aips-bus@02000000/gpio@020a0000
020a4000-020a7fff : /soc/aips-bus@02000000/gpio@020a4000
020a8000-020abfff : /soc/aips-bus@02000000/gpio@020a8000
020ac000-020affff : /soc/aips-bus@02000000/gpio@020ac000
020b4000-020b7fff : /soc/aips-bus@02000000/ethernet@020b4000
020bc000-020bffff : /soc/aips-bus@02000000/wdog@020bc000
020c9000-020c9fff : /soc/aips-bus@02000000/usbphy@020c9000
020ca000-020cafff : /soc/aips-bus@02000000/usbphy@020ca000
020e0000-020e3fff : /soc/aips-bus@02000000/iomuxc@020e0000
020ec000-020effff : /soc/aips-bus@02000000/sdma@020ec000
020f0000-020f3fff : /soc/aips-bus@02000000/pwm@020f0000
020f4000-020f7fff : /soc/aips-bus@02000000/pwm@020f4000
020f8000-020fbfff : /soc/aips-bus@02000000/pwm@020f8000
020fc000-020fffff : /soc/aips-bus@02000000/pwm@020fc000
02184000-021841ff : /soc/aips-bus@02100000/usb@02184000
02184000-021841ff : /soc/aips-bus@02100000/usb@02184000
02184200-021843ff : /soc/aips-bus@02100000/usb@02184200
02184200-021843ff : /soc/aips-bus@02100000/usb@02184200
02184800-021849ff : /soc/aips-bus@02100000/usbmisc@02184800
02188000-0218bfff : /soc/aips-bus@02100000/ethernet@02188000
02190000-02193fff : /soc/aips-bus@02100000/usdhc@02190000
02194000-02197fff : /soc/aips-bus@02100000/usdhc@02194000
02198000-0219bfff : /soc/aips-bus@02100000/adc@02198000
021a0000-021a3fff : /soc/aips-bus@02100000/i2c@021a0000
021a4000-021a7fff : /soc/aips-bus@02100000/i2c@021a4000
021b8000-021bbfff : /soc/aips-bus@02100000/weim@021b8000
021bc000-021bffff : /soc/aips-bus@02100000/ocotp-ctrl@021bc000
021c8000-021cbfff : /soc/aips-bus@02100000/lcdif@021c8000
021cc000-021cffff : /soc/aips-bus@02100000/pxp@021cc000
021ec000-021effff : /soc/aips-bus@02100000/serial@021ec000
021fc000-021fffff : /soc/aips-bus@02100000/serial@021fc000
02280000-02283fff : /soc/aips-bus@02200000/dcp@02280000
02290000-0229ffff : /soc/aips-bus@02200000/iomuxc-snvs@02290000
80000000-9fffffff : System RAM =512MB
80008000-80efffff : Kernel code
81000000-8112aa5f : Kernel data
[root@imx6ull:/proc]#
i2c的拓扑结构
查询几个i2c的bus:
[root@imx6ull:~]# i2cdetect -l
i2c-1 i2c 21a4000.i2c I2C adapter
i2c-0 i2c 21a0000.i2c I2C adapter
每个bus下挂几个外设
[root@imx6ull:~]# i2cdetect -y 0
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- 1e --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
其中:
fxls8471@1e 是 3-Axis, Linear Accelerometer
mag3110@0e 飞思卡尔磁力计MAG3110 (没有检测到??)
[root@imx6ull:~]#
[root@imx6ull:~]# i2cdetect -y 1
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- UU -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- UU -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: 60 -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
其中:
wm8960@1a 是 codec
sii902x@39 是hdmi-transmitter
ov5640@3c (设备树文件有,没有检测到?)
0x60 设备树文件没有,是什么设备?
可以查询i2c设备的寄存器,比如bus=0的0x1e设备:
[root@imx6ull:~]# i2cdump -f -y 0 0x1e
No size specified (using byte-data access)
0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef
00: 00 00 00 02 02 01 ee ee 00 00 00 00 00 00 00 00 ...?????........
10: 00 01 00 03 ee ee ee ee ee 40 00 00 ff ff ee ee .?.??????@....??
20: 05 13 01 00 00 ee ee ee 00 00 00 80 00 80 ee ee ???..???...?.???
30: 00 00 ee 05 ee 00 ee 1b 00 00 00 00 00 00 00 00 ..???.??........
40: 84 86 81 87 81 80 82 b1 ee ee ee ee ee ee ee ee ????????????????
50: ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ????????????????
60: ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ????????????????
70: ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ????????????????
80: ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ????????????????
90: ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ????????????????
a0: ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ????????????????
b0: ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ????????????????
c0: ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ????????????????
d0: ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ????????????????
e0: ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ????????????????
f0: ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ????????????????
其他
读取设备树的节点值
[root@imx6ull:/proc/device-tree]# hexdump ./memory/reg
0000000 0080 0000 0020 0000
0000008