Lifted the ban to combine MIPS Big Endian boot with El Torito
This commit is contained in:
@ -376,7 +376,7 @@ int Xorriso_boot_item_status(struct XorrisO *xorriso, char *cat_path,
|
||||
strcpy(bspec, "dir=/boot/isolinux");
|
||||
memset(zeros, 0, 28);
|
||||
if(bspec[0] && platform_id == 0 && patch_isolinux &&
|
||||
load_size == 2048 && is_default_id) {
|
||||
load_size == 2048 && is_default_id && emul == 0) {
|
||||
sprintf(line, "-boot_image isolinux %s\n", bspec);
|
||||
Xorriso_status_result(xorriso,filter,fp,flag&2);
|
||||
return(1);
|
||||
@ -388,7 +388,7 @@ int Xorriso_boot_item_status(struct XorrisO *xorriso, char *cat_path,
|
||||
file_size= ((stbuf.st_size / (off_t) 512) +
|
||||
!!(stbuf.st_size % (off_t) 512)) * 512;
|
||||
if(platform_id == 0xef && !patch_isolinux &&
|
||||
load_size == file_size && is_default_id) {
|
||||
load_size == file_size && is_default_id && emul == 0) {
|
||||
sprintf(line, "-boot_image any efi_path=");
|
||||
Text_shellsafe(bin_path, line, 1);
|
||||
strcat(line, "\n");
|
||||
@ -403,6 +403,12 @@ int Xorriso_boot_item_status(struct XorrisO *xorriso, char *cat_path,
|
||||
strcat(line, "\n");
|
||||
if(!(is_default && no_defaults))
|
||||
Xorriso_status_result(xorriso,filter,fp,flag&2);
|
||||
|
||||
is_default= (emul == 0);
|
||||
sprintf(line, "-boot_image %s emul_type=%s\n",
|
||||
form, emul == 2 ? "diskette" : emul == 1 ? "hard_disk" : "no_emulation");
|
||||
if(!(is_default && no_defaults))
|
||||
Xorriso_status_result(xorriso,filter,fp,flag&2);
|
||||
|
||||
is_default= (platform_id == 0 || (flag & 4));
|
||||
sprintf(line, "-boot_image %s platform_id=0x%-2.2x\n", form, platform_id);
|
||||
@ -531,6 +537,12 @@ int Xorriso_boot_image_status(struct XorrisO *xorriso, char *filter, FILE *fp,
|
||||
load_size= el_torito_get_load_size(boots[i]) * 512;
|
||||
el_torito_get_id_string(boots[i], id_string);
|
||||
el_torito_get_selection_crit(boots[i], sel_crit);
|
||||
if(media_type == ELTORITO_FLOPPY_EMUL)
|
||||
media_type= 2;
|
||||
else if(media_type == ELTORITO_HARD_DISC_EMUL)
|
||||
media_type= 1;
|
||||
else
|
||||
media_type= 0;
|
||||
ret= Xorriso_boot_item_status(xorriso, xorriso->boot_image_cat_path,
|
||||
path, platform_id, patch & 1, media_type,
|
||||
load_size, id_string, sel_crit, "any",
|
||||
@ -959,3 +971,24 @@ ex:;
|
||||
return(ret);
|
||||
}
|
||||
|
||||
|
||||
int Xorriso_add_mips_boot_file(struct XorrisO *xorriso, char *path, int flag)
|
||||
{
|
||||
int ret;
|
||||
IsoImage *image;
|
||||
|
||||
ret= Xorriso_get_volume(xorriso, &image, 0);
|
||||
if(ret <= 0)
|
||||
return ret;
|
||||
ret = iso_image_add_mips_boot_file(image, path, 0);
|
||||
Xorriso_process_msg_queues(xorriso,0);
|
||||
if (ret < 0) {
|
||||
Xorriso_report_iso_error(xorriso, "", ret,
|
||||
"Error when adding MIPS boot file",
|
||||
0, "FAILURE", 1);
|
||||
return(0);
|
||||
}
|
||||
return(1);
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user