大家好,又见面了,我是你们的朋友全栈君。
模块被加载后,在/sys/module/目录下降出现以此模块名命名的目录 root@dm368-evm:/sys/module# ls 8250 lockd snd_pcm_oss tuner_simple cmemk mt20xx snd_timer tuner_xc2028 davinci_display mt9p031 soundcore tvp514x davinci_enc_mngr musb_hdrc spurious usb_storage davinci_mmc netpoll sunrpc usbcore davincifb nfs tcp_cubic usbserial dm365_imp option tda8290 usbtest dm365mmap printk tda9887 videobuf_core edmak scsi_mod tea5761 videobuf_vmalloc irqk snd tea5767 vpfe_capture kernel snd_pcm ths7303 xc5000 root@dm368-evm:/sys/module#
注意 /sys/class的目录 如i2c root@dm368-evm:/sys/class# ls bdi edma misc scsi_host block firmware mmc_host sound cmem graphics mtd spi_master davinci_display hwmon net tty davinci_previewer i2c-adapter ppp ubi davinci_resizer i2c-dev regulator usb_device davinci_system irqk rtc video4linux dm365_aew mdio_bus scsi_device video_output dm365_af mem scsi_disk
查看模块信息 root@dm368-evm:~# modinfo edmak filename: /lib/modules/2.6.32.17-davinci1/kernel/drivers/dsp/edmak.ko description: DMA operations from user mode author: Texas Instruments license: GPL depends: vermagic: 2.6.32.17-davinci1 preempt mod_unload modversions ARMv5
查看CPU信息: root@dm368-evm:/proc# cat cpuinfo Processor : ARM926EJ-S rev 5 (v5l) BogoMIPS : 147.86 Features : swp half thumb fastmult edsp java CPU implementer : 0x41 CPU architecture: 5TEJ CPU variant : 0x0 CPU part : 0x926 CPU revision : 5 Hardware : DaVinci DM36x EVM Revision : 0000 Serial : 0000000000000000
查看内存信息: root@dm368-evm:/proc# cat /proc/meminfo MemTotal: 44212 kB MemFree: 26900 kB Buffers: 220 kB Cached: 3840 kB SwapCached: 0 kB Active: 3624 kB Inactive: 1836 kB Active(anon): 1444 kB Inactive(anon): 92 kB Active(file): 2180 kB Inactive(file): 1744 kB Unevictable: 0 kB Mlocked: 0 kB SwapTotal: 0 kB SwapFree: 0 kB Dirty: 4 kB Writeback: 0 kB AnonPages: 1428 kB Mapped: 1536 kB Shmem: 136 kB Slab: 2528 kB SReclaimable: 636 kB SUnreclaim: 1892 kB KernelStack: 360 kB PageTables: 244 kB NFS_Unstable: 0 kB Bounce: 0 kB WritebackTmp: 0 kB CommitLimit: 22104 kB Committed_AS: 6268 kB VmallocTotal: 968704 kB VmallocUsed: 110828 kB VmallocChunk: 841724 kB
查看USB设备: root@dm368-evm:/proc# cat /proc/bus/usb/devices
T: Bus=01 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#= 1 Spd=480 MxCh= 1 B: Alloc= 0/800 us ( 0%), #Int= 0, #Iso= 0 D: Ver= 2.00 Cls=09(hub ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1 P: Vendor=1d6b ProdID=0002 Rev= 2.06 S: Manufacturer=Linux 2.6.32.17-davinci1 musb-hcd S: Product=MUSB HDRC host driver S: SerialNumber=musb_hdrc C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr= 0mA I:* If#= 0 Alt= 0 #EPs= 1 Cls=09(hub ) Sub=00 Prot=00 Driver=hub E: Ad=81(I) Atr=03(Int.) MxPS= 4 Ivl=256ms
查看键盘和鼠标: root@dm368-evm:/proc# cat /proc/bus/input/devices cat: can’t open ‘/proc/bus/input/devices’: No such file or directory
查看各分区使用情况: root@dm368-evm:/proc# df Filesystem 1K-blocks Used Available Use% Mounted on ubi0:rootfs 113424 21208 87380 20% / tmpfs 40 0 40 0% /mnt/.splash none 1024 32 992 3% /dev /dev/mmcblk0p1 61387804 113140 58156328 0% /media/mmcblk0p1 tmpfs 16384 36 16348 0% /var/volatile tmpfs 22104 0 22104 0% /dev/shm tmpfs 16384 0 16384 0% /media/ram
查看体系结构: root@dm368-evm:/proc# busybox uname -a Linux dm368-evm 2.6.32.17-davinci1 #80 PREEMPT Mon Jul 14 16:05:38 CST 2014 armv5tejl unknown
查看中断信息: root@dm368-evm:/proc# cat /proc/interrupts CPU0 3: 0 AINTC dm365_h3a_af 6: 0 AINTC dm365_h3a_aew 8: 17004 AINTC davinci_osd 12: 1 AINTC musb_hdrc 16: 0 AINTC edma 17: 0 AINTC edma_error 23: 0 AINTC sdio0 26: 953 AINTC mmc0 32: 13148 AINTC clockevent 33: 1 AINTC free-run counter 39: 89 AINTC i2c_davinci 40: 639 AINTC serial 52: 0 AINTC eth0 53: 393 AINTC eth0 54: 0 AINTC eth0 55: 0 AINTC eth0 Err: 0
查看uboot环境配置: root@dm368-evm:/proc# cat cmdline dm365_imp.oper_mode=0 mem=48M console=ttyS0,115200n8 noinitrd rw ubi.mtd=3 root=ubi0:rootfs rootfstype=ubifs video=davincifb:osd0=720x576x16,4050K vpfe_capture.cont_bufsize=6291456 davinci_capture.device_type=1 vpfe_capture.interface=1
所支持文件系统: root@dm368-evm:/proc# cat filesystems nodev sysfs nodev rootfs nodev bdev nodev proc nodev tmpfs nodev debugfs nodev sockfs nodev usbfs nodev pipefs nodev anon_inodefs nodev rpc_pipefs nodev inotifyfs nodev devpts ext3 ext2 cramfs nodev ramfs vfat msdos nodev nfs nodev mqueue nodev ubifs
加载模块 root@dm368-evm:/proc# cat modules dm365mmap 1955 0 – Live 0xbf01c000 edmak 12667 0 – Live 0xbf013000 irqk 6491 0 – Live 0xbf00c000 cmemk 22319 0 – Live 0xbf000000
加载的文件系统 root@dm368-evm:/proc# cat mounts rootfs / rootfs rw 0 0 ubi0:rootfs / ubifs rw,relatime 0 0 proc /proc proc rw,relatime 0 0 tmpfs /mnt/.splash tmpfs rw,relatime,size=40k 0 0 sysfs /sys sysfs rw,relatime 0 0 none /dev tmpfs rw,relatime,size=1024k,nr_inodes=8192,mode=755 0 0 /dev/mmcblk0p1 /media/mmcblk0p1 ext3 rw,relatime,errors=continue,data=writeback 0 0 devpts /dev/pts devpts rw,relatime,gid=5,mode=620,ptmxmode=000 0 0 usbfs /proc/bus/usb usbfs rw,relatime 0 0 tmpfs /var/volatile tmpfs rw,relatime,size=16384k 0 0 tmpfs /dev/shm tmpfs rw,relatime,mode=777 0 0 tmpfs /media/ram tmpfs rw,relatime,size=16384k 0 0
系统分区: root@dm368-evm:/proc# cat mtd dev: size erasesize name mtd0: 003c0000 00020000 “bootloader” mtd1: 00040000 00020000 “params” mtd2: 00420000 00020000 “kernel” mtd3: 08000000 00020000 “filesystem” mtd4: 177e0000 00020000 “zslf”
printk打印机别: root@dm368-evm:/proc/sys/kernel# cat printk 7 4 1 7
内核版本: root@dm368-evm:/proc# cat version Linux version 2.6.32.17-davinci1 (root@zslf-desktop) (gcc version 4.3.3 (Sourcery G Lite 2009q1-203) ) #80 PREEMPT Mon Jul 14 16:05:38 CST 2014
系统运行时间: root@dm368-evm:/proc# cat uptime 1593.79 1224.34
Linux内核引导时,从文件/etc/fstab中读取要加载的文件系统 root@dm368-evm:/etc# cat fstab # stock fstab – you probably want to override this with a machine specific one
rootfs / auto defaults 1 1 proc /proc proc defaults 0 0 devpts /dev/pts devpts mode=0620,gid=5 0 0 usbfs /proc/bus/usb usbfs defaults 0 0 tmpfs /var/volatile tmpfs defaults,size=16M 0 0 tmpfs /dev/shm tmpfs mode=0777 0 0 tmpfs /media/ram tmpfs defaults,size=16M 0 0
# uncomment this if your device has a SD/MMC/Transflash slot
#/dev/mmcblk0p1 /media/card auto defaults,sync,noauto 0 0
查看开发板主频
第一种:
可以看内核启动信息
U-Boot 2010.12-rc2 (May 06 2014 – 09:23:56)
Cores: ARM 297 MHz
DDR: 243 MHz
I2C: ready
DRAM: 128 MiB
NAND: 512 MiB
MMC: davinci: 0, davinci: 1
Bad block table found at page 262080, version 0x01
Bad block table found at page 262016, version 0x01
Net: Ethernet PHY: LXT972 @ 0x01
DaVinci-EMAC
Hit any key to stop autoboot: 0
第二种:
执行 cat /proc/davinci_clocks
查看 arm_clk 的值
root@dm368-evm:/proc# cat davinci_clocks ref_clk users=16 24000000 Hz pll1 users=15 pll 486000000 Hz pll1_aux_clk users= 5 pll 24000000 Hz uart0 users= 1 psc 24000000 Hz i2c users= 1 psc 24000000 Hz spi4 users= 0 psc 24000000 Hz pwm0 users= 0 psc 24000000 Hz pwm1 users= 0 psc 24000000 Hz pwm2 users= 0 psc 24000000 Hz timer0 users= 1 psc 24000000 Hz timer1 users= 0 psc 24000000 Hz timer2 users= 2 psc 24000000 Hz timer3 users= 0 psc 24000000 Hz usb users= 1 psc 24000000 Hz pll1_sysclkbp users= 0 pll 24000000 Hz clkout0 users= 0 pll 24000000 Hz pll1_sysclk1 users= 0 pll 24300000 Hz pll1_sysclk2 users= 0 pll 243000000 Hz pll1_sysclk3 users= 2 pll 243000000 Hz vpss_dac users= 1 psc 243000000 Hz mjcp users= 1 psc 243000000 Hz pll1_sysclk4 users= 6 pll 121500000 Hz uart1 users= 1 psc 121500000 Hz mmcsd1 users= 0 psc 121500000 Hz spi0 users= 0 psc 121500000 Hz spi1 users= 0 psc 121500000 Hz spi2 users= 0 psc 121500000 Hz spi3 users= 0 psc 121500000 Hz gpio users= 1 psc 121500000 Hz aemif users= 2 psc 121500000 Hz emac users= 1 psc 121500000 Hz asp0 users= 1 psc 121500000 Hz rto users= 0 psc 121500000 Hz pll1_sysclk5 users= 1 pll 243000000 Hz vpss_master users= 1 psc 243000000 Hz pll1_sysclk6 users= 0 pll 27000000 Hz pll1_sysclk7 users= 0 pll 486000000 Hz pll1_sysclk8 users= 1 pll 97200000 Hz mmcsd0 users= 1 psc 97200000 Hz pll1_sysclk9 users= 0 pll 243000000 Hz pll2 users= 1 pll 594000000 Hz pll2_aux_clk users= 0 pll 24000000 Hz clkout1 users= 0 pll 24000000 Hz pll2_sysclk1 users= 0 pll 23760000 Hz pll2_sysclk2 users= 1 pll 297000000 Hz arm_clk users= 1 psc 297000000 Hz pll2_sysclk3 users= 0 pll 297000000 Hz pll2_sysclk4 users= 0 pll 20482758 Hz voice_codec users= 0 psc 20482758 Hz pll2_sysclk5 users= 0 pll 74250000 Hz pll2_sysclk6 users= 0 pll 594000000 Hz pll2_sysclk7 users= 0 pll 594000000 Hz pll2_sysclk8 users= 0 pll 594000000 Hz pll2_sysclk9 users= 0 pll 594000000 Hz pwm3 users= 0 psc 24000000 Hz
RTC驱动修改
查看时间 输入命令:date 设置日期和时间 输入命令:date -s “2013-11-02 16:13:30” 将时间写入时钟芯片 输入命令:hwclock -w 输入命令:reboot
系统重启后 输入命令:date 时间为刚才设置的值,测试OK!
发布者:全栈程序员栈长,转载请注明出处:https://javaforall.cn/170220.html原文链接:https://javaforall.cn