Commit 30ab79d3 authored by Thomas Schmitt's avatar Thomas Schmitt

New -boot_image setting hppa_hdrversion=

parent 98de4cc3
......@@ -539,7 +539,7 @@ int Xorriso_boot_status_non_mbr(struct XorrisO *xorriso, IsoImage *image,
char *filter, FILE *fp, int flag)
{
int i, num_boots, sa_type, ret;
char *paths[15], *line;
char *paths[15], *line, num[4];
char *cmdline, *bootloader, *kernel_32, *kernel_64, *ramdisk;
line= xorriso->result_line;
......@@ -556,7 +556,7 @@ 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 && sa_type != 4)
if(sa_type != 1 && sa_type != 2 && sa_type != 4 && sa_type != 5)
return(0);
if(sa_type == 1 || sa_type == 2) {
......@@ -574,7 +574,7 @@ int Xorriso_boot_status_non_mbr(struct XorrisO *xorriso, IsoImage *image,
}
return(num_boots);
}
if(sa_type == 4) {
if(sa_type == 4 || sa_type == 5) {
ret= iso_image_get_hppa_palo(image, &cmdline, &bootloader, &kernel_32,
&kernel_64, &ramdisk);
if(ret == 1) {
......@@ -583,6 +583,8 @@ int Xorriso_boot_status_non_mbr(struct XorrisO *xorriso, IsoImage *image,
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);
sprintf(num, "%d", sa_type);
Xorriso_status_hppa(xorriso, "hdrversion", num, filter, fp, 0);
}
return(0);
}
......@@ -1288,6 +1290,20 @@ int Xorriso_set_hppa_boot_parm(struct XorrisO *xorriso, char *text, char *what,
par[3]= text;
} else if(strcmp(what, "ramdisk") == 0) {
par[4]= text;
} else if(strcmp(what, "hdrversion") == 0) {
if(strcmp(text, "4") == 0) {
xorriso->system_area_options= (xorriso->system_area_options & ~0xfc) |
(4 << 2);
} else if(strcmp(text, "5") == 0) {
xorriso->system_area_options= (xorriso->system_area_options & ~0xfc) |
(5 << 2);
} else {
strcpy(xorriso->info_text, "Unsupported HP-PA PALO header version ");
Text_shellsafe(text, xorriso->info_text, 1);
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
return(0);
}
return(1);
} else {
strcpy(xorriso->info_text,
"HP-PA boot parameter name not recognized: hppa_");
......
......@@ -668,6 +668,7 @@ 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, parm_len;
int palohdrversion;
unsigned int u;
char *formpt, *treatpt, *eff_path= NULL, *eqpt, parm[20];
uint8_t sn[8];
......@@ -887,7 +888,11 @@ treatment_patch:;
} 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);
palohdrversion= (xorriso->system_area_options >> 2) & 0x3f;
if(palohdrversion != 4)
palohdrversion= 5;
ret= Xorriso_coordinate_system_area(xorriso, palohdrversion, 0, eff_path,
0);
if(ret <= 0)
goto ex;
eqpt= strchr(treatpt, '=');
......
......@@ -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 14, 2014"
.TH XORRISO 1 "Version 1.3.5, Jan 15, 2014"
.\" Please adjust this date whenever revising the manpage.
.\"
.\" Some roff macros, for reference:
......@@ -3144,8 +3144,11 @@ 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
\fBhppa_cmdline=\fRtext sets the PALO command line for HP\-PA. Up to 127
characters are permitted.
\fBhppa_cmdline=\fRtext sets the PALO command line for HP\-PA. Up to 1023
characters are permitted by default. With hppa_hdrversion=4 the limit is 127.
.br
Note that the first five hppa_ bootspecs are mandatory, if any of the
hppa_ bootspecs is used. Only hppa_hdrversion= is allowed to be missing.
.br
\fBhppa_bootloader=\fRiso_rr_path designates the given path as HP\-PA
bootloader file.
......@@ -3159,6 +3162,10 @@ bootloader file.
\fBhppa_ramdisk=\fRiso_rr_path designates the given path as HP\-PA
RAM disk file.
.br
\fBhppa_hdrversion=\fRnumber chooses between PALO header version 5 (default)
and version 4.
For the appropriate value see in PALO source code: PALOHDRVERSION.
.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.
......
No preview for this file type
......@@ -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 14, 2014"
@c man .TH XORRISO 1 "Version 1.3.5, Jan 15, 2014"
@c man .\" Please adjust this date whenever revising the manpage.
@c man .\"
@c man .\" Some roff macros, for reference:
......@@ -3677,8 +3677,11 @@ 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.
@*
@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_cmdline=}text sets the PALO command line for HP-PA. Up to 1023
characters are permitted by default. With hppa_hdrversion=4 the limit is 127.
@*
Note that the first five hppa_ bootspecs are mandatory, if any of the
hppa_ bootspecs is used. Only hppa_hdrversion= is allowed to be missing.
@*
@strong{hppa_bootloader=}iso_rr_path designates the given path as HP-PA
bootloader file.
......@@ -3692,6 +3695,10 @@ bootloader file.
@strong{hppa_ramdisk=}iso_rr_path designates the given path as HP-PA
RAM disk file.
@*
@strong{hppa_hdrversion=}number chooses between PALO header version 5 (default)
and version 4.
For the appropriate value see in PALO source code: PALOHDRVERSION.
@*
@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.
......
......@@ -404,6 +404,9 @@ struct XorrisO { /* the global context of xorriso */
2= MIPS Little Endian Boot Block
3= SUN Disk Label for SUN SPARC
4= HP-PA PALO boot sector
header version 4
5= HP-PA PALO boot sector
header version 5
bit8-9= Only with System area type 0
Cylinder alignment mode
0 = auto (align if bit1)
......
#define Xorriso_timestamP "2014.01.16.112242"
#define Xorriso_timestamP "2014.01.16.113247"
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