Commit 49ba26d6 authored by Thomas Schmitt's avatar Thomas Schmitt

New -boot_image settings hppa_cmdline=, hppa_bootloader=, hppa_kernel_32=,...

New -boot_image settings hppa_cmdline=, hppa_bootloader=, hppa_kernel_32=, hppa_kernel_64=, hppa_ramdisk=
parent b2eacd7d
/* xorriso - creates, loads, manipulates and burns ISO 9660 filesystem images.
Copyright 2007-2013 Thomas Schmitt, <scdbackup@gmx.net>
Copyright 2007-2014 Thomas Schmitt, <scdbackup@gmx.net>
Provided under GPL version 2 or later.
......@@ -515,6 +515,22 @@ ex:;
}
int Xorriso_status_hppa(struct XorrisO *xorriso, char *what, char *value,
char *filter, FILE *fp, int flag)
{
char *line;
line= xorriso->result_line;
if(value == NULL)
return(1);
sprintf(line, "-boot_image any hppa_%s=", what);
Text_shellsafe(value, line, 1);
strcat(line, "\n");
Xorriso_status_result(xorriso, filter, fp, flag & 2);
return(1);
}
/*
bit0= do only report non-default settings
bit1= do only report to fp
......@@ -522,8 +538,9 @@ ex:;
int Xorriso_boot_status_non_mbr(struct XorrisO *xorriso, IsoImage *image,
char *filter, FILE *fp, int flag)
{
int i, num_boots, sa_type;
int i, num_boots, sa_type, ret;
char *paths[15], *line;
char *cmdline, *bootloader, *kernel_32, *kernel_64, *ramdisk;
line= xorriso->result_line;
......@@ -539,21 +556,37 @@ int Xorriso_boot_status_non_mbr(struct XorrisO *xorriso, IsoImage *image,
Xorriso_status_result(xorriso, filter, fp, flag & 2);
return(0);
}
if(sa_type != 1 && sa_type != 2)
if(sa_type != 1 && sa_type != 2 && sa_type != 4)
return(0);
num_boots= iso_image_get_mips_boot_files(image, paths, 0);
Xorriso_process_msg_queues(xorriso, 0);
if(num_boots <= 0)
if(sa_type == 1 || sa_type == 2) {
num_boots= iso_image_get_mips_boot_files(image, paths, 0);
Xorriso_process_msg_queues(xorriso, 0);
if(num_boots > 0) {
if(sa_type == 2)
num_boots= 1;
for(i= 0; i < num_boots; i++) {
sprintf(line, "-boot_image any mips%s_path=", sa_type ==2 ? "el" : "");
Text_shellsafe(paths[i], line, 1);
strcat(line, "\n");
Xorriso_status_result(xorriso, filter, fp, flag & 2);
}
}
return(num_boots);
if(sa_type == 2)
num_boots= 1;
for(i= 0; i < num_boots; i++) {
sprintf(line, "-boot_image any mips%s_path=", sa_type ==2 ? "el" : "");
Text_shellsafe(paths[i], line, 1);
strcat(line, "\n");
Xorriso_status_result(xorriso, filter, fp, flag & 2);
}
return(num_boots);
if(sa_type == 4) {
ret= iso_image_get_hppa_palo(image, &cmdline, &bootloader, &kernel_32,
&kernel_64, &ramdisk);
if(ret == 1) {
Xorriso_status_hppa(xorriso, "cmdline", cmdline, filter, fp, 0);
Xorriso_status_hppa(xorriso, "bootloader", bootloader, filter, fp, 0);
Xorriso_status_hppa(xorriso, "kernel_32", kernel_32, filter, fp, 0);
Xorriso_status_hppa(xorriso, "kernel_64", kernel_64, filter, fp, 0);
Xorriso_status_hppa(xorriso, "ramdisk", ramdisk, filter, fp, 0);
}
return(0);
}
return(0);
}
......@@ -1226,6 +1259,54 @@ report_error:;
}
/* @param flag bit0= Give up HP-PA boot parameters
*/
int Xorriso_set_hppa_boot_parm(struct XorrisO *xorriso, char *text, char *what,
int flag)
{
int ret;
IsoImage *image;
char *par[5];
ret= Xorriso_get_volume(xorriso, &image, 0);
if(ret <= 0)
return(ret);
par[0]= par[1]= par[2]= par[3]= par[4]= NULL;
if(flag & 1) {
/* Give up HP-PA boot parameters */
iso_image_set_hppa_palo(image, par[0], par[1], par[2], par[3], par[4],
1);
return(1);
}
if(strcmp(what, "cmdline") == 0) {
par[0]= text;
} else if(strcmp(what, "bootloader") == 0) {
par[1]= text;
} else if(strcmp(what, "kernel_32") == 0 || strcmp(what, "kernel-32") == 0) {
par[2]= text;
} else if(strcmp(what, "kernel_64") == 0 || strcmp(what, "kernel-64") == 0) {
par[3]= text;
} else if(strcmp(what, "ramdisk") == 0) {
par[4]= text;
} else {
strcpy(xorriso->info_text,
"HP-PA boot parameter name not recognized: hppa_");
Text_shellsafe(what, xorriso->info_text, 1);
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
return(0);
}
ret= iso_image_set_hppa_palo(image, par[0], par[1], par[2], par[3], par[4],
0);
if (ret < 0) {
Xorriso_report_iso_error(xorriso, "", ret,
"Error when adding HP-PA boot parameter",
0, "FAILURE", 1);
return(0);
}
return(1);
}
int Xorriso_coordinate_system_area(struct XorrisO *xorriso, int sa_type,
int options, char *cmd, int flag)
{
......
/* xorriso - creates, loads, manipulates and burns ISO 9660 filesystem images.
Copyright 2007-2013 Thomas Schmitt, <scdbackup@gmx.net>
Copyright 2007-2014 Thomas Schmitt, <scdbackup@gmx.net>
Provided under GPL version 2 or later.
......@@ -667,9 +667,9 @@ unusable_size:;
int Xorriso_option_boot_image(struct XorrisO *xorriso, char *form,
char *treatment, int flag)
{
int was_ok= 1, ret, isolinux_grub= 0, count, bin_count;
int was_ok= 1, ret, isolinux_grub= 0, count, bin_count, parm_len;
unsigned int u;
char *formpt, *treatpt, *eff_path= NULL;
char *formpt, *treatpt, *eff_path= NULL, *eqpt, parm[20];
uint8_t sn[8];
double num;
......@@ -864,9 +864,11 @@ treatment_patch:;
} else if(strcmp(treatpt, "mips_discard") == 0 ||
strcmp(treatpt, "mipsel_discard") == 0 ||
strcmp(treatpt, "sparc_discard") == 0) {
strcmp(treatpt, "sparc_discard") == 0 ||
strcmp(treatpt, "hppa_discard") == 0) {
xorriso->system_area_options&= ~0xfc; /* system area type 0 */
Xorriso_add_mips_boot_file(xorriso, "", 1); /* give up MIPS boot files */
Xorriso_set_hppa_boot_parm(xorriso, "", "", 1); /* give up HP-PA files */
} else if(strncmp(treatpt, "sparc_label=", 12) == 0) {
sprintf(eff_path, "-boot_image %s sparc_label=", formpt);
......@@ -883,6 +885,25 @@ treatment_patch:;
if(ret <= 0)
goto ex;
} else if(strncmp(treatpt, "hppa_", 5) == 0) {
sprintf(eff_path, "-boot_image %s %s", formpt, treatpt);
ret= Xorriso_coordinate_system_area(xorriso, 4, 0, eff_path, 0);
if(ret <= 0)
goto ex;
eqpt= strchr(treatpt, '=');
if(eqpt == NULL) {
sprintf(xorriso->info_text,
"No equal sign found in -boot_image %s %s", form, treatment);
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
ret= 0; goto ex;
}
parm_len= (eqpt - treatpt) - 5;
if(parm_len > (int) sizeof(parm) - 1)
parm_len= sizeof(parm) - 1;
strncpy(parm, treatpt + 5, parm_len);
parm[parm_len]= 0;
ret= Xorriso_set_hppa_boot_parm(xorriso, eqpt + 1, parm, 0);
} else if(strncmp(treatpt, "boot_info_table=", 16)==0) {
if(strcmp(treatpt + 16, "off") == 0)
xorriso->patch_isolinux_image= (xorriso->patch_isolinux_image & ~3) | 0;
......
/* xorriso - creates, loads, manipulates and burns ISO 9660 filesystem images.
Copyright 2007-2013 Thomas Schmitt, <scdbackup@gmx.net>
Copyright 2007-2014 Thomas Schmitt, <scdbackup@gmx.net>
Provided under GPL version 2 or later.
......@@ -1684,6 +1684,8 @@ int Xorriso_option_help(struct XorrisO *xorriso, int flag)
" |\"efi_boot_part=\"|\"efi_boot_part=--efi-boot-image\"",
" |\"mips_path=\"|\"mipsel_path=\"|\"mips_discard\"",
" |\"sparc_label=\"|\"grub2_sparc_core=\"|\"sparc_discard\"",
" |\"hppa_cmdline=\"|\"hppa_bootloader=\"|\"hppa_kernel_32\"",
" |\"hppa_kernel_64=\"|\"hppa_ramdisk=\"",
" |\"hfsplus_serial=\"|\"hfsplus_block_size=\"",
" |\"apm_block_size=\"|\"show_status\"",
" Whether to discard or keep an exiting El Torito boot image.",
......
......@@ -2,7 +2,7 @@
/* xorriso - creates, loads, manipulates and burns ISO 9660 filesystem images.
Copyright 2007-2013 Thomas Schmitt, <scdbackup@gmx.net>
Copyright 2007-2014 Thomas Schmitt, <scdbackup@gmx.net>
Provided under GPL version 2 or later.
......
......@@ -9,7 +9,7 @@
.\" First parameter, NAME, should be all caps
.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
.\" other parameters are allowed: see man(7), man(1)
.TH XORRISO 1 "Version 1.3.5, Jan 02, 2014"
.TH XORRISO 1 "Version 1.3.5, Jan 14, 2014"
.\" Please adjust this date whenever revising the manpage.
.\"
.\" Some roff macros, for reference:
......@@ -425,7 +425,7 @@ MBR, GPT and APM are combinable. APM occupies the first 8 bytes of
MBR boot code. All three do not hamper El Torito booting from CDROM.
.br
There is support for further facilities:
MIPS Big Endian (SGI), MIPS Little Endian (DEC), SUN SPARC.
MIPS Big Endian (SGI), MIPS Little Endian (DEC), SUN SPARC, HP\-PA.
Those are mutually not combinable and also not combinable with MBR, GPT,
or APM.
.br
......@@ -2888,7 +2888,7 @@ can assume overwriteable media.
There are booting mechanisms which do not use an El Torito record but rather
start at the first bytes of the image: PC\-BIOS MBR for hard\-disk\-like devices,
MIPS Volume Header for old SGI computers, DEC Boot Block for old DECstation,
SUN Disk Label for SPARC machines.
SUN Disk Label for SPARC machines, HP\-PA boot sector for HP PA\-RISC machines.
.br
The boot firmware EFI may use programs which are located in a FAT filesystem
and announced by an MBR partition table entry.
......@@ -3144,10 +3144,24 @@ of the given file to be written after the SUN Disk Label. Both numbers are
counted in bytes. The address is written as 64 bit big\-endian number to
byte 0x228. The size is written as 32 bit big\-endian number to byte 0x230.
.br
\fBmips_discard\fR and \fBsparc_discard\fR revoke any boot file
declarations made by mips_path= or mipsel_path=. They also disable production
of SUN Disk Label.
This removes the ban on production of other boot blocks.
\fBhppa_cmdline=\fRtext sets the PALO command line for HP\-PA. Up to 127
characters are permitted.
.br
\fBhppa_bootloader=\fRiso_rr_path designates the given path as HP\-PA
bootloader file.
.br
\fBhppa_kernel_32=\fRiso_rr_path designates the given path as HP\-PA
32 bit kernel file.
.br
\fBhppa_kernel_64=\fRiso_rr_path designates the given path as HP\-PA
64 bit kernel file.
.br
\fBhppa_ramdisk=\fRiso_rr_path designates the given path as HP\-PA
RAM disk file.
.br
\fBmips_discard\fR, \fBsparc_discard\fR, and \fBhppa_discard\fR
revoke any boot file declarations made for mips or mipsel, resp. sparc,
resp. hppa. This removes the ban on production of other boot blocks.
.br
\fBhfsplus_serial=\fRhexstring sets a string of 16 digits "0" to "9"
and letters "a" to "f", which will be used as unique serial number of
......@@ -5532,7 +5546,7 @@ Thomas Schmitt <scdbackup@gmx.net>
.br
for libburnia\-project.org
.SH COPYRIGHT
Copyright (c) 2007 \- 2013 Thomas Schmitt
Copyright (c) 2007 \- 2014 Thomas Schmitt
.br
Permission is granted to distribute this text freely. It shall only be
modified in sync with the technical properties of \fBxorriso\fR.
......
This diff is collapsed.
......@@ -50,7 +50,7 @@
@c man .\" First parameter, NAME, should be all caps
@c man .\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
@c man .\" other parameters are allowed: see man(7), man(1)
@c man .TH XORRISO 1 "Version 1.3.5, Jan 02, 2014"
@c man .TH XORRISO 1 "Version 1.3.5, Jan 14, 2014"
@c man .\" Please adjust this date whenever revising the manpage.
@c man .\"
@c man .\" Some roff macros, for reference:
......@@ -69,7 +69,7 @@
xorriso - creates, loads, manipulates and writes ISO 9660 filesystem images
with Rock Ridge extensions.
Copyright @copyright{} 2007 - 2013 Thomas Schmitt
Copyright @copyright{} 2007 - 2014 Thomas Schmitt
@quotation
Permission is granted to distrubute this text freely.
......@@ -567,7 +567,7 @@ MBR, GPT and APM are combinable. APM occupies the first 8 bytes of
MBR boot code. All three do not hamper El Torito booting from CDROM.
@*
There is support for further facilities:
MIPS Big Endian (SGI), MIPS Little Endian (DEC), SUN SPARC.
MIPS Big Endian (SGI), MIPS Little Endian (DEC), SUN SPARC, HP-PA.
Those are mutually not combinable and also not combinable with MBR, GPT,
or APM.
@*
......@@ -3401,7 +3401,7 @@ can assume overwriteable media.
There are booting mechanisms which do not use an El Torito record but rather
start at the first bytes of the image: PC-BIOS MBR for hard-disk-like devices,
MIPS Volume Header for old SGI computers, DEC Boot Block for old DECstation,
SUN Disk Label for SPARC machines.
SUN Disk Label for SPARC machines, HP-PA boot sector for HP PA-RISC machines.
@*
The boot firmware EFI may use programs which are located in a FAT filesystem
and announced by an MBR partition table entry.
......@@ -3676,10 +3676,25 @@ of the given file to be written after the SUN Disk Label. Both numbers are
counted in bytes. The address is written as 64 bit big-endian number to
byte 0x228. The size is written as 32 bit big-endian number to byte 0x230.
@*
@strong{mips_discard} and @strong{sparc_discard} revoke any boot file
declarations made by mips_path= or mipsel_path=. They also disable production
of SUN Disk Label.
This removes the ban on production of other boot blocks.
@cindex HP-PA boot sector, production
@strong{hppa_cmdline=}text sets the PALO command line for HP-PA. Up to 127
characters are permitted.
@*
@strong{hppa_bootloader=}iso_rr_path designates the given path as HP-PA
bootloader file.
@*
@strong{hppa_kernel_32=}iso_rr_path designates the given path as HP-PA
32 bit kernel file.
@*
@strong{hppa_kernel_64=}iso_rr_path designates the given path as HP-PA
64 bit kernel file.
@*
@strong{hppa_ramdisk=}iso_rr_path designates the given path as HP-PA
RAM disk file.
@*
@strong{mips_discard}, @strong{sparc_discard}, and @strong{hppa_discard}
revoke any boot file declarations made for mips or mipsel, resp. sparc,
resp. hppa. This removes the ban on production of other boot blocks.
@*
@cindex HFS+ serial number
@strong{hfsplus_serial=}hexstring sets a string of 16 digits "0" to "9"
......@@ -6543,7 +6558,7 @@ Thomas Schmitt <scdbackup@@gmx.net>
for libburnia-project.org
@c man .SH COPYRIGHT
@section Copyright
Copyright (c) 2007 - 2013 Thomas Schmitt
Copyright (c) 2007 - 2014 Thomas Schmitt
@*
Permission is granted to distribute this text freely. It shall only be
modified in sync with the technical properties of @command{xorriso}.
......
......@@ -403,6 +403,7 @@ struct XorrisO { /* the global context of xorriso */
1= MIPS Big Endian Volume Header
2= MIPS Little Endian Boot Block
3= SUN Disk Label for SUN SPARC
4= HP-PA PALO boot sector
bit8-9= Only with System area type 0
Cylinder alignment mode
0 = auto (align if bit1)
......
#define Xorriso_timestamP "2014.01.14.084808"
#define Xorriso_timestamP "2014.01.14.090320"
......@@ -540,6 +540,9 @@ int Xorriso_boot_image_status(struct XorrisO *xorriso, char *filter, FILE *fp,
int Xorriso_add_mips_boot_file(struct XorrisO *xorriso, char *path, int flag);
int Xorriso_set_hppa_boot_parm(struct XorrisO *xorriso, char *text, char *what,
int flag);
int Xorriso_coordinate_system_area(struct XorrisO *xorriso, int sa_type,
int options, char *cmd, int flag);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment