一、修改内核顶层目录下的Makefile为arm的编译器
$ vim Makefile
为:
195 ARCH = arm
196 CROSS_COMPILE =arm-none-linux-gnueabi-
二、@ make s5pv210_defconfig //拷贝标准板配置文件
1. General setup ---> //通用配置
(一般 设置 )
1.1 [*] Configure standard kernel features (for small systems) --->
//内核崩溃kernel panic, 会提示代码执行栈
2.[*] Enable loadable module support ---> // 使能insmod
(使能够 模块 支持)
3.[*] Enable the block layer ---> // 磁盘IO调度, 一般使用默认的就ok
(块 层 )
4. System Type ---> //选择特定的arm core /cpu 类型,以及它们的一下属性, make menuconfig之后应当确认一下该部分
(类型)
4.1 ARM system type (Samsung S5PV210/S5PC110) --->
4.2 (0) S3C UART to use for low-level messages // 内核的调试信息需要由ttySAC0打印出来,这个要和bootargs中的console=xx保持一致
4.3 S5PV210 Machines --->//一般默认就会选上,只是我们查看配置文件选择的是否正确
5. Bus support ---> // 一些总线的支持,一般使用默认就ok
(支持)
6. Kernel Features ---> //内核的特性,比如应用和内核空间的内存分布
(特性 )
6.1 Memory split (3G/1G user/kernel split) --->
6.2 [*] Use the ARM EABI to compile the kernel //如果交叉工具链中出现了eabi,一定要选上
6.3 [*] Allow old ABI binaries to run with this kernel (EXPERIMENTAL)
7. Boot options ---> //启动选项, 内核启动过程当中,可以修改的特性
(引导 选项)
8. CPU Power Management ---> // cpu电源管理, 一般在用电池设备当中会要做选择
(功率 管理 )
9. Power management options ---> // 外围设备的电源管理 suspend() resum()
10[*] Networking support ---> // 网络的支持,基本上都是协议方面的,比如TCP/IP, 域套接字, 组播 , ppp协议
10.1 Networking options --->
10.1.1 <*> Packet sockets
10.1.2 <*> Unix domain sockets
10.1.3 [*] TCP/IP networking <==========如果有网卡,一定要选上
10.1.4 [*] IP: multicasting
10.1.5 [*] IP: kernel level autoconfiguration
10.1.6 [*] IP: BOOTP support
11. Device Drivers ---> // 设备驱动,包含两部分驱动: 控制器===设备的驱动, 经常光顾的选项
11.1 <*> Memory Technology Device (MTD) support ---> // 有nand,onenand等等设备,需要选择mtd
10.1.1 [*] Command line partition table parsing //uboot可以传递分区表
10.1.2 <*> Caching block device access to MTD devices // CONFIG_MTD_BLOCK
10.1.3 <*> NAND Device Support ---> //nand设备支持, 具体的某个平台的nand控制器选项
11.2 [*] Network device support ---> //需要有网卡
10.2.1 [*] Ethernet (10 or 100Mbit) (NEW) --->
10.2.1.1<*> DM9000 support
11.3 [*] USB support --->
11.3.1 <*> Support for Host-side USB
11.3.2 [*] USB device filesystem (DEPRECATED)
11.3.3 [*] USB device class-devices (DEPRECATED) (NEW)
11.3.4 <*> USB Modem (CDC ACM) support // 3G配置
11.3.5 <*> USB Serial Converter support ---> usb转串口
11.4 Graphics support ---> // 图形: lcd
11.4.1 <*> Support for frame buffer devices --->
11.4.1.1 <*> Samsung S3C framebuffer support
11.4.2 Console display driver support --->
11.4.2.1 <*> Framebuffer Console support
11.4.3 [*] Bootup logo ---> // 启动的log,前提是LCD驱动OK了,log才能显示
12. File systems ---> // 文件系统的支持,比如支持ntfs, ext4, nfs, cramfs, jiffs, minix..yaffs, ubifs,procfs,sysfs
12.1 <*> Ext3 journalling file system support
12.2 <*> The Extended 4 (ext4) filesystem
12.3 Pseudo filesystems ---> // 虚拟文件系统: 在内存中管理文件,掉电之后,文件就不存在, 开机的时候临时创建
// dev/, proc/, sys/几个目录中的文件都是临时
12.3.1 [*] /proc file system support (NEW)
12.3.2 [*] sysfs file system support (NEW)
12.3.3 [*] Virtual memory file system support (former shm fs)
12.3.4 [*] Tmpfs POSIX Access Control Lists
//Configure standard kernel features (for small systems)这个选项一定要选上
12.4 [*] Miscellaneous filesystems ---> //杂项文件系统, 对支持存放在nand中文件的管理方式
12.4.1 <*> Journalling Flash File System v2 (JFFS2) support
12.4.2 [*] JFFS2 write-buffering support
12.4.3 <*> Compressed ROM file system support (cramfs)
12.4.5 <*> SquashFS 4.0 - Squashed file system support
12.5 [*] Network File Systems (NEW) ---> // 网络文件系统: nfs
12.5.1 <*> NFS client support
12.5.2 [*] NFS client support for NFS version 3 x x
12.5.3 [*] NFS client support for the NFSv3 ACL protocol extension
12.5.4 [*] Root file system on NFS
12.6 <*> Native language support ---> //内核支持的字符编码方式
12.6.1 <*> Codepage 437 (United States, Canada)
12.6.2 <*> Simplified Chinese charset (CP936, GB2312)
12.6.3 <*> ASCII (United States)
12.6.4 <*> NLS ISO 8859-1 (Latin 1; Western European Languages)
12.6.5 <*> NLS UTF-8
-----------------------------------------------------------------------------------------------
总结: 一般需要选择procfs , sysfs, tmpfs, cramfs, jffs, squashfs, nfs
$ make zImage/uImage -j2
$ cp arch/arm/boot/zImage /tftpboot
实验掌握知识点:
1,掌握内核编译的方法
2,熟悉menuconfig中主菜单的意思,以及如何配置各个选项,几个选项中注意以下几个模块:
a,配置网卡是,需要选择哪些
b,nandflash需要配置哪些
c,LCD需要配置那些选项
d,文件系统需要配置哪些基本类型
内核的首次配置
最新推荐文章于 2021-04-30 12:40:16 发布