[raspberry pi4]拿到raspberry pi4之后,如何熟悉单板

72 阅读32分钟

[toc]

树莓派独有的命令树莓派独有的命令

raspberry pi 有一些自己的特殊命令,如下:

root\@raspberrypi:/usr/bin # ls -al raspi\*

    -rwxr-xr-x 1 root root 84356 2\u6708  10  2021 raspi-config
    -rwxr-xr-x 1 root root 20564 10\u6708  1  2019 raspi-gpio
    -rwxr-xr-x 1 root root  2383 7\u6708  18  2019 raspinfo
    lrwxrwxrwx 1 root root    22 4\u6708  30 22:09 raspistill -> /opt/vc/bin/raspistill
    lrwxrwxrwx 1 root root    20 4\u6708  30 22:09 raspivid -> /opt/vc/bin/raspivid
    lrwxrwxrwx 1 root root    23 4\u6708  30 22:09 raspividyuv -> /opt/vc/bin/raspividyuv
    lrwxrwxrwx 1 root root    20 4\u6708  30 22:09 raspiyuv -> /opt/vc/bin/raspiyuv
    root@raspberrypi:/usr/bin # 

拍照片 $ raspistill -o imagel. jpg

拍视频 $ raspivid -o video h264 -t 10000

树莓派信息 nisy@raspberrypi:/dev/bus/usb/001 $ raspinfo

System Information
------------------

Raspberry Pi 4 Model B Rev 1.1
PRETTY_NAME="Raspbian GNU/Linux 11 (bullseye)"
NAME="Raspbian GNU/Linux"
VERSION_ID="11"
VERSION="11 (bullseye)"

Raspberry Pi reference 2023-05-03
Generated using pi-gen, https://github.com/RPi-Distro/pi-gen, 47eee1f0ddcf8811559d51eea1c1bb48335e3e88, stage5

Linux raspberrypi 6.1.21-v8+ #1642 SMP PREEMPT Mon Apr 3 17:24:16 BST 2023 aarch64 GNU/Linux
Revision	: c03111
Serial : 10000000bafb5028
Model : Raspberry Pi 4 Model B Rev 1.1
Throttled flag : throttled=0x50000
Camera     : supported=0 detected=0, libcamera interfaces=0

Videocore information
---------------------

Mar 17 2023 10:50:39 
Copyright (c) 2012 Broadcom
version 82f3750a65fadae9a38077e3c2e217ad158c8d54 (clean) (release) (start)

alloc failures:   0
compactions:    0
legacy block fails: 0

Filesystem information
----------------------
Filesystem   1K-blocks  Used Available Use% Mounted on
/dev/root    30706704 9022332 20099224 31% /
devtmpfs     1678472    0  1678472  0% /dev
tmpfs       1942696  26596  1916100  2% /dev/shm
tmpfs       777080  1328  775752  1% /run
tmpfs        5120    4   5116  1% /run/lock
/dev/mmcblk0p9  2093044  52080  2040964  3% /boot
tmpfs       388536   24  388512  1% /run/user/1000
/dev/mmcblk0p8  1014440   168  945460  1% /media/nisy/OVERLAY
/dev/mmcblk0p7  33995520 768640 33226880  3% /media/nisy/SHARE
/dev/mmcblk0p6  3139576 1405920  1733656 45% /media/nisy/RECALBOX
/dev/mmcblk0p12 30190624   24 28631664  1% /media/nisy/SHARE1
/dev/mmcblk0p11  3296968 1910796  1386172 58% /media/nisy/BATOCERA

Filename Type Size Used Priority
/var/swap                file 102396 0 -2

Package version information
---------------------------
raspberrypi-ui-mods:
 Installed: 1.20230127
raspberrypi-sys-mods:
 Installed: 20230329
openbox:
 Installed: 3.6.1-9+rpt1+deb11u1
lxpanel:
 Installed: 0.10.1-2+rpt19
pcmanfm:
 Installed: 1.3.2-1+rpt9
rpd-plym-splash:
 Installed: 0.32

Networking Information
----------------------

eth0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
    ether m.m.m.m txqueuelen 1000 (Ethernet)
    RX packets 0 bytes 0 (0.0 B)
    RX errors 0 dropped 0 overruns 0 frame 0
    TX packets 0 bytes 0 (0.0 B)
    TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
    inet x.x.x.x netmask x.x.x.x
    inet6 ::1 prefixlen 128 scopeid 0x10<host>
    loop txqueuelen 1000 (Local Loopback)
    RX packets 52 bytes 4194 (4.0 KiB)
    RX errors 0 dropped 0 overruns 0 frame 0
    TX packets 52 bytes 4194 (4.0 KiB)
    TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
    inet x.x.x.x netmask x.x.x.x broadcast x.x.x.x
    inet6 y::y.y.y.y prefixlen 64 scopeid 0x20<link>
    ether m.m.m.m txqueuelen 1000 (Ethernet)
    RX packets 10453 bytes 6125586 (5.8 MiB)
    RX errors 0 dropped 0 overruns 0 frame 0
    TX packets 6379 bytes 805957 (787.0 KiB)
    TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0


USB Information
---------------

/: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 5000M
/: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/1p, 480M
  |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 480M
    |__ Port 1: Dev 5, If 0, Class=Human Interface Device, Driver=usbhid, 12M
    |__ Port 1: Dev 5, If 1, Class=Human Interface Device, Driver=usbhid, 12M
    |__ Port 1: Dev 5, If 2, Class=Human Interface Device, Driver=usbhid, 12M
    |__ Port 4: Dev 4, If 0, Class=Human Interface Device, Driver=usbhid, 1.5M

Display Information
-------------------

Running (F)KMS and X

Screen 0: minimum 320 x 200, current 1920 x 1080, maximum 7680 x 7680
HDMI-1 disconnected (normal left inverted right x axis y axis)
Identifier: 0x45
Timestamp: 18070
Subpixel:  unknown
Clones:   
CRTCs:   4
Transform: 1.000000 0.000000 0.000000
      0.000000 1.000000 0.000000
      0.000000 0.000000 1.000000
      filter: 
Output format: Automatic 
supported: Automatic, RGB, YCbCr 4:2:2, YCbCr 4:4:4
Broadcast RGB: Automatic 
supported: Automatic, Full, Limited 16:235
max bpc: 8 
range: (8, 12)
bottom margin: 0 
range: (0, 100)
top margin: 0 
range: (0, 100)
right margin: 0 
range: (0, 100)
left margin: 0 
range: (0, 100)
Colorspace: Default 
supported: Default, SMPTE_170M_YCC, BT709_YCC, XVYCC_601, XVYCC_709, SYCC_601, opYCC_601, opRGB, BT2020_CYCC, BT2020_RGB, BT2020_YCC, DCI-P3_RGB_D65, DCI-P3_RGB_Theater
link-status: Good 
supported: Good, Bad
CONNECTOR_ID: 32 
supported: 32
non-desktop: 0 
range: (0, 1)
HDMI-2 connected primary 1920x1080+0+0 (0x48) normal (normal left inverted right x axis y axis) 521mm x 293mm
Identifier: 0x46
Timestamp: 18070
Subpixel:  unknown
Gamma:   1.0:1.0:1.0
Brightness: 1.0
Clones:   
CRTC:    0
CRTCs:   0
Transform: 1.000000 0.000000 0.000000
      0.000000 1.000000 0.000000
      0.000000 0.000000 1.000000
      filter: 
_MUTTER_PRESENTATION_OUTPUT: 0 
EDID: 
00ffffffffffff004c2d100c53465a5a
2f19010380341d782a7dd1a45650a128
0f5054bfef80714f81c0810081809500
a9c0b3000101023a801871382d40582c
450009252100001e011d007251d01e20
6e28550009252100001e000000fd0032
4b1e5111000a202020202020000000fc
00533234453336300a20202020200184
020311b14690041f13120365030c0010
00011d00bc52d01e20b8285540092521
00001e8c0ad090204031200c40550009
25210000188c0ad08a20e02d10103e96
00092521000018000000000000000000
00000000000000000000000000000000
00000000000000000000000000000000
00000000000000000000000000000051
Output format: Automatic 
supported: Automatic, RGB, YCbCr 4:2:2, YCbCr 4:4:4
Broadcast RGB: Automatic 
supported: Automatic, Full, Limited 16:235
max bpc: 8 
range: (8, 12)
bottom margin: 0 
range: (0, 100)
top margin: 0 
range: (0, 100)
right margin: 0 
range: (0, 100)
left margin: 0 
range: (0, 100)
Colorspace: Default 
supported: Default, SMPTE_170M_YCC, BT709_YCC, XVYCC_601, XVYCC_709, SYCC_601, opYCC_601, opRGB, BT2020_CYCC, BT2020_RGB, BT2020_YCC, DCI-P3_RGB_D65, DCI-P3_RGB_Theater
link-status: Good 
supported: Good, Bad
CONNECTOR_ID: 42 
supported: 42
non-desktop: 0 
range: (0, 1)
 1920x1080 (0x48) 148.500MHz +HSync +VSync *current +preferred
    h: width 1920 start 2008 end 2052 total 2200 skew  0 clock 67.50KHz
    v: height 1080 start 1084 end 1089 total 1125      clock 60.00Hz
 1920x1080 (0x49) 148.500MHz +HSync +VSync
    h: width 1920 start 2448 end 2492 total 2640 skew  0 clock 56.25KHz
    v: height 1080 start 1084 end 1089 total 1125      clock 50.00Hz
 1920x1080 (0x4a) 148.352MHz +HSync +VSync
    h: width 1920 start 2008 end 2052 total 2200 skew  0 clock 67.43KHz
    v: height 1080 start 1084 end 1089 total 1125      clock 59.94Hz
 1680x1050 (0x4b) 119.000MHz +HSync -VSync
    h: width 1680 start 1728 end 1760 total 1840 skew  0 clock 64.67KHz
    v: height 1050 start 1053 end 1059 total 1080      clock 59.88Hz
省略几万字

Connector 0 (32) HDMI-A-1 (disconnected)
 Encoder 0 (31) TMDS
Connector 1 (42) HDMI-A-2 (connected)
 Encoder 1 (41) TMDS
  Crtc 4 (107) 1920x1080@60.00 148.500 1920/88/44/148/+ 1080/4/5/36/+ 60 (60.00)  
   Plane 4 (97) fb-id: 339 (crtcs: 4) 0,0 1920x1080 -> 0,0 1920x1080 (XR24 AR24 AB24 XB24 RG16 BG16 AR15 XR15 RG24 BG24 YU16 YV16 YU24 YV24 YU12 YV12 NV12 NV21 NV16 NV61 P030 XR30 AR30 AB30 XB30 RGB8 BGR8 XR12 AR12 XB12 AB12 BX12 BA12 RX12 RA12)
    FB 339 1920x1080 XR24
   Plane 26 (319) fb-id: 344 (crtcs: 4) 0,0 64x64 -> 1466,734 64x64 (XR24 AR24 AB24 XB24 RG16 BG16 AR15 XR15 RG24 BG24 YU16 YV16 YU24 YV24 YU12 YV12 NV12 NV21 NV16 NV61 P030 XR30 AR30 AB30 XB30 RGB8 BGR8 XR12 AR12 XB12 AB12 BX12 BA12 RX12 RA12)
    FB 344 64x64 AR24

Connector 1 (42) HDMI-A-2 (connected)
  0 1920x1080@60.00 148.500 1920/88/44/148/+  1080/4/5/36/+   60 (60.00) P|D  
  1 1920x1080@60.00 148.500 1920/88/44/148/+  1080/4/5/36/+   60 (60.00) D   16:9
省略几万字
 34 640x480@59.94   25.175 640/16/96/48/-   480/10/2/33/-   60 (59.94) D   
 35 720x400@70.08   28.320 720/18/108/54/-  400/12/2/35/+   70 (70.08) D   

HDMI0:       HDMI_HOTPLUG = 0x00000000
HDMI1:       HDMI_HOTPLUG = 0x00000001

/sys/kernel/debug/dri/1/state:
plane[47]: plane-0
crtc=(null)
fb=0
crtc-pos=0x0+0+0
src-pos=0.000000x0.000000+0.000000+0.000000
rotation=1
normalized-zpos=0
color-encoding=ITU-R BT.709 YCbCr
color-range=YCbCr limited range
plane[64]: plane-1
省略几万字
self_refresh_aware=0
max_requested_bpc=0



config.txt
----------

arm_64bit=1
arm_boost=1
arm_freq=1500
audio_pwm_mode=514
camera_auto_detect=1
config_hdmi_boost=5
core_freq=500
core_freq_min=200
disable_commandline_tags=2
disable_l2cache=1
disable_overscan=1
disable_splash=1
display_auto_detect=1
display_hdmi_rotate=-1
display_lcd_rotate=-1
dvfs=3
enable_gic=1
force_eeprom_read=1
force_pwm_open=1
framebuffer_ignore_alpha=1
framebuffer_swap=1
gpu_freq=500
gpu_freq_min=250
init_uart_clock=0x2dc6c00
lcd_framerate=60
mask_gpu_interrupt0=3072
mask_gpu_interrupt1=25763
max_framebuffers=2
over_voltage_avs=-11250
pause_burst_frames=1
program_serial_random=1
second_boot=1
total_mem=4096
hdmi_force_cec_address:0=65535
hdmi_force_cec_address:1=65535
hdmi_pixel_freq_limit:0=0x11e1a300
hdmi_pixel_freq_limit:1=0x11e1a300
device_tree=-
overlay_prefix=overlays/
hdmi_cvt:0=
hdmi_cvt:1=
hdmi_edid_filename:0=
hdmi_edid_filename:1=
hdmi_timings:0=
hdmi_timings:1=

cmdline.txt
-----------
coherent_pool=1M 8250.nr_uarts=0 snd_bcm2835.enable_headphones=0 snd_bcm2835.enable_headphones=1 snd_bcm2835.enable_hdmi=1 snd_bcm2835.enable_hdmi=0 video=HDMI-A-1:1920x1080M@60 smsc95xx.macaddr=DC:A6:32:17:19:A2 vc_mem.mem_base=0x3ec00000 vc_mem.mem_size=0x40000000 console=ttyS0,115200 console=tty1 root=/dev/mmcblk0p10 rootfstype=ext4 fsck.repair=yes rootwait quiet splash plymouth.ignore-serial-consoles

raspi-gpio settings
-------------------

