Made development option Libisofs_mips_boot_file_pathS unconditional.

This commit is contained in:
Thomas Schmitt 2010-10-15 09:23:09 +02:00
parent a75fb9a894
commit 48316af1d9
3 changed files with 2 additions and 57 deletions

View File

@ -1091,14 +1091,6 @@ int eltorito_writer_compute_data_blocks(IsoImageWriter *writer)
t = writer->target;
#ifndef Libisofs_mips_boot_file_pathS
/* >>> Preliminary: No El Torito with system area type other than MBR */
if (t->system_area_options & 0xfc)
return ISO_SUCCESS;
#endif
/* Patch the boot image info tables if indicated */
for (idx = 0; idx < t->catalog->num_bootimages; idx++) {
if (!(t->catalog->bootimages[idx]->isolinux_options & 0x01))
@ -1158,15 +1150,6 @@ int eltorito_writer_write_vol_desc(IsoImageWriter *writer)
t = writer->target;
cat = t->catalog;
#ifndef Libisofs_mips_boot_file_pathS
/* >>> Preliminary: No El Torito with system area type other than MBR */
if (t->system_area_options & 0xfc)
return ISO_SUCCESS;
#endif
iso_msg_debug(t->image->id, "Write El-Torito boot record");
memset(&vol, 0, sizeof(struct ecma119_boot_rec_vol_desc));
@ -1241,14 +1224,6 @@ int eltorito_writer_create(Ecma119Image *target)
}
}
#ifndef Libisofs_mips_boot_file_pathS
/* >>> Preliminary: No El Torito with system area type other than MBR */
if (target->system_area_options & 0xfc)
return ISO_SUCCESS;
#endif
/* we need the bootable volume descriptor */
target->curblock++;
return ISO_SUCCESS;

View File

@ -6556,8 +6556,4 @@ struct burn_source {
*/
/* Try to address MIPS Big Endian boot files via their ISO/RR paths
*/
#define Libisofs_mips_boot_file_pathS yes
#endif /*LIBISO_LIBISOFS_H_*/

View File

@ -261,15 +261,12 @@ static int make_mips_volume_header(Ecma119Image *t, uint8_t *buf, int flag)
uint32_t num_cyl, idx, blocks, num, checksum;
off_t image_size;
static uint32_t bps = 512, spt = 32;
#ifdef Libisofs_mips_boot_file_pathS
Ecma119Node *ecma_node;
IsoNode *node;
IsoStream *stream;
off_t file_size;
uint32_t file_lba;
int ret;
#endif
/* Bytes 512 to 32767 may come from image or external file */
memset(buf, 0, 512);
@ -305,8 +302,6 @@ static int make_mips_volume_header(Ecma119Image *t, uint8_t *buf, int flag)
/* 84 - 87 | boot_bytes | File length in bytes */
/* 88 - 311 | 0 | Volume Directory Entries 2 to 15 */
#ifdef Libisofs_mips_boot_file_pathS
for (idx = 0; idx < t->image->num_mips_boot_files; idx++) {
#ifndef NIX
@ -372,27 +367,6 @@ static int make_mips_volume_header(Ecma119Image *t, uint8_t *buf, int flag)
}
#else /* Libisofs_mips_boot_file_pathS */
for (idx = 0; idx < t->catalog->num_bootimages; idx++) {
/* >>> skip non-MIPS boot images */;
namept = (char *) iso_node_get_name(
(IsoNode *) t->catalog->bootimages[idx]->image);
name_field = (char *) (buf + (72 + 16 * idx));
strncpy(name_field, namept, 8);
iso_msb(buf + (72 + 16 * idx) + 8,
t->bootsrc[idx]->sections[0].block * 4, 4);
/* >>> shall i really round up to 2048 ? */
iso_msb(buf + (72 + 16 * idx) + 12,
((t->bootsrc[idx]->sections[0].size + 2047) / 2048 ) * 2048,
4);
}
#endif /* ! Libisofs_mips_boot_file_pathS */
/* 408 - 411 | part_blks | Number of 512 byte blocks in partition */
blocks = (image_size + bps - 1) / bps;
iso_msb(buf + 408, blocks, 4);
@ -429,7 +403,7 @@ static int make_mips_volume_header(Ecma119Image *t, uint8_t *buf, int flag)
Software Foundation, Inc.
This function itself is entirely under copyright (C) 2010 Thomas Schmitt.
*/
static int make_mipsel_volume_header(Ecma119Image *t, uint8_t *buf, int flag)
static int make_mipsel_boot_block(Ecma119Image *t, uint8_t *buf, int flag)
{
uint32_t load_adr, exec_adr, seg_size, seg_start, p_offset, p_filesz;
uint32_t phdr_adr;
@ -602,7 +576,7 @@ int iso_write_system_area(Ecma119Image *t, uint8_t *buf)
if (ret != ISO_SUCCESS)
return ret;
} else if(sa_type == 2) {
ret = make_mipsel_volume_header(t, buf, 0);
ret = make_mipsel_boot_block(t, buf, 0);
if (ret != ISO_SUCCESS)
return ret;
} else if(t->partition_offset > 0 && sa_type == 0) {