New ystem area sub type CHRP with iso_write_opts_set_system_area()
This commit is contained in:
parent
d7401f0a4c
commit
6fc3bb6777
@ -1416,5 +1416,9 @@ Involved -as mkisofs options:
|
|||||||
-efi-boot-part DISKFILE
|
-efi-boot-part DISKFILE
|
||||||
-prep-boot-part DISKFILE
|
-prep-boot-part DISKFILE
|
||||||
|
|
||||||
|
|
||||||
|
>>> What boots by what ?
|
||||||
|
|
||||||
|
|
||||||
------------------------------------------------------------------------------
|
------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
@ -3235,8 +3235,9 @@ int iso_write_opts_get_data_start(IsoWriteOpts *opts, uint32_t *data_start,
|
|||||||
* ISOLINUX boot image (see iso_image_set_boot_image()) and
|
* ISOLINUX boot image (see iso_image_set_boot_image()) and
|
||||||
* only if not bit0 is set.
|
* only if not bit0 is set.
|
||||||
* bit2-7= System area type
|
* bit2-7= System area type
|
||||||
* 0= PC-BIOS DOS MBR
|
* bit8-9= Only with System area type 0 = MBR
|
||||||
* 1= MIPS Big Endian Volume Header
|
* Cylinder alignment mode
|
||||||
|
* bit10-13= System area sub type
|
||||||
* @param flag bit0 = invalidate any attached system area data
|
* @param flag bit0 = invalidate any attached system area data
|
||||||
* same as data == NULL
|
* same as data == NULL
|
||||||
* bit1 = keep data unaltered
|
* bit1 = keep data unaltered
|
||||||
@ -3258,7 +3259,7 @@ int iso_write_opts_set_system_area(IsoWriteOpts *opts, char data[32768],
|
|||||||
memcpy(opts->system_area_data, data, 32768);
|
memcpy(opts->system_area_data, data, 32768);
|
||||||
}
|
}
|
||||||
if (!(flag & 4))
|
if (!(flag & 4))
|
||||||
opts->system_area_options = options & 0x3ff;
|
opts->system_area_options = options & 0x3fff;
|
||||||
return ISO_SUCCESS;
|
return ISO_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2145,12 +2145,20 @@ int iso_write_opts_set_fifo_size(IsoWriteOpts *opts, size_t fifo_size);
|
|||||||
* to 8.
|
* to 8.
|
||||||
* This will overwrite the first 512 bytes of the submitted
|
* This will overwrite the first 512 bytes of the submitted
|
||||||
* bit8-9= Only with System area type 0 = MBR
|
* bit8-9= Only with System area type 0 = MBR
|
||||||
* @since 1.0.4
|
* @since 1.0.4
|
||||||
* Cylinder alignment mode eventually pads the image to make it
|
* Cylinder alignment mode eventually pads the image to make it
|
||||||
* end at a cylinder boundary.
|
* end at a cylinder boundary.
|
||||||
* 0 = auto (align if bit1)
|
* 0 = auto (align if bit1)
|
||||||
* 1 = always align to cylinder boundary
|
* 1 = always align to cylinder boundary
|
||||||
* 2 = never align to cylinder boundary
|
* 2 = never align to cylinder boundary
|
||||||
|
* bit10-13= System area sub type
|
||||||
|
* @since 1.2.4
|
||||||
|
* With type 0 = MBR:
|
||||||
|
* Gets overridden by bit0 and bit1.
|
||||||
|
* 0 = no particular sub type
|
||||||
|
* 1 = CHRP: A single MBR partition of type 0x96 covers the
|
||||||
|
* ISO image. Not compatible with any other feature
|
||||||
|
* which needs to have own MBR partition entries.
|
||||||
* @param flag
|
* @param flag
|
||||||
* bit0 = invalidate any attached system area data. Same as data == NULL
|
* bit0 = invalidate any attached system area data. Same as data == NULL
|
||||||
* (This re-activates eventually loaded image System Area data.
|
* (This re-activates eventually loaded image System Area data.
|
||||||
|
@ -2008,7 +2008,8 @@ static int partprepend_writer_compute_data_blocks(IsoImageWriter *writer)
|
|||||||
return ISO_ASSERT_FAILURE;
|
return ISO_ASSERT_FAILURE;
|
||||||
t = writer->target;
|
t = writer->target;
|
||||||
|
|
||||||
/* >>> t->chrp_mark */;
|
if (t->efi_boot_partition != NULL || t->hfsplus || t->gpt_req_count > 0)
|
||||||
|
will_have_gpt = 1;
|
||||||
|
|
||||||
if (t->efi_boot_partition != NULL) {
|
if (t->efi_boot_partition != NULL) {
|
||||||
ret = compute_partition_size(t->efi_boot_partition,
|
ret = compute_partition_size(t->efi_boot_partition,
|
||||||
@ -2025,8 +2026,18 @@ static int partprepend_writer_compute_data_blocks(IsoImageWriter *writer)
|
|||||||
t->curblock += t->efi_boot_part_size;
|
t->curblock += t->efi_boot_part_size;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (t->efi_boot_partition != NULL || t->hfsplus)
|
if ((((t->system_area_options >> 10) & 0xf) == 1) &&
|
||||||
will_have_gpt = 1;
|
((t->system_area_options >> 2) & 0x3f) == 0) {
|
||||||
|
/* CHRP is not compatible with any other partition in MBR */
|
||||||
|
if (t->prep_partition != NULL || t->fat || will_have_gpt ||
|
||||||
|
t->mbr_req_count > 0)
|
||||||
|
return ISO_BOOT_MBR_OVERLAP;
|
||||||
|
ret = iso_quick_mbr_entry(t, (uint32_t) 0, (uint32_t) 0, 0x96, 0);
|
||||||
|
if (ret < 0)
|
||||||
|
return ret;
|
||||||
|
return ISO_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
if (t->prep_partition != NULL) {
|
if (t->prep_partition != NULL) {
|
||||||
ret = compute_partition_size(t->prep_partition, &(t->prep_part_size),
|
ret = compute_partition_size(t->prep_partition, &(t->prep_part_size),
|
||||||
0);
|
0);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user