URL: <http://savannah.gnu.org/bugs/?33236>
Summary: config files embedded in core.img can not declare menuentrys Project: GNU GRUB Submitted by: p55 Submitted on: Thu 05 May 2011 09:35:22 AM GMT Category: Configuration Severity: Major Priority: 5 - Normal Item Group: Feature Request Status: None Privacy: Public Assigned to: None Originator Name: Patrick Originator Email: p...@mailinator.com Open/Closed: Open Discussion Lock: Any Release: Release: Bazaar - trunk Reproducibility: Every Time Planned Release: None _______________________________________________________ Details: It should be possible to execute the embedded config file in "normal mode" I have been investigating grub for several hours just now and have been able to implement the feature. There is, though, of course more than one way to do it. Grub is NOT lacking concepts and levels of abstraction. The basic "problem" is that "normal mode" relies on _files_. Functions in grub-core/normal/main.c expect file paths. The way I approached the task was basically to move the grub_load_config() function from kern/main.c to normal/main.c and duplicate some functions in normal/main.c to make them accept char* buffers instead of grub_file_t as arguments. It works nicely so far. But is not compatible with the current behavior. I have 2 possibilities how to proceed now and would like to know which would have more chances to be included in the trunk. 1. write a module which basically does the same like kern/main.c does. The module would provide a special function that would "take over" control from kern/main.c as soon as it gets called from the embedded config file. The embedded config config file would then start with embedded_normal or something like that and the module would switch mode and never return control to kern/main.c 2. adjust kern/main.c and normal/main.c and make grub switch to "normal mode" in case normal is called from an embedded config file and NOT load (prefix)/grub.cfg. If "normal" is not called, switch to normal mode and load /grub.cfg, just like before. Method 2 would use significantly less code I think. Should I give it a try? (I actually don't really have the time anytime soon anyway... :-) maybe somebody else would like doing it as well... ) Thoughts?? _______________________________________________________ Reply to this item at: <http://savannah.gnu.org/bugs/?33236> _______________________________________________ Message sent via/by Savannah http://savannah.gnu.org/ _______________________________________________ Bug-grub mailing list Bug-grub@gnu.org https://lists.gnu.org/mailman/listinfo/bug-grub