Patrick Georgi ([email protected]) just uploaded a new patch set to 
gerrit, which you can find at http://review.coreboot.org/200

-gerrit

commit 181d45d266a3e4627c82690a745c0f08018f8cf5
Author: Mathias Krause <[email protected]>
Date:   Mon Mar 8 11:43:32 2010 +0100

    Set root device while probing boot_devices list
    
    This way we don't need to have absolute paths in the config file itself.
    
    Change-Id: Id1f27a08bd86bc9a872dd52347f19a55532a82e6
    Signed-off-by: Mathias Krause <[email protected]>
    Signed-off-by: Patrick Georgi <[email protected]>
---
 main/grub/grub.c |   17 ++++++++++++++---
 1 files changed, 14 insertions(+), 3 deletions(-)

diff --git a/main/grub/grub.c b/main/grub/grub.c
index 1afdadd..0e8970c 100644
--- a/main/grub/grub.c
+++ b/main/grub/grub.c
@@ -139,11 +139,22 @@ void manual_grub_menulst(void)
 int probe_menulst(char *bootdevice, char *filename)
 {
        char menulst[256];
-
-       strcpy(menulst, bootdevice);
+       struct builtin *root;
+       int use_root;
+
+       memset(menulst, 0, sizeof(menulst));
+       root = find_command("root");
+       if (root != NULL) {
+               (root->func)(bootdevice, BUILTIN_SCRIPT);
+               use_root = 1;
+       } else {
+               strcpy(menulst, bootdevice);
+               use_root = 0;
+       }
        strncat(menulst, filename, 256);
+
        /* Set string to zero: */
-       copy_path_to_filo_bootline(menulst, config_file, 0, 0);
+       copy_path_to_filo_bootline(menulst, config_file, use_root, 0);
        if (file_open(config_file)) {
                /* We found a config file. Bail out */
                /* The valid config file name stays in config_file[] */

-- 
coreboot mailing list: [email protected]
http://www.coreboot.org/mailman/listinfo/coreboot

Reply via email to