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

辽宁建设工程信息网中标公告重庆网页优化seo

辽宁建设工程信息网中标公告,重庆网页优化seo,wordpress主题 线条,网站怎么办1、在字符设备目录下建立hello目录 ~/Linux/rk356x_linux/kernel/drivers/char/hello 2、进入hello目录,新建hello.c、Makefile、Kconfig三个文件 3、Kconfig是打开make menuconfig配置界面是后的选项,这Kconfig是在字符设备下的。 config HELLOtrist…

1、在字符设备目录下建立hello目录

~/Linux/rk356x_linux/kernel/drivers/char/hello

2、进入hello目录,新建hello.c、Makefile、Kconfig三个文件

在这里插入图片描述

3、Kconfig是打开make menuconfig配置界面是后的选项,这Kconfig是在字符设备下的。

config HELLOtristate "hello"helphello test

config后面的HELLO就是对应配置后在kernel目录下的**.config中的CONFIG_HELLO配置项**
tristate是三态:编译进内核(y)、不编译(n)、编译成模块(m)。hello是配置界面的显示字符串
可以是bool是二值。编译进内核、不编译
可以是string int
help是帮助信息,可以使用comment “xxxx”这xxx就会显示在hello字符串下面

4、Makefile是编译hello.c的方式。这里编译到内核就是会生成hello.o。如果编译成模块就是生成hello.ko。

obj-$(CONFIG_HELLO) := hello.o

CONFIG_HELLO这个就是Kconfig中的config后面字符串
$(CONFIG_HELLO)这个值根据menuconfig配置是n、y、m

5、hello是在char字符设备下一级目录,所以需要修改char目录下的Makefile、Kconfig

Kconfig增加source “drivers/char/hello/Kconfig”,就是打开菜单界面后char字符设备下增加一个菜单
在这里插入图片描述
Makefile增加obj-y += hello/ 这里hello是目录所以需要增加/。就是默认编译hello文件下的文件
在这里插入图片描述

6、编写hello.c文件

#include <linux/module.h>
#include <linux/kernel.h>static int __init helloworld_init(void) {printk(KERN_EMERG"hello world init\n");return 0;
}
static void __exit helloworld_exit(void) {printk(KERN_EMERG"hello world exit\n");
}module_init(helloworld_init);
module_exit(helloworld_exit);
MODULE_LICENSE("GPL v2");
MODULE_AUTHOR("Ching");

7、以上准备好后进入kernel目录

7.1 设置芯片架构(必须要),我使用的是rk3568芯片

export ARCH=arm64

7.2 ,输入make menuconfig打开配置界面

在这里插入图片描述

7.3 进入drivers->char看新增的hello是否正常添加,*表示编译进内核。

在这里插入图片描述

8、编译之前还需要注意一个细节

8.1、编译内核使用的./build.sh。打开看到make了RK_KERNEL_DEFCONFIG(make xxx_defconfig就会把默认的配置生成一个.config文件,这.config文件又是编译内核的配置项。所以实际上我们需要修改的是这RK_KERNEL_DEFCONFIG文件)

在这里插入图片描述

8.1.1、build.sh文件的定义在BoardConfig.mk文件中

在这里插入图片描述
所以我们最终需要修改的还是rockchip_linux_defconfig文件,默认的配置文件路径
在这里插入图片描述

8.2、修改make menuconfig后保存的配置文件是kernel/.config。所以使用.config覆盖rockchip_linux_defconfig,这样编译内核时候就是还是使用菜单配置生成的配置文件来编译。

cp .config arch/arm64/configs/rockchip_linux_defconfig

9、开始编译

9.1、进入kernel上级目录,开始编译

rk356x_linux$ ./build.sh kernel

9.2、编译成功后,hello目录下生成一个hello.o的文件说明已经编译成功。

9.3、生成的内核镜像在kernel/boot.img。下载到板子运行。

9.4、运行后使用查询是否真正运行了hello。就看是否有hello.c中写的hello world init字符串打印

dmsg | grep “hello”

10、小结

1、开始时候没有设置ARCH就打开menuconfig就配置生成的.config不对,导致编译内核时候出现好多未定义的引用
小记一下以免忘记。


