# [Note] Utilization of some useful tools for bringing up
###### tags: In u-boot, `sf`, `nand`, `mmc`, `i2c`, `mii`, `md`, `mw`, `go`, `tftpb`, `bootm`
###### tags: In kernel, `i2cdetect`, `i2cget`, `i2cset`, `lsusb`, `lspci`, `lsmod`, `dmesg`, `devmem`, `mpstat`, `free`, `nproc`, `killall`, `memteseter`, `iperf3`, `ping`, `dfu-util`, `sysfs`, `proc`, `iw`, `wlanconfig`, `ethtool`, `LinuxSPPLE`
[toc]
## Preliminary
Here shows some useful tools we can utilize while bringing up in both u-boot and kernel. And we can use these tools to check peripheral including
- DRAM
- Storage (NOR, NAND and emmc)
- GPIO
- I2C
- usb
- Ethernet LAN
- Wireless
- Bluetooth
## Overview
- In u-boot
- sf: for NOR flash
- mmc: for EMMC
- nand: for NAND flash
- i2c: for i2c bus
- mii: for mdio bus
- md/mw: for the memory dump/write
- tftpb: to download files from TFTP server
- go: to run u-boot in DDR
- bootm: to boot application image from memory
- In kernel
- i2cdetect: to detect all devices on i2c bus
- i2cset: to write data to a device
- i2cget: to read data from a device
- lsusb: to list USB devices
- lspci: to list all PCI devices
- devmem: to read/write memory
- mpstat: to report processors related statistics.
- dmesg: to print or control the kernel ring buffer
- free: to display amount of free and used memory in the system
- memtester: to do memory tests
- iperf3: to do active measurements of the maximum achievable bandwidth on IP networks
- ping: to send ICMP ECHO_REQUEST to network hosts
- iw: to set the parameters of the network interface that are particular to the wireless operation like SSID, frequency etc
- wlanconfig: Create, destroy and manipulate madwifi VAPs.
- ethtool: to retrieve information and change your NIC settings
- LinuxSPPLE: to scan BLE devices
- dfu-util: to download and upload firmware to/from devices connected over USB.
- lsmod: to show the status of modules
- nproc: to show the number of processing units available
- killall: to kill processes by name
- Here lists some usefully virtual file systems for debugging:
- /sys/class/gpio: to configure and set GPIO direction and value
- /sys/kernel/debug/gpio: to show all gpios' info
- /proc/device-tree: to show the whole device
- /proc/cmdline: to show the boot command
- /proc/mtd: to show the partition layout
- /proc/meminfo: to show the memory info
### In u-boot
```
# ?
? - alias for 'help'
ar8xxx_dump- Dump ar8xxx registers
base - print or set address offset
bdinfo - print Board Info structure
bootelf - Boot from an ELF image in memory
bootipq - bootipq from flash device
bootm - boot application image from memory
bootp - boot image via network using BOOTP/TFTP protocol
bootvx - Boot vxWorks from an ELF image
bootz - boot Linux zImage image from memory
canary - test stack canary
chpart - change active partition
cmp - memory compare
coninfo - print console devices and information
cp - memory copy
crc32 - checksum calculation
dhcp - boot image via network using DHCP/TFTP protocol
dm - Driver model low level access
echo - echo args to console
editenv - edit environment variable
env - environment handling commands
erase - erase FLASH memory
exectzt - execute TZT
exit - exit script
false - do nothing, unsuccessfully
fatinfo - print information about filesystem
fatload - load binary file from a dos filesystem
fatls - list files in a directory (default /)
fatsize - determine a file's size
fatwrite- write file into a dos filesystem
fdt - flattened device tree utility commands
flash - flash part_name load_addr file_size
flasherase - flerase part_name
flinfo - print FLASH memory information
fuseipq - fuse QFPROM registers from memory
go - start application at address 'addr'
help - print command description/usage
i2c - I2C sub-system
imxtract- extract a part of a multi-image
ipq5018_mdio- IPQ5018 mdio utility commands
ipq_mdio- IPQ mdio utility commands
is_sec_boot_enabled- check secure boot fuse is enabled or not
itest - return true/false on integer compare
loop - infinite loop on address range
md - memory display
mii - MII utility commands
mm - memory modify (auto-incrementing address)
mmc - MMC sub system
mmcinfo - display MMC info
mtdparts- define flash/nand partitions
mtest - simple RAM read/write test
mw - memory write (fill)
nand - NAND sub-system
nboot - boot from NAND device
nfs - boot image via network using NFS protocol
nm - memory modify (constant address)
part - disk partition related commands
pci - list and access PCI Configuration Space
ping - send ICMP ECHO_REQUEST to network host
printenv- print environment variables
protect - enable or disable FLASH write protection
reset - Perform RESET of the CPU
run - run commands in an environment variable
runmulticore- Enable and schedule secondary cores
saveenv - save environment variables to persistent storage
secure_authenticate- authenticate the signed image
setenv - set environment variables
setexpr - set environment variable as the result of eval expression
sf - SPI flash sub-system
showvar - print local hushshell variables
sleep - delay execution for some time
smeminfo- print SMEM FLASH information
source - run script from memory
test - minimal test like /bin/sh
tftpboot- boot image via network using TFTP protocol
tftpput - TFTP put command, for uploading files to a server
true - do nothing, successfully
tzt - load and run tzt
uart - UART sub-system
ubi - ubi commands
usb - USB sub-system
usbboot - boot from USB device
version - print monitor, compiler and linker version
zip - zip a memory region
```
- sf:
```
# sf probe
SPI_ADDR_LEN=3
SF: Detected MX25U6435F with page size 256 Bytes, erase size 64 KiB, total 8 MiB
```
- mmc:
```
# mmc info
Device: <NULL>
Manufacturer ID: 15
OEM: 100
Name: AJTD4
Tran Speed: 52000000
Rd Block Len: 512
MMC version 5.1
High Capacity: Yes
Capacity: 14.6 GiB
Bus Width: 4-bit
Erase Group Size: 512 KiB
HC WP Group Size: 8 MiB
User Capacity: 14.6 GiB WRREL
Boot Capacity: 4 MiB ENH
RPMB Capacity: 4 MiB ENH
```
- nand:
```
# nand info
Device 0: nand0, sector size 128 KiB
Page size 2048 b
OOB size 64 b
Erase size 131072 b
subpagesize 0 b
options 0x 0
bbt options 0x 0
Device 1: 17x nand1, sector size 4 KiB
Page size 256 b
OOB size 0 b
Erase size 4096 b
subpagesize 6581603 b
options 0x65746172
bbt options 0x 0
```
- i2c: for i2c bus
```
i2c - I2C sub-system
Usage:
i2c crc32 chip address[.0, .1, .2] count - compute CRC32 checksum
i2c dev [dev] - show or set current I2C bus
i2c loop chip address[.0, .1, .2] [# of objects] - looping read of device
i2c md chip address[.0, .1, .2] [# of objects] - read from I2C device
i2c mm chip address[.0, .1, .2] - write to I2C device (auto-incrementing)
i2c mw chip address[.0, .1, .2] value [count] - write to I2C device (fill)
i2c nm chip address[.0, .1, .2] - write to I2C device (constant address)
i2c probe [address] - test for and show device(s) on the I2C bus
i2c read chip address[.0, .1, .2] length memaddress - read to memory
i2c write memaddress chip address[.0, .1, .2] length - write memory to i2c
i2c reset - re-init the I2C Controller
i2c speed [speed] - show or set I2C bus speed
# Select the i2c bus
i2c dev <bus>
i2c dev 0
# Probe the device
i2c probe <chip>
i2c probe 0x60
# Read from the device
i2c read <chip> <chip address> <length> <memory address>
i2c read 0x60 0x27 1 0x80200000
# Read and Display from the device
i2c md <chip> <chip address> <length>
i2c md 0x60 0x27 1
# Write to the device
i2c mw <chip> <chip address> <value> <length>
i2c mw 0x60 0x30 0x20 1
```
- mii: for mdio bus
```
# mii dev
MII devices: 'IPQ MDIO0' 'IPQ MDIO1'
Current device: 'IPQ MDIO0'
# mii info
PHY 0x1C: OUI = 0x1374, Model = 0x10, Rev = 0x01, 100baseT, FDX
PHY 0x1D: OUI = 0x22A886, Model = 0x2C, Rev = 0x08, 10baseT, HDX
# mii dev 'IPQ MDIO0'
# mii read 7 2
004D
# mii read 7 3
D0C0
# mii dev 'IPQ MDIO1'
# mii read 0x1c 2
004D
# mii read 0x1c 3
D101
```
- md/mw: for the memory dump/write
```
md - memory display
mw - memory write (fill)
# mw 0x01019004 0x2
# md 0x01019000
01019000: 00000203 00000003 000000e2 00000000 ................
01019010: 00000000 00000000 00000000 00000000 ................
01019020: 00000000 00000000 00000000 00000000 ................
01019030: 00000000 00000000 00000000 00000000 ................
01019040: 00000000 00000000 00000000 00000000 ................
01019050: 00000000 00000000 00000000 00000000 ................
01019060: 00000000 00000000 00000000 00000000 ................
01019070: 00000000 00000000 00000000 00000000 ................
01019080: 00000000 00000000 00000000 00000000 ................
01019090: 00000000 00000000 00000000 00000000 ................
010190a0: 00000000 00000000 00000000 00000000 ................
010190b0: 00000000 00000000 00000000 00000000 ................
010190c0: 00000000 00000000 00000000 00000000 ................
010190d0: 00000000 00000000 00000000 00000000 ................
010190e0: 00000000 00000000 00000000 00000000 ................
010190f0: 00000000 00000000 00000000 00000000 ................
```
- tftpb: to download files from TFTP server
```
# tftpb 0x44000000 openwrt-ipq5018-u-boot.mbn
```
- go: to run u-boot in DDR
```
# tftpb 0x27800000 u-boot.bin
# go 0x27800000
```
- bootm: to boot application image from memory
```
# bootm
...
```
### In kernel
- i2cdetect: to detect all devices on i2c bus
```
#root@OpenWrt:/# i2cdetect
Usage: i2cdetect [-y] [-a] [-q|-r] I2CBUS [FIRST LAST]
i2cdetect -F I2CBUS
i2cdetect -l
I2CBUS is an integer or an I2C bus name
If provided, FIRST and LAST limit the probing range.
# i2cdetect -l
i2c-0 i2c bcm2708_i2c.0 I2C adapter
i2c-1 i2c bcm2708_i2c.1 I2C adapter
# i2cdetect -y 1
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: 50 -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- UU -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
```
- i2cdump: to dump the data
```
# i2cdump -y 1 0x50
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: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
10: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
20: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
30: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
40: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
50: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
60: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
70: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
90: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
a0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
b0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
c0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
d0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
e0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
f0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
```
- i2cset: to write data to a device
```
# i2cset -f -y 1 0x50 0x12 5
```
- i2cget: to read data from a device
```
# i2cget -y 1 0x50 0x12
0x05
```
- lsusb: to list USB devices
```
# lsusb -t
/: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=ehci_hcd/3p, 480M
|__ Port 1: Dev 2, If 0, Class=hub, Driver=hub/8p, 480M
|__ Port 6: Dev 4, If 0, Class=hub, Driver=hub/3p, 12M
|__ Port 1: Dev 5, If 0, Class=HID, Driver=usbhid, 12M
|__ Port 2: Dev 6, If 0, Class=HID, Driver=, 12M
|__ Port 3: Dev 7, If 0, Class='bInterfaceClass 0xe0 not yet handled', Driver=btusb, 12M
|__ Port 3: Dev 7, If 1, Class='bInterfaceClass 0xe0 not yet handled', Driver=btusb, 12M
|__ Port 3: Dev 7, If 2, Class=vend., Driver=, 12M
|__ Port 3: Dev 7, If 3, Class=app., Driver=, 12M
/: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=ehci_hcd/3p, 480M
|__ Port 1: Dev 2, If 0, Class=hub, Driver=hub/6p, 480M
|__ Port 4: Dev 3, If 0, Class='bInterfaceClass 0x0e not yet handled', Driver=uvcvideo, 480M
|__ Port 4: Dev 3, If 1, Class='bInterfaceClass 0x0e not yet handled', Driver=uvcvideo, 480M
```
- lspci: to list all PCI devices
```
00:00.0 Host bridge: Intel Corporation 5500 I/O Hub to ESI Port (rev 13)
00:01.0 PCI bridge: Intel Corporation 5520/5500/X58 I/O Hub PCI Express Root Port 1 (rev 13)
00:09.0 PCI bridge: Intel Corporation 7500/5520/5500/X58 I/O Hub PCI Express Root Port 9 (rev 13)
00:14.0 PIC: Intel Corporation 7500/5520/5500/X58 I/O Hub System Management Registers (rev 13)
00:14.1 PIC: Intel Corporation 7500/5520/5500/X58 I/O Hub GPIO and Scratch Pad Registers (rev 13)
00:14.2 PIC: Intel Corporation 7500/5520/5500/X58 I/O Hub Control Status and RAS Registers (rev 13)
00:1a.0 USB controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #4 (rev 02)
00:1c.0 PCI bridge: Intel Corporation 82801I (ICH9 Family) PCI Express Port 1 (rev 02)
00:1d.0 USB controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #1 (rev 02)
00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev 92)
00:1f.0 ISA bridge: Intel Corporation 82801IB (ICH9) LPC Interface Controller (rev 02)
00:1f.2 IDE interface: Intel Corporation 82801IB (ICH9) 2 port SATA Controller [IDE mode] (rev 02)
01:00.0 Ethernet controller: Broadcom Corporation NetXtreme II BCM5709 Gigabit Ethernet (rev 20)
01:00.1 Ethernet controller: Broadcom Corporation NetXtreme II BCM5709 Gigabit Ethernet (rev 20)
03:00.0 RAID bus controller: LSI Logic / Symbios Logic MegaRAID SAS 2108 [Liberator] (rev 05)
06:03.0 VGA compatible controller: Matrox Electronics Systems Ltd. MGA G200eW WPCM450 (rev 0a)
```
- devmem: to read/write memory
```
# devmem 0x101F000
# devmem 0x101F000 32 0x4a01
```
- mpstat: to report processors related statistics.
```
# mpstat -P ALL
Linux 3.19.0-25-generic (ubuntu) 03/16/2016 _x86_64_ (2 CPU)
04:50:51 PM CPU %usr %nice %sys %iowait %irq %soft %steal %guest %gnice %idl
04:50:51 PM all 0.04 0.00 0.28 0.05 0.00 0.00 0.00 0.00 0.00 99.64
04:50:51 PM 0 0.04 0.00 0.28 0.04 0.00 0.00 0.00 0.00 0.00 99.64
04:50:51 PM 1 0.03 0.00 0.27 0.06 0.00 0.00 0.00 0.00 0.00 99.63
```
- dmesg: to print or control the kernel ring buffer
```shell=
[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.000000] Initializing cgroup subsys cpuset
[ 0.000000] Initializing cgroup subsys cpu
[ 0.000000] Initializing cgroup subsys cpuacct
[ 0.000000] Linux version 4.4.60 (ptpt52@SC-GAME) (gcc version 5.2.0 (OpenWrt GCC 5.2.0 3e1428c+r49254) ) #297 SMP PREEMPT Fri Aug 13 06:45:00 UTC 2021
[ 0.000000] CPU: ARMv7 Processor [51af8014] revision 4 (ARMv7), cr=10c0383d
[ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[ 0.000000] Machine model: Qualcomm Technologies, Inc. IPQ5018/AP-MP03.5-C1
[ 0.000000] Reserved memory: OVERLAP DETECTED!
[ 0.000000] q6_mem_regions@4B000000 (0x4b000000--0x4e400000) overlaps with q6_code_data@4B000000 (0x4b000000--0x4b060000)
[ 0.000000] Memory policy: Data cache writealloc
[ 0.000000] psci: probing for conduit method from DT.
[ 0.000000] psci: PSCIv1.0 detected in firmware.
[ 0.000000] psci: Using standard PSCI v0.2 function IDs
[ 0.000000] psci: MIGRATE_INFO_TYPE not supported.
[ 0.000000] PERCPU: Embedded 11 pages/cpu @8fd7d000 s14592 r8192 d22272 u45056
[ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 47552
[ 0.000000] Kernel command line: console=ttyMSM0,115200n8 ubi.mtd=rootfs root=mtd:ubi_rootfs rootfstype=squashfs rootwait swiotlb=1
[ 0.000000] PID hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.000000] Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)
[ 0.000000] Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
[ 0.000000] Memory: 182428K/192512K available (4915K kernel code, 281K rwdata, 1032K rodata, 1024K init, 323K bss, 10084K reserved, 0K cma-reserved, 0K highmem)
[ 0.000000] Virtual kernel memory layout:
[ 0.000000] vector : 0xffff0000 - 0xffff1000 ( 4 kB)
[ 0.000000] fixmap : 0xffc00000 - 0xfff00000 (3072 kB)
[ 0.000000] vmalloc : 0x90800000 - 0xff800000 (1776 MB)
[ 0.000000] lowmem : 0x80000000 - 0x90000000 ( 256 MB)
[ 0.000000] pkmap : 0x7fe00000 - 0x80000000 ( 2 MB)
[ 0.000000] modules : 0x7f000000 - 0x7fe00000 ( 14 MB)
[ 0.000000] .text : 0x81208000 - 0x818cef38 (6940 kB)
[ 0.000000] .init : 0x81900000 - 0x81a00000 (1024 kB)
[ 0.000000] .data : 0x81a00000 - 0x81a465d8 ( 282 kB)
[ 0.000000] .bss : 0x81a49000 - 0x81a99df8 ( 324 kB)
[ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=2, Nodes=1
[ 0.000000] Preemptible hierarchical RCU implementation.
[ 0.000000] Build-time adjustment of leaf fanout to 32.
[ 0.000000] RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=2.
[ 0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=32, nr_cpu_ids=2
[ 0.000000] NR_IRQS:16 nr_irqs:16 16
[ 0.000000] GICv2m: Node v2m: range[0xb00a000:0xb00affc], SPI[448:480]
[ 0.000000] GICv2m: Node v2m: range[0xb00b000:0xb00bffc], SPI[480:512]
[ 0.000000] Architected cp15 timer(s) running at 24.00MHz (virt).
[ 0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x588fe9dc0, max_idle_ns: 440795202592 ns
[ 0.000006] sched_clock: 56 bits at 24MHz, resolution 41ns, wraps every 4398046511097ns
[ 0.000018] Switching to timer-based delay loop, resolution 41ns
[ 0.000505] Calibrating delay loop (skipped), value calculated using timer frequency.. 48.00 BogoMIPS (lpj=240000)
[ 0.000521] pid_max: default: 32768 minimum: 301
[ 0.000628] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.000640] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.001297] Initializing cgroup subsys io
[ 0.001324] Initializing cgroup subsys memory
[ 0.001358] Initializing cgroup subsys devices
[ 0.001374] Initializing cgroup subsys freezer
[ 0.001395] Initializing cgroup subsys net_cls
[ 0.001408] Initializing cgroup subsys pids
[ 0.001444] CPU: Testing write buffer coherency: ok
[ 0.001885] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[ 0.001925] Setting up static identity map for 0x41300000 - 0x41300058
[ 0.050078] MSM Memory Dump base table set up
[ 0.050110] MSM Memory Dump apps data table set up
[ 0.090439] CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
[ 0.090570] Brought up 2 CPUs
[ 0.090588] SMP: Total of 2 processors activated (96.00 BogoMIPS).
[ 0.090595] CPU: All CPU(s) started in SVC mode.
[ 0.104856] VFP support v0.3: implementor 51 architecture 3 part 40 variant 3 rev 4
[ 0.105192] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[ 0.105216] futex hash table entries: 512 (order: 3, 32768 bytes)
[ 0.105414] pinctrl core: initialized pinctrl subsystem
[ 0.106554] NET: Registered protocol family 16
[ 0.108014] DMA: preallocated 2048 KiB pool for atomic coherent allocations
[ 0.130229] cpuidle: using governor ladder
[ 0.160253] cpuidle: using governor menu
[ 0.160509] NET: Registered protocol family 42
[ 0.165258] qcom,gcc-ipq5018 1800000.gcc: Registered ipq5018 GCC clocks provider
[ 0.169812] irq: no irq domain found for /soc/smp2p-wcss/slave-kernel !
[ 0.171326] irq: no irq domain found for /soc/smp2p-wcss/slave-kernel !
[ 0.184684] CPU: IPQ5018, SoC Version: 1.1
[ 0.186429] IPC logging disabled
[ 0.186439] IPC logging disabled
[ 0.186444] IPC logging disabled
[ 0.186449] IPC logging disabled
[ 0.186453] IPC logging disabled
[ 0.186697] sps:sps is ready.
[ 0.222231] pps_core: LinuxPPS API ver. 1 registered
[ 0.222244] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[ 0.222278] PTP clock support registered
[ 0.224160] Advanced Linux Sound Architecture Driver Initialized.
[ 0.224968] clocksource: Switched to clocksource arch_sys_counter
[ 0.227251] NET: Registered protocol family 2
[ 0.228060] TCP established hash table entries: 2048 (order: 1, 8192 bytes)
[ 0.228096] TCP bind hash table entries: 2048 (order: 2, 16384 bytes)
[ 0.228139] TCP: Hash tables configured (established 2048 bind 2048)
[ 0.228200] UDP hash table entries: 256 (order: 1, 8192 bytes)
[ 0.228225] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)
[ 0.228418] NET: Registered protocol family 1
[ 0.237064] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[ 0.237078] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[ 0.241621] Key type asymmetric registered
[ 0.241637] Asymmetric key parser 'x509' registered
[ 0.241669] io scheduler noop registered
[ 0.241677] io scheduler deadline registered (default)
[ 0.250282] TZ Log : Will warn on Access Violation, as paniconaccessviolation is not set
[ 0.250786] bt_driver 1943008.bt: bt_parse_ipc
[ 0.250844] bt_driver 1943008.bt: bt_parse_mem
[ 0.250892] bt_driver 1943008.bt: bt_parse_dt operating in secure mode
[ 0.252049] 58000.qcom,msm-eud: ttyEUD0 at MMIO 0x0 (irq = 154, base_baud = 0) is a EUD UART
[ 0.253525] Registered Sucessfully
[ 0.254093] msm_serial 78af000.serial: msm_serial: detected port #0
[ 0.254151] msm_serial 78af000.serial: uartclk = 1843199
[ 0.254204] 78af000.serial: ttyMSM0 at MMIO 0x78af000 (irq = 20, base_baud = 115199) is a MSM
[ 0.254235] msm_serial: console setup on port #0
[ 0.900107] console [ttyMSM0] enabled
[ 0.905325] msm_serial: driver initialized
[ 0.908704] msm_serial_hsl_init: driver initialized
[ 0.919841] loop: module loaded
[ 0.920285] spi_qup 78b5000.spi: IN:block:16, fifo:64, OUT:block:16, fifo:64
[ 0.923755] m25p80 spi32766.0: found gd25lb128d, expected n25q128a11
[ 0.929126] m25p80 spi32766.0: gd25lb128d (16384 Kbytes)
[ 0.935497] 14 ofpart partitions found on MTD device spi32766.0
[ 0.940706] Creating 14 MTD partitions on "spi32766.0":
[ 0.946373] 0x000000000000-0x000000030000 : "0:SBL1"
[ 0.952680] 0x000000030000-0x000000040000 : "0:MIBIB"
[ 0.957892] 0x000000040000-0x000000050000 : "0:BOOTCONFIG"
[ 0.962843] 0x000000050000-0x000000060000 : "0:BOOTCONFIG1"
[ 0.968232] 0x000000060000-0x000000100000 : "0:QSEE"
[ 0.973569] 0x000000100000-0x0000001a0000 : "0:QSEE_1"
[ 0.978818] 0x0000001a0000-0x0000001b0000 : "0:DEVCFG"
[ 0.983721] 0x0000001b0000-0x0000001c0000 : "0:DEVCFG_1"
[ 0.988906] 0x0000001c0000-0x0000001d0000 : "0:CDT"
[ 0.994366] 0x0000001d0000-0x0000001e0000 : "0:CDT_1"
[ 0.999032] 0x0000001e0000-0x0000001f0000 : "0:APPSBLENV"
[ 1.004164] 0x0000001f0000-0x000000290000 : "0:APPSBL"
[ 1.009667] 0x000000290000-0x000000330000 : "0:APPSBL_1"
[ 1.014593] 0x000000330000-0x0000003a0000 : "0:ART"
[ 1.021094] QPIC controller hw version Major:2, Minor:1
[ 1.023603] QPIC controller support serial nand.
[ 1.029174] nand: device found, Manufacturer ID: 0xc8, Chip ID: 0x41
[ 1.033676] nand: GigaDevice GD5F1GQ5REYIG SPI NAND 1G
[ 1.040044] nand: 128 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 128
[ 1.045616] 3 ofpart partitions found on MTD device qcom_nand.0
[ 1.052513] Creating 3 MTD partitions on "qcom_nand.0":
[ 1.058449] 0x000000000000-0x000000080000 : "0:TRAINING"
[ 1.075573] 0x000000080000-0x000003e80000 : "rootfs"
[ 1.120567] mtd: device 15 (rootfs) set to be root filesystem
[ 1.120811] mtdsplit: no squashfs found in "rootfs"
[ 1.125342] 0x000003e80000-0x000007c80000 : "rootfs_1"
[ 1.186194] libphy: Fixed MDIO Bus: probed
[ 1.404975] qca-mdio 88000.mdio: Could not find phy-reset-gpio
[ 1.405155] libphy: qca_mdio: probed
[ 1.425417] qca-mdio 88000.mdio: qca-mdio driver was registered
[ 1.864993] qca-mdio 90000.mdio: Could not find phy-reset-gpio
[ 1.865174] libphy: qca_mdio: probed
[ 1.871350] qca-mdio 90000.mdio: qca-mdio driver was registered
[ 1.975259] cnss: INFO: IPC Logging is disabled!
[ 1.975933] cnss[2]: INFO: Platform driver probed successfully. plat 8f298010 tgt 0xfffc
[ 1.979343] cnss[41]: INFO: Platform driver probed successfully. plat 8f2a0010 tgt 0xfffb
[ 1.987427] i2c /dev entries driver
[ 1.996327] qcom-tsens 4a8000.thermal-sensor: tsens calibration failed
[ 2.000139] cpufreq: cpufreq_online: CPU0: Running at unlisted freq: 799999 KHz
[ 2.005149] cpufreq: cpufreq_online: CPU0: Unlisted initial frequency changed to: 800000 KHz
[ 2.012381] sdhci: Secure Digital Host Controller Interface driver
[ 2.020940] sdhci: Copyright(c) Pierre Ossman
[ 2.026918] sdhci-pltfm: SDHCI platform and OF driver helper
[ 2.032410]
[ 2.032410] Version Rollback Feature Disabled
[ 2.039484] qcom-q6v5-wcss-pil cd00000.qcom_q6v5_wcss: ssr registeration success qcom_q6v5_wcss
[ 2.042758] remoteproc remoteproc0: cd00000.qcom_q6v5_wcss is available
[ 2.051403] q6v5_wcss_userpd1(8fda387c) node found
[ 2.058921] platform q6v5_wcss_userpd1: ssr registeration success q6v5_wcss_userpd1
[ 2.062810] remoteproc remoteproc1: q6v5_wcss_userpd1 is available
[ 2.070366] q6v5_wcss_userpd2(8fda3b20) node found
[ 2.077534] platform q6v5_wcss_userpd2: ssr registeration success q6v5_wcss_userpd2
[ 2.081374] remoteproc remoteproc2: q6v5_wcss_userpd2 is available
[ 2.089367] of_graph_get_next_endpoint(): no port node found in /soc/csr@6001000
[ 2.095243] coresight-csr 6001000.csr: CSR initialized
[ 2.102869] of_graph_get_next_endpoint(): no port node found in /soc/cti@6010000
[ 2.107831] of_graph_get_next_endpoint(): no port node found in /soc/cti@6011000
[ 2.115374] of_graph_get_next_endpoint(): no port node found in /soc/cti@6012000
[ 2.122694] of_graph_get_next_endpoint(): no port node found in /soc/cti@6013000
[ 2.130114] of_graph_get_next_endpoint(): no port node found in /soc/cti@6014000
[ 2.137486] of_graph_get_next_endpoint(): no port node found in /soc/cti@6015000
[ 2.144827] of_graph_get_next_endpoint(): no port node found in /soc/cti@6016000
[ 2.152239] of_graph_get_next_endpoint(): no port node found in /soc/cti@6017000
[ 2.159622] of_graph_get_next_endpoint(): no port node found in /soc/cti@6018000
[ 2.166987] of_graph_get_next_endpoint(): no port node found in /soc/cti@6019000
[ 2.174342] of_graph_get_next_endpoint(): no port node found in /soc/cti@601a000
[ 2.181762] of_graph_get_next_endpoint(): no port node found in /soc/cti@601b000
[ 2.189148] of_graph_get_next_endpoint(): no port node found in /soc/cti@601c000
[ 2.196508] of_graph_get_next_endpoint(): no port node found in /soc/cti@601d000
[ 2.203855] of_graph_get_next_endpoint(): no port node found in /soc/cti@601e000
[ 2.211282] of_graph_get_next_endpoint(): no port node found in /soc/cti@601f000
[ 2.218660] of_graph_get_next_endpoint(): no port node found in /soc/cti@6198000
[ 2.226208] of_graph_get_next_endpoint(): no port node found in /soc/cti@6199000
[ 2.233509] of_graph_get_next_endpoint(): no port node found in /soc/cti@610c000
[ 2.241033] sps_register_bam_device : unable to create IPC Logging 0 for bam 0x06064000
[ 2.247987] sps_register_bam_device : unable to create IPC Logging 1 for bam 0x06064000sps_register_bam_device : unable to create IPC Logging 2 for bam 0x06064000
[ 2.263658] sps_register_bam_device : unable to create IPC Logging 3 for bam 0x06064000sps_register_bam_device : unable to create IPC Logging 4 for bam 0x06064000
[ 2.278165] sps:BAM 0x06064000 is registered.[ 2.285344] coresight-tmc 6048000.tmc: TMC initialized
[ 2.289453] coresight-tmc 6047000.tmc: TMC initialized
[ 2.294549] coresight-funnel 6041000.funnel: FUNNEL initialized
[ 2.299636] coresight-funnel 6100000.funnel: FUNNEL initialized
[ 2.305439] coresight-funnel 6120000.funnel: FUNNEL initialized
[ 2.311269] coresight-funnel 6130000.funnel: FUNNEL initialized
[ 2.317249] coresight-funnel 61a1000.funnel: FUNNEL initialized
[ 2.323854] coresight-etm4x 619c000.etm: ETM 4.0 initialized
[ 2.329499] coresight-etm4x 619d000.etm: ETM 4.0 initialized
[ 2.335007] coresight-replicator-qcom 6046000.replicator: REPLICATOR 1.0 initialized
[ 2.340772] coresight-stm 6002000.stm: STM initialized
[ 2.349595] of_graph_get_next_endpoint(): no port node found in /soc/hwevent@6101000
[ 2.352952] coresight-hwevent 6101000.hwevent: Hardware Event driver initialized
[ 2.364723] NET: Registered protocol family 10
[ 2.369037] NET: Registered protocol family 17
[ 2.372393] bridge: automatic filtering via arp/ip/ip6tables has been deprecated. Update your scripts to load br_netfilter if you need this.
[ 2.376836] Bridge firewalling registered
[ 2.389540] 8021q: 802.1Q VLAN Support v1.8
[ 2.393652] Registering SWP/SWPB emulation handler
[ 2.416498] ubi0: attaching mtd15
[ 2.564929] random: nonblocking pool is initialized
[ 2.615645] ubi0: scanning is finished
[ 2.619845] ubi0: attached mtd15 (name "rootfs", size 62 MiB)
[ 2.619870] ubi0: PEB size: 131072 bytes (128 KiB), LEB size: 126976 bytes
[ 2.624563] ubi0: min./max. I/O unit sizes: 2048/2048, sub-page size 2048
[ 2.631369] ubi0: VID header offset: 2048 (aligned 2048), data offset: 4096
[ 2.638208] ubi0: good PEBs: 496, bad PEBs: 0, corrupted PEBs: 0
[ 2.644972] ubi0: user volume: 5, internal volumes: 1, max. volumes count: 128
[ 2.651213] ubi0: max/mean erase counter: 2/0, WL threshold: 4096, image sequence number: 766247865
[ 2.658257] ubi0: available PEBs: 20, total reserved PEBs: 476, PEBs reserved for bad PEB handling: 20
[ 2.667225] ubi0: background thread "ubi_bgt0d" started, PID 90
[ 2.775469] hctosys: unable to open rtc device (rtc0)
[ 2.782249] ALSA device list:
[ 2.782270] No soundcards found.
[ 2.786712] VFS: Mounted root (squashfs filesystem) readonly on device 31:20.
[ 2.789142] Freeing unused kernel memory: 1024K (81900000 - 81a00000)
[ 3.117932] init: Console is alive
[ 3.118136] init: - watchdog -
[ 3.873969] usbcore: registered new interface driver usbfs
[ 3.874063] usbcore: registered new interface driver hub
[ 3.878534] usbcore: registered new device driver usb
[ 3.885826] Button Hotplug driver version 0.4.1
[ 3.892977] remoteproc remoteproc3: bt_rproc_driver is available
[ 3.893159] bt_rproc_driver bt_rproc_driver: Probed
[ 4.125166] init: - preinit -
Press the [f] key and hit [enter] to enter failsafe mode
Press the [1], [2], [3] or [4] key and hit [enter] to select the debug level
Before mount_root
[ 6.422370] UBIFS (ubi0:4): default file-system created
[ 6.422858] UBIFS (ubi0:4): background thread "ubifs_bgt0_4" started, PID 124
[ 6.447356] UBIFS (ubi0:4): UBIFS: mounted UBI device 0, volume 4, name "rootfs_data"
[ 6.447383] UBIFS (ubi0:4): LEB size: 126976 bytes (124 KiB), min./max. I/O unit sizes: 2048 bytes/2048 bytes
[ 6.454161] UBIFS (ubi0:4): FS size: 31997952 bytes (30 MiB, 252 LEBs), journal size 1650688 bytes (1 MiB, 13 LEBs)
[ 6.464145] UBIFS (ubi0:4): reserved for root: 1511341 bytes (1475 KiB)
[ 6.474322] UBIFS (ubi0:4): media format: w4/r0 (latest is w4/r0), UUID 8C38F51D-9372-4B55-8E20-D025F7446D6D, small LPT model
[ 6.482500] mount_root: overlay filesystem has not been fully initialized yet
[ 6.492542] mount_root: switching to jffs2 overlay
After mount_root
131072+0 records in
131072+0 records out
131072 bytes (128.0KB) copied, 0.589575 seconds, 217.1KB/s
ln: /lib/firmware/IPQ5018/caldata.bin: No such file or directory
131072+0 records in
131072+0 records out
131072 bytes (128.0KB) copied, 0.563794 seconds, 227.0KB/s
ln: /lib/firmware/qcn9100/caldata_1.bin: No such file or directory
ln: /lib/firmware/qcn6122/caldata_1.bin: No such file or directory
131072+0 records in
131072+0 records out
131072 bytes (128.0KB) copied, 0.551341 seconds, 232.2KB/s
ln: /lib/firmware/qcn9100/caldata_2.bin: No such file or directory
ln: /lib/firmware/qcn6122/caldata_2.bin: No such file or directory
[ 8.317395] procd: - early -
[ 8.317502] procd: - watchdog -
[ 8.975239] procd: - ubus -
[ 9.987939] procd: - init -
Please press Enter to activate this console.
[ 10.503635] ubi: mtd15 is already attached to ubi0BT FW mount is successful
[ 10.668510] ubi: mtd15 is already attached to ubi0 WIFI FW mount is successful
ssdk_switch_device_num_init[1159]:INFO:ess-switch dts node number: 2
[ 13.100500] ssdk_dt_get_switch_node[970]:INFO:ess-switch DT exist!
[ 13.105561] ssdk_dt_parse_access_mode[856]:INFO:switch_access_mode: local bus
[ 13.111599] ssdk_dt_parse_access_mode[869]:INFO:switchreg_base_addr: 0x39c00000
[ 13.118815] ssdk_dt_parse_access_mode[870]:INFO:switchreg_size: 0x200000
[ 13.125932] ssdk_dt_parse_mac_mode[295]:INFO:mac mode = 0xf
[ 13.132864] ssdk_dt_parse_mac_mode[301]:INFO:mac mode1 doesn't exit!
[ 13.138169] ssdk_dt_parse_mac_mode[310]:INFO:mac mode2 doesn't exit!
[ 13.144774] ssdk_dt_parse_port_bmp[757]:INFO:port_bmp doesn't exist!
[ 13.151135] ssdk_dt_parse_uniphy[332]:INFO:ess-uniphy DT exist!
[ 13.157451] ssdk_dt_parse_led[943]:INFO:current dts led_source_num is 1
[ 13.163090] ssdk_plat_init start
[ 15.574975] ssdk_mp_reset_init[739]:INFO:MP reset successfully!
[ 15.575037] ssdk_gcc_clock_init[1033]:INFO:SSDK gcc clock init successfully!
[ 15.580848] mpge_phy_api_ops_init[1089]:INFO:qca probe mpge phy driver succeeded!
[ 15.587393] regi_init[3598]:INFO:Initializing SCOMPHY!
[ 16.718992] _adpt_mp_uniphy_clk_output_ctrl_set[236]:INFO:uniphy will output clock as 25000000Hz
[ 16.719103] ssdk_led_init[152]:INFO:ssdk_led_mode:3, ssdk_led_map:ffc, ssdk_led_src_id:0
[ 16.726965] ssdk_switch_register[1710]:INFO:Chip version 0xee
[ 16.734958] qca_link_polling_select[1315]:INFO:link-polling-required node does not exist
[ 16.740550] ssdk_switch_register[1744]:INFO:polling is selected
[ 16.748717] regi_init[3608]:INFO:Initializing SCOMPHY Done!!
[ 16.754384] ssdk_dt_get_switch_node[970]:INFO:ess-switch DT exist!
[ 16.760272] ssdk_dt_parse_access_mode[856]:INFO:switch_access_mode: mdio
[ 16.766254] ssdk_dt_parse_mac_mode[292]:INFO:mac mode doesn't exit!
[ 16.773100] ssdk_dt_parse_mac_mode[301]:INFO:mac mode1 doesn't exit!
[ 16.779099] ssdk_dt_parse_mac_mode[310]:INFO:mac mode2 doesn't exit!
[ 16.785726] ssdk_dt_parse[1061]:INFO:switch node is qca83xx!
[ 16.792023] ssdk_plat_init start
[ 16.861701] f1_phy_api_ops_init[1517]:INFO:qca probe f1 phy driver succeeded!
[ 16.861722] regi_init[3556]:INFO:Initializing ISISC!!
[ 16.867846] /soc/ess-instance/ess-switch1@1: could not get #gpio-cells for /soc/pinctrl@1000000/audio_pinmux
[ 17.074964] qca_ar8327_gpio_reset[3489]:INFO:GPIO39 reset switch done
[ 17.075144] ssdk_switch_register[1718]:INFO:Chip version 0x1302
[ 17.080400] qca_link_polling_select[1315]:INFO:link-polling-required node does not exist
[ 17.086120] ssdk_switch_register[1744]:INFO:polling is selected
[ 18.734959] regi_init[3561]:INFO:Initializing ISISC Done!!
[ 18.735071] regi_init[3631]:INFO:qca-ssdk module init succeeded!
[ 18.746703] **********************************************************
[ 18.746737] * NSS Data Plane driver
[ 18.752122] **********************************************************
[ 18.787179] qca-nss 7a00000.nss: Direct firmware load for qca-nss0.bin failed with error -2
[ 18.787208] qca-nss 7a00000.nss: Falling back to user helper
/lib/firmware/qca-nss0.bin 33
[ 19.387138] nss_driver - fw of size 759276 bytes copied to load addr: 40000000, nss_id : 0
[ 19.389086] Supported Frequencies -
[ 19.394285] 850 MHz 1 GHz
[ 19.399935]
[ 19.400892] 7f10fc40: set sdma 8e8e6000
[ 19.402667] node size 2 # items 4
[ 19.407190] memory: 40000000 268435456 (avl 199741440) items 4 active_cores 1
[ 19.409317] addr/size storage words 2 2 # words 4 in DTS, ddr size 800000
[ 19.416485] 7f10fc40: NSS core 0 DDR from 40000000 to 40800000
[ 19.423286] 7f10fc40: meminfo init succeed
[ 19.451941] ip6_tables: (C) 2000-2006 Netfilter Core Team
[ 19.459847] node size 2 # items 4
[ 19.459872] memory: 40000000 268435456 (avl 199741440) items 4 active_cores 1
[ 19.462138] addr/size storage words 2 2 # words 4 in DTS, ddr size 800000
[ 19.469295] 7f10fc40: nss core 0 booted successfully
[ 19.482827] nf_conntrack version 0.5.0 (2866 buckets, 11464 max)
[ 19.489991] QCA Hy-Fi multicast installation successfully
[ 19.492595] PPP generic driver version 2.4.2
[ 19.495494] NET: Registered protocol family 24
[ 19.502344] QCA multicast snooping installed successfully
[ 19.515895] cannot find nss-macsec0 node
[ 19.515982] cannot find nss-macsec1 node
[ 19.518982] cannot find nss-macsec2 node
[ 19.522821] nss_macsec init success
[ 19.529257] arp_tables: (C) 2002 David S. Miller
[ 19.532614] ip_tables: (C) 2000-2006 Netfilter Core Team
[ 19.630146] nf_conntrack_rtsp v0.6.21 loading
[ 19.728787] nf_nat_rtsp v0.6.21 loading
[ 19.761986] xt_time: kernel timezone is -0000
qcawifi configuration is disable
[ 26.392495] configuring additional NSS pbufs
[ 26.396324] additional pbufs of size 802816 got added to NSS
[ 26.444309] mem_manager: module license 'Proprietary' taints kernel.
[ 26.444336] Disabling lock debugging due to kernel taint
[ 26.476846] qdf: unknown parameter 'mem_debug_disabled' ignored
[ 30.677580] wlan: [975:I:RPTR] qca_multi_link_init_module:
[ 30.677580] ******QCA Repeater Initialization Done***********
[ 30.677580]
***** starting cnssdaemon -i integrated -i integrated1 -i integrated2 *****
*****cnssdaemon pid=1043*********
[ 32.023637] cnss[41]: INFO: Setting daemon_support=1 for instance_id 0x41
[ 32.051149] cnss: ERR: Failed to get plat_priv for instance_id 0x42
[ 32.075852] cnss[2]: INFO: Setting daemon_support=1 for instance_id 0x2
******No cold_boot_support*****
[ 33.158083] wlan: [1088:I:ANY] =======ol_if_register_wifi3_0==========
[ 33.158083]
[ 33.158121] wlan: [1088:I:ANY] osif_nss_register_module: NSS wifi ops registered for target_type:1 with soc_ops:7f7686e0
[ 33.165068] remoteproc remoteproc0: powering up cd00000.qcom_q6v5_wcss
[ 33.201793] remoteproc remoteproc0: Booting fw image IPQ5018/q6_fw.mdt, size 1820
[ 34.960373] Subsystem error monitoring/handling services are up
[ 34.960755] remoteproc remoteproc0: remote processor cd00000.qcom_q6v5_wcss is now up
[ 34.961083] rpmsg_dev_probe: No pm domain
[ 34.961421] rpmsg_dev_probe: No pm domain
[ 34.977464] wlan: [1088:I:ANY] ol_ath_wifi_ssr: ol_ath_wifi_ssr: SSR event 2 bus_type 1
[ 34.981093] remoteproc remoteproc1: powering up q6v5_wcss_userpd1
[ 34.996991] q6v5_wcss_userpd1 wcss powered up successfully
[ 34.998975] Subsystem error monitoring/handling services are up
[ 35.001570] cnss[2]: INFO: QMI WLFW service connected, state: 0x1
[ 35.001807] remoteproc remoteproc1: remote processor q6v5_wcss_userpd1 is now up
[ 35.001869] wlan: [1088:I:ANY] ol_ath_wifi_ssr: ol_ath_wifi_ssr: SSR event 3 bus_type 1
[ 35.001889] cnss[2]: INFO: Waiting for FW ready. Device: 0xfffc, FW ready timeout: 15 seconds
[ 35.029792] cnss[2]: INFO: device_id : 65532 mem mode : [2]
[ 35.037640] cnss[2]: INFO: platform name: Qualcomm Technologies, Inc. IPQ5018/AP-MP03.5-C1
[ 35.047441] cnss[2]: INFO: Target capability: chip_id: 0x0, chip_family: 0x4, board_id: 0xff, soc_id: 0xffffffff, fw_version: 0x2502826e, fw_build_timestamp: 2021-05-05 16:28, otp_version: s
[ 35.051192] cnss[2]: INFO: Boardid from dts:24,FW:ff
[ 35.080851] cnss[2]: INFO: BDF location : 0x4c400000
[ 35.080877] cnss[2]: INFO: BDF IPQ5018/bdwlan.b24 size 131072
[ 35.085956] cnss[2]: INFO: per device BDF location : 0x4c420000
[ 35.090708] cnss[2]: INFO: CALDATA IPQ5018/caldata.bin size 131072 offset 0x20000
[ 35.105024] cnss[2]: INFO: FW ready received for device 0xfffc
[ 35.105427] wlan: [1088:I:ANY] pld_ahb_wlan_enable: cnss_mode: Mission mode
[ 35.110052] cnss[2]: INFO: Sending mode message, mode: MISSION(0), state: 0x7
[ 35.121056] wlan: [1088:I:ANY] qca_napi_create: qca_napi_create: napi instance 0 created on pipe 4
[ 35.124300] wlan: [1088:I:ANY] __ol_ath_attach: Allocated soc 89080500
[ 35.133132] wlan: [1088:D:dfs] WLAN_DEBUG_DFS1 : dfs_psoc_obj_create_notification: DFS obj attach to psoc successfully
[ 35.139742] wlan: [1088:E:CONFIG] cfg_ini_parse_to_store: Failed to parse *.ini file @ QCA5018.ini; status:4
[ 35.150912] wlan: [1088:I:ANY] osif_nss_wifi_soc_setup: nss-wifili:#1 register wifili function for soc
[ 35.160187] wlan: [1088:I:ANY] osif_nss_wifi_soc_setup: nss register id -1 nss config 7 Target Type 1d
[ 35.170555] wlan: [1088:I:ANY] __ol_ath_attach: dev name soc0
[ 35.179082] wlan: [1088:I:ANY] ol_ath_soc_attach: WMI attached. wmi_handle 8efa7c00
[ 35.188535] wlan: [1088:I:MBSSIE] ol_ath_sanitize_ema_vendor_ie_config: vendor_ie_size: 0 ven_ie_size_nibble: 1
[ 35.192261] wlan: [1088:I:MBSSIE] ol_ath_sanitize_ema_vendor_ie_config: vendor_ie_size: 0 ven_ie_size_nibble: 1
[ 35.202203] wlan: [1088:I:MBSSIE] ol_ath_sanitize_ema_vendor_ie_config: vendor_ie_size: 0 ven_ie_size_nibble: 1
[ 35.212185] wlan: [1088:I:MBSSIE] ol_ath_sanitize_ema_vendor_ie_config: vendor_ie_size: 0 ven_ie_size_nibble: 1
[ 35.222262] wlan: [1088:I:MBSSIE] ol_ath_sanitize_ema_vendor_ie_config: vendor_ie_size: 0 ven_ie_size_nibble: 1
[ 35.232305] wlan: [1088:I:MBSSIE] ol_ath_sanitize_ema_vendor_ie_config: vendor_ie_size: 0 ven_ie_size_nibble: 1
[ 35.242392] wlan: [1088:I:MBSSIE] ol_ath_sanitize_ema_vendor_ie_config: vendor_ie_size: 0 ven_ie_size_nibble: 7
[ 35.252460] wlan: [1088:I:MBSSIE] ol_ath_sanitize_ema_vendor_ie_config: vendor_ie_size: 0 ven_ie_size_nibble: 7
[ 35.262506] wlan: [1088:I:MBSSIE] ol_ath_sanitize_ema_vendor_ie_config: vendor_ie_size: 0 ven_ie_size_nibble: 7
[ 35.273873] wlan: [1088:I:MBSSIE] ol_ath_sanitize_ema_vendor_ie_config: vendor_ie_size: 0 ven_ie_size_nibble: 7
[ 35.282827] wlan: [1088:I:MBSSIE] ol_ath_sanitize_ema_vendor_ie_config: vendor_ie_size: 0 ven_ie_size_nibble: 1
[ 35.292745] wlan: [1088:I:MBSSIE] ol_ath_sanitize_ema_vendor_ie_config: vendor_ie_size: 0 ven_ie_size_nibble: 1
[ 35.302801] wlan: [1088:I:MBSSIE] ol_ath_sanitize_ema_vendor_ie_config: vendor_ie_size: 0 ven_ie_size_nibble: 1
[ 35.312858] wlan: [1088:I:MBSSIE] ol_ath_sanitize_ema_vendor_ie_config: vendor_ie_size: 0 ven_ie_size_nibble: 7
[ 35.322943] wlan: [1088:I:MBSSIE] ol_ath_sanitize_ema_vendor_ie_config: vendor_ie_size: 0 ven_ie_size_nibble: 7
[ 35.333040] wlan: [1088:I:ANY] htc_wmi_init: HT Create . 89207000
[ 35.343080] wlan: [1088:I:ANY] htc_wmi_init: Skipping BMI Done
[ 35.349289] wlan: [1088:I:ANY] htc_wmi_init: host_enable 0
[ 35.363853] wlan: [1088:I:ANY] ol_target_init_complete: CDP soc attach success
[ 35.363884] wlan: [1088:I:ANY] ol_target_init_complete: Soc attach success NSS config 0
[ 35.371516] wlan: [1088:I:ANY] htc_set_async_ep: htc_set_async_ep: htc_handle 89207000, ep 2, value 1
[ 35.379541] wlan: [81:I:TIF] HE_CAP Info = 9a08010d
[ 35.387392] wlan: [81:I:TIF] Num HW modes = 1
[ 35.392050] wlan: [81:I:TIF] Num PHY = 1
[ 35.396583] wlan: [81:I:TIF] FW Build Version (Ext.) = 0
[ 35.400534] wlan: [81:I:TIF] HDL Version: MajorVersion.MinorVersion = 0.0
[ 35.405852] wlan: [81:I:TIF] Preferred HW Mode = 0 Num Radios = 1
[ 35.412567] wlan: [81:W:TIF] add_11ax_mode_flags: 11AX wireless modes are not populated by the target in reg capabilities, adding 11AX wireless modes
[ 35.418655] wlan: [81:I:TIF] init_deinit_add_11ax_modes: hw_mode_id = 0 phy_id = 0 wireless modes = 0
[ 35.432742] wlan: [81:I:TIF] init_deinit_alloc_pdevs: CDP PDEV ATTACH success
[ 35.441241] wlan: [81:I:TIF] init_deinit_get_total_num_ema_vaps: num_radios: 1
[ 35.448334] wlan: [81:I:TIF] init_deinit_get_total_num_ema_vaps: ema_max_vap_cnt: 0
[ 35.455432] wlan: [81:I:TIF] init_deinit_get_total_num_vdevs_for_soc: num_vdevs: 9
[ 35.462965] wlan: [81:I:TIF] init_deinit_get_total_num_ema_vaps: num_radios: 1
[ 35.472090] wlan: [81:I:TIF] init_deinit_get_total_num_ema_vaps: ema_max_vap_cnt: 0
[ 35.477827] wlan: [81:I:TIF] init_deinit_get_total_num_vdevs_for_soc: num_vdevs: 9
[ 35.485378] wlan: [81:I:TIF] init_deinit_get_total_num_ema_vaps: num_radios: 1
[ 35.493006] wlan: [81:I:TIF] init_deinit_get_total_num_ema_vaps: ema_max_vap_cnt: 0
[ 35.500242] wlan: [81:I:TIF] init_deinit_get_total_num_vdevs_for_soc: num_vdevs: 9
[ 35.507774] wlan: [81:I:TIF] init_deinit_get_total_num_ema_vaps: num_radios: 1
[ 35.515407] wlan: [81:I:TIF] init_deinit_get_total_num_ema_vaps: ema_max_vap_cnt: 0
[ 35.522608] wlan: [81:I:TIF] init_deinit_get_total_num_vdevs_for_soc: num_vdevs: 9
[ 35.530170] wlan: [81:I:ANY] init_deinit_update_pdev_tgt_info: pdev id:0 wmi_handle:8efa7c00
[ 35.539609] wlan: [81:I:ANY] init_deinit_update_pdev_tgt_info: Pdev = 0 Number of peers = 137 vdevs = 9
[ 35.546454] wlan: [81:I:TIF] init_deinit_update_pdev_tgt_info: CDP PDEV INIT success
[ 35.656263] wlan: [81:I:ANY] copy_fw_abi_version_tlv: copy_fw_abi_version_tlv: INIT_CMD version: 1, 0, 0x5f414351, 0x4c4d, 0x0, 0x0
[ 35.695209] wlan: [81:I:ANY] ready_extract_init_status_tlv: ready_extract_init_status_tlv:0
[ 35.695245] wlan: [81:I:ANY] dp_peer_map_attach_wifi3: dp_peer_map_attach_wifi3 max_peers 163, max_ast_index: 528
[ 35.695245]
[ 35.702549] wlan: [1088:I:ANY] ol_ath_connect_htc: WMI is ready
[ 35.721214] wlan: [1088:I:ANY] ath_get_radio_index: Error: Could not match the device name : wifi%d
[ 35.721250] wlan: [1088:E:NSS] [nss-wifili]: pdev:87980500 radio_ifnum:28 scheme_id:1 radio_priority:0
[ 35.732722] wlan: [1088:E:TIF] target_if_lro_hash_config: pdev with id 0 is NULL
[ 35.740620] wlan: [1088:I:ANY] ol_ath_soc_attach: connect HTC
[ 35.746353] wlan: [1088:I:ANY] ol_ath_soc_attach: bypasswmi : 0
[ 35.752161] wlan: [1088:I:MSCS] qca_mscs_module_init:
[ 35.752161] ****QCA MSCS Initialization Done**** SoC 89080500
[ 35.757517] wlan: [1088:I:ANY] ol_ath_soc_attach: UMAC attach
[ 35.769990] wlan: [1088:I:ANY] __ol_ath_attach: pdev_netdev name wifi0
[ 35.774230] wlan: [1088:I:ANY] __ol_ath_attach: Skip txrx_pdev_attach_target
[ 35.780688] wlan: [1088:I:ANY] __ol_ath_attach: BURSTING enabled by default
[ 35.788084] wlan: [1088:I:ANY] ol_ath_pdev_attach: interface_id 0
[ 35.794584] wlan: [1088:I:TIF] ol_ath_pdev_regdmn_init: phy id = 0 Modes supported
[ 35.800823] wlan: [1088:I:TIF] ol_ath_pdev_regdmn_init: 11b = 1 11g = 1 11a = 0 11n = 1 11ac = 1 11ax = 1
[ 35.808484] wlan: [1088:I:TIF] ol_ath_pdev_regdmn_init: Reg cap - phy_id = 0 supp_bnd = 1, modes = 680680c, lo_2g = 2312, hi_2g = 2732 lo_g5 = 0, hi_5g = 0
[ 35.818030] wlan: [1088:I:ANY] ol_ath_update_wireless_modes: wireless_modes = 680680c before update
[ 35.832166] wlan: [1088:I:ANY] ol_ath_update_wireless_modes: Wireless_modes = 680680c after update
[ 35.840932] wlan: [1088:I:ANY] ol_ath_update_ext_caps: 11ax 2G supported case
[ 35.850086] wlan: [1088:I:MBSSIE] ol_ath_assign_mbssid_ref_bssid: MBSSID reference bssid is 02:03:7f:12:38:38 soc: soc0 pdev: wifi0
[ 35.857334] wlan: [1088:I:MBSSIE] ieee80211_mbss_attach: :>
[ 35.870110] wlan: [1088:I:MBSSIE] ieee80211_mbss_attach: :<
[ 35.874311] wlan: [1088:I:ANY] ol_resmgr_create: OL Resmgr Init-ed
[ 35.880196] wlan: [1088:I:ANY] acfg_attach: acfg_attach: 3323: Netlink socket created:8917d000
[ 35.886178] wlan: [1088:I:ANY] ol_ath_stats_attach: periodic_chan_stats: 1
[ 35.895264] wlan: [1088:I:ANY] wlan_scan_update_channel_list: num_chan: 11
[ 35.901853] wlan: [0:I:ANY] ol_ath_pdev_attach: Set global_ic[1], ptr:7f5b5e9c
[ 35.908441] wlan: [0:I:ANY] dp_lag_soc_enable: pdev(8917c408) Enabling DBDC Repeater 0 soc_lag 8915f180
[ 35.915712] wlan: [0:E:NSS] [nss-wifili]: NSS Wifili DBDC Repeater enable message passed
[ 35.925425] wlan: [0:I:ANY] dp_lag_pdev_set_primary_radio: pdev(8917c408) is_primary 0
[ 35.933649] wlan: [0:I:ANY] ol_ath_twt_enable_complete_event_handler: twt enabled
[ 35.941340] wlan: [1088:I:ANY] ol_ath_pri20_cfg_blockchanlist_parse: cfg block channel list is empty
[ 35.948779] wlan: [1088:I:ANY] ol_ath_configure_cong_ctrl_max_msdus: pdev_idx = 0 tx_desc_limit = 4096
[ 35.958032] wlan: [1088:I:ANY] __ol_ath_attach: needed_headroom reservation 44
[ 35.968351] wlan: [1088:I:ANY] ol_ath_enable_fraglist: Enabled Fraglist bit for the radio wifi0 features 41
[ 35.974263] wlan: [1088:I:ANY] wlan_cfg80211_init: Number of 2G channels: 11
[ 35.984641] wlan: [1088:I:ANY] ieee80211_cfg80211_radio_attach: ic: 0x87980500, wdev: 0x87997c40, wiphy: 0x87077960, netdev: 0x87980000
[ 35.992677] wlan: [1088:I:Dynamic Mode Change] ol_ath_check_and_reconfig_hw_mode: Running with HW mode = 0
[ 36.005062] wlan: [1088:E:QLD] qld_register: Handle or address is NULL
[ 36.013213] wlan: [1088:I:ANY] wlan_pdev_operation: num_radios=1, wifi_radios[0].sc = 87980500_radio_type = 2
[ 36.019896] wlan: [1088:I:ANY] ol_ath_wifi_ssr: ol_ath_wifi_ssr: SSR event 2 bus_type 1
[ 36.029709] remoteproc remoteproc2: powering up q6v5_wcss_userpd2
[ 36.040711] Subsystem error monitoring/handling services are up
[ 36.043607] remoteproc remoteproc2: remote processor q6v5_wcss_userpd2 is now up
[ 36.049667] wlan: [1088:I:ANY] ol_ath_wifi_ssr: ol_ath_wifi_ssr: SSR event 3 bus_type 1
[ 36.057053] cnss[41]: INFO: Waiting for FW ready. Device: 0xfffb, FW ready timeout: 15 seconds
[ 52.774982] cnss[41]: ERR: FW ready timed-out 15 seconds
[ 52.775006] qmi_history_index [27]
```
- free: to display amount of free and used memory in the system
```
# free
total used free shared buff/cache available
Mem: 8075208 3204964 1310540 551232 3559704 4198340
Swap: 2097148 0 2097148
```
- memtester: to do memory tests
```
root@ubuntu:~# memtester 200M 1
memtester version 4.3.0 (64-bit)
Copyright (C) 2001-2012 Charles Cazabon.
Licensed under the GNU General Public License version 2 (only).
pagesize is 4096
pagesizemask is 0xfffffffffffff000
want 200MB (209715200 bytes)
got 200MB (209715200 bytes), trying mlock ...locked.
Loop 1/1:
Stuck Address : ok
Random Value : ok
Compare XOR : ok
Compare SUB : ok
Compare MUL : ok
Compare DIV : ok
Compare OR : ok
Compare AND : ok
Sequential Increment: ok
Solid Bits : ok
Block Sequential : ok
Checkerboard : ok
Bit Spread : ok
Bit Flip : ok
Walking Ones : ok
Walking Zeroes : ok
8-bit Writes : ok
16-bit Writes : ok
Done.
```
- iperf3: to do active measurements of the maximum achievable bandwidth on IP networks
```
// As a server with IP 192.168.1.100
# iperf3 -s
// As a client for TX test
# iperf3 -c 192.168.1.100
// As a client for RX test
# iperf3 -c 192.168.1.100 -R
```
- ping: to send ICMP ECHO_REQUEST to network hosts
```
# ping www.google.com -c 5
PING www.google.com (172.217.166.164) 56(84) bytes of data.
64 bytes from bom07s20-in-f4.1e100.net (172.217.166.164): icmp_seq=1 ttl=57 time=2.40 ms
64 bytes from bom07s20-in-f4.1e100.net (172.217.166.164): icmp_seq=2 ttl=57 time=2.48 ms
64 bytes from bom07s20-in-f4.1e100.net (172.217.166.164): icmp_seq=3 ttl=57 time=2.43 ms
64 bytes from bom07s20-in-f4.1e100.net (172.217.166.164): icmp_seq=4 ttl=57 time=2.35 ms
```
- iw: to set the parameters of the network interface that are particular to the wireless operation like SSID, frequency etc
```
# iw dev wlan0 link
Connected to 68:7f:74:3b:b0:01 (on wlan0)
SSID: tesla-5g-bcm
freq: 5745
RX: 30206 bytes (201 packets)
TX: 4084 bytes (23 packets)
signal: -31 dBm
tx bitrate: 300.0 MBit/s MCS 15 40Mhz short GI
```
- wlanconfig: Create, destroy and manipulate madwifi VAPs.
```
# wlanconfig ath0 list
ADDR AID FREQ TxRATE RxRATE RSSI IDLE TXSEQ RXSEQ CAPS STATE DHCP TIME_TO_IP HTCAPS IEs
70:48:0f:d5:b3:79 4 36 104M 6M 20 9 340 367 EP 4001b ACK 2 AWPS RSN WME
f0:f6:1c:d5:51:16 5 36 78M 12M 19 20 275 276 EP 4001b ACK 2 WPGS RSN WME
54:9f:13:3f:95:25 9 36 72M 24M 43 6 1995 992 EP 4001b ACK 2 AWQS RSN WME
```
- ethtool: to retrieve information and change your NIC settings
```
# ethtool eth0
Settings for eth0:
Supported ports: [ TP ]
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Supports auto-negotiation: Yes
Advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Advertised auto-negotiation: Yes
Speed: 100Mb/s
Duplex: Full
Port: Twisted Pair
PHYAD: 1
Transceiver: internal
Auto-negotiation: on
Supports Wake-on: d
Wake-on: d
Link detected: yes
```
- LinuxSPPLE: to scan BLE devices
- dfu-util: to download and upload firmware to/from devices connected over USB.
```
# dfu-util -l
dfu-util 0.9
Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2016 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to http://sourceforge.net/p/dfu-util/tickets/
Found DFU: [28e9:0189] ver=1000, devnum=3, cfg=1, intf=0, path="1-1.3", alt=1, name="@Option Bytes /0x1FFFF800/01*016 g", serial="??"
Found DFU: [28e9:0189] ver=1000, devnum=3, cfg=1, intf=0, path="1-1.3", alt=0, name="@Internal Flash /0x08000000/512*002Kg", serial="?
```
- lsmod: to show the status of modules
```
Module Size Used by
fuse 52176 3
cryptd 14125 0
aes_i586 16647 2
aes_generic 32970 1 aes_i586
parport_pc 22036 0
ppdev 12651 0
lp 12797 0
parport 31254 3 lp,ppdev,parport_pc
bnep 17288 2
rfcomm 28626 0
bluetooth 103791 10 rfcomm,bnep
```
- nproc: to show the number of processing units available
```
# nproc
24
```
- killall: to kill processes by name
```
# killall minicom
[1]+ Terminated minicom
```
### Virtual file systems for debugging:
- /sys/class/gpio: to configure and set GPIO direction and value
```
// 1. export gpio 31
// 2. config it to out direction
// 3. set the value to 1
# echo 31 > /sys/class/gpio/export
# echo out > /sys/class/gpio/gpio31/direction
# echo 1 > /sys/class/gpio/gpio31/value
```
- /sys/kernel/debug/gpio: to show all gpios' info
```shell
# cat /sys/kernel/debug/gpio
GPIOs 0-31, platform/pinctrl, gpio0:
gpio-1 ( |vcc_sd ) out lo
gpio-4 ( |bt_default_wake_host) out hi
gpio-5 ( |GPIO Key Power ) in hi
gpio-8 ( |cx20921 rstn ) out hi
gpio-9 ( |bt_default_reset ) out hi
gpio-10 ( |reset ) out hi
gpio-11 ( |SPK_EN ) out hi
GPIOs 32-63, platform/pinctrl, gpio1:
gpio-33 ( |vbus-5v ) out lo
gpio-34 ( |int-n ) in hi
gpio-45 ( |enable ) out lo
gpio-46 ( |vsel ) out lo
gpio-49 ( |vsel ) out lo
GPIOs 64-95, platform/pinctrl, gpio2:
gpio-83 ( |bt_default_rts ) out lo
gpio-90 ( |bt_default_wake ) out hi
gpio-92 ( |WLAN_PEN ) out lo
GPIOs 96-127, platform/pinctrl, gpio3:
gpio-111 ( |mdio-reset ) out hi
GPIOs 128-159, platform/pinctrl, gpio4:
gpio-149 ( |AUDIO_GPIO ) out hi
gpio-150 ( |wdt87xx_Reset_Pin ) out hi
gpio-153 ( |vcc5v0_host ) out hi
gpio-157 ( |enable ) out lo
gpio-158 ( |enable ) out hi
```
- /proc/device-tree: to show the whole device
```shell
# ls /proc/device-tree
#address-cells amba compatible fpga-full pmu@f8891000
#size-cells amba_pl cpus memory
aliases chosen fixedregulator name
```
- /proc/cmdline: to show the boot command
```shell
# cat /proc/cmdline
ro root=/dev/VolGroup00/LogVol00 rhgb quiet 3
```
- /proc/mtd: to show the partition layout
```shell
# cat /proc/mtd
dev: size erasesize name
mtd0: 01000000 00020000 "boot"
mtd1: 01000000 00020000 "setting"
mtd2: 02000000 00020000 "rootfs"
mtd3: 0be00000 00020000 "home"
mtd4: 00200000 00020000 "storage"
mtd5: 00040000 00010000 "u-boot"
mtd6: 00040000 00010000 "others"
```
- /proc/meminfo: to show the memory info
```shell
cat /proc/meminfo
MemTotal: 12142744 kB
MemFree: 10889316 kB
Buffers: 391964 kB
Cached: 522584 kB
SwapCached: 0 kB
Active: 407604 kB
Inactive: 564460 kB
HighTotal: 0 kB
HighFree: 0 kB
LowTotal: 12142744 kB
LowFree: 10889316 kB
SwapTotal: 20972816 kB
SwapFree: 20972816 kB
Dirty: 304 kB
Writeback: 0 kB
AnonPages: 57388 kB
Mapped: 23556 kB
Slab: 214100 kB
PageTables: 7328 kB
NFS_Unstable: 0 kB
Bounce: 0 kB
CommitLimit: 27044188 kB
Committed_AS: 372876 kB
VmallocTotal: 34359738367 kB
VmallocUsed: 281368 kB
VmallocChunk: 34359456975 kB
HugePages_Total: 0
HugePages_Free: 0
HugePages_Rsvd: 0
Hugepagesize: 2048 kB
```
## Reference
https://ithelp.ithome.com.tw/articles/10101160
https://blog.csdn.net/cy_cai/article/details/40587095
https://linux.incomeself.com/linux%E5%95%9F%E5%8B%95%E5%BE%8C%E6%9F%A5%E7%9C%8Bdevice-tree%E7%9A%84%E5%85%A7%E5%AE%B9/
https://b8807053.pixnet.net/blog/post/347760131-linux-gpio-driver-guide
https://blog.csdn.net/lpwsw/article/details/121676529
https://blog.csdn.net/lu_embedded/article/details/53061901
https://www.computerhope.com/unix/lsmod.htm
https://www.thegeekstuff.com/2010/10/ethtool-command/
https://www.thegeekstuff.com/2014/04/lspci-examples/
https://diego.assencio.com/?index=1363692dafeabeff8e3f975077f92dfe
http://twlinzino.blogspot.com/2016/03/mpstat-core-cpu.html
https://gist.github.com/ptpt52/45d3f1927d3107e1f580cacbf5a75279
http://twlinzino.blogspot.com/2016/03/mpstat-core-cpu.html
https://www.tecmint.com/linux-ping-command-examples/
https://wireless.wiki.kernel.org/en/users/documentation/iw
https://community.ui.com/questions/wlanconfig-ath0-list-ap-on-uap-pro/68069bfe-22bd-4a23-8a89-dbae6a8465fb