kernel

Would Richardson–Lucy deconvolution work for recovering the latent kernel?

三世轮回 提交于 2020-01-21 19:42:54
问题 I am aware that Richardson–Lucy deconvolution is for recovering the latent image, but suppose we have a noisy image and the original image. Can we find the kernel that caused the transformation? Below is a MATLAB code for Richardson-Lucy deconvolution and I am wondering if it is easy to modify and make it recover the kernel instead of the latent image . My thoughts are that we change the convolution options to valid so the output would represent the kernel, what do you think? function latent

How to change version string of the kernel?

百般思念 提交于 2020-01-21 04:30:33
问题 I'm very new to Linux and very new to building/compiling my own kernel. For starters, I'm just trying to figure out how to change the version string of my kernel. For instance, when I do uname -a, it prints out "Linux localhost.localdomain 3.11.10-100.fc18.i686". I'd like to customize that, but I'm not sure what file to edit. I know it must be some file in my kernel directory, but I've been going through them with no luck. Any help would be great! 回答1: At the top of the top-level Makefile,

Android 源代码结构

若如初见. 提交于 2020-01-20 08:52:50
   简介   在使用Andriod SDK进行应用程序开发的时候,我们需要对源代码进行调试,有可能需要进入到某个Android API函数内部进行跟踪调试。但是,如果目标版本的SDK没有关联对应版本的源代码的话,就会提示你找不到源代码。   图:找不到Android源码的提示     我们都知道Android系统是一个开源工程,在网上可以下载到源代码。一般在网上搜索一下,就会找到各种下载源代码的方法,比如使用Git和Repo,android源代码下载的网址是 http://android.git.kernel.org/ 。关于利用Git下载android源代码的方法,我就不再赘述了,因为网上的方法很多,这里给出一个参考链接 Windows平台下Android源码的下载 。   如果你跟我一样是初学者,相信看了上面的文章,你就知道如何使用Git下载android源码了。但是,看着 http://android.git.kernel.org/ 站点下的各种目录和文件,相信你也会跟我一样傻眼,不知道那个目录下的文件对应是什么代码,想找到自己所需要的东西都比较难了。所以这里给大家介绍一下android源代码的结构,如果发现文章有错误之处,还请各位童鞋轻点砸砖!   图: http://android.git.kernel.org/ 下纷繁复杂的文件    

Android 源代码结构

泪湿孤枕 提交于 2020-01-20 08:00:33
简介   在使用Andriod SDK进行应用程序开发的时候,我们需要对源代码进行调试,有可能需要进入到某个Android API函数内部进行跟踪调试。但是,如果目标版本的SDK没有关联对应版本的源代码的话,就会提示你找不到源代码。   图:找不到Android源码的提示     我们都知道Android系统是一个开源工程,在网上可以下载到源代码。一般在网上搜索一下,就会找到各种下载源代码的方法,比如使用Git和Repo,android源代码下载的网址是 http://android.git.kernel.org/ 。关于利用Git下载android源代码的方法,我就不再赘述了,因为网上的方法很多,这里给出一个参考链接 Windows平台下Android源码的下载 。   如果你跟我一样是初学者,相信看了上面的文章,你就知道如何使用Git下载android源码了。但是,看着 http://android.git.kernel.org/ 站点下的各种目录和文件,相信你也会跟我一样傻眼,不知道那个目录下的文件对应是什么代码,想找到自己所需要的东西都比较难了。所以这里给大家介绍一下android源代码的结构,如果发现文章有错误之处,还请各位童鞋轻点砸砖!   图: http://android.git.kernel.org/ 下纷繁复杂的文件     认识Android源代码结构之前

Android 源代码结构

旧城冷巷雨未停 提交于 2020-01-20 07:09:34
简介   在使用Andriod SDK进行应用程序开发的时候,我们需要对源代码进行调试,有可能需要进入到某个Android API函数内部进行跟踪调试。但是,如果目标版本的SDK没有关联对应版本的源代码的话,就会提示你找不到源代码。   图:找不到Android源码的提示     我们都知道Android系统是一个开源工程,在网上可以下载到源代码。一般在网上搜索一下,就会找到各种下载源代码的方法,比如使用Git和Repo,android源代码下载的网址是 http://android.git.kernel.org/ 。关于利用Git下载android源代码的方法,我就不再赘述了,因为网上的方法很多,这里给出一个参考链接 Windows平台下Android源码的下载 。   如果你跟我一样是初学者,相信看了上面的文章,你就知道如何使用Git下载android源码了。但是,看着 http://android.git.kernel.org/ 站点下的各种目录和文件,相信你也会跟我一样傻眼,不知道那个目录下的文件对应是什么代码,想找到自己所需要的东西都比较难了。所以这里给大家介绍一下android源代码的结构,如果发现文章有错误之处,还请各位童鞋轻点砸砖!   图: http://android.git.kernel.org/ 下纷繁复杂的文件     认识Android源代码结构之前

Android 源代码结构

