New -as mkisofs options --grub2-mbr and --grub2-boot-info

This commit is contained in:
Thomas Schmitt 2013-04-13 07:43:47 +00:00
parent fe245e7131
commit 4bbcfba223
2 changed files with 19 additions and 7 deletions

View File

@ -583,7 +583,7 @@ int Xorriso_genisofs_count_args(struct XorrisO *xorriso, int argc, char **argv,
"--old-root-no-md5", "--old-root-devno", "--old-root-no-ino", "--old-root-no-md5", "--old-root-devno", "--old-root-no-ino",
"--no_rc", "--norock", "-hfsplus", "-fat", "-chrp-boot-part", "--no_rc", "--norock", "-hfsplus", "-fat", "-chrp-boot-part",
"-isohybrid-gpt-basdat", "-isohybrid-gpt-hfsplus", "-isohybrid-gpt-basdat", "-isohybrid-gpt-hfsplus",
"-isohybrid-apm-hfsplus", "-isohybrid-apm-hfsplus", "--grub2-boot-info",
"" ""
}; };
static char arg1_options[][41]= { static char arg1_options[][41]= {
@ -618,7 +618,7 @@ int Xorriso_genisofs_count_args(struct XorrisO *xorriso, int argc, char **argv,
"-isohybrid-mbr", "-e", "-partition_offset", "-partition_hd_cyl", "-isohybrid-mbr", "-e", "-partition_offset", "-partition_hd_cyl",
"-partition_sec_hd", "-partition_cyl_align", "-untranslated_name_len", "-partition_sec_hd", "-partition_cyl_align", "-untranslated_name_len",
"-rr_reloc_dir", "-hfsplus-serial-no", "-prep-boot-part", "-efi-boot-part", "-rr_reloc_dir", "-hfsplus-serial-no", "-prep-boot-part", "-efi-boot-part",
"-hfsplus-block-size", "-apm-block-size", "-hfsplus-block-size", "-apm-block-size", "--grub2-mbr",
"" ""
}; };
static char arg2_options[][41]= { static char arg2_options[][41]= {
@ -817,6 +817,7 @@ int Xorriso_genisofs_help(struct XorrisO *xorriso, int flag)
" -hard-disk-boot Boot image is a hard disk image", " -hard-disk-boot Boot image is a hard disk image",
" -no-emul-boot Boot image is 'no emulation' image", " -no-emul-boot Boot image is 'no emulation' image",
" -boot-info-table Patch boot image with info table", " -boot-info-table Patch boot image with info table",
" --grub2-boot-info Patch boot image at byte 2548",
" -eltorito-id ID Set El Torito Id String", " -eltorito-id ID Set El Torito Id String",
" -eltorito-selcrit HEXBYTES Set El Torito Selection Criteria", " -eltorito-selcrit HEXBYTES Set El Torito Selection Criteria",
" -isohybrid-gpt-basdat Mark El Torito boot image as Basic Data in GPT", " -isohybrid-gpt-basdat Mark El Torito boot image as Basic Data in GPT",
@ -842,6 +843,7 @@ int Xorriso_genisofs_help(struct XorrisO *xorriso, int flag)
" --modification-date=YYYYMMDDhhmmsscc", " --modification-date=YYYYMMDDhhmmsscc",
" Override date of creation and modification", " Override date of creation and modification",
" -isohybrid-mbr FILE Set SYSLINUX mbr/isohdp[fp]x*.bin for isohybrid", " -isohybrid-mbr FILE Set SYSLINUX mbr/isohdp[fp]x*.bin for isohybrid",
" --grub2-mbr FILE Set GRUB2 MBR for patching at byte 432",
#ifdef Xorriso_with_isohybriD #ifdef Xorriso_with_isohybriD
" isolinux_mbr=on|auto|off Control eventual isohybrid MBR generation", " isolinux_mbr=on|auto|off Control eventual isohybrid MBR generation",
#endif #endif
@ -1673,6 +1675,7 @@ not_enough_args:;
} else if(strcmp(argpt, "-no-emul-boot")==0 || } else if(strcmp(argpt, "-no-emul-boot")==0 ||
strcmp(argpt, "-hard-disk-boot")==0 || strcmp(argpt, "-hard-disk-boot")==0 ||
strcmp(argpt, "-boot-info-table")==0 || strcmp(argpt, "-boot-info-table")==0 ||
strcmp(argpt, "--grub2-boot-info") == 0 ||
strncmp(argpt, "isolinux_mbr=", 13)==0 || strncmp(argpt, "isolinux_mbr=", 13)==0 ||
strcmp(argpt, "-eltorito-alt-boot")==0 || strcmp(argpt, "-eltorito-alt-boot")==0 ||
strcmp(argpt, "--protective-msdos-label")==0 || strcmp(argpt, "--protective-msdos-label")==0 ||
@ -1701,7 +1704,8 @@ not_enough_args:;
strcmp(argpt, "-partition_hd_cyl") == 0 || strcmp(argpt, "-partition_hd_cyl") == 0 ||
strcmp(argpt, "-partition_sec_hd") == 0 || strcmp(argpt, "-partition_sec_hd") == 0 ||
strcmp(argpt, "-partition_cyl_align") == 0 || strcmp(argpt, "-partition_cyl_align") == 0 ||
strcmp(argpt, "-isohybrid-mbr")==0) { strcmp(argpt, "-isohybrid-mbr") == 0 ||
strcmp(argpt, "--grub2-mbr") == 0) {
if(i+1>=argc) if(i+1>=argc)
goto not_enough_args; goto not_enough_args;
delay_opt_list[delay_opt_count++]= i; delay_opt_list[delay_opt_count++]= i;
@ -2177,6 +2181,9 @@ problem_handler_2:;
xorriso->boot_emul_default= 0; xorriso->boot_emul_default= 0;
} else if(strcmp(argpt, "-boot-info-table")==0) { } else if(strcmp(argpt, "-boot-info-table")==0) {
xorriso->patch_isolinux_image= (xorriso->patch_isolinux_image & ~2) | 1; xorriso->patch_isolinux_image= (xorriso->patch_isolinux_image & ~2) | 1;
} else if(strcmp(argpt, "--grub2-boot-info") == 0) {
xorriso->patch_isolinux_image=
(xorriso->patch_isolinux_image & ~2) | 512;
} else if(strcmp(argpt, "-b") == 0 || } else if(strcmp(argpt, "-b") == 0 ||
strcmp(argpt, "-eltorito-boot") == 0 || strcmp(argpt, "-eltorito-boot") == 0 ||
strcmp(argpt, "--efi-boot") == 0 || strcmp(argpt, "--efi-boot") == 0 ||
@ -2268,7 +2275,8 @@ problem_handler_2:;
} else if(strcmp(argpt, "--embedded-boot")==0 || } else if(strcmp(argpt, "--embedded-boot")==0 ||
strcmp(argpt, "-generic-boot")==0 || strcmp(argpt, "-generic-boot")==0 ||
strcmp(argpt, "-G") == 0 || strcmp(argpt, "-G") == 0 ||
strcmp(argpt, "-isohybrid-mbr")==0) { strcmp(argpt, "-isohybrid-mbr") == 0 ||
strcmp(argpt, "--grub2-mbr") == 0) {
if(i+1>=argc) if(i+1>=argc)
goto not_enough_args; goto not_enough_args;
i++; i++;
@ -2276,9 +2284,13 @@ problem_handler_2:;
if(ret <= 0) if(ret <= 0)
goto problem_handler_boot; goto problem_handler_boot;
if(strcmp(argpt, "-isohybrid-mbr")==0) if(strcmp(argpt, "-isohybrid-mbr")==0)
xorriso->system_area_options= (xorriso->system_area_options & ~3) | 2; xorriso->system_area_options=
(xorriso->system_area_options & ~4001) | 2;
else if(strcmp(argpt, "--grub2-mbr") == 0)
xorriso->system_area_options=
(xorriso->system_area_options & ~2) | 0x4000;
} else if(strcmp(argpt, "--protective-msdos-label")==0) { } else if(strcmp(argpt, "--protective-msdos-label")==0) {
xorriso->system_area_options= (xorriso->system_area_options & ~3) | 1; xorriso->system_area_options= (xorriso->system_area_options & ~2) | 1;
} else if(strcmp(argpt, "--boot-catalog-hide")==0) { } else if(strcmp(argpt, "--boot-catalog-hide")==0) {
xorriso->boot_image_cat_hidden|= 3; xorriso->boot_image_cat_hidden|= 3;
} else if(strcmp(argpt, "-partition_offset") == 0 || } else if(strcmp(argpt, "-partition_offset") == 0 ||

View File

@ -1 +1 @@
#define Xorriso_timestamP "2013.04.13.074117" #define Xorriso_timestamP "2013.04.13.074309"