* util/grub-mkimage.c (generate_image): Refuse to create the images
bigger than the actual flash (512K) in Loongson machines. 512K is also the biggest chip supported by them.
This commit is contained in:
parent
3533413cd5
commit
3281d3d6d4
2 changed files with 9 additions and 1 deletions
|
@ -1,3 +1,9 @@
|
|||
2011-01-24 Vladimir Serbinenko <phcoder@gmail.com>
|
||||
|
||||
* util/grub-mkimage.c (generate_image): Refuse to create the images
|
||||
bigger than the actual flash (512K) in Loongson machines. 512K is also
|
||||
the biggest chip supported by them.
|
||||
|
||||
2011-01-22 Vladimir Serbinenko <phcoder@gmail.com>
|
||||
|
||||
* grub-core/kern/emu/getroot.c: Include config-util.h explicitly.
|
||||
|
|
|
@ -1196,7 +1196,9 @@ generate_image (const char *dir, char *prefix, FILE *out, char *mods[],
|
|||
grub_util_warn ("fwstart.img doesn't match the known good version. "
|
||||
"Proceed at your own risk");
|
||||
|
||||
rom_size = ALIGN_UP (core_size + boot_size, 512 * 1024);
|
||||
if (core_size + boot_size > 512 * 1024)
|
||||
grub_util_error ("firmware image is too big");
|
||||
rom_size = 512 * 1024;
|
||||
|
||||
rom_img = xmalloc (rom_size);
|
||||
memset (rom_img, 0, rom_size);
|
||||
|
|
Loading…
Reference in a new issue