当前位置: 首页 > news >正文

哪个网站建网页比较好企业网站建设与网页设计

哪个网站建网页比较好,企业网站建设与网页设计,做cps需要什么样的网站,莘县做网站推荐群#xff1a;C/C大学技术协会#xff1a;145655849 Linux中的模块#xff08;Modules) Linux的module其实可以看作是内核的插件。 在Linux系统中#xff0c;可以通过文件 cat /proc/modules xxxxxxxxxx1 1cat /proc/modules 查看相关的驱动模块。 也可以通过命令 l…推荐群C/C大学技术协会145655849 Linux中的模块Modules) Linux的module其实可以看作是内核的插件。 在Linux系统中可以通过文件 cat /proc/modules xxxxxxxxxx1 1cat /proc/modules 查看相关的驱动模块。 也可以通过命令 lsmod xxxxxxxxxx1 1lsmod 查看lsmod只是将/proc/modules中的内容做了格式化排版。 设备驱动是模块的一种它用于为系统上层提供针对硬件的操作。除硬件设备的驱动外内核模块也是内核扩展功能的一种方式即有些模块并没有对应的硬件而是纯软件的运行在0环的代码如内核级的防火墙网络模块。 使用命令 insmod xxxxxxxxxx1 1insmod 或者 modprobe xxxxxxxxxx1 1modprobe 可以在内核中插入模块。两者的区别在于modprobe的功能更强并且会自动解决依赖问题。 编译及启用Linux内核 随系统发行的Linux内核的头文件在/usr/src下不一定与当前系统的内核二进制文件一致甚至有可能不全。 所以在做内核开发前最好些自己重编译、安装一份内核。 参考 https://wiki.ubuntu.com/Kernel/BuildYourOwnKernel 获取源码 通过以下命令下载源码 apt-get source linux-image-(uname−r)xxxxxxxxxx11apt−getsourcelinux−image−(uname -r) xxxxxxxxxx1 1apt-get source linux-image-(uname−r)xxxxxxxxxx11apt−getsourcelinux−image−(uname -r) 设置编译依赖 通过以下命令将build的依赖环境配置下载为与将要编译的内核一致 sudo apt-get build-dep linux-image-(uname−r)xxxxxxxxxx11sudoapt−getbuild−deplinux−image−(uname -r) xxxxxxxxxx1 1sudo apt-get build-dep linux-image-(uname−r)xxxxxxxxxx11sudoapt−getbuild−deplinux−image−(uname -r) 编译内核 进入源码根目录下执行 fakeroot debian/rules clean quicker build: fakeroot debian/rules binary-headers binary-generic binary-perarch if you need linux-tools or lowlatency kernel, run instead: fakeroot debian/rules binary xxxxxxxxxx5 1fakeroot debian/rules clean2# quicker build:3fakeroot debian/rules binary-headers binary-generic binary-perarch4# if you need linux-tools or lowlatency kernel, run instead:5fakeroot debian/rules binary 将在上层目录下得到几个deb文件 cd … ls *.deb linux-headers-4.8.0-17_4.8.0-17.19_all.deb linux-headers-4.8.0-17-generic_4.8.0-17.19_amd64.deb linux-image-4.8.0-17-generic_4.8.0-17.19_amd64.deb xxxxxxxxxx5 1cd …2ls *.deb3 linux-headers-4.8.0-17_4.8.0-17.19_all.deb4 linux-headers-4.8.0-17-generic_4.8.0-17.19_amd64.deb5 linux-image-4.8.0-17-generic_4.8.0-17.19_amd64.deb 安装测试新内核 sudo dpkg -i linux4.8.0-17.19.deb sudo reboot xxxxxxxxxx2 1sudo dpkg -i linux4.8.0-17.19.deb2sudo reboot 设置编译时产生调试符号信息 sudo apt-get install pkg-config-dbgsym fakeroot debian/rules clean fakeroot debian/rules binary-headers binary-generic binary-perarch skipdbgfalse xxxxxxxxxx3 1sudo apt-get install pkg-config-dbgsym2fakeroot debian/rules clean3fakeroot debian/rules binary-headers binary-generic binary-perarch skipdbgfalse 使用Make系统手工编译内核及加入模块 以上的方法是Ubuntu的apt-get系统提供的可以方便地获取源码、编译及安装。 但是对于理解内核编译过程自己加入驱动模块的用处不大。 将自己的驱动模块加入源码目录中 将自己的源码文件(hello.c)放入到内核源码的./drivers/char目录下我的测试文件的内容为 /* $Id: hello.c,v 1.5 2004/10/26 03:32:21 corbet Exp $ */ #include linux/init.h #include linux/module.h MODULE_LICENSE(“Dual BSD/GPL”); static int hello_init(void) { printk(KERN_ALERT “Hello, world\n”); return 0; } static void hello_exit(void) { printk(KERN_ALERT “Goodbye, cruel world\n”); } module_init(hello_init); module_exit(hello_exit); ​x 1/* 2 * $Id: hello.c,v 1.5 2004/10/26 03:32:21 corbet Exp $ 3 */ 4#include linux/init.h5#include linux/module.h6MODULE_LICENSE(“Dual BSD/GPL”);7​8static int hello_init(void)9{10 printk(KERN_ALERT “Hello, world\n”);11 return 0;12}13​14static void hello_exit(void)15{16 printk(KERN_ALERT “Goodbye, cruel world\n”);17}18​19module_init(hello_init);20module_exit(hello_exit); 编辑Kconfig文件以及Makefile文件 因为我们要使用可视化的 make menuconfig xxxxxxxxxx1 1make menuconfig 工具来定义内核的编译选项这需要用到开源的命令行图行库libcurses可以先安装 sudo apt-get install libncurses5-dev libncursesw5-dev xxxxxxxxxx1 1sudo apt-get install libncurses5-dev libncursesw5-dev 接着通过编辑Kconfig文件来设置菜单内容curses通过读取Kconfig来展示菜单 打开./driver/char目录下的Kcofnig文件Kconfig的语法可以参考内核源码目录下的Documentation/kbuild/kconfig-language.txt。 找到类似以下内容 config BFIN_OTP tristate “Blackfin On-Chip OTP Memory Support” … help If you say Y here, you will get support for a character device … If unsure, it is safe to say Y. xxxxxxxxxx7 1config BFIN_OTP2 tristate Blackfin On-Chip OTP Memory Support3…4 help5 If you say Y here, you will get support for a character device6 …7 If unsure, it is safe to say Y. 依照它的格式在其后加入 config MYMODULE tristate “A new module just for test!” default n help nothing for usage, left blank xxxxxxxxxx5 1config MYMODULE2 tristate A new module just for test!3 default n4 help5 nothing for usage, left blank 接着再编辑./driver/char目录下的Makefile文件在依照该文件中的其它项在最后加入内容 obj-(CONFIGMYMODULE)hello.oxxxxxxxxxx11obj−(CONFIG_MYMODULE) hello.o xxxxxxxxxx1 1obj-(CONFIGM​YMODULE)hello.oxxxxxxxxxx11obj−(CONFIG_MYMODULE) hello.o 其中CONFIG_之后的MYMODULE对应了在Kconfig中的目录设置其中的hello.o对应了源码的文件名hello.c)。 编译 此时回到源码的根目录运行命令 make menuconfig xxxxxxxxxx1 1make menuconfig 在device drviers - character drivers下找到我们新添的MYMODULE项并通过空格设置为M状态表示以模块的方式编译。 在源码根目录下运行 make modules xxxxxxxxxx1 1make modules 若一切顺利在./drivers/char/目录下会得到hello.ko即内核模块文件。 安装 使用insmod安装模块使用lsmod查看模块使用rmmod删除模块使用dmesg查看内核模块的输出信息。 insmod hello.ko 1insmod hello.ko 参考资料推荐群C/C大学技术协会145655849 The Linux Kernel Module Programming Guide Linux内核源码中的Documentation/kbuild/的几个txt文档
http://wiki.neutronadmin.com/news/54006/

