main.c revision 2
2N/A * GRUB -- GRand Unified Bootloader 2N/A * Copyright (C) 2002,2003,2005,2006,2008,2009 Free Software Foundation, Inc. 2N/A * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. 2N/A * GRUB is free software: you can redistribute it and/or modify 2N/A * it under the terms of the GNU General Public License as published by 2N/A * the Free Software Foundation, either version 3 of the License, or 2N/A * (at your option) any later version. 2N/A * GRUB is distributed in the hope that it will be useful, 2N/A * but WITHOUT ANY WARRANTY; without even the implied warranty of 2N/A * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 2N/A * GNU General Public License for more details. 2N/A * You should have received a copy of the GNU General Public License 2N/A/* This is actualy platform-independant but used only on loongson and sparc. */ 2N/A /* Check if there are any modules. */ 2N/A/* Load all modules in core. */ 2N/A /* Not an ELF module, skip. */ 2N/A /* Not an embedded config, skip. */ 2N/A/* Write hook for the environment variables of root. Remove surrounding 2N/A parentheses, if any. */ 2N/A /* XXX Is it better to check the existence of the device? */ 2N/A /* Commented this out because we always want network interfaces 2N/A * plumbed, even when we have a prefix on memdisk. We could check 2N/A * if the devicename is actually memdisk and only do this then, but 2N/A * there does not appear to be any harm in doing it unconditionally 2N/A /* We have a partition, but still need to fill in the drive. */ 2N/A/* Load the normal mode module and execute the normal mode if possible. */ 2N/A /* Load the module. */ 2N/A /* Print errors if any. */ 2N/A/* The main routine. */ 2N/A /* First of all, initialize the machine. */ 2N/A /* Load pre-loaded modules and free the space. */ 2N/A /* It is better to set the root device as soon as possible,