|
@@ -291,122 +291,6 @@ struct master_boot_record {
|
291
|
291
|
/** MBR magic signature */
|
292
|
292
|
#define INT13_MBR_MAGIC 0xaa55
|
293
|
293
|
|
294
|
|
-/** ISO9660 block size */
|
295
|
|
-#define ISO9660_BLKSIZE 2048
|
296
|
|
-
|
297
|
|
-/** An ISO9660 Primary Volume Descriptor (fixed portion) */
|
298
|
|
-struct iso9660_primary_descriptor_fixed {
|
299
|
|
- /** Descriptor type */
|
300
|
|
- uint8_t type;
|
301
|
|
- /** Identifier ("CD001") */
|
302
|
|
- uint8_t id[5];
|
303
|
|
-} __attribute__ (( packed ));
|
304
|
|
-
|
305
|
|
-/** An ISO9660 Primary Volume Descriptor */
|
306
|
|
-struct iso9660_primary_descriptor {
|
307
|
|
- /** Fixed portion */
|
308
|
|
- struct iso9660_primary_descriptor_fixed fixed;
|
309
|
|
-} __attribute__ (( packed ));
|
310
|
|
-
|
311
|
|
-/** ISO9660 Primary Volume Descriptor type */
|
312
|
|
-#define ISO9660_TYPE_PRIMARY 0x01
|
313
|
|
-
|
314
|
|
-/** ISO9660 identifier */
|
315
|
|
-#define ISO9660_ID "CD001"
|
316
|
|
-
|
317
|
|
-/** ISO9660 Primary Volume Descriptor block address */
|
318
|
|
-#define ISO9660_PRIMARY_LBA 16
|
319
|
|
-
|
320
|
|
-/** An El Torito Boot Record Volume Descriptor (fixed portion) */
|
321
|
|
-struct eltorito_descriptor_fixed {
|
322
|
|
- /** Descriptor type */
|
323
|
|
- uint8_t type;
|
324
|
|
- /** Identifier ("CD001") */
|
325
|
|
- uint8_t id[5];
|
326
|
|
- /** Version, must be 1 */
|
327
|
|
- uint8_t version;
|
328
|
|
- /** Boot system indicator; must be "EL TORITO SPECIFICATION" */
|
329
|
|
- uint8_t system_id[32];
|
330
|
|
-} __attribute__ (( packed ));
|
331
|
|
-
|
332
|
|
-/** An El Torito Boot Record Volume Descriptor */
|
333
|
|
-struct eltorito_descriptor {
|
334
|
|
- /** Fixed portion */
|
335
|
|
- struct eltorito_descriptor_fixed fixed;
|
336
|
|
- /** Unused */
|
337
|
|
- uint8_t unused[32];
|
338
|
|
- /** Boot catalog sector */
|
339
|
|
- uint32_t sector;
|
340
|
|
-} __attribute__ (( packed ));
|
341
|
|
-
|
342
|
|
-/** ISO9660 Boot Volume Descriptor type */
|
343
|
|
-#define ISO9660_TYPE_BOOT 0x00
|
344
|
|
-
|
345
|
|
-/** El Torito Boot Record Volume Descriptor block address */
|
346
|
|
-#define ELTORITO_LBA 17
|
347
|
|
-
|
348
|
|
-/** An El Torito Boot Catalog Validation Entry */
|
349
|
|
-struct eltorito_validation_entry {
|
350
|
|
- /** Header ID; must be 1 */
|
351
|
|
- uint8_t header_id;
|
352
|
|
- /** Platform ID
|
353
|
|
- *
|
354
|
|
- * 0 = 80x86
|
355
|
|
- * 1 = PowerPC
|
356
|
|
- * 2 = Mac
|
357
|
|
- */
|
358
|
|
- uint8_t platform_id;
|
359
|
|
- /** Reserved */
|
360
|
|
- uint16_t reserved;
|
361
|
|
- /** ID string */
|
362
|
|
- uint8_t id_string[24];
|
363
|
|
- /** Checksum word */
|
364
|
|
- uint16_t checksum;
|
365
|
|
- /** Signature; must be 0xaa55 */
|
366
|
|
- uint16_t signature;
|
367
|
|
-} __attribute__ (( packed ));
|
368
|
|
-
|
369
|
|
-/** El Torito platform IDs */
|
370
|
|
-enum eltorito_platform_id {
|
371
|
|
- ELTORITO_PLATFORM_X86 = 0x00,
|
372
|
|
- ELTORITO_PLATFORM_POWERPC = 0x01,
|
373
|
|
- ELTORITO_PLATFORM_MAC = 0x02,
|
374
|
|
-};
|
375
|
|
-
|
376
|
|
-/** A bootable entry in the El Torito Boot Catalog */
|
377
|
|
-struct eltorito_boot_entry {
|
378
|
|
- /** Boot indicator
|
379
|
|
- *
|
380
|
|
- * Must be @c ELTORITO_BOOTABLE for a bootable ISO image
|
381
|
|
- */
|
382
|
|
- uint8_t indicator;
|
383
|
|
- /** Media type
|
384
|
|
- *
|
385
|
|
- */
|
386
|
|
- uint8_t media_type;
|
387
|
|
- /** Load segment */
|
388
|
|
- uint16_t load_segment;
|
389
|
|
- /** System type */
|
390
|
|
- uint8_t filesystem;
|
391
|
|
- /** Unused */
|
392
|
|
- uint8_t reserved_a;
|
393
|
|
- /** Sector count */
|
394
|
|
- uint16_t length;
|
395
|
|
- /** Starting sector */
|
396
|
|
- uint32_t start;
|
397
|
|
- /** Unused */
|
398
|
|
- uint8_t reserved_b[20];
|
399
|
|
-} __attribute__ (( packed ));
|
400
|
|
-
|
401
|
|
-/** Boot indicator for a bootable ISO image */
|
402
|
|
-#define ELTORITO_BOOTABLE 0x88
|
403
|
|
-
|
404
|
|
-/** El Torito media types */
|
405
|
|
-enum eltorito_media_type {
|
406
|
|
- /** No emulation */
|
407
|
|
- ELTORITO_NO_EMULATION = 0,
|
408
|
|
-};
|
409
|
|
-
|
410
|
294
|
/** A floppy disk geometry */
|
411
|
295
|
struct int13_fdd_geometry {
|
412
|
296
|
/** Number of tracks */
|