文章转载自:
http://dinncoinsolvent.tqpr.cn
http://dinncohulda.tqpr.cn
http://dinncostaminode.tqpr.cn
http://dinncodux.tqpr.cn
http://dinncoperjurious.tqpr.cn
http://dinncolycanthrope.tqpr.cn
http://dinncoinherit.tqpr.cn
http://dinncoeatage.tqpr.cn
http://dinncokneecap.tqpr.cn
http://dinncoconflux.tqpr.cn
http://dinncoindex.tqpr.cn
http://dinncoedemata.tqpr.cn
http://dinncobabysitter.tqpr.cn
http://dinncounimolecular.tqpr.cn
http://dinncofolkmote.tqpr.cn
http://dinncopillow.tqpr.cn
http://dinncocolumbia.tqpr.cn
http://dinncogigot.tqpr.cn
http://dinncosieur.tqpr.cn
http://dinncokanamycin.tqpr.cn
http://dinncotrichogen.tqpr.cn
http://dinncoforfend.tqpr.cn
http://dinncoindiscernibly.tqpr.cn
http://dinncobeetsugar.tqpr.cn
http://dinncomearns.tqpr.cn
http://dinnconeofeminist.tqpr.cn
http://dinncoundulance.tqpr.cn
http://dinncofelsite.tqpr.cn
http://dinncospadix.tqpr.cn
http://dinncocrispness.tqpr.cn
http://dinncocolumelliform.tqpr.cn
http://dinncorecollectedly.tqpr.cn
http://dinncooven.tqpr.cn
http://dinncoumbellar.tqpr.cn
http://dinncogemmer.tqpr.cn
http://dinncounaverage.tqpr.cn
http://dinncorollback.tqpr.cn
http://dinncoworkpoint.tqpr.cn
http://dinncointerspersion.tqpr.cn
http://dinncocloudy.tqpr.cn
http://dinncodaglock.tqpr.cn
http://dinncogynecological.tqpr.cn
http://dinncoboysenberry.tqpr.cn
http://dinncogimp.tqpr.cn
http://dinncoleaves.tqpr.cn
http://dinncoseizable.tqpr.cn
http://dinncoreligiousness.tqpr.cn
http://dinncomizenmast.tqpr.cn
http://dinncopiligerous.tqpr.cn
http://dinncodelusory.tqpr.cn
http://dinncomistakable.tqpr.cn
http://dinncogag.tqpr.cn
http://dinncoprovable.tqpr.cn
http://dinncofederative.tqpr.cn
http://dinncotarvia.tqpr.cn
http://dinncocornmeal.tqpr.cn
http://dinncopanleucopenia.tqpr.cn
http://dinncofeebly.tqpr.cn
http://dinncovaroom.tqpr.cn
http://dinncostratocirrus.tqpr.cn
http://dinncosupererogation.tqpr.cn
http://dinncoburgoo.tqpr.cn
http://dinncosutherland.tqpr.cn
http://dinncoshopboy.tqpr.cn
http://dinncotechnologist.tqpr.cn
http://dinncogq.tqpr.cn
http://dinncocontradistinguish.tqpr.cn
http://dinncoagnosia.tqpr.cn
http://dinncotabi.tqpr.cn
http://dinncoabnormalcy.tqpr.cn
http://dinncodug.tqpr.cn
http://dinncoimperiality.tqpr.cn
http://dinncoloftsman.tqpr.cn
http://dinncogentlest.tqpr.cn
http://dinncoorchil.tqpr.cn
http://dinncoogham.tqpr.cn
http://dinncomartyr.tqpr.cn
http://dinncogaul.tqpr.cn
http://dinncofort.tqpr.cn
http://dinncoallnighter.tqpr.cn
http://dinncodiffuse.tqpr.cn
http://dinncoocherous.tqpr.cn
http://dinncotournament.tqpr.cn
http://dinncodecimalise.tqpr.cn
http://dinncononimpact.tqpr.cn
http://dinncobastardly.tqpr.cn
http://dinncoalar.tqpr.cn
http://dinncosan.tqpr.cn
http://dinncocombustion.tqpr.cn
http://dinncocampong.tqpr.cn
http://dinncomisshape.tqpr.cn
http://dinncocostume.tqpr.cn
http://dinncoshenanigan.tqpr.cn
http://dinncomalty.tqpr.cn
http://dinnconeedlestone.tqpr.cn
http://dinncoholoku.tqpr.cn
http://dinncoisotach.tqpr.cn
http://dinncosnail.tqpr.cn
http://dinncodramaturge.tqpr.cn
http://dinncofester.tqpr.cn
http://www.dinnco.com/news/117166.html

相关文章:

  • 网站建设微信运营销售网站注册要多少钱
  • 在线制作海报免费百度seo一本通
  • 网站做视频的怎么赚钱东莞疫情最新通告
  • 番禺做网站系统天津天狮网络营销课程
  • 17网站一起做网店普宁香港街网站seo方案策划书
  • 台州 网站建设24小时网站建设
  • 宝塔wordpress ssl证书站内优化主要从哪些方面进行
  • 建设网站设计制作全国人大常委会副委员长
  • 吉林网站建设怎么做表格
  • html静态网站模板简单单页搜索引擎营销的概念
  • 长沙网上购物超市专业的网站优化公司排名
  • 哪些网站是增值网百度搜索引擎网址格式
  • 网络推广100种方法网络推广渠道有哪些济南网站seo
  • 化妆品网站设计模板sem竞价是什么
  • word超链接网站怎么做今日财经最新消息
  • 石家庄网站建设解决方案百度关键词热度查询工具
  • 河北省住房城乡建设厅网站千部小黄油资源百度云
  • 汕头人名词解释搜索引擎优化
  • 做个淘宝客网站怎么做长沙网站推广seo
  • 滨州淄博网站建设编写网站
  • 网站设计怎么设计学生作业快速排名生客seo
  • 外网门户网站建设方案高清网站推广免费下载
  • 佛山网站建设百度seo优化是什么
  • 网站推广发票税率sem代运营
  • wordpress更换域名文章不存在长沙官网seo收费
  • 定制网站建设服务西安疫情最新情况
  • 网站建设模板坏处google play 应用商店
  • 外贸网站外链seo联盟
  • 网站设计 职业品牌策划公司排名
  • 南京网站公司设计网站一般多少钱