1、说明
linux内核的是通过可视化的窗口来配置的,在中终端输入 make menuconfig 就可以配置,里面的参数也比较多,需要整理下,便于以后复习
参考文档:https://www.cnblogs.com/zengkefu/p/6372232.html
https://blog.csdn.net/qq_29350001/article/details/51489318
2、整理
General setup 常规设置
->()Cross-compiler tool prefix 交叉编译工具前缀,我看有人会把这里设置成gcc的地址,也不需
要,因为在Makefile里面我们已经修改CROSS_COMPLIE
-> [ ] Compile also drivers which will not load 编译驱动程序不加载
->() Local version - append to kernel release 设置内核版本号或名称
->[ ] Automatically append version information to the version strin 添加自定义信息到内核版本
号
-> Kernel compression mode (Gzip) ---> 内核压缩模式 ,选择的格式要保证你系统有安装了
相应的压缩工具,不同的压缩方式会生成不同的镜像
,vmlinux:未压缩镜像,Image:原始内核二进制代
码,zImage:gzip压缩的镜像,bzImage:bzip2压缩
的镜像
->((none)) Default hostname 默认主机名
->[*] Support for paging of anonymous memory (swap) 虚拟内存启用或禁止,这里根据实际
情况,如果内存是比较小可以支持,
但这个操作是很费flash的,闪存的操作
次数是有限的
->[*] System V IPC 进程间通信,这里是为了支持老的进程通信接口,现在般都是用POSIX IPC
接口
->[*] POSIX Message Queues 消息队列,支持消息队列会多占用点内存
->[*] Enable process_vm_readv/writev syscalls 使能虚拟内存读写接口调用
->[*] open by fhandle syscalls 打开文件句柄,操作文件就需要打开
->[*] uselib syscall uselib 接口调用
->-*- Auditing support 审计支持,用于和内核的某些子模块同时工作
->IRQ subsystem ---> 中断子系统
->[ ] Expose hardware/virtual IRQ mapping via debugfs 通过debugfs来显示硬件/虚拟的
IRQ映射,通过虚拟文件系统来映
射IRQ中断号,作调试目的
->[ ] Expose irq internals in debugfs 显示中断在debugf中
->Timers subsystem ---> 定时器子系统
->Timer tick handling (Idle dynticks system (tickless idle)) 选择内核时钟滴答的方式,这
个参数可以根据自己的系统来
设置
->[*] Old Idle dynticks config 用来兼容老版本内核选项
->[*] High Resolution Timer Support 高精度定时器,支持ns级
->CPU/Task time and stats accounting ---> 进程时间与状态统计
-> Cputime accounting (Simple tick based cputime accounting) -- 时间统计
-> [ ] Fine granularity task level IRQ time accounting 统计进程IRQ时间
-> [*] BSD Process Accounting 将进程统计信息写入指定文件
->[*] BSD Process Accounting version 3 file format 可以记录V3格式,能记录PID
->[*] Export task/process statistics through netlink 通过netlink接口向用户空间导出进程
的统 计信息
->[*] Enable per-task delay accounting 在统计信息中包含进程等候系统资源(cpu,IO同步
,内存交换等)所花费的时间
->[*] Enable extended accounting over taskstats 在统计信息中包含进程的更多扩展信息
->[*] Enable per-task storage I/O accounting 在统计信息中包含进程在存储设备上的
I/O字节数
->RCU Subsystem ---> 在读多写少的情况下,这是一个高性能的锁机制
->[ ] Make expert-level adjustments to RCU configuration
-><> Kernel .config support 将配置选项保存在内核中,便于恢复
->(18) Kernel log buffer size (16 => 64KB, 17 => 128KB) 内核log缓存大小
->(12) CPU kernel log buffer size contribution (13 => 8 KB, 17 => 1) CPU内核log
->(13) Temporary per-CPU printk log buffer size (12 => 4KB, 13 => 8 printk log大小
->-*- Control Group support ---> 进程管理机制,可以针对一组进程进行系统资源的分配和管理
->
->[*] Checkpoint/restore support "检查点/恢复"支持
->[*] Namespaces support ---> 名字空间支持
->
->[*] Automatic process group scheduling 每个TTY动态地创建任务分组(cgroup),这样就可以降低高负载
情况下的桌面延迟
-> [ ] Enable deprecated sysfs features to support old userspace too 开启文件系统默认属性
->-*- Kernel->user space relay support (formerly relayfs) 某些文件系统(比如debugfs)中提供
中继(relay)支持
->[*] Initial RAM filesystem and RAM disk (initramfs/initrd) support 初始内存文件系统与初始
内存盘
->() Initramfs source file(s) 制作initramfs镜像的原料
->[*] Support initial ramdisk/ramfs compressed using gzip 支持经过gzip压缩的ramdisk或
cpio镜像
->Compiler optimization level (Optimize for performance) ---> 优化级别
->[*] Configure standard kernel features (expert users) ---> 配置标准的内核特性
->
->[*] Enable bpf() system call 使能bpf()系统调用
->[*] Use full shmem filesystem 完全使用shmem来代替ramfs
->*] Enable AIO support 开启POSIX异步IO支持.它常常被高性能的多线程程序使用
->[*] Enable madvise/fadvise syscalls
->[ ] Enable userfaultfd() system call
->[*] Enable PCI quirk workarounds 开启针对多种PCI芯片组的错误规避功能
->[*] Enable membarrier() system call
->[ ] Embedded system 嵌入式系统
->[ ] PC/104 support
->Kernel Performance Events And Counters ---> 性能相关的事件和计数器支持
->[*] Enable VM event counters for /proc/vmstat 从内核导出的虚拟内存的各种统计信息
->[*] Enable SLUB debugging support SLUB调试支持,禁用后可显著降低内核大小
->[ ] Enable memcg SLUB sysfs support by default
->[ ] Disable heap randomization 禁用堆随机化
->Choose SLAB allocator (SLUB (Unqueued Allocator)) ---> 选择内存分配管理器
->
->[*] Allow slab caches to be merged
->[ ] SLAB freelist randomization
->[ ] Harden slab freelist metadata
-> [*] SLUB per cpu partial cache CPU 缓存加速局部对象的分配和释放
-> [*] Profiling support 性能分析支持
-><M> OProfile system profiling OProfile性能分析工具支持,仅用于调试目的
->[*] Kprobes Kprobes调试支持
->[*] Optimize very unlikely/likely branches 优化非常近似/不近似的分支
->[ ] Static key selftest
->[ ] GCC plugins ---- gcc插件
->Stack Protector buffer overflow detection (Strong) ---> 堆栈溢出保护
->(8) Number of bits to use for ASLR of mmap base address 基地址位数
->[*] Make kernel text and rodata read-only
->[*] Set loadable kernel module data as NX and text as RO 将内核模块的数据区标
记为NX(不可执行),文本
段标记为RO(只读),以防
止不良模块(例如被植入病
毒的模块)对系统的破坏
->[ ] Perform full reference count validation at the expense of spe
->GCOV-based kernel profiling ---> 基于GCC的gcov(代码覆盖率测试工具)的代码分析支持,
仅用于调试
->[*] Enable loadable module support ---> 可加载模块支持
->[ ] Enable support for block device writeback throttling 回写机制限制
->[*] Block layer debugging information in debugfs 调试信息写入debugfs
->[ ] Logic for interfacing with Opal enabled SEDs
-> Partition Types ---> 分割类型
->
-> IO Schedulers ---> IO调度器(IO Scheduler)是操作系统用来决定块设备上IO
操作提交顺序的方法
-> <*> Deadline I/O scheduler deadline调度器.简洁小巧
-> System Type ---> 系统类型
->[ ] [ ] Disable branch prediction 去使能分支预测
-> Bus support ---> 总线支持
-> Kernel Features ---> 内核类型
-> Boot options ---> 启动配置
-> CPU Power Management ---> CPU管理
-> Floating point emulation ---> 浮点仿真
-> Userspace binary formats ---> 名字空间二进制格式
-> Power management options ---> 电源管理
->[*] Networking support ---> 网络支持
-> Device Drivers ---> 设备驱动
-> Firmware Drivers ---> 固件驱动
-> File systems ---> 文件系统
-> Kernel hacking ---> 内核开发
-> Security options ---> 安全选项
-> -*- Cryptographic API ---> 加密API支持
-> Library routines ---> 网络库例程
-> [*] Virtualization ---> 虚拟化