BANK0 (GPIO 0 to 27):
GPIO 0: level=1 fsel=0 func=INPUT pull=UP
GPIO 1: level=1 fsel=0 func=INPUT pull=UP
GPIO 2: level=1 fsel=0 func=INPUT pull=UP
GPIO 3: level=1 fsel=0 func=INPUT pull=UP
GPIO 4: level=1 fsel=0 func=INPUT pull=UP
GPIO 5: level=1 fsel=0 func=INPUT pull=UP
GPIO 6: level=1 fsel=0 func=INPUT pull=UP
GPIO 7: level=1 fsel=0 func=INPUT pull=UP
GPIO 8: level=1 fsel=0 func=INPUT pull=UP
GPIO 9: level=0 fsel=0 func=INPUT pull=DOWN
GPIO 10: level=0 fsel=0 func=INPUT pull=DOWN
GPIO 11: level=0 fsel=0 func=INPUT pull=DOWN
GPIO 12: level=0 fsel=0 func=INPUT pull=DOWN
GPIO 13: level=0 fsel=0 func=INPUT pull=DOWN
GPIO 14: level=1 fsel=0 func=INPUT pull=NONE
GPIO 15: level=1 fsel=0 func=INPUT pull=UP
GPIO 16: level=0 fsel=0 func=INPUT pull=DOWN
GPIO 17: level=0 fsel=0 func=INPUT pull=DOWN
GPIO 18: level=0 fsel=0 func=INPUT pull=DOWN
GPIO 19: level=0 fsel=0 func=INPUT pull=DOWN
GPIO 20: level=0 fsel=0 func=INPUT pull=DOWN
GPIO 21: level=0 fsel=0 func=INPUT pull=DOWN
GPIO 22: level=0 fsel=0 func=INPUT pull=DOWN
GPIO 23: level=0 fsel=0 func=INPUT pull=DOWN
GPIO 24: level=0 fsel=0 func=INPUT pull=DOWN
GPIO 25: level=0 fsel=0 func=INPUT pull=DOWN
GPIO 26: level=0 fsel=0 func=INPUT pull=DOWN
GPIO 27: level=0 fsel=0 func=INPUT pull=DOWN
BANK1 (GPIO 28 to 45):
GPIO 28: level=1 fsel=2 alt=5 func=RGMII_MDIO pull=UP
GPIO 29: level=0 fsel=2 alt=5 func=RGMII_MDC pull=DOWN
GPIO 30: level=0 fsel=7 alt=3 func=CTS0 pull=UP
GPIO 31: level=0 fsel=7 alt=3 func=RTS0 pull=NONE
GPIO 32: level=1 fsel=7 alt=3 func=TXD0 pull=NONE
GPIO 33: level=1 fsel=7 alt=3 func=RXD0 pull=UP
GPIO 34: level=0 fsel=7 alt=3 func=SD1_CLK pull=NONE
GPIO 35: level=1 fsel=7 alt=3 func=SD1_CMD pull=UP
GPIO 36: level=1 fsel=7 alt=3 func=SD1_DAT0 pull=UP
GPIO 37: level=1 fsel=7 alt=3 func=SD1_DAT1 pull=UP
GPIO 38: level=1 fsel=7 alt=3 func=SD1_DAT2 pull=UP
GPIO 39: level=1 fsel=7 alt=3 func=SD1_DAT3 pull=UP
GPIO 40: level=1 fsel=4 alt=0 func=PWM1_0 pull=NONE
GPIO 41: level=0 fsel=4 alt=0 func=PWM1_1 pull=NONE
GPIO 42: level=0 fsel=1 func=OUTPUT pull=UP
GPIO 43: level=1 fsel=0 func=INPUT pull=UP
GPIO 44: level=1 fsel=5 alt=1 func=SDA0 pull=UP
GPIO 45: level=1 fsel=5 alt=1 func=SCL0 pull=UP
BANK2 (GPIO 46 to 53):
GPIO 46: level=0 fsel=0 func=INPUT pull=UP
GPIO 47: level=0 fsel=0 func=INPUT pull=UP
GPIO 48: level=0 fsel=0 func=INPUT pull=DOWN
GPIO 49: level=0 fsel=0 func=INPUT pull=DOWN
GPIO 50: level=0 fsel=0 func=INPUT pull=DOWN
GPIO 51: level=0 fsel=0 func=INPUT pull=DOWN
GPIO 52: level=0 fsel=0 func=INPUT pull=DOWN
GPIO 53: level=0 fsel=0 func=INPUT pull=DOWN

vcdbg log messages
------------------

004280.757: arasan: arasan_emmc_open
004280.927: arasan: arasan_emmc_set_clock C0: 0x00800000 C1: 0x000e0047 emmc: 200000000 actual: 390625 div: 0x00000100 target: 400000 min: 400000 max: 400000 delay: 5
004385.702: arasan: arasan_emmc_set_clock C0: 0x00800000 C1: 0x000e0047 emmc: 200000000 actual: 390625 div: 0x00000100 target: 400000 min: 400000 max: 400000 delay: 5
004385.789: arasan: arasan_emmc_set_clock C0: 0x00800f00 C1: 0x000e0047 emmc: 200000000 actual: 390625 div: 0x00000100 target: 400000 min: 390000 max: 400000 delay: 5
004422.127: arasan: arasan_emmc_set_clock C0: 0x00800f06 C1: 0x000e0207 emmc: 200000000 actual: 50000000 div: 0x00000002 target: 50000000 min: 0 max: 50000000 delay: 1
004427.516: brfs: File read: /mfs/sd/config.txt
004428.495: brfs: File read: 2113 bytes
004450.193: HDMI0:EDID error reading EDID block 0 attempt 0
004451.209: HDMI0:EDID giving up on reading EDID block 0
004511.555: brfs: File read: /mfs/sd/config.txt
005271.985: gpioman: gpioman_get_pin_num: pin DISPLAY_DSI_PORT not defined
005274.506: *** Restart logging
005274.526: brfs: File read: 2113 bytes
005280.051: hdmi: HDMI0:EDID error reading EDID block 0 attempt 0
005281.069: hdmi: HDMI0:EDID giving up on reading EDID block 0
005286.111: hdmi: HDMI0:EDID error reading EDID block 0 attempt 0
005287.126: hdmi: HDMI0:EDID giving up on reading EDID block 0
005287.144: hdmi: HDMI:hdmi_get_state is deprecated, use hdmi_get_display_state instead
005345.114: HDMI0: hdmi_pixel_encoding: 300000000
005345.127: HDMI1: hdmi_pixel_encoding: 300000000
005345.618: kernel=
005352.552: dtb_file 'bcm2711-rpi-4-b.dtb'
005358.075: brfs: File read: /mfs/sd/bcm2711-rpi-4-b.dtb
005358.092: Loaded 'bcm2711-rpi-4-b.dtb' to 0x100 size 0xcd71
005371.275: brfs: File read: 52593 bytes
005384.016: brfs: File read: /mfs/sd/overlays/overlay_map.dtb
005456.615: Found camera 'ov5647' on port 0, unicam_port 1
005457.132: brfs: File read: 2347 bytes
005469.037: brfs: File read: /mfs/sd/overlays/ov5647.dtbo
005510.503: Loaded overlay 'ov5647'
005649.918: brfs: File read: 3368 bytes
005653.821: brfs: File read: /mfs/sd/config.txt
005654.691: dtparam: audio=on
005666.369: brfs: File read: 2113 bytes
005690.284: brfs: File read: /mfs/sd/overlays/vc4-kms-v3d-pi4.dtbo
005844.570: Loaded overlay 'vc4-kms-v3d'
006236.058: brfs: File read: 3913 bytes
006239.340: brfs: File read: /mfs/sd/cmdline.txt
006239.422: Read command line from file 'cmdline.txt':
006239.451: 'console=serial0,115200 console=tty1 root=/dev/mmcblk0p10 rootfstype=ext4 fsck.repair=yes rootwait quiet splash plymouth.ignore-serial-consoles'
006580.819: brfs: File read: 143 bytes
008341.102: brfs: File read: /mfs/sd/kernel8.img
008341.143: Loaded 'kernel8.img' to 0x80000 size 0x7d6bd0
011179.580: Kernel relocated to 0x200000
011179.606: Device tree loaded to 0x2eff2800 (size 0xd79a)
011186.842: gpioman: gpioman_get_pin_num: pin SDCARD_CONTROL_POWER not defined
013330.542: vchiq_core: vchiq_init_state: slot_zero = 0xcf000000, is_master = 1
013341.217: TV service:host side not connected, dropping notification 0x00000002, 0x00000001, 0x00000010

dmesg log
---------

