From 2e956586c1973217fe78cb0de0daf2c7676f18d3 Mon Sep 17 00:00:00 2001 From: Thomas Schmitt Date: Tue, 12 Oct 2010 10:32:22 +0000 Subject: [PATCH] Provisorily: -boot_image mips_path= , -as mkisofs -mips-boot. No Eltorito then. --- xorriso/emulators.c | 11 +++++++++++ xorriso/opts_a_c.c | 19 +++++++++++++++++++ xorriso/xorriso_private.h | 4 ++++ xorriso/xorriso_timestamp.h | 2 +- 4 files changed, 35 insertions(+), 1 deletion(-) diff --git a/xorriso/emulators.c b/xorriso/emulators.c index 16fc62e7..b20c202d 100644 --- a/xorriso/emulators.c +++ b/xorriso/emulators.c @@ -745,6 +745,7 @@ int Xorriso_genisofs_help(struct XorrisO *xorriso, int flag) " -partition_offset LBA Make image mountable by first partition, too", " -partition_sec_hd NUMBER Define number of sectors per head", " -partition_hd_cyl NUMBER Define number of heads per cylinder", +" -mips-boot FILE Set mips boot image name (relative to image root)", " --modification-date=YYYYMMDDhhmmsscc", " Override date of creation and modification", " -isohybrid-mbr FILE Set SYSLINUX mbr/isohdp[fp]x*.bin for isohybrid", @@ -1239,6 +1240,7 @@ not_enough_args:; strcmp(argv[i], "-eltorito-boot") == 0 || strcmp(argv[i], "--efi-boot") == 0 || strcmp(argv[i], "-e") == 0 || + strcmp(argv[i], "-mips-boot") == 0 || strcmp(argv[i], "-c") == 0 || strcmp(argv[i], "-eltorito-catalog") == 0 || strcmp(argv[i], "-boot-load-size") == 0 || @@ -1453,6 +1455,7 @@ problem_handler_2:; xorriso->patch_isolinux_image= 1; } else if(strcmp(argv[i], "-b") == 0 || strcmp(argv[i], "-eltorito-boot") == 0 || + strcmp(argv[i], "-mips-boot") == 0 || strcmp(argv[i], "--efi-boot") == 0 || strcmp(argv[i], "-e") == 0) { i++; @@ -1466,6 +1469,14 @@ problem_handler_2:; boot_path= xorriso->boot_image_bin_path; xorriso->boot_efi_default= 1; emul_boot= xorriso->boot_image_emul= 0; + } else if(strcmp(argv[i - 1], "-mips-boot") == 0) { + boot_path= xorriso->boot_image_bin_path; + option_b= 0; + + /* >>> Preliminary : this should be adjustable per boot image */ + xorriso->system_area_options= 1 << 2; /* system area type 1 */ + + } else { boot_path= xorriso->boot_image_bin_path; if(strcmp(argv[i - 1], "-e") == 0) diff --git a/xorriso/opts_a_c.c b/xorriso/opts_a_c.c index cd9bd014..1de88b00 100644 --- a/xorriso/opts_a_c.c +++ b/xorriso/opts_a_c.c @@ -614,6 +614,7 @@ 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->boot_count > 0) { ret= Xorriso_attach_boot_image(xorriso, 2); /* dispose boot images */ if(ret <= 0) @@ -730,6 +731,24 @@ 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) { + 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 */ + } else if(strncmp(treatpt, "boot_info_table=", 16)==0) { if(strcmp(treatpt + 16, "off") == 0) xorriso->patch_isolinux_image= 0; diff --git a/xorriso/xorriso_private.h b/xorriso/xorriso_private.h index d4330679..b2cb3c8a 100644 --- a/xorriso/xorriso_private.h +++ b/xorriso/xorriso_private.h @@ -300,6 +300,10 @@ struct XorrisO { /* the global context of xorriso */ (a simple partition table) bit1= isohybrid boot image pointer and partition table + bit2-7= System area type + 0= with bit0 or bit1: MBR + else: unspecified type + 1= MIPS Big Endian Volume Header */ int patch_system_area; /* Bits as of system_area_options. to be applied to the loaded system diff --git a/xorriso/xorriso_timestamp.h b/xorriso/xorriso_timestamp.h index 1cf98775..7a54bb2a 100644 --- a/xorriso/xorriso_timestamp.h +++ b/xorriso/xorriso_timestamp.h @@ -1 +1 @@ -#define Xorriso_timestamP "2010.10.12.103027" +#define Xorriso_timestamP "2010.10.12.103157"