grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] Split of the normal mode


From: Bean
Subject: [PATCH] Split of the normal mode
Date: Sun, 29 Mar 2009 17:25:12 +0800

Hi,

This patch split the function of normal mode into small modules, here
is a summary:

1, Move dynamic command loader to commands/dyncmd.c (dyncmd.mod)
2, Move automatic fs loader to fs/autofs.c (autofs.mod)
3, Split normal mode into three major parts:
parser/normal - normal mode parser (nparser.mod)
reader/normal - normal mode command line reader (nreader.mod)
menu/text - menu viewer (tmenu.mod)
4, Generic menu function move to menu/menu.c and menu/menu_viewer.c. (menu.mod)
5, Misc function move to lib/misc.c lib/completion.c (misc.mod)
6, setjmp function move to lib/i386, lib/x86_64, lib/powerpc and
lib/sparc64 (setjmp.mod)

Three new handler class:
parser
reader
menu_viewer

The kernel also split into parser and reader code.

grub-mkimage now support boot config file, which would be embed in
core.img. At startup, the kernel parser would read the config file and
execute the commands. Here is a sample boot config file that would
bring grub2 to an environment similar to the previous normal mode:

insmod dyncmd
insmod autofs
insmod nparser
handler parser normal
insmod nreader
handler reader normal
insmod tmenu
configfile /boot/grub/grub.cfg

The kernel parser is not very smart, so only use unix eol ('\n'), and
don't leave extra space.

grub-mkimage -c boot.cfg ...

This patch should apply cleanly with svn r2046.

-- 
Bean

Attachment: split.zip
Description: Zip archive


reply via email to

[Prev in Thread] Current Thread [Next in Thread]