[  0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd083]
[  0.000000] Linux version 6.1.21-v8+ (dom@buildbot) (aarch64-linux-gnu-gcc-8 (Ubuntu/Linaro 8.4.0-3ubuntu1) 8.4.0, GNU ld (GNU Binutils for Ubuntu) 2.34) #1642 SMP PREEMPT Mon Apr 3 17:24:16 BST 2023
[  0.000000] random: crng init done
[  0.000000] Machine model: Raspberry Pi 4 Model B Rev 1.1
[  0.000000] efi: UEFI not found.
[  0.000000] Reserved memory: created CMA memory pool at 0x000000000ec00000, size 512 MiB
[  0.000000] OF: reserved mem: initialized node linux,cma, compatible id shared-dma-pool
[  0.000000] Zone ranges:
[  0.000000]  DMA   [mem 0x0000000000000000-0x000000003fffffff]
[  0.000000]  DMA32  [mem 0x0000000040000000-0x00000000fbffffff]
[  0.000000]  Normal  empty
[  0.000000] Movable zone start for each node
[  0.000000] Early memory node ranges
[  0.000000]  node  0: [mem 0x0000000000000000-0x000000003b3fffff]
[  0.000000]  node  0: [mem 0x0000000040000000-0x00000000fbffffff]
[  0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x00000000fbffffff]
[  0.000000] On node 0, zone DMA32: 19456 pages in unavailable ranges
[  0.000000] On node 0, zone DMA32: 16384 pages in unavailable ranges
[  0.000000] percpu: Embedded 29 pages/cpu s78504 r8192 d32088 u118784
[  0.000000] pcpu-alloc: s78504 r8192 d32088 u118784 alloc=29*4096
[  0.000000] pcpu-alloc: [0] 0 [0] 1 [0] 2 [0] 3 
[  0.000000] Detected PIPT I-cache on CPU0
[  0.000000] CPU features: detected: Spectre-v2
[  0.000000] CPU features: detected: Spectre-v3a
[  0.000000] CPU features: detected: Spectre-v4
[  0.000000] CPU features: detected: Spectre-BHB
[  0.000000] CPU features: kernel page table isolation forced ON by KASLR
[  0.000000] CPU features: detected: Kernel page table isolation (KPTI)
[  0.000000] CPU features: detected: ARM erratum 1742098
[  0.000000] CPU features: detected: ARM errata 1165522, 1319367, or 1530923
[  0.000000] alternatives: applying boot alternatives
[  0.000000] Built 1 zonelists, mobility grouping on. Total pages: 996912
[  0.000000] Kernel command line: coherent_pool=1M 8250.nr_uarts=0 snd_bcm2835.enable_headphones=0 snd_bcm2835.enable_headphones=1 snd_bcm2835.enable_hdmi=1 snd_bcm2835.enable_hdmi=0 video=HDMI-A-1:1920x1080M@60 smsc95xx.macaddr=m.m.m.m vc_mem.mem_base=0x3ec00000 vc_mem.mem_size=0x40000000 console=ttyS0,115200 console=tty1 root=/dev/mmcblk0p10 rootfstype=ext4 fsck.repair=yes rootwait quiet splash plymouth.ignore-serial-consoles
[  0.000000] Unknown kernel command line parameters "splash", will be passed to user space.
[  0.000000] Dentry cache hash table entries: 524288 (order: 10, 4194304 bytes, linear)
[  0.000000] Inode-cache hash table entries: 262144 (order: 9, 2097152 bytes, linear)
[  0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[  0.000000] software IO TLB: area num 4.
[  0.000000] software IO TLB: mapped [mem 0x0000000037400000-0x000000003b400000] (64MB)
[  0.000000] Memory: 3356944K/4050944K available (11776K kernel code, 2106K rwdata, 3688K rodata, 4160K init, 1077K bss, 169712K reserved, 524288K cma-reserved)
[  0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[  0.000000] ftrace: allocating 39744 entries in 156 pages
[  0.000000] ftrace: allocated 156 pages with 4 groups
[  0.000000] trace event string verifier disabled
[  0.000000] rcu: Preemptible hierarchical RCU implementation.
[  0.000000] rcu: RCU event tracing is enabled.
[  0.000000] rcu: RCU restricting CPUs from NR_CPUS=256 to nr_cpu_ids=4.
[  0.000000] Trampoline variant of Tasks RCU enabled.
省略几万字
EEPROM
------

*** UPDATE AVAILABLE ***
BOOTLOADER: update available
  CURRENT: Thu 29 Apr 2021 04:11:25 PM UTC (1619712685)
  LATEST: Wed 11 Jan 2023 05:40:52 PM UTC (1673458852)
  RELEASE: default (/lib/firmware/raspberrypi/bootloader/default)
      Use raspi-config to change the release.

 VL805_FW: Dedicated VL805 EEPROM
   VL805: up to date
  CURRENT: 000138c0
  LATEST: 000138c0

nisy@raspberrypi:/dev/bus/usb/001 $ raspividyuv 

ERROR: the system should be configured for the legacy camera stack

nisy@raspberrypi:/dev/bus/usb/001 $ raspiyuv

ERROR: the system should be configured for the legacy camera stack
nisy@raspberrypi:/dev/bus/usb/001 

基本配置命令 sudo raspi-config

GPIO

nisy@raspberrypi:~ $ pinout
,--------------------------------.
| oooooooooooooooooooo J8   +======
| 1ooooooooooooooooooo  PoE |   Net
|  Wi                    1o +======
|  Fi  Pi Model 4B  V1.1 oo      |
|        ,----. +---+         +====
| |D|    |SoC | |RAM|         |USB3
| |S|    |    | |   |         +====
| |I|    `----' +---+            |
|                   |C|       +====
|                   |S|       |USB2
| pwr   |hd|   |hd| |I||A|    +====
`-| |---|m0|---|m1|----|V|-------'

Revision           : c03111
SoC                : BCM2711
RAM                : 4GB
Storage            : MicroSD
USB ports          : 4 (of which 2 USB3)
Ethernet ports     : 1 (1000Mbps max. speed)
Wi-fi              : True
Bluetooth          : True
Camera ports (CSI) : 1
Display ports (DSI): 1

J8:
   3V3  (1) (2)  5V    
 GPIO2  (3) (4)  5V    
 GPIO3  (5) (6)  GND   
 GPIO4  (7) (8)  GPIO14
   GND  (9) (10) GPIO15
GPIO17 (11) (12) GPIO18
GPIO27 (13) (14) GND   
GPIO22 (15) (16) GPIO23
   3V3 (17) (18) GPIO24
GPIO10 (19) (20) GND   
 GPIO9 (21) (22) GPIO25
GPIO11 (23) (24) GPIO8 
   GND (25) (26) GPIO7 
 GPIO0 (27) (28) GPIO1 
 GPIO5 (29) (30) GND   
 GPIO6 (31) (32) GPIO12
GPIO13 (33) (34) GND   
GPIO19 (35) (36) GPIO16
GPIO26 (37) (38) GPIO20
   GND (39) (40) GPIO21

POE:
TR01 (1) (2) TR00
TR03 (3) (4) TR02

For further information, please refer to https://pinout.xyz/

树莓派跑分

./7zzs b

7zip GUI(32bit)

pi@raspberrypi:~/Downloads $ ./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=zh_CN.UTF-8 Threads:4

Compiler: 9.2.1 20191025 GCC 9.2.1
Linux : 5.10.52-v7l+ : #1441 SMP Tue Aug 3 18:11:56 BST 2021 : armv7l
PageSize:4KB hwcap:3FB0D6:NEON hwcap2:10:CRC32
LE 

1T CPU Freq (MHz):   770  1496  1499  1482  1492  1498  1498
2T CPU Freq (MHz): 199% 1487   200% 1498  

RAM size:    2048 MB,  # CPU hardware threads:   4
RAM usage:    889 MB,  # Benchmark threads:      4

                       Compressing  |                  Decompressing
Dict     Speed Usage    R/U Rating  |      Speed Usage    R/U Rating
         KiB/s     %   MIPS   MIPS  |      KiB/s     %   MIPS   MIPS

22:       4002   333   1170   3894  |      79365   363   1865   6771
23:       3711   339   1116   3781  |      77910   364   1853   6741
24:       3640   342   1144   3914  |      81043   388   1833   7112
25:       3506   351   1142   4004  |      72867   358   1810   6485
----------------------------------  | ------------------------------
Avr:      3715   341   1143   3898  |      77796   368   1840   6777
Tot:             355   1492   5338

32bit 7zzs测试:

RAM size:    2048 MB,  # CPU hardware threads:   4
RAM usage:    889 MB,  # Benchmark threads:      4

                       Compressing  |                  Decompressing
Dict     Speed Usage    R/U Rating  |      Speed Usage    R/U Rating
         KiB/s     %   MIPS   MIPS  |      KiB/s     %   MIPS   MIPS

22:       4159   333   1216   4046  |      80710   362   1901   6886
23:       3981   345   1177   4057  |      82400   378   1887   7130
24:       3753   337   1198   4035  |      76818   360   1875   6741
25:       3684   357   1178   4207  |      74340   358   1849   6616
----------------------------------  | ------------------------------
Avr:      3894   343   1192   4086  |      78567   364   1878   6843
Tot:             354   1535   5465

64bit 7zzs测试:


7-Zip (z) 22.01 (arm64) : Copyright (c) 1999-2022 Igor Pavlov : 2022-07-15
 64-bit arm_v:8 locale=en_US.UTF-8 Threads:4, ASM

Compiler: 9.2.1 20191025 GCC 9.2.1
Linux : 5.15.32-v8+ : #1538 SMP PREEMPT Thu Mar 31 19:40:39 BST 2022 : aarch64
PageSize:4KB hwcap:887:CRC32:ASIMD
LE 

1T CPU Freq (MHz): 1489 1498 967 1497 1497 1497 1497
2T CPU Freq (MHz): 200% 1497 200% 1497 

RAM size:  3794 MB, # CPU hardware threads: 4
RAM usage:  889 MB, # Benchmark threads:   4

            Compressing |         Decompressing
Dict  Speed Usage  R/U Rating |   Speed Usage  R/U Rating
     KiB/s  % MIPS MIPS |   KiB/s  % MIPS MIPS

22:   4166 318 1275 4053 |  115032 398 2464 9814
23:   3666 290 1288 3735 |  112664 398 2448 9749
24:   3947 353 1201 4244 |  102922 373 2423 9032
25:   3758 348 1232 4291 |   99193 369 2392 8828
---------------------------------- | ------------------------------
Avr:   3884 327 1249 4081 |  107453 385 2432 9356
Tot:      356 1840 6718

coremark跑分

看到eembc官网的pi4 能跑到 48626分 (www.eembc.org/viewer/?ben… 我用自己的跑一下,设置开机直接进CLI,然后参考上面别人跑分时的“Compiler Flags‘,输入命令: make XCFLAGS="-O2 -DMULTITHREAD=4 -DUSE_PTHREAD -DPERFORMANCE_RUN=1 -lrt -pthread" 很快跑完,还是有差距,不确信是否与gcc等有关:

2K performance run parameters for coremark.
CoreMark Size  : 666
Total ticks   : 14204
Total time (secs): 14.204000
Iterations/Sec  : 30977.189524
Iterations    : 440000
Compiler version : GCC8.3.0
Compiler flags  : -O2 -O2 -DMULTITHREAD=4 -DUSE_PTHREAD -DPERFORMANCE_RUN=1 -lrt -pthread -DPERFORMANCE_RUN=1 -lrt
Parallel PThreads : 4
Memory location : Please put data memory location here
(e.g. code in flash, data on heap etc)
seedcrc     : 0xe9f5
[0]crclist    : 0xe714
[1]crclist    : 0xe714
[2]crclist    : 0xe714
[3]crclist    : 0xe714
[0]crcmatrix   : 0x1fd7
[1]crcmatrix   : 0x1fd7
[2]crcmatrix   : 0x1fd7
[3]crcmatrix   : 0x1fd7
[0]crcstate   : 0x8e3a
[1]crcstate   : 0x8e3a
[2]crcstate   : 0x8e3a
[3]crcstate   : 0x8e3a
[0]crcfinal   : 0x33ff
[1]crcfinal   : 0x33ff
[2]crcfinal   : 0x33ff
[3]crcfinal   : 0x33ff
Correct operation validated. See README.md for run and reporting rules.
CoreMark 1.0 : 30977.189524 / GCC8.3.0 -O2 -O2 -DMULTITHREAD=4 -DUSE_PTHREAD -DPERFORMANCE_RUN=1 -lrt -pthread -DPERFORMANCE_RUN=1 -lrt / Heap / 4:PThreads

thermal

cd /sys/class/thermal
ls -al
cat thermal\_zone0/type
cat thermal\_zone0/temp
nisy@raspberrypi:/dev/bus/usb/001 $ cat /sys/class/thermal/thermal_zone*/type

cpu-thermal

文件系统和常用命令

启动脚本:待补充

常用命令

nisy@raspberrypi:/dev/bus/usb/001 $ lspci

00:00.0 PCI bridge: Broadcom Inc. and subsidiaries BCM2711 PCIe Bridge (rev 10)

01:00.0 USB controller: VIA Technologies, Inc. VL805 USB 3.0 Host Controller (rev 01)

nisy@raspberrypi:/dev/bus/usb/001 $ lsusb

Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub

Bus 001 Device 004: ID 1c4f:0065 SiGma Micro Optical Wheel Mouse [Rapoo N1130]

Bus 001 Device 005: ID 1a81:204c Holtek Semiconductor, Inc. ikbc S200

Bus 001 Device 002: ID 2109:3431 VIA Labs, Inc. Hub

Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

nisy@raspberrypi:~ $ lsipc

    RESOURCE DESCRIPTION                       LIMIT USED USE%
    MSGMNI  Number of message queues                 32000  0 0.00%
    MSGMAX  Max size of message (bytes)                8192  -   -
    MSGMNB  Default max size of queue (bytes)            16384  -   -
    SHMMNI  Shared memory segments                  4096  5 0.12%
    SHMALL  Shared memory pages            18446744073692774399 1024 0.00%
    SHMMAX  Max size of shared memory segment (bytes) 18446744073692774399  -   -
    SHMMIN  Min size of shared memory segment (bytes)          1  -   -
    SEMMNI  Number of semaphore identifiers             32000  0 0.00%
    SEMMNS  Total number of semaphores             1024000000  0 0.00%
    SEMMSL  Max semaphores per semaphore set.            32000  -   -
    SEMOPM  Max number of operations per semop(2)           500  -   -
    SEMVMX  Semaphore max value                   32767  -   -

nisy@raspberrypi:/dev $ ls -al /dev

    总用量 4
    drwxr-xr-x 17 root root    4280 128 14:46 .
    drwxr-xr-x 18 root root    4096 5月 3 2023 ..
    crw-r--r--  1 root root   10, 235 1月 28 14:46 autofs
    drwxr-xr-x  2 root root     640 128 14:46 block
    crw-------  1 root root   10, 234 1月 28 14:46 btrfs-control
    drwxr-xr-x  3 root root     60 1月 1 1970 bus
    crw-------  1 root root   10, 126 1月 28 14:46 cachefiles
    crw-rw----  1 root video  237,  0 1月 28 14:46 cec0
    crw-rw----  1 root video  237,  1 1月 28 14:46 cec1
    drwxr-xr-x  2 root root    3580 128 14:46 char
    crw--w----  1 root tty    5,  1 1月 28 14:46 console
    crw-------  1 root root   10, 123 1月 28 14:46 cpu_dma_latency
    crw-------  1 root root   10, 203 1月 28 14:46 cuse
    drwxr-xr-x  7 root root     140 128 14:46 disk
    drwxr-xr-x  2 root root     80 1月 1 1970 dma_heap
    drwxr-xr-x  3 root root     120 128 14:46 dri
    crw-rw----  1 root video  29,  0 1月 28 14:46 fb0
    lrwxrwxrwx  1 root root     13 513 2023 fd -> /proc/self/fd
    crw-rw-rw-  1 root root   1,  7 128 14:46 full
    crw-rw-rw-  1 root root   10, 229 128 14:46 fuse
    crw-rw----  1 root gpio  254,  0 1月 28 14:46 gpiochip0
    crw-rw----  1 root gpio  254,  1 1月 28 14:46 gpiochip1
    crw-rw----  1 root gpio  245,  0 1月 28 14:46 gpiomem
    crw-------  1 root root  241,  0 1月 28 14:46 hidraw0
    crw-------  1 root root  241,  1 1月 28 14:46 hidraw1
    crw-------  1 root root  241,  2 1月 28 14:46 hidraw2
    crw-------  1 root root  241,  3 1月 28 14:46 hidraw3
    crw-------  1 root root   10, 183 1月 28 14:46 hwrng
    crw-rw----  1 root i2c   89,  0 1月 28 14:46 i2c-0
    crw-rw----  1 root i2c   89, 10 1月 28 14:46 i2c-10
    crw-rw----  1 root i2c   89, 20 1月 28 14:46 i2c-20
    crw-rw----  1 root i2c   89, 21 1月 28 14:46 i2c-21
    crw-rw----  1 root i2c   89, 22 1月 28 14:46 i2c-22
    lrwxrwxrwx  1 root root     12 513 2023 initctl -> /run/initctl
    drwxr-xr-x  4 root root     220 128 14:46 input
    crw-r--r--  1 root root   1, 11 1月 28 14:46 kmsg
    crw-rw----+ 1 root kvm   10, 232 1月 28 14:46 kvm
    lrwxrwxrwx  1 root root     28 513 2023 log -> /run/systemd/journal/dev-log
    brw-rw----  1 root disk   7,  0 1月 28 14:46 loop0
    brw-rw----  1 root disk   7,  1 1月 28 14:46 loop1
    brw-rw----  1 root disk   7,  2 1月 28 14:46 loop2
    brw-rw----  1 root disk   7,  3 1月 28 14:46 loop3
    brw-rw----  1 root disk   7,  4 1月 28 14:46 loop4
    brw-rw----  1 root disk   7,  5 1月 28 14:46 loop5
    brw-rw----  1 root disk   7,  6 1月 28 14:46 loop6
    brw-rw----  1 root disk   7,  7 1月 28 14:46 loop7
    crw-rw----  1 root disk   10, 237 1月 28 14:46 loop-control
    drwxr-xr-x  2 root root     60 128 14:46 mapper
    crw-rw----  1 root video  238,  0 1月 28 14:46 media0
    crw-rw----  1 root video  238,  1 1月 28 14:46 media1
    crw-rw----  1 root video  238,  2 1月 28 14:46 media2
    crw-rw----  1 root video  238,  3 1月 28 14:46 media3
    crw-rw----  1 root video  238,  4 1月 28 14:46 media4
    crw-r-----  1 root kmem   1,  1 1月 28 14:46 mem
    brw-rw----  1 root disk  179,  0 1月 28 14:46 mmcblk0
    brw-rw----  1 root disk  179,  1 1月 28 14:46 mmcblk0p1
    brw-rw----  1 root disk  179,  2 1月 28 14:46 mmcblk0p2
    brw-rw----  1 root disk  179,  5 1月 28 14:46 mmcblk0p5
    brw-rw----  1 root disk  179,  6 1月 28 14:46 mmcblk0p6
    brw-rw----  1 root disk  179,  7 1月 28 14:46 mmcblk0p7
    drwxrwxrwt  2 root root     40 1月 1 1970 mqueue
    drwxr-xr-x  2 root root     60 128 14:46 net
    crw-rw-rw-  1 root root   1,  3 128 14:46 null
    crw-r-----  1 root kmem   1,  4 1月 28 14:46 port
    crw-------  1 root root  108,  0 1月 28 14:46 ppp
    crw-rw-rw-  1 root tty    5,  2 3月 9 2024 ptmx
    drwxr-xr-x  2 root root      0 513 2023 pts
    brw-rw----  1 root disk   1,  0 1月 28 14:46 ram0
    brw-rw----  1 root disk   1,  1 1月 28 14:46 ram1
    brw-rw----  1 root disk   1, 10 1月 28 14:46 ram10
    brw-rw----  1 root disk   1, 11 1月 28 14:46 ram11
    brw-rw----  1 root disk   1, 12 1月 28 14:46 ram12
    brw-rw----  1 root disk   1, 13 1月 28 14:46 ram13
    brw-rw----  1 root disk   1, 14 1月 28 14:46 ram14
    brw-rw----  1 root disk   1, 15 1月 28 14:46 ram15
    brw-rw----  1 root disk   1,  2 1月 28 14:46 ram2
    brw-rw----  1 root disk   1,  3 1月 28 14:46 ram3
    brw-rw----  1 root disk   1,  4 1月 28 14:46 ram4
    brw-rw----  1 root disk   1,  5 1月 28 14:46 ram5
    brw-rw----  1 root disk   1,  6 1月 28 14:46 ram6
    brw-rw----  1 root disk   1,  7 1月 28 14:46 ram7
    brw-rw----  1 root disk   1,  8 1月 28 14:46 ram8
    brw-rw----  1 root disk   1,  9 1月 28 14:46 ram9
    crw-rw-rw-  1 root root   1,  8 128 14:46 random
    crw-rw-r--+ 1 root netdev  10, 242 1月 28 14:46 rfkill
    lrwxrwxrwx  1 root root      7 128 14:46 serial1 -> ttyAMA0
    drwxrwxrwt  2 root root     40 3月 9 12:04 shm
    drwxr-xr-x  3 root root     220 128 14:46 snd
    lrwxrwxrwx  1 root root     15 513 2023 stderr -> /proc/self/fd/2
    lrwxrwxrwx  1 root root     15 513 2023 stdin -> /proc/self/fd/0
    lrwxrwxrwx  1 root root     15 513 2023 stdout -> /proc/self/fd/1
    crw-rw-rw-  1 root tty    5,  0 128 14:46 tty
    crw--w----  1 root tty    4,  0 1月 28 14:46 tty0
    crw-------  1 nisy tty    4,  1 1月 28 14:46 tty1
    crw--w----  1 root tty    4, 10 1月 28 14:46 tty10
    crw--w----  1 root tty    4, 11 1月 28 14:46 tty11
    crw--w----  1 root tty    4, 12 1月 28 14:46 tty12
    crw--w----  1 root tty    4, 13 1月 28 14:46 tty13
    crw--w----  1 root tty    4, 14 1月 28 14:46 tty14
    crw--w----  1 root tty    4, 15 1月 28 14:46 tty15
    crw--w----  1 root tty    4, 16 1月 28 14:46 tty16
    crw--w----  1 root tty    4, 17 1月 28 14:46 tty17
    crw--w----  1 root tty    4, 18 1月 28 14:46 tty18
    crw--w----  1 root tty    4, 19 1月 28 14:46 tty19
    crw--w----  1 root tty    4,  2 1月 28 14:46 tty2
    crw--w----  1 root tty    4, 20 1月 28 14:46 tty20
    crw--w----  1 root tty    4, 21 1月 28 14:46 tty21
    crw--w----  1 root tty    4, 22 1月 28 14:46 tty22
    crw--w----  1 root tty    4, 23 1月 28 14:46 tty23
    crw--w----  1 root tty    4, 24 1月 28 14:46 tty24
    crw--w----  1 root tty    4, 25 1月 28 14:46 tty25
    crw--w----  1 root tty    4, 26 1月 28 14:46 tty26
    crw--w----  1 root tty    4, 27 1月 28 14:46 tty27
    crw--w----  1 root tty    4, 28 1月 28 14:46 tty28
    crw--w----  1 root tty    4, 29 1月 28 14:46 tty29
    crw--w----  1 root tty    4,  3 1月 28 14:46 tty3
    crw--w----  1 root tty    4, 30 1月 28 14:46 tty30
    crw--w----  1 root tty    4, 31 1月 28 14:46 tty31
    crw--w----  1 root tty    4, 32 1月 28 14:46 tty32
    crw--w----  1 root tty    4, 33 1月 28 14:46 tty33
    crw--w----  1 root tty    4, 34 1月 28 14:46 tty34
    crw--w----  1 root tty    4, 35 1月 28 14:46 tty35
    crw--w----  1 root tty    4, 36 1月 28 14:46 tty36
    crw--w----  1 root tty    4, 37 1月 28 14:46 tty37
    crw--w----  1 root tty    4, 38 1月 28 14:46 tty38
    crw--w----  1 root tty    4, 39 1月 28 14:46 tty39
    crw--w----  1 root tty    4,  4 1月 28 14:46 tty4
    crw--w----  1 root tty    4, 40 1月 28 14:46 tty40
    crw--w----  1 root tty    4, 41 1月 28 14:46 tty41
    crw--w----  1 root tty    4, 42 1月 28 14:46 tty42
    crw--w----  1 root tty    4, 43 1月 28 14:46 tty43
    crw--w----  1 root tty    4, 44 1月 28 14:46 tty44
    crw--w----  1 root tty    4, 45 1月 28 14:46 tty45
    crw--w----  1 root tty    4, 46 1月 28 14:46 tty46
    crw--w----  1 root tty    4, 47 1月 28 14:46 tty47
    crw--w----  1 root tty    4, 48 1月 28 14:46 tty48
    crw--w----  1 root tty    4, 49 1月 28 14:46 tty49
    crw--w----  1 root tty    4,  5 1月 28 14:46 tty5
    crw--w----  1 root tty    4, 50 1月 28 14:46 tty50
    crw--w----  1 root tty    4, 51 1月 28 14:46 tty51
    crw--w----  1 root tty    4, 52 1月 28 14:46 tty52
    crw--w----  1 root tty    4, 53 1月 28 14:46 tty53
    crw--w----  1 root tty    4, 54 1月 28 14:46 tty54
    crw--w----  1 root tty    4, 55 1月 28 14:46 tty55
    crw--w----  1 root tty    4, 56 1月 28 14:46 tty56
    crw--w----  1 root tty    4, 57 1月 28 14:46 tty57
    crw--w----  1 root tty    4, 58 1月 28 14:46 tty58
    crw--w----  1 root tty    4, 59 1月 28 14:46 tty59
    crw--w----  1 root tty    4,  6 1月 28 14:46 tty6
    crw--w----  1 root tty    4, 60 1月 28 14:46 tty60
    crw--w----  1 root tty    4, 61 1月 28 14:46 tty61
    crw--w----  1 root tty    4, 62 1月 28 14:46 tty62
    crw--w----  1 root tty    4, 63 1月 28 14:46 tty63
    crw--w----  1 root tty    4,  7 1月 28 14:46 tty7
    crw--w----  1 root tty    4,  8 1月 28 14:46 tty8
    crw--w----  1 root tty    4,  9 1月 28 14:46 tty9
    crw-rw----  1 root dialout 204, 64 1月 28 14:46 ttyAMA0
    crw-------  1 root root   5,  3 1月 28 14:46 ttyprintk
    crw-------  1 root root   10, 239 1月 28 14:46 uhid
    crw-------  1 root root   10, 223 1月 28 14:46 uinput
    crw-rw-rw-  1 root root   1,  9 128 14:46 urandom
    drwxr-xr-x  2 root root     60 128 14:46 usb
    drwxr-xr-x  3 root root     60 128 14:46 v4l
    crw-rw----+ 1 root video  81, 15 1月 28 14:46 v4l-subdev0
    crw-rw----  1 root video  10, 124 1月 28 14:46 vchiq
    crw-rw----  1 root video  10, 125 1月 28 14:46 vcio
    crw-------  1 root root  246,  0 1月 28 14:46 vc-mem
    crw-rw----  1 root tty    7,  0 1月 28 14:46 vcs
    crw-rw----  1 root tty    7,  1 1月 28 14:46 vcs1
    crw-rw----  1 root tty    7,  2 1月 28 14:46 vcs2
    crw-rw----  1 root tty    7,  3 1月 28 14:46 vcs3
    crw-rw----  1 root tty    7,  4 1月 28 14:46 vcs4
    crw-rw----  1 root tty    7,  5 1月 28 14:46 vcs5
    crw-rw----  1 root tty    7,  6 1月 28 14:46 vcs6
    crw-rw----  1 root tty    7,  7 1月 28 14:46 vcs7
    crw-rw----  1 root tty    7, 128 1月 28 14:46 vcsa
    crw-rw----  1 root tty    7, 129 1月 28 14:46 vcsa1
    crw-rw----  1 root tty    7, 130 1月 28 14:46 vcsa2
    crw-rw----  1 root tty    7, 131 1月 28 14:46 vcsa3
    crw-rw----  1 root tty    7, 132 1月 28 14:46 vcsa4
    crw-rw----  1 root tty    7, 133 1月 28 14:46 vcsa5
    crw-rw----  1 root tty    7, 134 1月 28 14:46 vcsa6
    crw-rw----  1 root tty    7, 135 1月 28 14:46 vcsa7
    crw-rw----  1 root video  10, 122 1月 28 14:46 vcsm-cma
    crw-rw----  1 root tty    7, 64 1月 28 14:46 vcsu
    crw-rw----  1 root tty    7, 65 1月 28 14:46 vcsu1
    crw-rw----  1 root tty    7, 66 1月 28 14:46 vcsu2
    crw-rw----  1 root tty    7, 67 1月 28 14:46 vcsu3
    crw-rw----  1 root tty    7, 68 1月 28 14:46 vcsu4
    crw-rw----  1 root tty    7, 69 1月 28 14:46 vcsu5
    crw-rw----  1 root tty    7, 70 1月 28 14:46 vcsu6
    crw-rw----  1 root tty    7, 71 1月 28 14:46 vcsu7
    crw-------  1 root root   10, 127 1月 28 14:46 vga_arbiter
    crw-------  1 root root   10, 137 1月 28 14:46 vhci
    crw-------  1 root root   10, 238 1月 28 14:46 vhost-net
    crw-------  1 root root   10, 241 1月 28 14:46 vhost-vsock
    crw-rw----+ 1 root video  81, 14 1月 28 14:46 video0
    crw-rw----+ 1 root video  81,  2 1月 28 14:46 video10
    crw-rw----+ 1 root video  81,  3 1月 28 14:46 video11
    crw-rw----+ 1 root video  81,  6 1月 28 14:46 video12
    crw-rw----+ 1 root video  81,  0 1月 28 14:46 video13
    crw-rw----+ 1 root video  81,  1 1月 28 14:46 video14
    crw-rw----+ 1 root video  81,  4 1月 28 14:46 video15
    crw-rw----+ 1 root video  81,  5 1月 28 14:46 video16
    crw-rw----+ 1 root video  81,  7 1月 28 14:46 video18
    crw-rw----+ 1 root video  81, 13 1月 28 14:46 video19
    crw-rw----+ 1 root video  81,  8 1月 28 14:46 video20
    crw-rw----+ 1 root video  81, 10 1月 28 14:46 video21
    crw-rw----+ 1 root video  81, 11 1月 28 14:46 video22
    crw-rw----+ 1 root video  81, 12 1月 28 14:46 video23
    crw-rw----+ 1 root video  81,  9 1月 28 14:46 video31
    crw-------  1 root root   10, 130 1月 28 14:46 watchdog
    crw-------  1 root root  248,  0 1月 28 14:46 watchdog0
    crw-rw-rw-  1 root root   1,  5 128 14:46 zero

pi@raspberrypi:/proc $ df -h

    \u6587\u4ef6\u7cfb\u7edf        \u5bb9\u91cf  \u5df2\u7528  \u53ef\u7528 \u5df2\u7528% \u6302\u8f7d\u70b9
    /dev/root        14G  7.5G  5.8G   57% /
    devtmpfs        1.8G     0  1.8G    0% /dev
    tmpfs           1.9G     0  1.9G    0% /dev/shm
    tmpfs           1.9G   17M  1.9G    1% /run
    tmpfs           5.0M  4.0K  5.0M    1% /run/lock
    tmpfs           1.9G     0  1.9G    0% /sys/fs/cgroup
    /dev/mmcblk0p1  253M   48M  205M   19% /boot
    tmpfs           378M  4.0K  378M    1% /run/user/1000

root@raspberrypi:/proc # fdisk -l

    Disk /dev/ram0: 4 MiB, 4194304 bytes, 8192 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 4096 bytes
    I/O size (minimum/optimal): 4096 bytes / 4096 bytes


    Disk /dev/ram1: 4 MiB, 4194304 bytes, 8192 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 4096 bytes
    I/O size (minimum/optimal): 4096 bytes / 4096 bytes


    Disk /dev/ram2: 4 MiB, 4194304 bytes, 8192 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 4096 bytes
    I/O size (minimum/optimal): 4096 bytes / 4096 bytes


    Disk /dev/ram3: 4 MiB, 4194304 bytes, 8192 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 4096 bytes
    I/O size (minimum/optimal): 4096 bytes / 4096 bytes


    Disk /dev/ram4: 4 MiB, 4194304 bytes, 8192 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 4096 bytes
    I/O size (minimum/optimal): 4096 bytes / 4096 bytes


    Disk /dev/ram5: 4 MiB, 4194304 bytes, 8192 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 4096 bytes
    I/O size (minimum/optimal): 4096 bytes / 4096 bytes


    Disk /dev/ram6: 4 MiB, 4194304 bytes, 8192 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 4096 bytes
    I/O size (minimum/optimal): 4096 bytes / 4096 bytes


    Disk /dev/ram7: 4 MiB, 4194304 bytes, 8192 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 4096 bytes
    I/O size (minimum/optimal): 4096 bytes / 4096 bytes


    Disk /dev/ram8: 4 MiB, 4194304 bytes, 8192 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 4096 bytes
    I/O size (minimum/optimal): 4096 bytes / 4096 bytes


    Disk /dev/ram9: 4 MiB, 4194304 bytes, 8192 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 4096 bytes
    I/O size (minimum/optimal): 4096 bytes / 4096 bytes


    Disk /dev/ram10: 4 MiB, 4194304 bytes, 8192 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 4096 bytes
    I/O size (minimum/optimal): 4096 bytes / 4096 bytes


    Disk /dev/ram11: 4 MiB, 4194304 bytes, 8192 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 4096 bytes
    I/O size (minimum/optimal): 4096 bytes / 4096 bytes


    Disk /dev/ram12: 4 MiB, 4194304 bytes, 8192 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 4096 bytes
    I/O size (minimum/optimal): 4096 bytes / 4096 bytes


    Disk /dev/ram13: 4 MiB, 4194304 bytes, 8192 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 4096 bytes
    I/O size (minimum/optimal): 4096 bytes / 4096 bytes


    Disk /dev/ram14: 4 MiB, 4194304 bytes, 8192 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 4096 bytes
    I/O size (minimum/optimal): 4096 bytes / 4096 bytes


    Disk /dev/ram15: 4 MiB, 4194304 bytes, 8192 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 4096 bytes
    I/O size (minimum/optimal): 4096 bytes / 4096 bytes


    Disk /dev/mmcblk0: 14.5 GiB, 15523119104 bytes, 30318592 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disklabel type: dos
    Disk identifier: 0x97685b82

    Device         Boot  Start      End  Sectors  Size Id Type
    /dev/mmcblk0p1        8192   532479   524288  256M  c W95 FAT32 (LBA)
    /dev/mmcblk0p2      532480 30318591 29786112 14.2G 83 Linux

root@raspberrypi:/usr/bin # lsblk

    NAME        MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
    mmcblk0     179:0    0 14.5G  0 disk 
    ├─mmcblk0p1 179:1    0  256M  0 part /boot
    └─mmcblk0p2 179:2    0 14.2G  0 part /

![image](https://p3-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/a5f1d46d7d3f4bbd85fe634e6e0af5c9~tplv-k3u1fbpfcp-jj-mark:0:0:0:0:q75.image#?w=1438\&h=322\&s=54065\&e=png\&b=f8f0ef)

pi@raspberrypi:~ $ cat /etc/os-release

    PRETTY_NAME="Raspbian GNU/Linux 10 (buster)"
    NAME="Raspbian GNU/Linux"
    VERSION_ID="10"
    VERSION="10 (buster)"
    VERSION_CODENAME=buster
    ID=raspbian
    ID_LIKE=debian
    HOME_URL="http://www.raspbian.org/"
    SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
    BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"

pi@raspberrypi:~ $ lsmod

    Module                  Size  Used by
    rfcomm                 49152  4
    fuse                  126976  3
    bnep                   20480  2
    hci_uart               40960  1
    btbcm                  16384  1 hci_uart
    bluetooth             393216  29 hci_uart,bnep,btbcm,rfcomm
    ecdh_generic           16384  1 bluetooth
    ecc                    40960  1 ecdh_generic
    8021q                  32768  0
    garp                   16384  1 8021q
    stp                    16384  1 garp
    llc                    16384  2 garp,stp
    joydev                 20480  0
    vc4                   253952  3
    brcmfmac              327680  0
    cec                    49152  1 vc4
    brcmutil               20480  1 brcmfmac
    sha256_generic         16384  0
    drm_kms_helper        241664  3 vc4
    v3d                    73728  3
    gpu_sched              45056  1 v3d
    cfg80211              761856  1 brcmfmac
    drm                   520192  10 v3d,vc4,gpu_sched,drm_kms_helper
    rfkill                 32768  6 bluetooth,cfg80211
    drm_panel_orientation_quirks    16384  1 drm
    bcm2835_codec          36864  0
    bcm2835_isp            32768  0
    bcm2835_v4l2           40960  0
    v4l2_mem2mem           36864  1 bcm2835_codec
    raspberrypi_hwmon      16384  0
    bcm2835_mmal_vchiq     28672  3 bcm2835_isp,bcm2835_codec,bcm2835_v4l2
    videobuf2_dma_contig    20480  2 bcm2835_isp,bcm2835_codec
    videobuf2_vmalloc      16384  1 bcm2835_v4l2
    videobuf2_memops       16384  2 videobuf2_dma_contig,videobuf2_vmalloc
    videobuf2_v4l2         32768  4 bcm2835_isp,bcm2835_codec,bcm2835_v4l2,v4l2_mem2mem
    videobuf2_common       61440  5 bcm2835_isp,bcm2835_codec,bcm2835_v4l2,v4l2_mem2mem,videobuf2_v4l2
    snd_soc_core          225280  1 vc4
    videodev              249856  6 bcm2835_isp,bcm2835_codec,videobuf2_common,bcm2835_v4l2,v4l2_mem2mem,videobuf2_v4l2
    snd_compress           20480  1 snd_soc_core
    snd_bcm2835            28672  4
    mc                     45056  6 bcm2835_isp,bcm2835_codec,videobuf2_common,videodev,v4l2_mem2mem,videobuf2_v4l2
    snd_pcm_dmaengine      16384  1 snd_soc_core
    vc_sm_cma              32768  2 bcm2835_isp,bcm2835_mmal_vchiq
    snd_pcm               106496  5 snd_compress,vc4,snd_pcm_dmaengine,snd_bcm2835,snd_soc_core
    snd_timer              32768  1 snd_pcm
    snd                    77824  13 snd_compress,snd_timer,snd_bcm2835,snd_soc_core,snd_pcm
    syscopyarea            16384  1 drm_kms_helper
    sysfillrect            16384  1 drm_kms_helper
    sysimgblt              16384  1 drm_kms_helper
    fb_sys_fops            16384  1 drm_kms_helper
    rpivid_mem             16384  0
    backlight              20480  1 drm
    uio_pdrv_genirq        16384  0
    uio                    20480  1 uio_pdrv_genirq
    nvmem_rmem             16384  0
    i2c_dev                20480  0
    ip_tables              28672  0
    x_tables               32768  1 ip_tables
    ipv6                  495616  38

proc文件系统

pi@raspberrypi:/proc $ cat cpuinfo

    processor	: 0
    model name	: ARMv7 Processor rev 3 (v7l)
    BogoMIPS	: 126.00
    Features	: half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm crc32 
    CPU implementer	: 0x41
    CPU architecture: 7
    CPU variant	: 0x0
    CPU part	: 0xd08
    CPU revision	: 3

    processor	: 1
    model name	: ARMv7 Processor rev 3 (v7l)
    BogoMIPS	: 126.00
    Features	: half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm crc32 
    CPU implementer	: 0x41
    CPU architecture: 7
    CPU variant	: 0x0
    CPU part	: 0xd08
    CPU revision	: 3

    processor	: 2
    model name	: ARMv7 Processor rev 3 (v7l)
    BogoMIPS	: 126.00
    Features	: half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm crc32 
    CPU implementer	: 0x41
    CPU architecture: 7
    CPU variant	: 0x0
    CPU part	: 0xd08
    CPU revision	: 3

    processor	: 3
    model name	: ARMv7 Processor rev 3 (v7l)
    BogoMIPS	: 126.00
    Features	: half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm crc32 
    CPU implementer	: 0x41
    CPU architecture: 7
    CPU variant	: 0x0
    CPU part	: 0xd08
    CPU revision	: 3

    Hardware	: BCM2711
    Revision	: c03111
    Serial		: 10000000bafb5028
    Model		: Raspberry Pi 4 Model B Rev 1.1

pi@raspberrypi:/proc $ cat meminfo

MemTotal:        3866504 kB
MemFree:         3455744 kB
MemAvailable:    3548456 kB
Buffers:           29196 kB
Cached:           222252 kB
SwapCached:            0 kB
Active:            86360 kB
Inactive:         230344 kB
Active(anon):        540 kB
Inactive(anon):   112308 kB
Active(file):      85820 kB
Inactive(file):   118036 kB
Unevictable:       30248 kB
Mlocked:              16 kB
HighTotal:       3211264 kB
HighFree:        2882908 kB
LowTotal:         655240 kB
LowFree:          572836 kB
SwapTotal:        102396 kB
SwapFree:         102396 kB
Dirty:                 0 kB
Writeback:             0 kB
AnonPages:         95600 kB
Mapped:            97464 kB
Shmem:             47596 kB
KReclaimable:      15648 kB
Slab:              32292 kB
SReclaimable:      15648 kB
SUnreclaim:        16644 kB
KernelStack:        1696 kB
PageTables:         4108 kB
NFS_Unstable:          0 kB
Bounce:                0 kB
WritebackTmp:          0 kB
CommitLimit:     2035648 kB
Committed_AS:     846776 kB
VmallocTotal:     245760 kB
VmallocUsed:        5300 kB
VmallocChunk:          0 kB
Percpu:              464 kB
CmaTotal:         262144 kB
CmaFree:          247876 kB

pi@raspberrypi:/proc $ cat mounts

/dev/root / ext4 rw,noatime 0 0
devtmpfs /dev devtmpfs rw,relatime,size=1801156k,nr_inodes=97762,mode=755 0 0
sysfs /sys sysfs rw,nosuid,nodev,noexec,relatime 0 0
proc /proc proc rw,relatime 0 0
securityfs /sys/kernel/security securityfs rw,nosuid,nodev,noexec,relatime 0 0
tmpfs /dev/shm tmpfs rw,nosuid,nodev 0 0
devpts /dev/pts devpts rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000 0 0
tmpfs /run tmpfs rw,nosuid,nodev,mode=755 0 0
tmpfs /run/lock tmpfs rw,nosuid,nodev,noexec,relatime,size=5120k 0 0
tmpfs /sys/fs/cgroup tmpfs ro,nosuid,nodev,noexec,mode=755 0 0
cgroup2 /sys/fs/cgroup/unified cgroup2 rw,nosuid,nodev,noexec,relatime,nsdelegate 0 0
cgroup /sys/fs/cgroup/systemd cgroup rw,nosuid,nodev,noexec,relatime,xattr,name=systemd 0 0
none /sys/fs/bpf bpf rw,nosuid,nodev,noexec,relatime,mode=700 0 0
cgroup /sys/fs/cgroup/net_cls,net_prio cgroup rw,nosuid,nodev,noexec,relatime,net_cls,net_prio 0 0
cgroup /sys/fs/cgroup/cpu,cpuacct cgroup rw,nosuid,nodev,noexec,relatime,cpu,cpuacct 0 0
cgroup /sys/fs/cgroup/cpuset cgroup rw,nosuid,nodev,noexec,relatime,cpuset 0 0
cgroup /sys/fs/cgroup/pids cgroup rw,nosuid,nodev,noexec,relatime,pids 0 0
cgroup /sys/fs/cgroup/freezer cgroup rw,nosuid,nodev,noexec,relatime,freezer 0 0
cgroup /sys/fs/cgroup/devices cgroup rw,nosuid,nodev,noexec,relatime,devices 0 0
cgroup /sys/fs/cgroup/blkio cgroup rw,nosuid,nodev,noexec,relatime,blkio 0 0
cgroup /sys/fs/cgroup/perf_event cgroup rw,nosuid,nodev,noexec,relatime,perf_event 0 0
systemd-1 /proc/sys/fs/binfmt_misc autofs rw,relatime,fd=41,pgrp=1,timeout=0,minproto=5,maxproto=5,direct 0 0
mqueue /dev/mqueue mqueue rw,relatime 0 0
debugfs /sys/kernel/debug debugfs rw,relatime 0 0
sunrpc /run/rpc_pipefs rpc_pipefs rw,relatime 0 0
configfs /sys/kernel/config configfs rw,relatime 0 0
/dev/mmcblk0p1 /boot vfat rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,errors=remount-ro 0 0
tmpfs /run/user/1000 tmpfs rw,nosuid,nodev,relatime,size=386648k,mode=700,uid=1000,gid=1000 0 0
gvfsd-fuse /run/user/1000/gvfs fuse.gvfsd-fuse rw,nosuid,nodev,relatime,user_id=1000,group_id=1000 0 0
fusectl /sys/fs/fuse/connections fusectl rw,relatime 0 0

pi@raspberrypi:/proc $ cat cmdline

coherent_pool=1M 8250.nr_uarts=0 snd_bcm2835.enable_compat_alsa=0 snd_bcm2835.enable_hdmi=1 video=HDMI-A-1:1440x900M@60 smsc95xx.macaddr=DC:A6:32:17:19:A2 vc_mem.mem_base=0x3ec00000 vc_mem.mem_size=0x40000000  console=ttyS0,115200 console=tty1 root=PARTUUID=97685b82-02 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait quiet splash plymouth.ignore-serial-consoles

pi@raspberrypi:/proc $ cat interrupts

CPU0       CPU1       CPU2       CPU3       
 25:          1          0          0          0     GICv2  99 Level     timer
 26:          0          0          0          0     GICv2  29 Level     arch_timer
 27:      17565       7886       8942      10472     GICv2  30 Level     arch_timer
 33:       4824          0          0          0     GICv2  65 Level     fe00b880.mailbox
 36:       6507          0          0          0     GICv2 153 Level     uart-pl011
 39:        347          0          0          0     GICv2 114 Level     DMA IRQ
 46:       2148          0          0          0     GICv2  66 Level     VCHIQ doorbell
 47:      29807          0          0          0     GICv2 158 Level     mmc1, mmc0
 48:      46489          0          0          0     GICv2 144 Level     vc4 firmware kms
 54:       3730          0          0          0     GICv2 189 Level     eth0
 55:          0          0          0          0     GICv2 190 Level     eth0
 61:       7059          0          0          0     GICv2 106 Level     v3d
 62:          0          0          0          0     GICv2 175 Level     PCIe PME
 63:       2364          0          0          0  BRCM STB PCIe MSI 524288 Edge      xhci_hcd
IPI0:          0          0          0          0  CPU wakeup interrupts
IPI1:          0          0          0          0  Timer broadcast interrupts
IPI2:        254        258        277        295  Rescheduling interrupts
IPI3:       9411      11020      18603      13819  Function call interrupts
IPI4:          0          0          0          0  CPU stop interrupts
IPI5:       1805        707        574        817  IRQ work interrupts
IPI6:          0          0          0          0  completion interrupts
Err:          0

pi@raspberrypi:/proc $ cat devices

Character devices:
  1 mem
  4 /dev/vc/0
  4 tty
  5 /dev/tty
  5 /dev/console
  5 /dev/ptmx
  5 ttyprintk
  7 vcs
 10 misc
 13 input
 14 sound
 29 fb
 81 video4linux
 89 i2c
116 alsa
128 ptm
136 pts
162 raw
180 usb
189 usb_device
204 ttyAMA
216 rfcomm
226 drm
236 cec
237 media
238 rpivid-vp9mem
239 rpivid-h264mem
240 rpivid-intcmem
241 rpivid-hevcmem
242 uio
243 vchiq
244 hidraw
245 rpmb
246 bcm2835-gpiomem
247 vcio
248 vc-mem
249 bsg
250 watchdog
251 lirc
252 rtc
253 dma_heap
254 gpiochip

Block devices:
  1 ramdisk
  7 loop
  8 sd
 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
259 blkext

root@raspberrypi:/proc # cat iomem

00000000-37ffffff : System RAM
  00008000-00ffffff : Kernel code
  01200000-01432143 : Kernel data
40000000-fbffffff : System RAM
fd500000-fd50930f : fd500000.pcie pcie@7d500000
fd580000-fd58ffff : fd580000.ethernet ethernet@7d580000
  fd580e14-fd580e1c : unimac-mdio.-19
fe007000-fe007aff : fe007000.dma dma@7e007000
fe007b00-fe007eff : fe007b00.dma dma@7e007b00
fe00a000-fe00a023 : fe100000.watchdog watchdog@7e100000
fe00b840-fe00b87b : fe00b840.mailbox mailbox@7e00b840
fe00b880-fe00b8bf : fe00b880.mailbox mailbox@7e00b880
fe100000-fe100113 : fe100000.watchdog watchdog@7e100000
fe101000-fe102fff : fe101000.cprman cprman@7e101000
fe104000-fe104027 : fe104000.rng rng@7e104000
fe200000-fe2000b3 : fe200000.gpio gpio@7e200000
fe201000-fe2011ff : serial@7e201000
  fe201000-fe2011ff : fe201000.serial serial@7e201000
fe215000-fe215007 : fe215000.aux aux@7e215000
fe300000-fe3000ff : fe300000.mmcnr mmcnr@7e300000
fe340000-fe3400ff : fe340000.emmc2 emmc2@7e340000
fe600000-fe6000ff : fe600000.firmwarekms firmwarekms@7e600000
fec00000-fec03fff : fec00000.v3d hub
fec04000-fec07fff : fec00000.v3d core0
fec11000-fec1101f : fe100000.watchdog watchdog@7e100000
600000000-63fffffff : pcie@7d500000
  600000000-6000fffff : PCI Bus 0000:01
    600000000-600000fff : 0000:01:00.0
      600000000-600000fff : xhci-hcd

sysfs

nisy@raspberrypi:/dev/bus/usb/001 $ ls -al /sys/bus/media/devices/

total 0

drwxr-xr-x 2 root root 0 Mar 13 21:55 .

drwxr-xr-x 4 root root 0 Mar 11 23:21 ..

lrwxrwxrwx 1 root root 0 Mar 13 21:55 media0 -> ../../../devices/platform/soc/fe00b840.mailbox/bcm2835-isp/media0

lrwxrwxrwx 1 root root 0 Mar 13 21:55 media1 -> ../../../devices/platform/scb/feb10000.codec/media1

lrwxrwxrwx 1 root root 0 Mar 13 21:55 media2 -> ../../../devices/platform/soc/fe801000.csi/media2

lrwxrwxrwx 1 root root 0 Mar 13 21:55 media3 -> ../../../devices/platform/soc/fe00b840.mailbox/bcm2835-isp/media3

lrwxrwxrwx 1 root root 0 Mar 13 21:55 media4 -> ../../../devices/platform/soc/fe00b840.mailbox/bcm2835-codec/media4

nisy@raspberrypi:/dev/bus/usb/001 $ 

nisy@raspberrypi:/dev/bus/usb/001 $ ls -al /sys/class/video4linux

total 0

drwxr-xr-x 2 root root 0 Mar 11 23:21 .

drwxr-xr-x 64 root root 0 Sep 13 2022 ..

lrwxrwxrwx 1 root root 0 Mar 11 23:21 v4l-subdev0 -> ../../devices/platform/soc/fe205000.i2c/i2c-22/i2c-10/10-0036/video4linux/v4l-subdev0

lrwxrwxrwx 1 root root 0 Mar 11 23:21 video0 -> ../../devices/platform/soc/fe801000.csi/video4linux/video0

lrwxrwxrwx 1 root root 0 Mar 11 23:21 video10 -> ../../devices/platform/soc/fe00b840.mailbox/bcm2835-codec/video4linux/video10

lrwxrwxrwx 1 root root 0 Mar 11 23:21 video11 -> ../../devices/platform/soc/fe00b840.mailbox/bcm2835-codec/video4linux/video11

lrwxrwxrwx 1 root root 0 Mar 11 23:21 video12 -> ../../devices/platform/soc/fe00b840.mailbox/bcm2835-codec/video4linux/video12

lrwxrwxrwx 1 root root 0 Mar 11 23:21 video13 -> ../../devices/platform/soc/fe00b840.mailbox/bcm2835-isp/video4linux/video13

lrwxrwxrwx 1 root root 0 Mar 11 23:21 video14 -> ../../devices/platform/soc/fe00b840.mailbox/bcm2835-isp/video4linux/video14

lrwxrwxrwx 1 root root 0 Mar 11 23:21 video15 -> ../../devices/platform/soc/fe00b840.mailbox/bcm2835-isp/video4linux/video15

lrwxrwxrwx 1 root root 0 Mar 11 23:21 video16 -> ../../devices/platform/soc/fe00b840.mailbox/bcm2835-isp/video4linux/video16

lrwxrwxrwx 1 root root 0 Mar 11 23:21 video18 -> ../../devices/platform/soc/fe00b840.mailbox/bcm2835-codec/video4linux/video18

lrwxrwxrwx 1 root root 0 Mar 11 23:21 video19 -> ../../devices/platform/scb/feb10000.codec/video4linux/video19

lrwxrwxrwx 1 root root 0 Mar 11 23:21 video20 -> ../../devices/platform/soc/fe00b840.mailbox/bcm2835-isp/video4linux/video20

lrwxrwxrwx 1 root root 0 Mar 11 23:21 video21 -> ../../devices/platform/soc/fe00b840.mailbox/bcm2835-isp/video4linux/video21

lrwxrwxrwx 1 root root 0 Mar 11 23:21 video22 -> ../../devices/platform/soc/fe00b840.mailbox/bcm2835-isp/video4linux/video22

lrwxrwxrwx 1 root root 0 Mar 11 23:21 video23 -> ../../devices/platform/soc/fe00b840.mailbox/bcm2835-isp/video4linux/video23

lrwxrwxrwx 1 root root 0 Mar 11 23:21 video31 -> ../../devices/platform/soc/fe00b840.mailbox/bcm2835-codec/video4linux/video31

nisy@raspberrypi:/dev/bus/usb/001 $ 

nisy@raspberrypi:/dev/bus/usb/001 foriin/sys/class/video4linux/video;doechofor i in /sys/class/video4linux/video* ; do echoi ;echo dev:(cat(cat i/dev); echo name:(cat(cat i/name);echo index:(cat(cat i/index);echo link_name:(cat(cat i/link_name);echo; done

/sys/class/video4linux/video0

dev:81:14

name:unicam-image

index:0

cat: /sys/class/video4linux/video0/link_name: No such file or directory

link_name:

  


/sys/class/video4linux/video10

dev:81:4

name:bcm2835-codec-decode

index:0

cat: /sys/class/video4linux/video10/link_name: No such file or directory

link_name:

  


/sys/class/video4linux/video11

dev:81:5

name:bcm2835-codec-encode

index:0

cat: /sys/class/video4linux/video11/link_name: No such file or directory

link_name:

  


/sys/class/video4linux/video12

dev:81:11

name:bcm2835-codec-isp

index:0

cat: /sys/class/video4linux/video12/link_name: No such file or directory

link_name:

  


/sys/class/video4linux/video13

dev:81:0

name:bcm2835-isp-output0

index:0

cat: /sys/class/video4linux/video13/link_name: No such file or directory

link_name:

  


/sys/class/video4linux/video14

dev:81:1

name:bcm2835-isp-capture0

index:1

cat: /sys/class/video4linux/video14/link_name: No such file or directory

link_name:

  


/sys/class/video4linux/video15

dev:81:2

name:bcm2835-isp-capture1

index:2

cat: /sys/class/video4linux/video15/link_name: No such file or directory

link_name:

  


/sys/class/video4linux/video16

dev:81:3

name:bcm2835-isp-stats2

index:3

cat: /sys/class/video4linux/video16/link_name: No such file or directory

link_name:

  


/sys/class/video4linux/video18

dev:81:12

name:bcm2835-codec-image_fx

index:0

cat: /sys/class/video4linux/video18/link_name: No such file or directory

link_name:

  


/sys/class/video4linux/video19

dev:81:6

name:rpivid

index:0

cat: /sys/class/video4linux/video19/link_name: No such file or directory

link_name:

  


/sys/class/video4linux/video20

dev:81:7

name:bcm2835-isp-output0

index:0

cat: /sys/class/video4linux/video20/link_name: No such file or directory

link_name:

  


/sys/class/video4linux/video21

dev:81:8

name:bcm2835-isp-capture0

index:1

cat: /sys/class/video4linux/video21/link_name: No such file or directory

link_name:

  


/sys/class/video4linux/video22

dev:81:9

name:bcm2835-isp-capture1

index:2

cat: /sys/class/video4linux/video22/link_name: No such file or directory

link_name:

  


/sys/class/video4linux/video23

dev:81:10

name:bcm2835-isp-stats2

index:3

cat: /sys/class/video4linux/video23/link_name: No such file or directory

link_name:

  


/sys/class/video4linux/video31

dev:81:13

name:bcm2835-codec-encode_image

index:0

cat: /sys/class/video4linux/video31/link_name: No such file or directory

link_name:

  

nisy@raspberrypi:/dev/bus/usb/001 foriin/sys/class/video4linux/v4lsubdev;doechofor i in /sys/class/video4linux/v4l-subdev* ; do echoi ;echo dev:(cat(cat i/dev); echo name:(cat(cat i/name);echo index:(cat(cat i/index);echo link_name:(cat(cat i/link_name);echo; done

/sys/class/video4linux/v4l-subdev0

dev:81:15

name:ov5647 10-0036

index:1

cat: /sys/class/video4linux/v4l-subdev0/link_name: No such file or directory

link_name:

  


nisy@raspberrypi:/dev/bus/usb/001 

nisy@raspberrypi:/dev/bus/usb/001 

nisy@raspberrypi:/dev/bus/usb/001  foriin/sys/bus/media/devices/media;doecho for i in /sys/bus/media/devices/media* ; do echo i ;echo dev:(cat(cat i/dev); echo model:(cat(cat i/model);echo; done

/sys/bus/media/devices/media0

dev:238:0

model:bcm2835-isp

  


/sys/bus/media/devices/media1

dev:238:1

model:rpivid

  


/sys/bus/media/devices/media2

dev:238:2

model:unicam

/sys/bus/media/devices/media3

dev:238:3

model:bcm2835-isp

/sys/bus/media/devices/media4

dev:238:4

model:bcm2835-codec

root@raspberrypi:/sys/kernel/debug/pinctrl/fe200000.gpio-pinctrl-bcm2711# cat /sys/kernel/debug/pinctrl/fe200000.gpio-pinctrl-bcm2711/pinmux-pins 

Pinmux settings per pin

Format: pin (name): mux_owner gpio_owner hog?

pin 0 (gpio0): (MUX UNCLAIMED) (GPIO UNCLAIMED)

pin 1 (gpio1): (MUX UNCLAIMED) (GPIO UNCLAIMED)

pin 2 (gpio2): (MUX UNCLAIMED) (GPIO UNCLAIMED)

pin 3 (gpio3): (MUX UNCLAIMED) (GPIO UNCLAIMED)

pin 4 (gpio4): (MUX UNCLAIMED) (GPIO UNCLAIMED)

pin 5 (gpio5): (MUX UNCLAIMED) (GPIO UNCLAIMED)

pin 6 (gpio6): (MUX UNCLAIMED) (GPIO UNCLAIMED)

pin 7 (gpio7): (MUX UNCLAIMED) (GPIO UNCLAIMED)

pin 8 (gpio8): (MUX UNCLAIMED) (GPIO UNCLAIMED)

pin 9 (gpio9): (MUX UNCLAIMED) (GPIO UNCLAIMED)

pin 10 (gpio10): (MUX UNCLAIMED) (GPIO UNCLAIMED)

pin 11 (gpio11): (MUX UNCLAIMED) (GPIO UNCLAIMED)

pin 12 (gpio12): (MUX UNCLAIMED) (GPIO UNCLAIMED)

pin 13 (gpio13): (MUX UNCLAIMED) (GPIO UNCLAIMED)

pin 14 (gpio14): (MUX UNCLAIMED) (GPIO UNCLAIMED)

pin 15 (gpio15): (MUX UNCLAIMED) (GPIO UNCLAIMED)

pin 16 (gpio16): (MUX UNCLAIMED) (GPIO UNCLAIMED)

pin 17 (gpio17): (MUX UNCLAIMED) (GPIO UNCLAIMED)

pin 18 (gpio18): (MUX UNCLAIMED) (GPIO UNCLAIMED)

pin 19 (gpio19): (MUX UNCLAIMED) (GPIO UNCLAIMED)

pin 20 (gpio20): (MUX UNCLAIMED) (GPIO UNCLAIMED)

pin 21 (gpio21): (MUX UNCLAIMED) (GPIO UNCLAIMED)

pin 22 (gpio22): (MUX UNCLAIMED) (GPIO UNCLAIMED)

pin 23 (gpio23): (MUX UNCLAIMED) (GPIO UNCLAIMED)

pin 24 (gpio24): (MUX UNCLAIMED) (GPIO UNCLAIMED)

pin 25 (gpio25): (MUX UNCLAIMED) (GPIO UNCLAIMED)

pin 26 (gpio26): (MUX UNCLAIMED) (GPIO UNCLAIMED)

pin 27 (gpio27): (MUX UNCLAIMED) (GPIO UNCLAIMED)

pin 28 (gpio28): (MUX UNCLAIMED) (GPIO UNCLAIMED)

pin 29 (gpio29): (MUX UNCLAIMED) (GPIO UNCLAIMED)

pin 30 (gpio30): fe201000.serial (GPIO UNCLAIMED) function alt3 group gpio30

pin 31 (gpio31): fe201000.serial (GPIO UNCLAIMED) function alt3 group gpio31

pin 32 (gpio32): fe201000.serial (GPIO UNCLAIMED) function alt3 group gpio32

pin 33 (gpio33): fe201000.serial (GPIO UNCLAIMED) function alt3 group gpio33

pin 34 (gpio34): fe300000.mmcnr (GPIO UNCLAIMED) function alt3 group gpio34

pin 35 (gpio35): fe300000.mmcnr (GPIO UNCLAIMED) function alt3 group gpio35

pin 36 (gpio36): fe300000.mmcnr (GPIO UNCLAIMED) function alt3 group gpio36

pin 37 (gpio37): fe300000.mmcnr (GPIO UNCLAIMED) function alt3 group gpio37

pin 38 (gpio38): fe300000.mmcnr (GPIO UNCLAIMED) function alt3 group gpio38

pin 39 (gpio39): fe300000.mmcnr (GPIO UNCLAIMED) function alt3 group gpio39

pin 40 (gpio40): fe00b840.mailbox (GPIO UNCLAIMED) function alt0 group gpio40

pin 41 (gpio41): fe00b840.mailbox (GPIO UNCLAIMED) function alt0 group gpio41

pin 42 (gpio42): (MUX UNCLAIMED) pinctrl-bcm2711:42

pin 43 (gpio43): (MUX UNCLAIMED) (GPIO UNCLAIMED)

pin 44 (gpio44): soc:i2c0mux (GPIO UNCLAIMED) function alt1 group gpio44

pin 45 (gpio45): soc:i2c0mux (GPIO UNCLAIMED) function alt1 group gpio45

pin 46 (gpio46): (MUX UNCLAIMED) (GPIO UNCLAIMED)

pin 47 (gpio47): (MUX UNCLAIMED) (GPIO UNCLAIMED)

pin 48 (gpio48): (MUX UNCLAIMED) (GPIO UNCLAIMED)

pin 49 (gpio49): (MUX UNCLAIMED) (GPIO UNCLAIMED)

pin 50 (gpio50): (MUX UNCLAIMED) (GPIO UNCLAIMED)

pin 51 (gpio51): (MUX UNCLAIMED) (GPIO UNCLAIMED)

pin 52 (gpio52): (MUX UNCLAIMED) (GPIO UNCLAIMED)

pin 53 (gpio53): (MUX UNCLAIMED) (GPIO UNCLAIMED)

pin 54 (gpio54): (MUX UNCLAIMED) (GPIO UNCLAIMED)

pin 55 (gpio55): (MUX UNCLAIMED) (GPIO UNCLAIMED)

pin 56 (gpio56): (MUX UNCLAIMED) (GPIO UNCLAIMED)

pin 57 (gpio57): (MUX UNCLAIMED) (GPIO UNCLAIMED)

root@raspberrypi:/sys/kernel/debug/pinctrl/fe200000.gpio-pinctrl-bcm2711

nisy@raspberrypi:/dev/bus/usb/001 $ sudo cat /sys/kernel/debug/gpio


gpiochip0: GPIOs 0-57, parent: platform/fe200000.gpio, pinctrl-bcm2711:

 gpio-0  (ID_SDA       )

 gpio-1  (ID_SCL       )

 gpio-2  (SDA1        )

 gpio-3  (SCL1        )

 gpio-4  (GPIO_GCLK      )

 gpio-5  (GPIO5        )

 gpio-6  (GPIO6        )

 gpio-7  (SPI_CE1_N      )

 gpio-8  (SPI_CE0_N      )

 gpio-9  (SPI_MISO      )

 gpio-10 (SPI_MOSI      )

 gpio-11 (SPI_SCLK      )

 gpio-12 (GPIO12       )

 gpio-13 (GPIO13       )

 gpio-14 (TXD1        )

 gpio-15 (RXD1        )

 gpio-16 (GPIO16       )

 gpio-17 (GPIO17       )

 gpio-18 (GPIO18       )

 gpio-19 (GPIO19       )

 gpio-20 (GPIO20       )

 gpio-21 (GPIO21       )

 gpio-22 (GPIO22       )

 gpio-23 (GPIO23       )

 gpio-24 (GPIO24       )

 gpio-25 (GPIO25       )

 gpio-26 (GPIO26       )

 gpio-27 (GPIO27       )

 gpio-28 (RGMII_MDIO     )

 gpio-29 (RGMIO_MDC      )

 gpio-30 (CTS0        )

 gpio-31 (RTS0        )

 gpio-32 (TXD0        )

 gpio-33 (RXD0        )

 gpio-34 (SD1_CLK       )

 gpio-35 (SD1_CMD       )

 gpio-36 (SD1_DATA0      )

 gpio-37 (SD1_DATA1      )

 gpio-38 (SD1_DATA2      )

 gpio-39 (SD1_DATA3      )

 gpio-40 (PWM0_MISO      )

 gpio-41 (PWM1_MOSI      )

 gpio-42 (STATUS_LED_G_CLK  |ACT         ) out lo 

 gpio-43 (SPIFLASH_CE_N    )

 gpio-44 (SDA0        )

 gpio-45 (SCL0        )

 gpio-46 (RGMII_RXCLK     )

 gpio-47 (RGMII_RXCTL     )

 gpio-48 (RGMII_RXD0     )

 gpio-49 (RGMII_RXD1     )

 gpio-50 (RGMII_RXD2     )

 gpio-51 (RGMII_RXD3     )

 gpio-52 (RGMII_TXCLK     )

 gpio-53 (RGMII_TXCTL     )

 gpio-54 (RGMII_TXD0     )

 gpio-55 (RGMII_TXD1     )

 gpio-56 (RGMII_TXD2     )

 gpio-57 (RGMII_TXD3     )

  


gpiochip1: GPIOs 504-511, parent: platform/soc:firmware:gpio, raspberrypi-exp-gpio, can sleep:

 gpio-504 (BT_ON        )

 gpio-505 (WL_ON        )

 gpio-506 (PWR_LED_OFF     |PWR         ) out lo ACTIVE LOW

 gpio-507 (GLOBAL_RESET    )

 gpio-508 (VDD_SD_IO_SEL    |vdd-sd-io      ) out hi 

 gpio-509 (CAM_GPIO      |cam1_regulator   ) out lo 

 gpio-510 (SD_PWR_ON      |sd_vcc_reg     ) out hi 

 gpio-511 (SD_OC_N       )

nisy@raspberrypi:/dev/bus/usb/001 $

i2c相关

    nisy@raspberrypi:~ $ i2cdetect -l
    i2c-20	i2c       	Broadcom STB :                  	I2C adapter
    i2c-10	i2c       	i2c-22-mux (chan_id 1)          	I2C adapter
    i2c-1	i2c       	bcm2835 (i2c@7e804000)          	I2C adapter
    i2c-21	i2c       	Broadcom STB :                  	I2C adapter
    i2c-0	i2c       	i2c-22-mux (chan_id 0)          	I2C adapter
    i2c-22	i2c       	bcm2835 (i2c@7e205000)          	I2C adapter

或者Raspbian GNU/Linux 11 (bullseye)下

nisy@raspberrypi:~ $ i2cdetect -l
i2c-20 i2c     fef04500.i2c           I2C adapter
i2c-10 i2c     i2c-22-mux (chan_id 1)      I2C adapter
i2c-21 i2c     fef09500.i2c           I2C adapter
i2c-0 i2c     i2c-22-mux (chan_id 0)      I2C adapter
i2c-22 i2c     bcm2835 (i2c@7e205000)      I2C adapter

nisy@raspberrypi:~ $ i2cdetect -y 0

     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:                         -- -- -- -- -- -- -- -- 
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
70: -- -- -- -- -- -- -- --                         

nisy@raspberrypi:~ $ 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: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
70: -- -- -- -- -- -- -- --    

nisy@raspberrypi:~ $ i2cdetect -y 10

     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:                         -- -- -- -- -- -- -- -- 
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
30: -- -- -- -- -- -- UU -- -- -- -- -- -- -- -- -- 
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
70: -- -- -- -- -- -- -- --                         

nisy@raspberrypi:~ $ i2cdetect -y 20

     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:                         08 09 0a 0b 0c 0d 0e 0f 
10: 10 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e 1f 
20: 20 21 22 23 24 25 26 27 28 29 2a 2b 2c 2d 2e 2f 
30: -- -- -- -- -- -- -- 37 38 39 3a 3b 3c 3d 3e 3f 
40: 40 41 42 43 44 45 46 47 48 49 4a 4b 4c 4d 4e 4f 
50: 50 -- -- -- -- -- -- -- -- 59 -- -- -- -- -- -- 
60: 60 61 62 63 64 65 66 67 68 69 6a 6b 6c 6d 6e 6f 
70: 70 71 72 73 74 75 76 77                         

nisy@raspberrypi:~ $ i2cdetect -y 21

     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:                         08 09 0a 0b 0c 0d 0e 0f 
10: 10 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e 1f 
20: 20 21 22 23 24 25 26 27 28 29 2a 2b 2c 2d 2e 2f 
30: -- -- -- -- -- -- -- -- 38 39 3a 3b 3c 3d 3e 3f 
40: 40 41 42 43 44 45 46 47 48 49 4a 4b 4c 4d 4e 4f 
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
60: 60 61 62 63 64 65 66 67 68 69 6a 6b 6c 6d 6e 6f 
70: 70 71 72 73 74 75 76 77                         

nisy@raspberrypi:~ $ i2cdetect -y 22

     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:                         -- -- -- -- -- -- -- -- 
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
30: -- -- -- -- -- -- UU -- -- -- -- -- -- -- -- -- 
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
70: -- -- -- -- -- -- -- --                         
nisy@raspberrypi:~ $ 

sysfs文件系统

root@raspberrypi:/sys/class # cat /boot/config.txt

# For more options and information see
# http://rpf.io/configtxt
# Some settings may impact device functionality. See link above for details

# uncomment if you get no picture on HDMI for a default "safe" mode
#hdmi_safe=1

# uncomment this if your display has a black border of unused pixels visible
# and your display can output without overscan
#disable_overscan=1

# uncomment the following to adjust overscan. Use positive numbers if console
# goes off screen, and negative if there is too much border
#overscan_left=16
#overscan_right=16
#overscan_top=16
#overscan_bottom=16

# uncomment to force a console size. By default it will be display's size minus
# overscan.
#framebuffer_width=1280
#framebuffer_height=720

# uncomment if hdmi display is not detected and composite is being output
#hdmi_force_hotplug=1

# uncomment to force a specific HDMI mode (this will force VGA)
#hdmi_group=1
#hdmi_mode=1

# uncomment to force a HDMI mode rather than DVI. This can make audio work in
# DMT (computer monitor) modes
#hdmi_drive=2

# uncomment to increase signal to HDMI, if you have interference, blanking, or
# no display
#config_hdmi_boost=4

# uncomment for composite PAL
#sdtv_mode=2

#uncomment to overclock the arm. 700 MHz is the default.
#arm_freq=800

# Uncomment some or all of these to enable the optional hardware interfaces
#dtparam=i2c_arm=on
#dtparam=i2s=on
#dtparam=spi=on

# Uncomment this to enable infrared communication.
#dtoverlay=gpio-ir,gpio_pin=17
#dtoverlay=gpio-ir-tx,gpio_pin=18

# Additional overlays and parameters are documented /boot/overlays/README

# Enable audio (loads snd_bcm2835)
dtparam=audio=on

[pi4]
# Enable DRM VC4 V3D driver on top of the dispmanx display stack
dtoverlay=vc4-fkms-v3d
max_framebuffers=2

[all]
#dtoverlay=vc4-fkms-v3d
start_x=1
gpu_mem=128
root@raspberrypi:/sys/class # 

nisy@raspberrypi:~ $ ls -al /sys/bus/media/devices/

    总用量 0
    drwxr-xr-x 2 root root 0 128 14:47 .
    drwxr-xr-x 4 root root 0 128 14:46 ..
    lrwxrwxrwx 1 root root 0 128 14:47 media0 -> ../../../devices/platform/soc/fe801000.csi/media0
    lrwxrwxrwx 1 root root 0 128 14:47 media1 -> ../../../devices/platform/soc/fe00b840.mailbox/bcm2835-isp/media1
    lrwxrwxrwx 1 root root 0 128 14:47 media2 -> ../../../devices/platform/soc/fe00b840.mailbox/bcm2835-codec/media2
    lrwxrwxrwx 1 root root 0 128 14:47 media3 -> ../../../devices/platform/soc/fe00b840.mailbox/bcm2835-isp/media3
    lrwxrwxrwx 1 root root 0 128 14:47 media4 -> ../../../devices/platform/scb/feb10000.codec/media4

    nisy@raspberrypi:/sys/bus/media/devices $ cat media0/model
    unicam
    nisy@raspberrypi:/sys/bus/media/devices $ cat media1/model
    bcm2835-isp
    nisy@raspberrypi:/sys/bus/media/devices $ cat media2/model
    bcm2835-codec
    nisy@raspberrypi:/sys/bus/media/devices $ cat media3/model
    bcm2835-isp
    nisy@raspberrypi:/sys/bus/media/devices $ cat media4/model
    rpivid
    nisy@raspberrypi:/sys/bus/media/devices 

nisy@raspberrypi:/sys/bus/media/devices $ cat /sys/class/thermal/thermal_zone*/type

cpu-thermal

nisy@raspberrypi:/sys/bus/media/devices $ ls -al /sys/class/thermal/

    总用量 0
    drwxr-xr-x 2 root root 0 128 14:46 .
    drwxr-xr-x 64 root root 0 513 2023 ..
    lrwxrwxrwx 1 root root 0 128 14:46 thermal_zone0 -> ../../devices/virtual/thermal/thermal_zone0

nisy\@raspberrypi:/sys/bus/media/devices $cd /sys/class/thermal/
nisy@raspberrypi:/sys/class/thermal$ cd thermal\_zone0
nisy\@raspberrypi:/sys/class/thermal/thermal\_zone0 $ls -al
总用量 0
drwxr-xr-x 4 root root  0 128 14:46 .
drwxr-xr-x 3 root root  0 128 14:46 .. -r--r--r-- 1 root root 4096 3月 9 11:58 available_policies
drwxr-xr-x 3 root root  0 128 14:46 hwmon0 -rw-r--r-- 1 root root 4096 3月 9 11:58 integral_cutoff -rw-r--r-- 1 root root 4096 3月 9 11:58 k_d -rw-r--r-- 1 root root 4096 3月 9 11:58 k_i -rw-r--r-- 1 root root 4096 3月 9 11:58 k_po -rw-r--r-- 1 root root 4096 3月 9 11:58 k_pu -rw-r--r-- 1 root root 4096 3月 9 11:58 mode -rw-r--r-- 1 root root 4096 3月 9 11:58 offset -rw-r--r-- 1 root root 4096 3月 9 11:58 policy
drwxr-xr-x 2 root root  0 3月 9 11:58 power -rw-r--r-- 1 root root 4096 3月 9 11:58 slope
lrwxrwxrwx 1 root root  0 128 14:46 subsystem -> ../../../../class/thermal -rw-r--r-- 1 root root 4096 3月 9 11:58 sustainable_power -r--r--r-- 1 root root 4096 3月 9 11:58 temp -rw-r--r-- 1 root root 4096 3月 9 11:58 trip_point_0_hyst -r--r--r-- 1 root root 4096 3月 9 11:58 trip_point_0_temp -r--r--r-- 1 root root 4096 3月 9 11:58 trip_point_0_type -r--r--r-- 1 root root 4096 3月 9 11:57 type -rw-r--r-- 1 root root 4096 128 14:46 uevent
nisy@raspberrypi:/sys/class/thermal/thermal_zone0$ cat temp
43816
nisy\@raspberrypi:/sys/class/thermal/thermal\_zone0 \

init进程查询 - nisy@raspberrypi:/dev/bus/usb/001 $ ls -al /sbin/init

lrwxrwxrwx 1 root root 20 Sep 13 2022 /sbin/init -> /lib/systemd/systemd

v4l2-ctl 命令(参考 wiki.100ask.org/V4l2-ctl ):

pi@raspberrypi:~ $ ls -al /dev/video*

Raspbian GNU/Linux 10 (buster)下

crw-rw----+ 1 root video 81, 6 4\u6708 18 23:44 /dev/video0
crw-rw----+ 1 root video 81, 4 4\u6708 18 23:44 /dev/video10
crw-rw----+ 1 root video 81, 5 4\u6708 18 23:44 /dev/video11
crw-rw----+ 1 root video 81, 7 4\u6708 18 23:44 /dev/video12
crw-rw----+ 1 root video 81, 0 4\u6708 18 23:44 /dev/video13
crw-rw----+ 1 root video 81, 1 4\u6708 18 23:44 /dev/video14
crw-rw----+ 1 root video 81, 2 4\u6708 18 23:44 /dev/video15
crw-rw----+ 1 root video 81, 3 4\u6708 18 23:44 /dev/video16

pi@raspberrypi:~ $ v4l2-ctl --list-devices

bcm2835-codec-decode (platform:bcm2835-codec):
/dev/video10
/dev/video11
/dev/video12

bcm2835-isp (platform:bcm2835-isp):
/dev/video13
/dev/video14
/dev/video15
/dev/video16

mmal service 16.1 (platform:bcm2835-v4l2-0):
/dev/video0

pi@raspberrypi:~ $ v4l2-ctl -d /dev/video0 -D

Driver Info:
Driver name   : bm2835 mmal
Card type    : mmal service 16.1
Bus info     : platform:bcm2835-v4l2-0
Driver version  : 5.10.52
Capabilities   : 0x85200005
Video Capture
Video Overlay
Read/Write
Streaming
Extended Pix Format
Device Capabilities
Device Caps   : 0x05200005
Video Capture
Video Overlay
Read/Write
Streaming
Extended Pix Format

pi@raspberrypi:~ $ v4l2-ctl -d /dev/video10 -D

Driver Info:
Driver name   : bcm2835-codec
Card type    : bcm2835-codec-decode
Bus info     : platform:bcm2835-codec
Driver version  : 5.10.52
Capabilities   : 0x84204000
Video Memory-to-Memory Multiplanar
Streaming
Extended Pix Format
Device Capabilities
Device Caps   : 0x04204000
Video Memory-to-Memory Multiplanar
Streaming
Extended Pix Format
Media Driver Info:
Driver name   : bcm2835-codec
Model      : bcm2835-codec
Serial      : 0000
Bus info     : platform:bcm2835-codec
Media version  : 5.10.52
Hardware revision: 0x00000001 (1)
Driver version  : 5.10.52
Interface Info:
ID        : 0x0300000c
Type       : V4L Video
Entity Info:
ID        : 0x00000001 (1)
Name       : bcm2835-codec-decode-source
Function     : V4L2 I/O
Pad 0x01000002  : 0: Source
 Link 0x02000008: to remote pad 0x1000004 of entity 'bcm2835-codec-decode-proc': Data, Enabled, Immutable

pi@raspberrypi:~ $ v4l2-ctl -d /dev/video11 -D

Driver Info:
Driver name   : bcm2835-codec
Card type    : bcm2835-codec-encode
Bus info     : platform:bcm2835-codec
Driver version  : 5.10.52
Capabilities   : 0x84204000
Video Memory-to-Memory Multiplanar
Streaming
Extended Pix Format
Device Capabilities
Device Caps   : 0x04204000
Video Memory-to-Memory Multiplanar
Streaming
Extended Pix Format
Media Driver Info:
Driver name   : bcm2835-codec
Model      : bcm2835-codec
Serial      : 0000
Bus info     : platform:bcm2835-codec
Media version  : 5.10.52
Hardware revision: 0x00000001 (1)
Driver version  : 5.10.52
Interface Info:
ID        : 0x0300001a
Type       : V4L Video
Entity Info:
ID        : 0x0000000f (15)
Name       : bcm2835-codec-encode-source
Function     : V4L2 I/O
Pad 0x01000010  : 0: Source
 Link 0x02000016: to remote pad 0x1000012 of entity 'bcm2835-codec-encode-proc': Data, Enabled, Immutable

pi@raspberrypi:~ $ v4l2-ctl -d /dev/video12 -D

Driver Info:
Driver name   : bcm2835-codec
Card type    : bcm2835-codec-isp
Bus info     : platform:bcm2835-codec
Driver version  : 5.10.52
Capabilities   : 0x84204000
Video Memory-to-Memory Multiplanar
Streaming
Extended Pix Format
Device Capabilities
Device Caps   : 0x04204000
Video Memory-to-Memory Multiplanar
Streaming
Extended Pix Format
Media Driver Info:
Driver name   : bcm2835-codec
Model      : bcm2835-codec
Serial      : 0000
Bus info     : platform:bcm2835-codec
Media version  : 5.10.52
Hardware revision: 0x00000001 (1)
Driver version  : 5.10.52
Interface Info:
ID        : 0x03000028
Type       : V4L Video
Entity Info:
ID        : 0x0000001d (29)
Name       : bcm2835-codec-isp-source
Function     : V4L2 I/O
Pad 0x0100001e  : 0: Source
 Link 0x02000024: to remote pad 0x1000020 of entity 'bcm2835-codec-isp-proc': Data, Enabled, Immutable

pi@raspberrypi:~ $ v4l2-ctl -d /dev/video0 -L


User Controls

           brightness 0x00980900 (int)  : min=0 max=100 step=1 default=50 value=50 flags=slider
            contrast 0x00980901 (int)  : min=-100 max=100 step=1 default=0 value=0 flags=slider
           saturation 0x00980902 (int)  : min=-100 max=100 step=1 default=0 value=0 flags=slider
          red_balance 0x0098090e (int)  : min=1 max=7999 step=1 default=1000 value=1000 flags=slider
          blue_balance 0x0098090f (int)  : min=1 max=7999 step=1 default=1000 value=1000 flags=slider
        horizontal_flip 0x00980914 (bool)  : default=0 value=0
         vertical_flip 0x00980915 (bool)  : default=0 value=0
      power_line_frequency 0x00980918 (menu)  : min=0 max=3 default=1 value=1
0: Disabled
1: 50 Hz
2: 60 Hz
3: Auto
           sharpness 0x0098091b (int)  : min=-100 max=100 step=1 default=0 value=0 flags=slider
         color_effects 0x0098091f (menu)  : min=0 max=15 default=0 value=0
0: None
1: Black & White
2: Sepia
3: Negative
4: Emboss
5: Sketch
6: Sky Blue
7: Grass Green
8: Skin Whiten
9: Vivid
10: Aqua
11: Art Freeze
12: Silhouette
13: Solarization
14: Antique
15: Set Cb/Cr
             rotate 0x00980922 (int)  : min=0 max=360 step=90 default=0 value=0 flags=modify-layout
       color_effects_cbcr 0x0098092a (int)  : min=0 max=65535 step=1 default=32896 value=32896

Codec Controls

       video_bitrate_mode 0x009909ce (menu)  : min=0 max=1 default=0 value=0 flags=update
0: Variable Bitrate
1: Constant Bitrate
         video_bitrate 0x009909cf (int)  : min=25000 max=25000000 step=25000 default=10000000 value=10000000
     repeat_sequence_header 0x009909e2 (bool)  : default=0 value=0
      h264_i_frame_period 0x00990a66 (int)  : min=0 max=2147483647 step=1 default=60 value=60
           h264_level 0x00990a67 (menu)  : min=0 max=13 default=11 value=11
0: 1
1: 1b
2: 1.1
3: 1.2
4: 1.3
5: 2
6: 2.1
7: 2.2
8: 3
9: 3.1
10: 3.2
11: 4
12: 4.1
13: 4.2
          h264_profile 0x00990a6b (menu)  : min=0 max=4 default=4 value=4
0: Baseline
1: Constrained Baseline
2: Main
4: High

Camera Controls

         auto_exposure 0x009a0901 (menu)  : min=0 max=3 default=0 value=0
0: Auto Mode
1: Manual Mode
     exposure_time_absolute 0x009a0902 (int)  : min=1 max=10000 step=1 default=1000 value=1000
   exposure_dynamic_framerate 0x009a0903 (bool)  : default=0 value=0
       auto_exposure_bias 0x009a0913 (intmenu): min=0 max=24 default=12 value=12
0: -4000 (0xfffffffffffff060)
1: -3667 (0xfffffffffffff1ad)
2: -3333 (0xfffffffffffff2fb)
3: -3000 (0xfffffffffffff448)
4: -2667 (0xfffffffffffff595)
5: -2333 (0xfffffffffffff6e3)
6: -2000 (0xfffffffffffff830)
7: -1667 (0xfffffffffffff97d)
8: -1333 (0xfffffffffffffacb)
9: -1000 (0xfffffffffffffc18)
10: -667 (0xfffffffffffffd65)
11: -333 (0xfffffffffffffeb3)
12: 0 (0x0)
13: 333 (0x14d)
14: 667 (0x29b)
15: 1000 (0x3e8)
16: 1333 (0x535)
17: 1667 (0x683)
18: 2000 (0x7d0)
19: 2333 (0x91d)
20: 2667 (0xa6b)
21: 3000 (0xbb8)
22: 3333 (0xd05)
23: 3667 (0xe53)
24: 4000 (0xfa0)
   white_balance_auto_preset 0x009a0914 (menu)  : min=0 max=10 default=1 value=1
0: Manual
1: Auto
2: Incandescent
3: Fluorescent
4: Fluorescent H
5: Horizon
6: Daylight
7: Flash
8: Cloudy
9: Shade
10: Greyworld
      image_stabilization 0x009a0916 (bool)  : default=0 value=0
        iso_sensitivity 0x009a0917 (intmenu): min=0 max=4 default=0 value=0
0: 0 (0x0)
1: 100000 (0x186a0)
2: 200000 (0x30d40)
3: 400000 (0x61a80)
4: 800000 (0xc3500)
      iso_sensitivity_auto 0x009a0918 (menu)  : min=0 max=1 default=1 value=1
0: Manual
1: Auto
     exposure_metering_mode 0x009a0919 (menu)  : min=0 max=3 default=0 value=0
0: Average
1: Center Weighted
2: Spot
3: Matrix
           scene_mode 0x009a091a (menu)  : min=0 max=13 default=0 value=0
0: None
8: Night
11: Sports

JPEG Compression Controls

      compression_quality 0x009d0903 (int)  : min=1 max=100 step=1 default=30 value=30
pi@raspberrypi:~ $ 

pi@raspberrypi:~ $ v4l2-ctl --list-formats-ext

ioctl: VIDIOC_ENUM_FMT
Type: Video Capture

[0]: 'YU12' (Planar YUV 4:2:0)
Size: Stepwise 32x32 - 2592x1944 with step 2/2
[1]: 'YUYV' (YUYV 4:2:2)
Size: Stepwise 32x32 - 2592x1944 with step 2/2
[2]: 'RGB3' (24-bit RGB 8-8-8)
Size: Stepwise 32x32 - 2592x1944 with step 2/2
[3]: 'JPEG' (JFIF JPEG, compressed)
Size: Stepwise 32x32 - 2592x1944 with step 2/2
[4]: 'H264' (H.264, compressed)
Size: Stepwise 32x32 - 2592x1944 with step 2/2
[5]: 'MJPG' (Motion-JPEG, compressed)
Size: Stepwise 32x32 - 2592x1944 with step 2/2
[6]: 'YVYU' (YVYU 4:2:2)
Size: Stepwise 32x32 - 2592x1944 with step 2/2
[7]: 'VYUY' (VYUY 4:2:2)
Size: Stepwise 32x32 - 2592x1944 with step 2/2
[8]: 'UYVY' (UYVY 4:2:2)
Size: Stepwise 32x32 - 2592x1944 with step 2/2
[9]: 'NV12' (Y/CbCr 4:2:0)
Size: Stepwise 32x32 - 2592x1944 with step 2/2
[10]: 'BGR3' (24-bit BGR 8-8-8)
Size: Stepwise 32x32 - 2592x1944 with step 2/2
[11]: 'YV12' (Planar YVU 4:2:0)
Size: Stepwise 32x32 - 2592x1944 with step 2/2
[12]: 'NV21' (Y/CrCb 4:2:0)
Size: Stepwise 32x32 - 2592x1944 with step 2/2
[13]: 'RX24' (32-bit XBGR 8-8-8-8)
Size: Stepwise 32x32 - 2592x1944 with step 2/2
pi@raspberrypi:~ $ 

或者Raspbian GNU/Linux 11 (bullseye)下

nisy@raspberrypi:~ $ ls -al /dev/video*
crw-rw----+ 1 root video 81, 14 Mar 17 20:29 /dev/video0
crw-rw----+ 1 root video 81, 4 Mar 17 20:29 /dev/video10
crw-rw----+ 1 root video 81, 5 Mar 17 20:29 /dev/video11
crw-rw----+ 1 root video 81, 6 Mar 17 20:29 /dev/video12
crw-rw----+ 1 root video 81, 1 Mar 17 20:29 /dev/video13
crw-rw----+ 1 root video 81, 2 Mar 17 20:29 /dev/video14
crw-rw----+ 1 root video 81, 3 Mar 17 20:29 /dev/video15
crw-rw----+ 1 root video 81, 7 Mar 17 20:29 /dev/video16
crw-rw----+ 1 root video 81, 10 Mar 17 20:29 /dev/video18
crw-rw----+ 1 root video 81, 0 Mar 17 20:29 /dev/video19
crw-rw----+ 1 root video 81, 8 Mar 17 20:29 /dev/video20
crw-rw----+ 1 root video 81, 9 Mar 17 20:29 /dev/video21
crw-rw----+ 1 root video 81, 11 Mar 17 20:29 /dev/video22
crw-rw----+ 1 root video 81, 12 Mar 17 20:29 /dev/video23
crw-rw----+ 1 root video 81, 13 Mar 17 20:29 /dev/video31