放肆的年华 提交于 2020-01-20 06:46:27
简介   在使用Andriod SDK进行应用程序开发的时候,我们需要对源代码进行调试,有可能需要进入到某个Android API函数内部进行跟踪调试。但是,如果目标版本的SDK没有关联对应版本的源代码的话,就会提示你找不到源代码。   图:找不到Android源码的提示     我们都知道Android系统是一个开源工程,在网上可以下载到源代码。一般在网上搜索一下,就会找到各种下载源代码的方法,比如使用Git和Repo,android源代码下载的网址是 http://android.git.kernel.org/ 。关于利用Git下载android源代码的方法,我就不再赘述了,因为网上的方法很多,这里给出一个参考链接 Windows平台下Android源码的下载 。   如果你跟我一样是初学者,相信看了上面的文章,你就知道如何使用Git下载android源码了。但是,看着 http://android.git.kernel.org/ 站点下的各种目录和文件,相信你也会跟我一样傻眼,不知道那个目录下的文件对应是什么代码,想找到自己所需要的东西都比较难了。所以这里给大家介绍一下android源代码的结构,如果发现文章有错误之处,还请各位童鞋轻点砸砖!   图: http://android.git.kernel.org/ 下纷繁复杂的文件     认识Android源代码结构之前

kernel中发送按键

断了今生、忘了曾经 提交于 2020-01-20 01:01:20
有时需要在kernel中处理一个中断,仅仅是一个状态的变化,此时发送一个键值到app端,相对比较方便。 在kernel中发送按键的函数 void input_report_key ( struct input_dev * dev , unsigned int code , int value ) void input_sync ( struct input_dev * dev ) 按键传送逻辑 从逻辑看,按键发送分四部分: 1.在kernel中注册一个input设备,用于发送按键,纯软件处理,和硬件无关 2.获取硬件状态变化,转为键值 3.对于Android系统,在framework有input service,监控input device,获取键值后,通过回调函数上报给app 4. app根据应用功能定义处理按键 典型应用场景 处理一个中断,上报一个小心说明该中断到来 一般在kernel中有已经实现的input设备驱动,无论是否有硬件设备和该驱动关联。此时在该设备驱动中增加定义一个函数,在函数中发送按键,如此也和原来的驱动逻辑解耦合,然后该函数通过EXPORT_SYMBOL_GPL声明,然后在捕获中断的驱动中调用已定义的函数,实现按键发送。 例如 xxx_keys.c void rk_send_F11_key ( void ) { printk ( "DICKE pirntk

kernel中文件的读写操作可以使用vfs_read()和vfs_write

廉价感情. 提交于 2020-01-20 00:39:31
需要在Linux kernel--大多是在需要调试的驱动程序--中读写文件数据。在kernel中操作文件没有标准库可用,需要利用kernel的一些函数,这些函数主要有: filp_open() filp_close(), vfs_read() vfs_write(),set_fs(),get_fs()等,这些函数在linux/fs.h和asm/uaccess.h头文件中声明。下面介绍主要步骤   1. 打开文件   filp_open()在kernel中可以打开文件,其原形如下:   strcut file* filp_open(const char* filename, int open_mode, int mode);   该函数返回strcut file*结构指针,供后继函数操作使用,该返回值用IS_ERR(2881064151)来检验其有效性。   参数说明   filename: 表明要打开或创建文件的名称(包括路径部分)。在内核中打开的文件时需要注意打开的时机,很容易出现需要打开文件的驱动很早就加载并打开文件,但需要打开的文件所在设备还不有挂载到文件系统中,而导致打开失败。   open_mode: 文件的打开方式,其取值与标准库中的open相应参数类似,可以取O_CREAT,O_RDWR,O_RDONLY等。   mode: 创建文件时使用,设置创建文件的读写权限

Linux 编译内核

大兔子大兔子 提交于 2020-01-19 05:52:27
编译内核步骤: 1. 先查看自己OS使用的内核版本 mrzhang@mrzhang:~$ uname -r 4.4.0-51-generic mrzhang@mrzhang:~$ 2. 如果安装系统时,自动安装了源码。在 /usr/src 目录下有对应的使用的版本目录(ubuntu安装完一般没有源码需要自己下载)。如下: 后缀generic表示通用版。 mrzhang@mrzhang:/usr/src$ ls linux-headers-4.4.0-21 linux-headers-4.4.0-21-generic linux-headers-4.4.0-51 linux-headers-4.4.0-51-generic 3. 下载源码 指令apt-cache search linux-source查看系统可用的源码版本 mrzhang@mrzhang:/usr/src$ apt-cache search linux-source linux-source - Linux kernel source with Ubuntu patches linux-source-4.4.0 - Linux kernel source for version 4.4.0 with Ubuntu patches linux-source-4.8.0 - Linux kernel source for

iptables包过滤入门指南

无人久伴 提交于 2020-01-17 13:38:28
1. Introduction Welcome, gentle reader. It is assumed you know what an IP address, a network address, a netmask, routing and DNS are. If not, I recommend that you read the Network Concepts HOWTO. This HOWTO flips between a gentle introduction (which will leave you feeling warm and fuzzy now, but unprotected in the Real World) and raw full-disclosure (which would leave all but the hardiest souls confused, paranoid and seeking heavy weaponry). Your network is not secure. The problem of allowing rapid, convenient communication while restricting its use to good, and not evil intents is congruent