相关文章:

  • 高端网站建设费用情况山东省工程建设招标信息网站
  • 企业如何通过地方网站宣传网站网站服务器一年的费用
  • 邢台网站维护具体的网站建设
  • 网站建设需要几个阶段网站上面的体验卡怎么做
  • vs2013做网站保存的格式制作书签的作文
  • 广东长海建设工程有限公司网站制作和维系一个网站的费用
  • 深圳电信网站备案做网页价格
  • 网站无法上传图片wordpress获取评论用户名
  • 做国内打不开的网站吗网站站建设建技设术技术
  • 企业网站建站公司郑州吉林省吉林市昌邑区
  • 如何搭建网站教程视频网页制作基础教程第二版答案
  • 工业网站开发商wordpress女装小说
  • 中国建设网官方网站企业网银愿意做cps的网站
  • 永久免费ppt下载网站网站服务器建设教程视频
  • 5网站建设公司可以写代码的网站
  • 网站建设税率多少站长之家ip地址归属查询
  • 烟台网站建设托管如何替换网站ico图标
  • 优惠券领取网站开发郑州做响应式网站
  • 沈阳建网站公司wordpress和shopify区别
  • 贵州省清镇市建设学校网站做网站没有成本费用如何做账
  • 南通网站seo网站建设项目策划书范文
  • 网站页面设计图片素材网页设计师证书什么时候考
  • 新手什么网站做外贸加盟微信小程序代理
  • 网站虚拟主机虚拟空间网站建设策划书编制
  • 免费网站使用牟长青 做网站推广的四个基本要点
  • 企业网站建设的一般原则包括国家企业信用公示信息年报全国
  • 网站备案前置审批类型免费表格模板网站
  • 做医疗的网站三合一网站建设用途
  • 临淄网站建设多少钱优质手机网站建设
  • 厦门网站建设哪家好厦门最好的网站建设湖南住建云网站