Re: svn commit: r331843 - in head/usr.sbin/makefs: . cd9660
On Mon, Apr 09, 2018 at 04:38:38PM -0700, Benno Rice wrote: > > > > On Apr 9, 2018, at 6:37 AM, Glen Barberwrote: > > [snip] > > > It appears this part has broken creating disc1.iso (and other ISO > > images) for amd64. I see the following error: > > [snip] > > Yep, that’s on me. I forgot to update mkisoimages.sh. Could you try the > attached patch? > % Index: release/amd64/mkisoimages.sh % === % --- release/amd64/mkisoimages.sh (revision 332343) % +++ release/amd64/mkisoimages.sh (working copy) % @@ -38,7 +38,7 @@ % umount efi % rmdir efi % mdconfig -d -u $device % - bootable="-o bootimage=efi;efiboot.img -o no-emul-boot $bootable" % + bootable="-o bootimage=i386;efiboot.img -o no-emul-boot $bootable -o platformid=efi" % % shift % else This appears to have fixed it. Glen signature.asc Description: PGP signature
Re: svn commit: r331843 - in head/usr.sbin/makefs: . cd9660
> On Apr 9, 2018, at 6:37 AM, Glen Barberwrote: [snip] > It appears this part has broken creating disc1.iso (and other ISO > images) for amd64. I see the following error: [snip] Yep, that’s on me. I forgot to update mkisoimages.sh. Could you try the attached patch? ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r331843 - in head/usr.sbin/makefs: . cd9660
On Sat, Mar 31, 2018 at 03:04:42PM +, 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 > + > 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 (19690 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
svn commit: r331843 - in head/usr.sbin/makefs: . cd9660
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$"); #defineELTORITO_DPRINTF(__x) #endif +#include + 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; @@ -174,9 +174,15 @@ cd9660_add_boot_disk(iso9660_disk *diskStructure, cons new_image->serialno = diskStructure->image_serialno++; + new_image->platform_id = new_image->system; + /* TODO : Need to do anything about the boot image in the tree? */ diskStructure->is_bootable = 1; + /* First boot image is initial/default entry. */ + if (default_boot_image == NULL) + default_boot_image = new_image; + return 1; } @@ -210,6 +216,13 @@ cd9660_eltorito_add_boot_option(iso9660_disk *diskStru warn("%s: strtoul", __func__); return 0; } + } else if (strcmp(option_string, "platformid") == 0) { + if (strcmp(value, "efi") == 0) + image->platform_id = ET_SYS_EFI; + else { + warn("%s: unknown platform: %s", __func__, value); + return 0; + } } else { return 0;