[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#743879: debian-cd: Fixes for hppa architecture (patch attached)



Hi Thomas,

On 04/08/2014 , Helge Deller wrote:
> I will test your xorriso as soon as possible.

Attached is the diff to xorriso-1.3.7 which I used to test.
Up to now I only tested on x86_64, testing on hppa is still needed (but will work most likely).
As you can see from the diff, your code was correct.
I just modified a few trivial things:
- removed the #ifdef Libisofs_enable_unreleased_hppa_palO lines
- added the comment "palo boot loader entry point is always zero. No need to write ipl_entry value"
- added a "=" at the end of the usage printfs (|\"hppa_cmdline=\"|\"hppa_bootloader=\"|\"hppa_kernel_32=\"")

I didn't added the lines to libisofs/libisofs.ver because I ran the statically linked executable. 

So far everythink worked as expected.
I booted this iso image via tftpboot (parisc uses the same file format for netbooting as on CD-ROM)
on a 32bit and a 64bit parisc machine.
Both kernels booted OK, and the kernel commandline was correctly detected.

So, in my opinion you can just activate the hppa command options for xorriso.

In my todo list is still:
- I think there still seems to be a problem with gzipped Linux kernels.
- Test everything with debian-cd and modify debian-cd to use xorriso (will send patch in a few days).

Thanks for your work on xorriso!
Helge 
diff -up ./libisofs/image.c.org ./libisofs/image.c
--- ./libisofs/image.c.org	2014-04-08 15:04:58.000000000 +0200
+++ ./libisofs/image.c	2014-04-08 15:28:27.000000000 +0200
@@ -147,12 +147,8 @@ void iso_image_unref(IsoImage *image)
         if (image->sparc_core_node != NULL)
             iso_node_unref((IsoNode *) image->sparc_core_node);
 
-#ifdef Libisofs_enable_unreleased_hppa_palO
-
         iso_image_set_hppa_palo(image, NULL, NULL, NULL, NULL, NULL, 1);
 
-#endif
-
         free(image->volset_id);
         free(image->volume_id);
         free(image->publisher_id);
diff -up ./libisofs/libisofs.h.org ./libisofs/libisofs.h
--- ./libisofs/libisofs.h.org	2014-04-08 15:03:35.000000000 +0200
+++ ./libisofs/libisofs.h	2014-04-08 22:09:38.625554400 +0200
@@ -2137,14 +2137,11 @@ int iso_write_opts_set_overwrite_buf(Iso
 int iso_write_opts_set_fifo_size(IsoWriteOpts *opts, size_t fifo_size);
 
 /*
- * Release 1.3.6 contains an incomplete implementation of preparations for the
- * HP-PA bootloader PALO. Its header version 5 is not completely defined yet.
- * To enable the code for these preparations, you have to define the macro
- *   Libisofs_enable_unreleased_hppa_palO
- * and to insert into libisofs/libisofs.ver the lines
+ * TODO: and to insert into libisofs/libisofs.ver the lines
  *   iso_image_set_hppa_palo;
  *   iso_image_get_hppa_palo;
  */
+
 /*
  * Attach 32 kB of binary data which shall get written to the first 32 kB 
  * of the ISO image, the ECMA-119 System Area. This space is intended for
diff -up ./libisofs/system_area.c.org ./libisofs/system_area.c
--- ./libisofs/system_area.c.org	2014-04-08 15:10:32.000000000 +0200
+++ ./libisofs/system_area.c	2014-04-08 22:10:18.412271586 +0200
@@ -887,7 +887,8 @@ static int make_hppa_palo_sector(Ecma119
     iso_msb(buf + 240, adr, 4);
     iso_msb(buf + 244, len, 4);
 
-    /* >>> ??? iso_msb(buf + 248, ipl_entry, 4); */
+    /* palo boot loader entry point is always zero. No need to write ipl_entry value
+     */
 
     if (hdrversion == 5) {
         if (strlen(img->hppa_cmdline) > 1023) {
diff -up ./xorriso/emulators.c.org ./xorriso/emulators.c
diff -up ./xorriso/iso_img.c.org ./xorriso/iso_img.c
--- ./xorriso/iso_img.c.org	2014-04-08 15:28:44.000000000 +0200
+++ ./xorriso/iso_img.c	2014-04-08 15:32:21.000000000 +0200
@@ -557,14 +557,10 @@ int Xorriso_boot_status_non_mbr(struct X
  int i, num_boots, sa_type;
  char *paths[15], *line;
 
-#ifdef Libisofs_enable_unreleased_hppa_palO
-
  int ret;
  char num[4];
  char *cmdline, *bootloader, *kernel_32, *kernel_64, *ramdisk;
 
-#endif
-
  line= xorriso->result_line;
 
  sa_type= (xorriso->system_area_options & 0xfc) >> 2;
@@ -599,8 +595,6 @@ int Xorriso_boot_status_non_mbr(struct X
  }
  if(sa_type == 4 || sa_type == 5) {
 
-#ifdef Libisofs_enable_unreleased_hppa_palO
-
    ret= iso_image_get_hppa_palo(image, &cmdline, &bootloader, &kernel_32,
                                 &kernel_64, &ramdisk);
    if(ret == 1) {
@@ -613,8 +607,6 @@ int Xorriso_boot_status_non_mbr(struct X
      Xorriso_status_hppa(xorriso, "hdrversion", num, filter, fp, 0);
    }
 
-#endif /* ! Libisofs_enable_unreleased_hppa_palO */
-
    return(0);
  }
  return(0);
@@ -1302,14 +1294,8 @@ int Xorriso_set_hppa_boot_parm(struct Xo
  par[0]= par[1]= par[2]= par[3]= par[4]= NULL;
  if(flag & 1) {
    /* Give up HP-PA boot parameters */
-
-#ifdef Libisofs_enable_unreleased_hppa_palO
-
    iso_image_set_hppa_palo(image, par[0], par[1], par[2], par[3], par[4],
                            1);
-
-#endif
-
    return(1);
  }
  if(strcmp(what, "cmdline") == 0) {
@@ -1344,8 +1330,6 @@ int Xorriso_set_hppa_boot_parm(struct Xo
    return(0);
  }
 
-#ifdef Libisofs_enable_unreleased_hppa_palO
-
  ret= iso_image_set_hppa_palo(image, par[0], par[1], par[2], par[3], par[4],
                               0);
  if (ret < 0) {
@@ -1354,16 +1338,8 @@ int Xorriso_set_hppa_boot_parm(struct Xo
                             0, "FAILURE", 1);
    return(0);
  }
- return(1);
-
-#else
-
- strcpy(xorriso->info_text, "HP-PA boot preparations are not yet supported");
- Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
- return(0);
-
-#endif /* ! Libisofs_enable_unreleased_hppa_palO */
 
+ return(1);
 }
 
 
diff -up ./xorriso/opts_d_h.c.org ./xorriso/opts_d_h.c
--- ./xorriso/opts_d_h.c.org	2014-04-08 15:24:54.000000000 +0200
+++ ./xorriso/opts_d_h.c	2014-04-08 15:34:40.000000000 +0200
@@ -1684,14 +1684,8 @@ int Xorriso_option_help(struct XorrisO *
 "              |\"efi_boot_part=\"|\"efi_boot_part=--efi-boot-image\"",
 "              |\"mips_path=\"|\"mipsel_path=\"|\"mips_discard\"",
 "              |\"sparc_label=\"|\"grub2_sparc_core=\"|\"sparc_discard\"",
-
-#ifdef Libisofs_enable_unreleased_hppa_palO
-
-"              |\"hppa_cmdline=\"|\"hppa_bootloader=\"|\"hppa_kernel_32\"",
-"              |\"hppa_kernel_64=\"|\"hppa_ramdisk=\"|\"hppa_hdrversion\"",
-
-#endif
-
+"              |\"hppa_cmdline=\"|\"hppa_bootloader=\"|\"hppa_kernel_32=\"",
+"              |\"hppa_kernel_64=\"|\"hppa_ramdisk=\"|\"hppa_hdrversion=\"",
 "              |\"hfsplus_serial=\"|\"hfsplus_block_size=\"",
 "              |\"apm_block_size=\"|\"show_status\"",
 "                 Whether to discard or keep an exiting El Torito boot image.",

Reply to: