rename format from raw to yeeloong_flash

This commit is contained in:
Vladimir 'phcoder' Serbinenko 2010-04-06 22:23:02 +02:00
parent 781d7798bb
commit 3bf09c9ea8
4 changed files with 33 additions and 13 deletions

View file

@ -41,21 +41,8 @@
#define GRUB_KERNEL_MACHINE_TOTAL_MODULE_SIZE GRUB_KERNEL_CPU_TOTAL_MODULE_SIZE
#define GRUB_KERNEL_MACHINE_COMPRESSED_SIZE GRUB_KERNEL_CPU_COMPRESSED_SIZE
#define GRUB_PLATFORM_IMAGE_FORMATS "raw, elf"
#define GRUB_PLATFORM_IMAGE_DEFAULT_FORMAT "raw"
#define GRUB_PLATFORM_IMAGE_DEFAULT GRUB_PLATFORM_IMAGE_RAW
#ifndef ASM_FILE
typedef enum {
GRUB_PLATFORM_IMAGE_RAW,
GRUB_PLATFORM_IMAGE_ELF
}
grub_platform_image_format_t;
#define GRUB_PLATFORM_IMAGE_RAW GRUB_PLATFORM_IMAGE_RAW
#define GRUB_PLATFORM_IMAGE_ELF GRUB_PLATFORM_IMAGE_ELF
/* The prefix which points to the directory where GRUB modules and its
configuration file are located. */
extern char grub_prefix[];

View file

@ -31,6 +31,21 @@ void EXPORT_FUNC (grub_halt) (void);
configuration file are located. */
extern char grub_prefix[];
#define GRUB_PLATFORM_IMAGE_FORMATS "raw, elf"
#define GRUB_PLATFORM_IMAGE_DEFAULT_FORMAT "raw"
#define GRUB_PLATFORM_IMAGE_DEFAULT GRUB_PLATFORM_IMAGE_RAW
#ifndef ASM_FILE
typedef enum {
GRUB_PLATFORM_IMAGE_RAW,
GRUB_PLATFORM_IMAGE_ELF
}
grub_platform_image_format_t;
#define GRUB_PLATFORM_IMAGE_RAW GRUB_PLATFORM_IMAGE_RAW
#define GRUB_PLATFORM_IMAGE_ELF GRUB_PLATFORM_IMAGE_ELF
#endif
#endif /* ! GRUB_KERNEL_MACHINE_HEADER */

View file

@ -27,6 +27,19 @@
void EXPORT_FUNC (grub_reboot) (void);
void EXPORT_FUNC (grub_halt) (void);
#define GRUB_PLATFORM_IMAGE_FORMATS "yeeloong_flash, elf"
#define GRUB_PLATFORM_IMAGE_DEFAULT_FORMAT "yeeloong_flash"
#define GRUB_PLATFORM_IMAGE_DEFAULT GRUB_PLATFORM_IMAGE_YEELOONG_FLASH
typedef enum {
GRUB_PLATFORM_IMAGE_YEELOONG_FLASH,
GRUB_PLATFORM_IMAGE_ELF
}
grub_platform_image_format_t;
#define GRUB_PLATFORM_IMAGE_YEELOONG_FLASH GRUB_PLATFORM_IMAGE_YEELOONG_FLASH
#define GRUB_PLATFORM_IMAGE_ELF GRUB_PLATFORM_IMAGE_ELF
#endif
#endif /* ! GRUB_KERNEL_MACHINE_HEADER */

View file

@ -569,6 +569,11 @@ main (int argc, char *argv[])
#ifdef GRUB_PLATFORM_IMAGE_DEFAULT
case 'O':
#ifdef GRUB_PLATFORM_IMAGE_YEELOONG_FLASH
if (strcmp (optarg, "yeeloong_flash") == 0)
format = GRUB_PLATFORM_IMAGE_YEELOONG_FLASH;
else
#endif
#ifdef GRUB_PLATFORM_IMAGE_RAW
if (strcmp (optarg, "raw") == 0)
format = GRUB_PLATFORM_IMAGE_RAW;