On Sat, Mar 31, 2018 at 03:04:42PM +0000, Benno Rice wrote:
> Author: benno
> Date: Sat Mar 31 15:04:41 2018
> New Revision: 331843
> URL: https://svnweb.freebsd.org/changeset/base/331843
> 
> Log:
>   Synchronise with NetBSD's version of EFI handling for El Torito images.
>   
>   When I implemented my EFI support I failed to check if the upstream version
>   of makefs in NetBSD had done the same. Override my version with theirs to
>   make it easier to stay in sync with them in the future.
>   
>   Reviewed by:        imp, mav
>   Obtained from:      NetBSD
>   MFC after:  1 week
>   Sponsored by:       iXsystems, Inc.
>   Differential Revision:      https://reviews.freebsd.org/D14913
> 
> Modified:
>   head/usr.sbin/makefs/cd9660.c
>   head/usr.sbin/makefs/cd9660/cd9660_eltorito.c
>   head/usr.sbin/makefs/cd9660/cd9660_eltorito.h
>   head/usr.sbin/makefs/makefs.8
> 
> Modified: head/usr.sbin/makefs/cd9660.c
> ==============================================================================
> --- head/usr.sbin/makefs/cd9660.c     Sat Mar 31 13:19:27 2018        
> (r331842)
> +++ head/usr.sbin/makefs/cd9660.c     Sat Mar 31 15:04:41 2018        
> (r331843)
> @@ -309,6 +309,7 @@ cd9660_prep_opts(fsinfo_t *fsopts)
>               OPT_STR('\0', "no-boot", "No boot support"),
>               OPT_STR('\0', "hard-disk-boot", "Boot from hard disk"),
>               OPT_STR('\0', "boot-load-segment", "Boot load segment"),
> +             OPT_STR('\0', "platformid", "Section Header Platform ID"),
>  
>               { .name = NULL }
>       };
> @@ -444,7 +445,8 @@ cd9660_parse_opts(const char *option, fsinfo_t *fsopts
>                       /* RRIP */
>                       cd9660_eltorito_add_boot_option(diskStructure, name, 0);
>                       rv = 1;
> -             } else if (strcmp(name, "boot-load-segment") == 0) {
> +             } else if (strcmp(name, "boot-load-segment") == 0 ||
> +                 strcmp(name, "platformid") == 0) {
>                       if (buf[0] == '\0') {
>                               warnx("Option `%s' doesn't contain a value",
>                                   name);
> 
> Modified: head/usr.sbin/makefs/cd9660/cd9660_eltorito.c
> ==============================================================================
> --- head/usr.sbin/makefs/cd9660/cd9660_eltorito.c     Sat Mar 31 13:19:27 
> 2018        (r331842)
> +++ head/usr.sbin/makefs/cd9660/cd9660_eltorito.c     Sat Mar 31 15:04:41 
> 2018        (r331843)
> @@ -1,4 +1,4 @@
> -/*   $NetBSD: cd9660_eltorito.c,v 1.17 2011/06/23 02:35:56 enami Exp $       
> */
> +/*   $NetBSD: cd9660_eltorito.c,v 1.23 2018/03/28 06:48:55 nonaka Exp $      
> */
>  
>  /*-
>   * SPDX-License-Identifier: BSD-2-Clause-NetBSD
> @@ -47,16 +47,19 @@ __FBSDID("$FreeBSD$");
>  #define      ELTORITO_DPRINTF(__x)
>  #endif
>  
> +#include <util.h>
> +
>  static struct boot_catalog_entry *cd9660_init_boot_catalog_entry(void);
>  static struct boot_catalog_entry *cd9660_boot_setup_validation_entry(char);
>  static struct boot_catalog_entry *cd9660_boot_setup_default_entry(
>      struct cd9660_boot_image *);
>  static struct boot_catalog_entry *cd9660_boot_setup_section_head(char);
> -static struct boot_catalog_entry *cd9660_boot_setup_validation_entry(char);
>  #if 0
>  static u_char cd9660_boot_get_system_type(struct cd9660_boot_image *);
>  #endif
>  
> +static struct cd9660_boot_image *default_boot_image;
> +
>  int
>  cd9660_add_boot_disk(iso9660_disk *diskStructure, const char *boot_info)
>  {
> @@ -104,12 +107,9 @@ cd9660_add_boot_disk(iso9660_disk *diskStructure, cons
>       else if (strcmp(sysname, "macppc") == 0 ||
>                strcmp(sysname, "mac68k") == 0)
>               new_image->system = ET_SYS_MAC;
> -     else if (strcmp(sysname, "efi") == 0 ||
> -              strcmp(sysname, "uefi") == 0)
> -             new_image->system = ET_SYS_UEFI;
>       else {
>               warnx("boot disk system must be "
> -                   "efi, i386, powerpc, macppc, mac68k");
> +                   "i386, powerpc, macppc, or mac68k");
>               free(temp);
>               free(new_image);
>               return 0;

It appears this part has broken creating disc1.iso (and other ISO
images) for amd64.  I see the following error:

 sh /usr/src/release/amd64/mkisoimages.sh -b 12_0_CURRENT_amd64_CD disc1.iso 
disc1 
 200+0 records in
 200+0 records out
 819200 bytes transferred in 0.004175 secs (196222290 bytes/sec)
 newfs_msdos: cannot get number of sectors per track: Operation not supported
 newfs_msdos: cannot get number of heads: Operation not supported
 /dev/md3: 1557 sectors in 1557 FAT12 clusters (512 bytes/cluster)
 BytesPerSec=512 SecPerClust=1 ResSectors=1 FATs=2 RootDirEnts=512 Sectors=1600 
Media=0xf8 FATsecs=5 SecPerTrack=63 Heads=1 HiddenSecs=0
 makefs: boot disk system must be i386, powerpc, macppc, or mac68k
 Usage: makefs [-xZ] [-B endian] [-b free-blocks] [-d debug-mask]
         [-F mtree-specfile] [-f free-files] [-M minimum-size] [-m maximum-size]
         [-N userdb-dir] [-O offset] [-o fs-options] [-R roundup-size]
         [-S sector-size] [-s image-size] [-T <timestamp/file>] [-t fs-type]
         image-file directory | manifest [extra-directory ...]
 
 cd9660 specific options:
         l,            isolevel  ISO Level
         v,             verbose  Turns on verbose output
         h,                help  Show help message
         S,     follow-symlinks  Resolve symlinks in pathnames
         R,           rockridge  Enable Rock-Ridge extensions
         C,           chrp-boot  Enable CHRP boot
         K,     keep-bad-images  Keep bad images
         D,    allow-deep-trees  Allow trees more than 8 levels
         a,      allow-max-name  Allow 37 char filenames (unimplemented)
         i, allow-illegal-chars  Allow illegal characters in filenames
         m,      allow-multidot  Allow multiple periods in filenames
         o,omit-trailing-period  Omit trailing periods in filenames
                allow-lowercase  Allow lowercase characters in filenames
                     archimedes  Enable Archimedes structure
            no-trailing-padding  Include padding areas
         A,       applicationid  Application Identifier
         P,           publisher  Publisher Identifier
         p,            preparer  Preparer Identifier
         L,               label  Disk Label
         V,            volumeid  Volume Set Identifier
         B,           bootimage  Boot image parameter
         G,   generic-bootimage  Generic boot image param
                   bootimagedir  Boot image directory
                   no-emul-boot  No boot emulation
                        no-boot  No boot support
                 hard-disk-boot  Boot from hard disk
              boot-load-segment  Boot load segment
                     platformid  Section Header Platform ID

Glen

Attachment: signature.asc
Description: PGP signature

Reply via email to