Jay 发布的文章

linux gpio libc


gpio对linux c app里面的一个gpio操作云里雾里半天,是时候好好理理了。https://www.kernel.org/doc/Documentation/gpio/sysfs.txthttps://www.kernel.org/doc/Documentation/gpio/gpio-legacy.txt主要是这gpio number是如何同pin number 一一对应的。256 root@mxj-zbcs-310:#tree /sys/class/gpio . |-- export |-- gpio120 -> ../../devices/soc.0/1c20800...

Overview of the V4L2 driver framework


目录 [隐藏]I. IntroductionII. Structure of a driverIII. Structure of the frameworkstruct v4l2_devicestruct v4l2_subdevstruct video_devicestruct v4l2_fhV4L2 events Overview of the V4L2 driver frameworkThis text documents the various structures provided by the V4L2 framework and their relations...

使用VS2017 开发Linux C应用


目录 [隐藏]includelibI. TroubleShootingUnexpected GDB output from commandCannot insert breakpoint -1.Could not find the 'zip' archiverOperation not permittedMicrosoft.Build.Linux.Shared.ExceptionTTYcannot open display 使用VS2017 开发Linux C应用Visual C++ for Linux Development依赖环境sudo apt-get install ...

log4c


目录 [隐藏]I. 安装位置使用 log4chttp://log4c.sourceforge.net/已经从 http://log4c.sourceforge.net/ 下载源码,成功编译,现在需要讲动态库确定位置。然后讲对应的.h文件拷贝到工程。I. 安装deb$sudo apt-get install liblog4c-dev #liblog4csource$wget http://prdownloads.sourceforge.net/log4c/log4c-1.2.4.tar.gz $mkdir log4c $tar -xvf log4c-1.2.4.tar.g...

logrotate


目录 [隐藏]I. logrotateII. docsIII. troubleshootings日志异常 I. logrotateII. docsman logrotateIII. troubleshootings日志异常如上强制logrotate ,执行以下步骤。logrotate -v -f /etc/logrotate.d/kernel-message 重命名当前日志 renaming /var/log/messages to /var/log/messages-20180827压缩文件compressing log with: /bin/gzip默认的文件已...

systemd


目录 [隐藏]I. man systemdII. systemd vs sysv initIII. systemd commandIV. systemd source review systemdSystemdsystem V与systemdI. man systemdsystemd 是linux操作系统的系统和服务管理器,作为boot启动后的第一个进程(PID=1),systemd扮演初始化系统,以及启动和维护用户空间服务。为了兼容SysV,如果systemd初始化被调用并且进程id不是1,它将执行telinit,并且将同步参数到该应用,所以在正常系统登录状态下的i...

htpdate


目录 [隐藏]I. code reviewII. modifyIII. Troubleshooting通过date -s 修改时间未及时同步 htpdate标签 :GAC-350 htpdateGAC-350 放弃ntpdate采用htpdate,通过/etc/default/htpdate配置为deamon模式,并且尝试从多个门户网站同步时间。但是测试反馈从开机无网络到网络恢复的时候同步时间未及时恢复,需要等待一段时间。HTP_SERVERS="baidu.com youku.com taobao.com" HTP_OPTIONS="-D...

bashrc notes


bashrc notesbash 登录会使用/etc/profile和~/.bashrc,视情况将如下的值保存在对应文件,使之生效。man 高亮export LESS_TERMCAP_mb=$'\E[01;32m' export LESS_TERMCAP_md=$'\E[01;31m' export LESS_TERMCAP_me=$'\E[0m' export LESS_TERMCAP_se=$'\E[0m' export LESS_TERMCAP_so=$'\E[01;44;33m' export LESS_TERMCAP_ue=$'\E[0m' export LESS_TERMCA...

shell command


Shell 命令对于Shell命令我们要区分bash 内置(bash built in )和GNU 开源软件包以及三方软件包。对于所有命令我们都可以尝试whereis 确定可执行文件、源码、和手册路径。#man whereis whereis - locate the binary, source, and manual page files for a com- mand # whereis whereis whereis: /usr/bin/whereis /usr/share/man/man1/whereis.1.gz 同时可以可以通过which确定当前环境变量下的命令位置#...

linux cooling device


目录 [隐藏]I. thermal sensorII. governorIII. cooling deviceIV. test script linux cooling device这里详细介绍并理解基于 allwinner a64 linux 下根据热量传感器 采集的温度用以自动调频 原理。I. thermal sensorhttp://linux-sunxi.org/Thermal_Sensora64集两个热量传感器分别监控gpu和cpu温度。The thermal sensors have become common elements in wide range...