通过对一个 GRUB 2模块源代码的编写、编译,到模块的加载、运行和卸载,分析 GRUB 2的模块结构及开发过程,阐明了 GRUB 2将功能分布在众多小模块中且在运行时能够动态加载和卸载的模块化设计机制。结果表明,该机制便于随时扩展功能,进行用户二次开发。%By analyzing the process of writing and compiling a simple GRUB 2 module source code,and loading,running,unloading a module,the article described the structure and the process of developing of GRUB 2 module,and clarified the modular design of GRUB 2:it put functions into many small modules, and those modules could be dynamically loaded and unloaded.The analysis showed that GRUB 2 could be redeveloped to consummate its functions and extend its application occasions.
展开▼