rename format from raw to yeeloong_flash
This commit is contained in:
parent
781d7798bb
commit
3bf09c9ea8
4 changed files with 33 additions and 13 deletions
|
@ -41,21 +41,8 @@
|
||||||
#define GRUB_KERNEL_MACHINE_TOTAL_MODULE_SIZE GRUB_KERNEL_CPU_TOTAL_MODULE_SIZE
|
#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_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
|
#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
|
/* The prefix which points to the directory where GRUB modules and its
|
||||||
configuration file are located. */
|
configuration file are located. */
|
||||||
extern char grub_prefix[];
|
extern char grub_prefix[];
|
||||||
|
|
|
@ -31,6 +31,21 @@ void EXPORT_FUNC (grub_halt) (void);
|
||||||
configuration file are located. */
|
configuration file are located. */
|
||||||
extern char grub_prefix[];
|
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
|
||||||
|
|
||||||
#endif /* ! GRUB_KERNEL_MACHINE_HEADER */
|
#endif /* ! GRUB_KERNEL_MACHINE_HEADER */
|
||||||
|
|
|
@ -27,6 +27,19 @@
|
||||||
void EXPORT_FUNC (grub_reboot) (void);
|
void EXPORT_FUNC (grub_reboot) (void);
|
||||||
void EXPORT_FUNC (grub_halt) (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
|
||||||
|
|
||||||
#endif /* ! GRUB_KERNEL_MACHINE_HEADER */
|
#endif /* ! GRUB_KERNEL_MACHINE_HEADER */
|
||||||
|
|
|
@ -569,6 +569,11 @@ main (int argc, char *argv[])
|
||||||
|
|
||||||
#ifdef GRUB_PLATFORM_IMAGE_DEFAULT
|
#ifdef GRUB_PLATFORM_IMAGE_DEFAULT
|
||||||
case 'O':
|
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
|
#ifdef GRUB_PLATFORM_IMAGE_RAW
|
||||||
if (strcmp (optarg, "raw") == 0)
|
if (strcmp (optarg, "raw") == 0)
|
||||||
format = GRUB_PLATFORM_IMAGE_RAW;
|
format = GRUB_PLATFORM_IMAGE_RAW;
|
||||||
|
|
Loading…
Reference in a new issue