kernel编译 |
您所在的位置:网站首页 › select=selected › kernel编译 |
原文网址:kernel编译_IT利刃出鞘的博客-CSDN博客 make menuconfig配置方法1.找到内核中的文件。例:sound/soc/samsung/s3c24xx-i2s.c 2.打开其同等目录下的Makefile,查找"s3c24xx-i2c" 找到: snd-soc-s3c24xx-i2s-objs := s3c24xx-i2s.o obj-$(CONFIG_SND_S3C24XX_I2S) += snd-soc-s3c24xx-i2s.o CONFIG_SND_S3C24XX_I2S即为配置项。 3.make menuconfig; 输入/SND_S3C24XX_I2S (CONFIG_SND_S3C24XX_I2S也可以) 回车,即可找到其配置方式,将其复制到UE中,对照这个方式来配置即可。 查找后的结果示例: Symbol : xxx [=y] 表示xxx已经配置为y Type: tristate表示三态(y,M,n) boolean表示二态(y,n) Prompt: 提示。后边的字符串就是最终要配置的项 //对应Kconfig的tristate后边的字符串 Depends on: 依赖的配置 Location : 该项配置所在的路径 Selects : 本项的选择所影响的选择 Selected by: 本项自己不能选择,只能被这个字符串中的内容来选择。 //Selects和Selected by示例: Symbol: S3C24XX_DMA [=n] ... Prompt: S3C2410 DMA support Selects: S3C_DMA [=n] Symbol: S3C_DMA [=n] Selected by: S3C24XX_DMA [=n] && PLAT_S3C24XX [=y] && ARCH_S3C24XX [=y] 如上,需要配置S3C_DMA时,无法直接配置,只能通过S3C24XX_DMA来配置 make menuconfig时,从各个目录下的Kconfig文件获得配置项,最终全部汇总到根目录下的 .config 文件中 make menuconfig的最后一步,会有提示,比如缺少了某个depends on,此时按下"Esc",然后按"h",即可查看Depends on。 例:有的模块取决于另一模块,若另一模块配置为M,则本模块也得配置为M ./configure -help可以用此命令来查看配置文件。 如: System types: --build=BUILD configure for building on BUILD [guessed] --host=HOST cross-compile to build programs to run on HOST [BUILD] --target=TARGET configure for building compilers for TARGET [HOST] --host=arm-linux 表示编译出来的要运行于linux之下 --target=arm-linux 表示目标是linux mkimage错误信息:"mkimage" command not found - U-Boot images will not be built 解决方法1 编译uboot,会在tools/路径下生成mkimage,将其拷贝到usr/bin/目录即可 解决方法2 sudo apt install uboot-mkimage //旧版本ubuntu 或者sudo apt install u-boot-tools //新版本ubuntu |
CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3 |