-boot_image mipsel_path= , -as mkisofs -mipsel-boot.
This commit is contained in:
parent
c1381c7baf
commit
d44005244d
@ -1241,6 +1241,7 @@ not_enough_args:;
|
|||||||
strcmp(argv[i], "--efi-boot") == 0 ||
|
strcmp(argv[i], "--efi-boot") == 0 ||
|
||||||
strcmp(argv[i], "-e") == 0 ||
|
strcmp(argv[i], "-e") == 0 ||
|
||||||
strcmp(argv[i], "-mips-boot") == 0 ||
|
strcmp(argv[i], "-mips-boot") == 0 ||
|
||||||
|
strcmp(argv[i], "-mipsel-boot") == 0 ||
|
||||||
strcmp(argv[i], "-c") == 0 ||
|
strcmp(argv[i], "-c") == 0 ||
|
||||||
strcmp(argv[i], "-eltorito-catalog") == 0 ||
|
strcmp(argv[i], "-eltorito-catalog") == 0 ||
|
||||||
strcmp(argv[i], "-boot-load-size") == 0 ||
|
strcmp(argv[i], "-boot-load-size") == 0 ||
|
||||||
@ -1552,11 +1553,15 @@ problem_handler_2:;
|
|||||||
if(ret <= 0)
|
if(ret <= 0)
|
||||||
goto problem_handler_boot;
|
goto problem_handler_boot;
|
||||||
|
|
||||||
} else if(strcmp(argv[i], "-mips-boot")==0) {
|
} else if(strcmp(argv[i], "-mips-boot") == 0 ||
|
||||||
if(i+1>=argc)
|
strcmp(argv[i], "-mipsel-boot") == 0) {
|
||||||
|
if(i + 1 >= argc)
|
||||||
goto not_enough_args;
|
goto not_enough_args;
|
||||||
i++;
|
i++;
|
||||||
strcpy(sfe, "mips_path=");
|
if(strcmp(argv[i - 1], "-mipsel-boot") == 0)
|
||||||
|
strcpy(sfe, "mipsel_path=");
|
||||||
|
else
|
||||||
|
strcpy(sfe, "mips_path=");
|
||||||
ret= Sfile_str(sfe, argv[i], 1);
|
ret= Sfile_str(sfe, argv[i], 1);
|
||||||
if(ret <= 0)
|
if(ret <= 0)
|
||||||
goto ex;
|
goto ex;
|
||||||
|
@ -458,17 +458,20 @@ int Xorriso_boot_item_status(struct XorrisO *xorriso, char *cat_path,
|
|||||||
int Xorriso_boot_status_mips(struct XorrisO *xorriso, IsoImage *image,
|
int Xorriso_boot_status_mips(struct XorrisO *xorriso, IsoImage *image,
|
||||||
char *filter, FILE *fp, int flag)
|
char *filter, FILE *fp, int flag)
|
||||||
{
|
{
|
||||||
int i, num_boots;
|
int i, num_boots, sa_type;
|
||||||
char *paths[15], *line;
|
char *paths[15], *line;
|
||||||
|
|
||||||
line= xorriso->result_line;
|
line= xorriso->result_line;
|
||||||
|
|
||||||
|
sa_type= (xorriso->system_area_options & 0xfc) >> 2;
|
||||||
num_boots= iso_image_get_mips_boot_files(image, paths, 0);
|
num_boots= iso_image_get_mips_boot_files(image, paths, 0);
|
||||||
Xorriso_process_msg_queues(xorriso, 0);
|
Xorriso_process_msg_queues(xorriso, 0);
|
||||||
if(num_boots <= 0)
|
if(num_boots <= 0)
|
||||||
return(num_boots);
|
return(num_boots);
|
||||||
|
if(sa_type == 2)
|
||||||
|
num_boots= 1;
|
||||||
for(i= 0; i < num_boots; i++) {
|
for(i= 0; i < num_boots; i++) {
|
||||||
strcpy(line,"-boot_image any mips_path=");
|
sprintf(line, "-boot_image any mips%s_path=", sa_type ==2 ? "el" : "");
|
||||||
Text_shellsafe(paths[i], line, 1);
|
Text_shellsafe(paths[i], line, 1);
|
||||||
strcat(line, "\n");
|
strcat(line, "\n");
|
||||||
Xorriso_status_result(xorriso, filter, fp, flag & 2);
|
Xorriso_status_result(xorriso, filter, fp, flag & 2);
|
||||||
@ -1001,22 +1004,38 @@ ex:;
|
|||||||
|
|
||||||
|
|
||||||
/* @param flag bit0= give up all boot file paths
|
/* @param flag bit0= give up all boot file paths
|
||||||
|
bit1= refuse if already a path is added
|
||||||
*/
|
*/
|
||||||
int Xorriso_add_mips_boot_file(struct XorrisO *xorriso, char *path, int flag)
|
int Xorriso_add_mips_boot_file(struct XorrisO *xorriso, char *path, int flag)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
IsoImage *image;
|
IsoImage *image;
|
||||||
|
char *paths[15];
|
||||||
|
|
||||||
ret= Xorriso_get_volume(xorriso, &image, 0);
|
ret= Xorriso_get_volume(xorriso, &image, 0);
|
||||||
if(ret <= 0)
|
if(ret <= 0)
|
||||||
return ret;
|
return ret;
|
||||||
if(flag & 1) {
|
if(flag & 1) {
|
||||||
iso_image_give_up_mips_boot(image, 0);
|
iso_image_give_up_mips_boot(image, 0);
|
||||||
return(1);
|
Xorriso_process_msg_queues(xorriso,0);
|
||||||
|
return(1);
|
||||||
|
}
|
||||||
|
if(flag & 2) {
|
||||||
|
ret= iso_image_get_mips_boot_files(image, paths, 0);
|
||||||
|
Xorriso_process_msg_queues(xorriso,0);
|
||||||
|
if(ret < 0)
|
||||||
|
goto report_error;
|
||||||
|
if(ret > 0) {
|
||||||
|
Xorriso_msgs_submit(xorriso, 0,
|
||||||
|
"There is already a boot image file registered.",
|
||||||
|
0, "FAILURE", 0);
|
||||||
|
return(0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
ret = iso_image_add_mips_boot_file(image, path, 0);
|
ret = iso_image_add_mips_boot_file(image, path, 0);
|
||||||
Xorriso_process_msg_queues(xorriso,0);
|
Xorriso_process_msg_queues(xorriso,0);
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
|
report_error:;
|
||||||
Xorriso_report_iso_error(xorriso, "", ret,
|
Xorriso_report_iso_error(xorriso, "", ret,
|
||||||
"Error when adding MIPS boot file",
|
"Error when adding MIPS boot file",
|
||||||
0, "FAILURE", 1);
|
0, "FAILURE", 1);
|
||||||
@ -1030,7 +1049,8 @@ int Xorriso_coordinate_system_area(struct XorrisO *xorriso, int sa_type,
|
|||||||
int options, char *cmd, int flag)
|
int options, char *cmd, int flag)
|
||||||
{
|
{
|
||||||
int old_type, old_options;
|
int old_type, old_options;
|
||||||
static char *type_names[2] = {"MBR", "MIPS Big Endian Volume Header"};
|
static char *type_names[3] = {
|
||||||
|
"MBR", "MIPS Big Endian Volume Header", "MIPS Little Endian Boot Block"};
|
||||||
|
|
||||||
old_type= (xorriso->system_area_options & 0xfc) >> 2;
|
old_type= (xorriso->system_area_options & 0xfc) >> 2;
|
||||||
old_options= xorriso->system_area_options & ~0xfc;
|
old_options= xorriso->system_area_options & ~0xfc;
|
||||||
@ -1053,7 +1073,7 @@ int Xorriso_coordinate_system_area(struct XorrisO *xorriso, int sa_type,
|
|||||||
hint_revoke:;
|
hint_revoke:;
|
||||||
if(old_type == 0)
|
if(old_type == 0)
|
||||||
sprintf(xorriso->info_text, "Revokable by -boot_image any discard");
|
sprintf(xorriso->info_text, "Revokable by -boot_image any discard");
|
||||||
else if(old_type == 1)
|
else if(old_type == 1 || old_type == 2)
|
||||||
sprintf(xorriso->info_text, "Revokable by -boot_image any mips_discard");
|
sprintf(xorriso->info_text, "Revokable by -boot_image any mips_discard");
|
||||||
if(old_type < 2)
|
if(old_type < 2)
|
||||||
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "HINT", 0);
|
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "HINT", 0);
|
||||||
|
@ -745,7 +745,21 @@ treatment_patch:;
|
|||||||
if(ret <= 0)
|
if(ret <= 0)
|
||||||
return(ret);
|
return(ret);
|
||||||
|
|
||||||
} else if(strcmp(treatpt, "mips_discard") == 0) {
|
} else if(strncmp(treatpt, "mipsel_path=", 12) == 0) {
|
||||||
|
sprintf(eff_path, "-boot_image %s mipsel_path=", formpt);
|
||||||
|
ret= Xorriso_coordinate_system_area(xorriso, 2, 0, eff_path, 0);
|
||||||
|
if(ret <= 0)
|
||||||
|
return(ret);
|
||||||
|
ret= Xorriso_normalize_img_path(xorriso, xorriso->wdi, treatpt + 12,
|
||||||
|
eff_path, 2);
|
||||||
|
if(ret <= 0)
|
||||||
|
return(ret);
|
||||||
|
ret= Xorriso_add_mips_boot_file(xorriso, eff_path, 2);
|
||||||
|
if(ret <= 0)
|
||||||
|
return(ret);
|
||||||
|
|
||||||
|
} else if(strcmp(treatpt, "mips_discard") == 0 ||
|
||||||
|
strcmp(treatpt, "mipsel_discard") == 0) {
|
||||||
xorriso->system_area_options&= ~0xfc; /* system area type 0 */
|
xorriso->system_area_options&= ~0xfc; /* system area type 0 */
|
||||||
Xorriso_add_mips_boot_file(xorriso, "", 1); /* give up MIPS boot files */
|
Xorriso_add_mips_boot_file(xorriso, "", 1); /* give up MIPS boot files */
|
||||||
|
|
||||||
|
@ -1390,7 +1390,8 @@ int Xorriso_option_help(struct XorrisO *xorriso, int flag)
|
|||||||
" |\"discard\"|\"keep\"|\"patch\"|\"dir=\"|\"bin_path=\"",
|
" |\"discard\"|\"keep\"|\"patch\"|\"dir=\"|\"bin_path=\"",
|
||||||
" |\"cat_path=\"|\"cat_hidden=on|iso_rr|joliet|off\"",
|
" |\"cat_path=\"|\"cat_hidden=on|iso_rr|joliet|off\"",
|
||||||
" |\"load_size=\"|\"system_area=\"|\"partition_table=on|off\"",
|
" |\"load_size=\"|\"system_area=\"|\"partition_table=on|off\"",
|
||||||
" |\"mips_path=\"|\"mips_discard\"|\"show_status\"",
|
" |\"mips_path=\"|\"mipsel_path=\"|\"mips_discard\"",
|
||||||
|
" |\"show_status\"",
|
||||||
" Whether to discard or keep an exiting El Torito boot image.",
|
" Whether to discard or keep an exiting El Torito boot image.",
|
||||||
" ISOLINUX can be made bootable by dir=/ or dir=/isolinux",
|
" ISOLINUX can be made bootable by dir=/ or dir=/isolinux",
|
||||||
" or dir=/boot/isolinux. Others, like GRUB, by bin_path=...",
|
" or dir=/boot/isolinux. Others, like GRUB, by bin_path=...",
|
||||||
@ -1399,8 +1400,9 @@ int Xorriso_option_help(struct XorrisO *xorriso, int flag)
|
|||||||
" ISO image by the usual commands like -map or -add.",
|
" ISO image by the usual commands like -map or -add.",
|
||||||
" system_area= and partition_table= are for MBR based booting",
|
" system_area= and partition_table= are for MBR based booting",
|
||||||
" from USB stick. The system_area= file needs not to be added.",
|
" from USB stick. The system_area= file needs not to be added.",
|
||||||
" mips_path= adds Big Endian MIPS boot files. Combinable with",
|
" mips_path= adds Big Endian MIPS boot files. mipsel_path=",
|
||||||
" El Torito but not with MBR production.",
|
" sets one Little Endian MIPS boot file. Both are mutually",
|
||||||
|
" exclusive and exclusive to MBR production.",
|
||||||
"",
|
"",
|
||||||
" -uid uid User id to be used for the whole multi-session ISO image.",
|
" -uid uid User id to be used for the whole multi-session ISO image.",
|
||||||
" -gid gid Group id for the same purpose.",
|
" -gid gid Group id for the same purpose.",
|
||||||
|
@ -44,7 +44,7 @@
|
|||||||
@c man .\" First parameter, NAME, should be all caps
|
@c man .\" First parameter, NAME, should be all caps
|
||||||
@c man .\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
|
@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 .\" other parameters are allowed: see man(7), man(1)
|
||||||
@c man .TH XORRISO 1 "Oct 13, 2010"
|
@c man .TH XORRISO 1 "Oct 15, 2010"
|
||||||
@c man .\" Please adjust this date whenever revising the manpage.
|
@c man .\" Please adjust this date whenever revising the manpage.
|
||||||
@c man .\"
|
@c man .\"
|
||||||
@c man .\" Some roff macros, for reference:
|
@c man .\" Some roff macros, for reference:
|
||||||
@ -2882,10 +2882,17 @@ partition offset. 0 chooses a default value.
|
|||||||
@cindex MIPS boot file, activation
|
@cindex MIPS boot file, activation
|
||||||
@strong{mips_path=}iso_rr_path declares a data file in the image to be a
|
@strong{mips_path=}iso_rr_path declares a data file in the image to be a
|
||||||
MIPS Big Endian boot file. Enable production of a MIPS Big Endian Volume
|
MIPS Big Endian boot file. Enable production of a MIPS Big Endian Volume
|
||||||
Header. This is mutually exclusive with MBR production. It will overwrite
|
Header. This is mutually exclusive with MBR production and mipsel_path=.
|
||||||
the first 512 bytes of any data eventually provided by system_area=.
|
It will overwrite the first 512 bytes of any data eventually provided by
|
||||||
|
system_area=.
|
||||||
Up to 15 boot files can be declared by mips_path=.
|
Up to 15 boot files can be declared by mips_path=.
|
||||||
@*
|
@*
|
||||||
|
@strong{mipsel_path=}iso_rr_path declares a data file in the image to be the
|
||||||
|
MIPS Little Endian boot file. This is mutually exclusive with MBR production
|
||||||
|
and mips_path=. It will overwrite the first 512 bytes of any data eventually
|
||||||
|
provided by system_area=.
|
||||||
|
Only a single boot file can be declared by mipsel_path=.
|
||||||
|
@*
|
||||||
@strong{mips_discard} revokes any boot file declarations made by mips_path=.
|
@strong{mips_discard} revokes any boot file declarations made by mips_path=.
|
||||||
This removes the ban on MBR production.
|
This removes the ban on MBR production.
|
||||||
@*
|
@*
|
||||||
|
@ -304,6 +304,7 @@ struct XorrisO { /* the global context of xorriso */
|
|||||||
0= with bit0 or bit1: MBR
|
0= with bit0 or bit1: MBR
|
||||||
else: unspecified type
|
else: unspecified type
|
||||||
1= MIPS Big Endian Volume Header
|
1= MIPS Big Endian Volume Header
|
||||||
|
2= MIPS Little Endian Boot Block
|
||||||
*/
|
*/
|
||||||
int patch_system_area; /* Bits as of system_area_options.
|
int patch_system_area; /* Bits as of system_area_options.
|
||||||
to be applied to the loaded system
|
to be applied to the loaded system
|
||||||
@ -558,8 +559,5 @@ struct XorrisO { /* the global context of xorriso */
|
|||||||
#include "parse_exec.h"
|
#include "parse_exec.h"
|
||||||
|
|
||||||
|
|
||||||
/* <<< */
|
|
||||||
#define Xorriso_mips_boot_file_pathS 1
|
|
||||||
|
|
||||||
#endif /* Xorriso_private_includeD */
|
#endif /* Xorriso_private_includeD */
|
||||||
|
|
||||||
|
@ -1 +1 @@
|
|||||||
#define Xorriso_timestamP "2010.10.13.170641"
|
#define Xorriso_timestamP "2010.10.15.112050"
|
||||||
|
Loading…
Reference in New Issue
Block a user