![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
linux文件系统层
linux文件系统层以上内容学习记录
うちは止水
写博客只是为了工作和学习做下记录,方便以后查找回忆。
展开
-
linux系统多主机网络通信配置
主机多系统之间,多网卡进行通信原创 2022-06-15 14:57:40 · 405 阅读 · 0 评论 -
linux系统读写eth网卡PHY寄存器工具mdio_mmd_indirect
#include <sys/types.h>#include <sys/socket.h>#include <sys/ioctl.h>#include <linux/if.h>#include <linux/mii.h>#include <linux/sockios.h>#include <errno.h>#include <stdio.h>#include <string.h>.原创 2021-11-17 11:13:27 · 16972 阅读 · 0 评论 -
linux系统读写eth网卡PHY寄存器工具mdio_cmd
在用户层访问smi/mdio总线, 读写phy芯片寄存器的通用代码。Linux内核2.6以上通用。mdio_cmd.c#include <sys/types.h>#include <sys/socket.h>#include <sys/ioctl.h>#include <linux/if.h>#include <linux/mii.h>#include <linux/sockios.h>#include <原创 2021-11-17 11:11:10 · 3283 阅读 · 0 评论 -
linux磁盘IO测试工具fio交叉编译
如何使用请参考以下文章https://www.cnblogs.com/xuyaowen/p/fio-usage.html1. 下载源码地址https://github.com/axboe/fio.githttp://git.kernel.dk/cgit/fio/2. configure配置通过./configure --help 查看帮助在当前路径下创建out文件./configure --host=arm-linux --cross-prefix=/home/lb008原创 2021-08-20 16:24:24 · 3148 阅读 · 0 评论 -
根据udev机制创建video camera设备节点软链接
一、列出设备所有属性,用来编写udev规则# udevadm info -a -n [device name]将 [device name] 替换为系统中存在的设备,比如 /dev/sda 或 /dev/ttyUSB0。如果你不知道设备名,你也可以列出某个系统路径的属性:-a :所有属性-n:后面跟设备节点node查看video设备节点所有属性# udevadm info -a -n /dev/video16root:/ # udevadm info -a -n /de原创 2020-09-22 10:39:49 · 970 阅读 · 0 评论 -
modprobe和insmod之间的区别,rmmod和lsmod介绍
他们的区别在于,modprobe会考虑要装载的模块是否引用了一些当前内核不存在的符号。如果有这类引用,modprobe会在当前模块搜索路径中查找定义了这些符号的其他模块。如果modprobe找到了这些模块(即要装载的模块所依赖的模块),它会同时将这些模块装载到内核。如果在这种情况下使用insmod,则该命令会失败,并在系统日志中记录“unresolved symbols(未解析的符号)”消息。rmmod可以使用rmmod工具从内核中移除模块。注意,如果内核认为模块仍然在使用状态.原创 2020-08-30 17:55:58 · 1255 阅读 · 0 评论 -
linux pstore/ram 实现kernel panic/oops奔溃log抓取保存
基于pstore和 ramoops实现在非易失性内存中保存panic日志1. kernel配置在menuconfig中选择内核pstore模块,build-in进内核$ make menuconfig |-> File systems |-> Miscellaneous filesystems |-> Persistent store support |-> Log kernel console messages # console 前端..原创 2020-07-31 14:10:32 · 4186 阅读 · 0 评论 -
poll机制实现timer定时器计时功能
#include <sys/types.h>#include <sys/socket.h>#include <stdio.h>#include <string.h>#include <arpa/inet.h>#include <errno.h>#include <signal.h>#include <sys/poll.h>#include <sys/epoll.h>#include.原创 2020-07-28 09:02:36 · 1297 阅读 · 0 评论 -
linux C语言程序判断文件类型demo
#include <sys/types.h>#include <sys/stat.h>#include <unistd.h>int main(int argc,char *argv[]){ int i; struct stat buf; char *ptr; if(lstat(argv[1],&buf)<0) { printf("error"); ret.原创 2020-07-27 16:20:16 · 942 阅读 · 1 评论 -
media-ctl --set-v4l2:CSI2 capture format设置
CSI on mainline Linux with v4l2The CSI (CMOS Sensor Interface) hardware block is partially supported in mainline Linux. Support for the hardware block found on A31 and later generations is already upstream, while the one found on A10/A20 is being worked原创 2020-07-17 15:17:19 · 6256 阅读 · 0 评论 -
linux i2c 的通信函数i2c_transfer出错码
参考errno-base.h #define EPERM 1 /*Operationnotpermitted*/#define ENOENT 2 /*Nosuchfileordirectory*/#define ESRCH 3 /*Nosuchprocess*/#define EINTR 4 /*Interruptedsystemcall*/#...转载 2019-05-28 16:46:20 · 5473 阅读 · 0 评论 -
linux系统下,在用户空间应用程序中模拟发送系统键盘事件
转自:https://www.cnblogs.com/butterflybay/p/10347924.htmlLinux 有自己的 input 子系统,可以统一管理鼠标和键盘事件。如果想模拟键盘事件,但是系统没有键盘设备该如何是好?基于输入子系统实现的 input 可以方便的在用户空间模拟鼠标和键盘事件。也可以自己做一个字符设备接收用户输入,根据输入,投递 input 事件。...转载 2019-08-07 10:29:57 · 732 阅读 · 0 评论 -
VIN Capture YUV422 转成RGB888后保存为BMP图片(demo程序)
#include <stdio.h>#include <stdlib.h>#include <string.h>#include <assert.h>#include <getopt.h> #include <fcntl.h> #include <unistd.h>#include <er...原创 2019-08-27 14:15:40 · 483 阅读 · 0 评论 -
VIN Capture ARGB8888保存为BMP图片格式(demo程序)
#include <stdio.h>#include <stdlib.h>#include <string.h>#include <assert.h>#include <getopt.h> #include <fcntl.h> #include <unistd.h>#include <er...原创 2019-08-27 13:58:44 · 1064 阅读 · 0 评论 -
linux下find命令使用说明
Linux find命令Linux find命令用来在指定目录下查找文件。任何位于参数之前的字符串都将被视为欲查找的目录名。如果使用该命令时,不设置任何参数,则find命令将在当前目录下查找子目录与文件。并且将查找到的子目录和文件全部进行显示。语法find path -option [ -print ] [ -exec -ok command ] {}...转载 2019-08-25 19:52:05 · 76 阅读 · 0 评论 -
linux 上层应用 i2c读写demo程序
/*This software uses a BSD license.Copyright (c) 2010, Sean Cross / chumby industriesAll rights reserved.Redistribution and use in source and binary forms, with or withoutmodification, are perm...原创 2019-08-17 14:28:07 · 2555 阅读 · 4 评论 -
poll 监听/sys/class/xxx下节点的两种实现方式
方式一: lseek到09方式二:reopen节点操作.(这个一定要注意在第一次open需要对它做一次dummy读操作)app 代码如下#include <stdio.h>#include <sys/types.h>#include <sys/stat.h>#include <fcntl.h>#include <un...原创 2019-10-30 17:48:55 · 551 阅读 · 0 评论 -
linux下查看应用属性(属于PC端运行还是属于ARM端运行)
文件名:xxxfile xxx# file sysfs_testsysfs_test: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.16, BuildID[sha1]=355fc9d7798ede2...原创 2019-10-30 17:52:46 · 1414 阅读 · 0 评论 -
rcar-du 通过DRM/KMS实现DU显示测试demo
app .c文件/*本ソースの使用方法 (1) 下記コマンドでビルド実行 make (2) 下記コマンドでaltボード実機用rootfsにコピー sudo cp camera_test /tftpboot/work_hieng/rootfs/home/root/ (3) altボード実機上linuxコンソールにて、下記コマンドを実施して、テストプログラム実行 cd ...原创 2019-11-15 17:01:08 · 963 阅读 · 0 评论 -
rcar-du 通过modetest命令测试DU驱动显示
通过以下命令查看设备信息modetest -M rcar-du然后输入以下modetest -M rcar-du -s xx@xx:1280x720第一个xx是connector id,第二个xx是crtc id...原创 2019-11-16 17:47:31 · 1963 阅读 · 0 评论