New bootspec alpha_boot=, new -as mkisofs option -alpha-boot
This commit is contained in:
@ -561,7 +561,8 @@ int Xorriso_boot_status_non_mbr(struct XorrisO *xorriso, IsoImage *image,
|
||||
Xorriso_status_result(xorriso, filter, fp, flag & 2);
|
||||
return(0);
|
||||
}
|
||||
if(sa_type != 1 && sa_type != 2 && sa_type != 4 && sa_type != 5)
|
||||
if(sa_type != 1 && sa_type != 2 && sa_type != 4 && sa_type != 5 &&
|
||||
sa_type != 6)
|
||||
return(0);
|
||||
|
||||
if(sa_type == 1 || sa_type == 2) {
|
||||
@ -578,8 +579,7 @@ int Xorriso_boot_status_non_mbr(struct XorrisO *xorriso, IsoImage *image,
|
||||
}
|
||||
}
|
||||
return(num_boots);
|
||||
}
|
||||
if(sa_type == 4 || sa_type == 5) {
|
||||
} else if(sa_type == 4 || sa_type == 5) {
|
||||
ret= iso_image_get_hppa_palo(image, &cmdline, &bootloader, &kernel_32,
|
||||
&kernel_64, &ramdisk);
|
||||
if(ret == 1) {
|
||||
@ -592,6 +592,15 @@ int Xorriso_boot_status_non_mbr(struct XorrisO *xorriso, IsoImage *image,
|
||||
Xorriso_status_hppa(xorriso, "hdrversion", num, filter, fp, 0);
|
||||
}
|
||||
return(0);
|
||||
} else if(sa_type == 6) {
|
||||
ret= iso_image_get_alpha_boot(image, &bootloader);
|
||||
if (ret == 1 && bootloader != NULL) {
|
||||
sprintf(line, "-boot_image any alpha_boot=");
|
||||
Text_shellsafe(bootloader, line, 1);
|
||||
strcat(line, "\n");
|
||||
Xorriso_status_result(xorriso, filter, fp, flag & 2);
|
||||
}
|
||||
return(0);
|
||||
}
|
||||
return(0);
|
||||
}
|
||||
@ -1292,6 +1301,32 @@ int Xorriso_set_hppa_boot_parm(struct XorrisO *xorriso, char *text, char *what,
|
||||
}
|
||||
|
||||
|
||||
/* @param flag bit0= Give up DEC Alpha boot parameters
|
||||
*/
|
||||
int Xorriso_set_alpha_boot(struct XorrisO *xorriso, char *path, int flag)
|
||||
{
|
||||
int ret;
|
||||
IsoImage *image;
|
||||
|
||||
ret= Xorriso_get_volume(xorriso, &image, 0);
|
||||
if(ret <= 0)
|
||||
return(ret);
|
||||
if(flag & 1) {
|
||||
/* Give up boot parameters */
|
||||
iso_image_set_alpha_boot(image, NULL, 1);
|
||||
return(1);
|
||||
}
|
||||
ret= iso_image_set_alpha_boot(image, path, 0);
|
||||
if (ret < 0) {
|
||||
Xorriso_report_iso_error(xorriso, "", ret,
|
||||
"Error when adding DEC Alpha boot loader",
|
||||
0, "FAILURE", 1);
|
||||
return(0);
|
||||
}
|
||||
return(1);
|
||||
}
|
||||
|
||||
|
||||
/* @param flag bit0= do not set xorriso->system_area_options, just check
|
||||
bit1= only check for grub2_mbr <-> isolinux partition_table
|
||||
*/
|
||||
@ -1299,9 +1334,11 @@ int Xorriso_coordinate_system_area(struct XorrisO *xorriso, int sa_type,
|
||||
int options, char *cmd, int flag)
|
||||
{
|
||||
int old_type, old_options, new_options;
|
||||
static char *type_names[6] = {
|
||||
static char *type_names[7] = {
|
||||
"MBR", "MIPS Big Endian Volume Header", "MIPS Little Endian Boot Block",
|
||||
"SUN Disk Label", "HP-PA PALO v4", "HP-PA PALO v5"};
|
||||
"SUN Disk Label", "HP-PA PALO v4", "HP-PA PALO v5",
|
||||
"DEC Alpha SRM Boot Block"};
|
||||
static int num_names = 7;
|
||||
|
||||
old_type= (xorriso->system_area_options & 0xfc) >> 2;
|
||||
old_options= xorriso->system_area_options & 0x3c03;
|
||||
@ -1315,7 +1352,8 @@ int Xorriso_coordinate_system_area(struct XorrisO *xorriso, int sa_type,
|
||||
(old_type != sa_type || (old_options != 0 && old_options != new_options))){
|
||||
reject:;
|
||||
sprintf(xorriso->info_text, "%s : First sector already occupied by %s",
|
||||
cmd, old_type < 6 ? type_names[old_type] : "other boot facility");
|
||||
cmd, old_type < num_names ?
|
||||
type_names[old_type] : "other boot facility");
|
||||
if(old_type == 0 && (old_options & 2))
|
||||
strcat(xorriso->info_text, " for ISOLINUX isohybrid");
|
||||
else if (old_type == 0 && (xorriso->system_area_options & (1 << 14))) {
|
||||
@ -1850,6 +1888,15 @@ static int Xorriso_scan_report_lines(struct XorrisO *xorriso,
|
||||
sprintf(buf, "-boot_image any hppa_bootloader=");
|
||||
Text_shellsafe(textpt, buf, 1);
|
||||
|
||||
} else if(strcmp(name, "DEC Alpha ldr path :") == 0) {
|
||||
if(mkisofs)
|
||||
sprintf(buf, "-alpha-boot ");
|
||||
else
|
||||
sprintf(buf, "-boot_image any alpha_boot=");
|
||||
Text_shellsafe(textpt, buf, 1);
|
||||
|
||||
/* >>> what to do if "DEC Alpha ldr adr :" without path ? */;
|
||||
|
||||
}
|
||||
|
||||
if(buf[0])
|
||||
|
Reference in New Issue
Block a user