Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 9 Apr 2018 13:37:17 +0000
From:      Glen Barber <gjb@FreeBSD.org>
To:        Benno Rice <benno@FreeBSD.org>
Cc:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   Re: svn commit: r331843 - in head/usr.sbin/makefs: . cd9660
Message-ID:  <20180409133717.GB82598@FreeBSD.org>
In-Reply-To: <201803311504.w2VF4gxR024784@repo.freebsd.org>
References:  <201803311504.w2VF4gxR024784@repo.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help

--jy6Sn24JjFx/iggw
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

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
>=20
> Log:
>   Synchronise with NetBSD's version of EFI handling for El Torito images.
>  =20
>   When I implemented my EFI support I failed to check if the upstream ver=
sion
>   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.
>  =20
>   Reviewed by:	imp, mav
>   Obtained from:	NetBSD
>   MFC after:	1 week
>   Sponsored by:	iXsystems, Inc.
>   Differential Revision:	https://reviews.freebsd.org/D14913
>=20
> 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
>=20
> Modified: head/usr.sbin/makefs/cd9660.c
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D
> --- 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"),
> =20
>  		{ .name =3D NULL }
>  	};
> @@ -444,7 +445,8 @@ cd9660_parse_opts(const char *option, fsinfo_t *fsopts
>  			/* RRIP */
>  			cd9660_eltorito_add_boot_option(diskStructure, name, 0);
>  			rv =3D 1;
> -		} else if (strcmp(name, "boot-load-segment") =3D=3D 0) {
> +		} else if (strcmp(name, "boot-load-segment") =3D=3D 0 ||
> +		    strcmp(name, "platformid") =3D=3D 0) {
>  			if (buf[0] =3D=3D '\0') {
>  				warnx("Option `%s' doesn't contain a value",
>  				    name);
>=20
> Modified: head/usr.sbin/makefs/cd9660/cd9660_eltorito.c
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D
> --- head/usr.sbin/makefs/cd9660/cd9660_eltorito.c	Sat Mar 31 13:19:27 201=
8	(r331842)
> +++ head/usr.sbin/makefs/cd9660/cd9660_eltorito.c	Sat Mar 31 15:04:41 201=
8	(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 $	*/
> =20
>  /*-
>   * SPDX-License-Identifier: BSD-2-Clause-NetBSD
> @@ -47,16 +47,19 @@ __FBSDID("$FreeBSD$");
>  #define	ELTORITO_DPRINTF(__x)
>  #endif
> =20
> +#include <util.h>
> +
>  static struct boot_catalog_entry *cd9660_init_boot_catalog_entry(void);
>  static struct boot_catalog_entry *cd9660_boot_setup_validation_entry(cha=
r);
>  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(cha=
r);
>  #if 0
>  static u_char cd9660_boot_get_system_type(struct cd9660_boot_image *);
>  #endif
> =20
> +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, co=
ns
>  	else if (strcmp(sysname, "macppc") =3D=3D 0 ||
>  	         strcmp(sysname, "mac68k") =3D=3D 0)
>  		new_image->system =3D ET_SYS_MAC;
> -	else if (strcmp(sysname, "efi") =3D=3D 0 ||
> -		 strcmp(sysname, "uefi") =3D=3D 0)
> -		new_image->system =3D 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.is=
o disc1=20
 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 support=
ed
 newfs_msdos: cannot get number of heads: Operation not supported
 /dev/md3: 1557 sectors in 1557 FAT12 clusters (512 bytes/cluster)
 BytesPerSec=3D512 SecPerClust=3D1 ResSectors=3D1 FATs=3D2 RootDirEnts=3D51=
2 Sectors=3D1600 Media=3D0xf8 FATsecs=3D5 SecPerTrack=3D63 Heads=3D1 Hidden=
Secs=3D0
 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 ...]
=20
 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


--jy6Sn24JjFx/iggw
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEEjRJAPC5sqwhs9k2jAxRYpUeP4pMFAlrLbI0ACgkQAxRYpUeP
4pN2KA//YS6DybQM7naJlv0iF88oKo8e8M7dYxi0MgLekVO/+pRStjaWEkp5AEHh
RAz/N8wBlXRbn2d8Eku8p59KcL4+xOS6+PfOpjXPN1LbGXQjUCysOsVnK8+4tukU
wRn2e6F6DdT6p3qTubGjO+cZPr9PzOw1wmMB3QGhjIKWdzkOWcFPdYsY3BCYCk0C
tOIwQ2NCgs8xjnbKG+n5nJlfr/uXwjnz/vw83jLXbPkevLV1MaOHtDZ69VSoX+cQ
i3WA0EwjDKHnx2eDwif1RxMkklrLmmGyRtO5ox+feNmYdb44CF50dvxjMSaX69G4
uVS6GndB0Cx/6H26Yt7TPr487q1sTITuz/8idYg6S4r5lqz8HqHRtOuvxZBdE8Wu
zZ9Gkw4MFeWwVwh1L48tSPuNmD8vkmHKrft+CofRc7oyiUIQYoOJRRwIpkAssaN1
aw2ZwELixcopJGQ4LE4YgnCINSECmyRtzu2QlIlKj0Gx0d2Dwv90MDZf7NHI+9JO
0FJHZ/nzSo2ntMv0GY9YZYJm8R3TLo8n0KSVLdFtaL2IHsnFnIcA5viaOCiBPOYH
uoVxXk3c+8OZ70rRqDQzJbHC1OodGnlma02TXeWU4euQUXPNn9g/HqLLLpM55uri
5g2AVuZlALyotYwpbumaFyjJEQPv2cXp0joHQMhil4eyOecbcAU=
=BJNc
-----END PGP SIGNATURE-----

--jy6Sn24JjFx/iggw--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20180409133717.GB82598>