usage-model (from linux kernel)

Linux and the Device Tree The Linux usage model for device tree data Author: Grant Likely This article describes how Linux uses the device tree. An overview of the device tree data format can be found on the device tree usage page at[1]. [1] The “Open Firmware Device Tree”, or simply Device…

linux 内核 platform_match

/** * platform_match – bind platform device to platform driver. * @dev: device. * @drv: driver. * * Platform device IDs are assumed to be encoded like this: * “<name><instance>”, where <name> is a short description of the type of * device, like “pci” or “floppy”, and <instance> is the enumerated * instance of the…

Linux kernel coding style

Linux kernel coding style This is a short document describing the preferred coding style for the linux kernel. Coding style is very personal, and I won’t force my views on anybody, but this is what goes for anything that I have to be able to maintain, and I’d prefer it for most other things too….

error: implicit declaration of function ‘copy_from_user’

编译内核模块出现以下错误: error: implicit declaration of function ‘copy_from_user’ [-Werror=implicit-function-declaration] 解决办法: 添加头文件: #include <linux/uaccess.h> 原因: asm/uaccess.h does not have copy_to_user on kernel > 4.11.


需求:有一个shell脚本 需要运行过程中自动输入密码,而不用手工。 解决方法: 使用管道,并使用-S参数来指定密码输入方式: echo ‘mindthink’ | sudo -S ./ 其中 mindthink 为密码。 参考链接