ppp 添加ipv6菜单项
# ppp目录 package/network/services/ppp/Makefile # 定义子菜单项 pppipv6 define Package/pppipv6 # 对应父菜单 $(call Package/ppp/Default) DEPENDS:=@(PACKAGE_ppp||PACKAGE_ppp-multilink) TITLE:=with IPv6 endef # 定义描述 define Package/pppipv6/description This package is compiled with IPv4 and IPv6 script support. endef # 定义安装文件 define Package/pppipv6/install $(INSTALL_BIN) ./files/ppp6.sh $(1)/lib/netifd/proto/ppp.sh $(INSTALL_BIN) ./files/lib/netifd/ppp6-up $(1)/lib/netifd/ endef # 执行调用 $(eval $(call BuildPackage,pppipv6)) # 判断IPV6选择, 就执行 ifdef CONFIG_IPV6 $(INSTALL_BIN) ./files/ppp6.sh $(1)/lib/netifd/proto/ppp.sh $(INSTALL_BIN) ./files/lib/netifd/ppp6-up $(1)/lib/netifd/ endif
Makefile增加菜单
1 # 定义菜单项 2 define KernelPackage/mt-2ghz 3 $(call KernelPackage/mt) 4 TITLE:=MediaTek MT 2.4GHZ support # 描述 5 DEPENDS:= \ 6 +kmod-mt-core +kmod-mt # 依赖, 强制选中 7 endef
增加子菜单
1 define KernelPackage/mt 2 $(KernelPackage/mt-default) 3 TITLE:=MediaTek MT wireless driver 4 DEPENDS+=+kmod-mt-core 5 MENU:=1 # 定义选项为菜单, 有子选项 6 endef 7 8 define KernelPackage/mt/config # 定义子选项 9 if PACKAGE_kmod-mt 10 config MT_ENABLED_2GHZ_SUPPORT 11 bool "MediaTek MT 2.4GHZ support" 12 default n # 默认值 13 endif 14 endef
增加展开菜单
...