嵌入式系统移植 - Kernel : 添加客制化内核配置项

嵌入式系统移植 - Kernel : 添加客制化内核配置项

说明

嵌入式驱动通常遵从模块化设计理念, 内核配置项可以定义全局变量, 驱动开关等, 从而提高驱动灵活性, 一些项目定制需求, 为了不修改源码里面自带的内核配置文件. 所以我们添加属于自己项目的内核配置文件就变得尤为重要了.

效果图

在这里插入图片描述

修改源码

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index dc3edbf..79b7ee7 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -2444,3 +2444,5 @@ source "crypto/Kconfig"
 source "lib/Kconfig"
 
 source "arch/arm/kvm/Kconfig"
+
+source "sunchip/Kconfig"
diff --git a/sunchip/Kconfig b/sunchip/Kconfig
new file mode 100755
index 0000000..2e55e3c
--- /dev/null
+++ b/sunchip/Kconfig
@@ -0,0 +1,18 @@
+menu "Sunchip setup"
+
+choice
+    bool "Sunchip Soc Arch Type"
+    default SUNCHIP_ARCH_ROCKCHIP_RK3128
+    config SUNCHIP_ARCH_ROCKCHIP_RK3128
+        tristate  "Soc is RK3128"
+    
+    config SUNCHIP_ARCH_ROCKCHIP_RK3126C
+        tristate  "Soc is RK3126"
+endchoice
+
+config SUNCHIP_PACKAGE_IMAGE
+	bool "Sunchip Kernel Uncompressed Method"
+	default y
+	help
+
+endmenu
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值