Polished and documented MIPS booting option
This commit is contained in:
@ -614,7 +614,8 @@ treatment_patch:;
|
||||
xorriso->patch_isolinux_image= 0;
|
||||
xorriso->boot_image_bin_path[0]= 0;
|
||||
xorriso->patch_system_area= 0;
|
||||
xorriso->system_area_options&= ~0xfc; /* system area type 0 */
|
||||
if((xorriso->system_area_options & 0xfc ) == 0)
|
||||
xorriso->system_area_options= 0; /* Reset eventual type 0 flags */
|
||||
if(xorriso->boot_count > 0) {
|
||||
ret= Xorriso_attach_boot_image(xorriso, 2); /* dispose boot images */
|
||||
if(ret <= 0)
|
||||
@ -731,19 +732,11 @@ treatment_patch:;
|
||||
xorriso->keep_boot_image= 0;
|
||||
xorriso->boot_efi_default= 1;
|
||||
|
||||
} else if(strcmp(treatpt, "mips_path=") == 0) {
|
||||
xorriso->boot_image_bin_path[0] = 0;
|
||||
xorriso->boot_efi_default= 0;
|
||||
|
||||
/* >>> Preliminary : this should be adjustable per boot image */
|
||||
xorriso->system_area_options&= ~0xfc; /* system area type 0 */
|
||||
|
||||
} else if(strncmp(treatpt, "mips_path=", 10) == 0) {
|
||||
|
||||
#ifdef Xorriso_mips_boot_file_pathS
|
||||
|
||||
/* >>> Check for contradicting xorriso->system_area_options */;
|
||||
|
||||
sprintf(eff_path, "-boot_image %s mips_path=", formpt);
|
||||
ret= Xorriso_coordinate_system_area(xorriso, 1, 0, eff_path, 0);
|
||||
if(ret <= 0)
|
||||
return(ret);
|
||||
ret= Xorriso_normalize_img_path(xorriso, xorriso->wdi, treatpt + 10,
|
||||
eff_path, 2);
|
||||
if(ret <= 0)
|
||||
@ -751,21 +744,10 @@ treatment_patch:;
|
||||
ret= Xorriso_add_mips_boot_file(xorriso, eff_path, 0);
|
||||
if(ret <= 0)
|
||||
return(ret);
|
||||
xorriso->system_area_options= 1 << 2; /* system area type 1 */
|
||||
|
||||
#else /* Xorriso_mips_boot_file_pathS */
|
||||
|
||||
ret= Xorriso_normalize_img_path(xorriso, xorriso->wdi, treatpt + 10,
|
||||
xorriso->boot_image_bin_path, 2);
|
||||
if(ret <= 0)
|
||||
return(ret);
|
||||
xorriso->keep_boot_image= 0;
|
||||
xorriso->boot_efi_default= 0;
|
||||
|
||||
/* >>> Preliminary : this should be adjustable per boot image */
|
||||
xorriso->system_area_options&= 1 << 2; /* system area type 1 */
|
||||
|
||||
#endif /* ! Xorriso_mips_boot_file_pathS */
|
||||
} else if(strcmp(treatpt, "mips_discard") == 0) {
|
||||
xorriso->system_area_options&= ~0xfc; /* system area type 0 */
|
||||
Xorriso_add_mips_boot_file(xorriso, "", 1); /* give up MIPS boot files */
|
||||
|
||||
} else if(strncmp(treatpt, "boot_info_table=", 16)==0) {
|
||||
if(strcmp(treatpt + 16, "off") == 0)
|
||||
@ -808,23 +790,27 @@ treatment_patch:;
|
||||
}
|
||||
|
||||
} else if(strncmp(treatpt, "system_area=", 12) == 0) {
|
||||
if(strcmp(formpt, "isolinux")==0) {
|
||||
ret= Xorriso_coordinate_system_area(xorriso, 0, 2,
|
||||
"-boot_image isolinux system_area=", 0);
|
||||
if(ret <= 0)
|
||||
return(ret);
|
||||
}
|
||||
ret= Xorriso_set_system_area_path(xorriso, treatpt + 12, 0);
|
||||
if(ret <= 0)
|
||||
return(ret);
|
||||
if(strcmp(formpt, "isolinux")==0)
|
||||
xorriso->system_area_options= (xorriso->system_area_options & ~3) | 2;
|
||||
|
||||
} else if(strncmp(treatpt, "partition_table=", 16)==0) {
|
||||
if(strcmp(treatpt + 16, "off") == 0) {
|
||||
xorriso->system_area_options&= ~3;
|
||||
xorriso->patch_system_area= xorriso->system_area_options;
|
||||
} else if(strcmp(treatpt + 16, "on") == 0) {
|
||||
xorriso->system_area_options&= ~3;
|
||||
sprintf(eff_path, "-boot_image %s partition_table=", formpt);
|
||||
if(strcmp(formpt, "isolinux")==0)
|
||||
xorriso->system_area_options|= 2;
|
||||
ret= Xorriso_coordinate_system_area(xorriso, 0, 2, eff_path, 0);
|
||||
else
|
||||
xorriso->system_area_options|= 1;
|
||||
xorriso->patch_system_area= xorriso->system_area_options;
|
||||
ret= Xorriso_coordinate_system_area(xorriso, 0, 1, eff_path, 0);
|
||||
if(ret <= 0)
|
||||
return(ret);
|
||||
} else
|
||||
was_ok= 0;
|
||||
|
||||
|
Reference in New Issue
Block a user