Small adjustments and bug fix with new MIPS boot facility.
This commit is contained in:
parent
f33df0ef29
commit
870280a018
@ -636,7 +636,7 @@ int iso_image_get_mips_boot_files(IsoImage *image, char *paths[15], int flag)
|
|||||||
int i;
|
int i;
|
||||||
|
|
||||||
for (i = 0; i < image->num_mips_boot_files; i++)
|
for (i = 0; i < image->num_mips_boot_files; i++)
|
||||||
paths[i] = image->mips_boot_file_paths[image->num_mips_boot_files];
|
paths[i] = image->mips_boot_file_paths[i];
|
||||||
for (; i < 15; i++)
|
for (; i < 15; i++)
|
||||||
paths[i] = NULL;
|
paths[i] = NULL;
|
||||||
return image->num_mips_boot_files;
|
return image->num_mips_boot_files;
|
||||||
|
@ -2968,13 +2968,15 @@ int iso_image_get_system_area(IsoImage *img, char data[32768],
|
|||||||
int *options, int flag);
|
int *options, int flag);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add a MIPS Big Endian boot file to the image. Up to 15 such files can be
|
* Add a MIPS Big Endian boot file path to the image. Up to 15 such files can
|
||||||
* written into a MIPS Big Endian Volume Header if this is enabled by
|
* be written into a MIPS Big Endian Volume Header if this is enabled by
|
||||||
* value 1 in iso_write_opts_set_system_area() option bits 2 to 7.
|
* value 1 in iso_write_opts_set_system_area() option bits 2 to 7.
|
||||||
|
* The data files which shall serve as MIPS boot files have to be brought into
|
||||||
|
* the image by the normal means.
|
||||||
* @param img
|
* @param img
|
||||||
* The image to be manipulated.
|
* The image to be manipulated.
|
||||||
* @param path
|
* @param path
|
||||||
* Absolute path of the boot file in the ISO 9660 Rock Ridge tree
|
* Absolute path of the boot file in the ISO 9660 Rock Ridge tree.
|
||||||
* @param flag
|
* @param flag
|
||||||
* Bitfield for control purposes, unused yet, submit 0
|
* Bitfield for control purposes, unused yet, submit 0
|
||||||
* @return
|
* @return
|
||||||
|
@ -236,7 +236,8 @@ static int make_mips_volume_header(Ecma119Image *t, uint8_t *buf, int flag)
|
|||||||
int ret;
|
int ret;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
memset(buf, 0, 16 * BLOCK_SIZE);
|
/* Bytes 512 to 32767 may come from image or external file */
|
||||||
|
memset(buf, 0, 512);
|
||||||
|
|
||||||
image_size = t->curblock * 2048;
|
image_size = t->curblock * 2048;
|
||||||
|
|
||||||
@ -425,14 +426,14 @@ int iso_write_system_area(Ecma119Image *t, uint8_t *buf)
|
|||||||
ret = make_mips_volume_header(t, buf, 0);
|
ret = make_mips_volume_header(t, buf, 0);
|
||||||
if (ret != ISO_SUCCESS)
|
if (ret != ISO_SUCCESS)
|
||||||
return ret;
|
return ret;
|
||||||
} else if(t->partition_offset > 0) {
|
} else if(t->partition_offset > 0 && sa_type == 0) {
|
||||||
/* Write a simple partition table. */
|
/* Write a simple partition table. */
|
||||||
ret = make_grub_msdos_label(img_blocks, buf, 2);
|
ret = make_grub_msdos_label(img_blocks, buf, 2);
|
||||||
if (ret != ISO_SUCCESS) /* error should never happen */
|
if (ret != ISO_SUCCESS) /* error should never happen */
|
||||||
return ISO_ASSERT_FAILURE;
|
return ISO_ASSERT_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (t->partition_offset > 0) {
|
if (t->partition_offset > 0 && sa_type == 0) {
|
||||||
/* Adjust partition table to partition offset */
|
/* Adjust partition table to partition offset */
|
||||||
img_blocks = t->curblock; /* value might be altered */
|
img_blocks = t->curblock; /* value might be altered */
|
||||||
ret = iso_offset_partition_start(img_blocks, t->partition_offset,
|
ret = iso_offset_partition_start(img_blocks, t->partition_offset,
|
||||||
|
Loading…
Reference in New Issue
Block a user