From owner-svn-src-head@freebsd.org Sun Mar 25 08:54:13 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 463CBF57652 for ; Sun, 25 Mar 2018 08:54:13 +0000 (UTC) (envelope-from dch@skunkwerks.at) Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com [66.111.4.29]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DB1517BBFC; Sun, 25 Mar 2018 08:54:12 +0000 (UTC) (envelope-from dch@skunkwerks.at) Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id E023E21B6E; Sun, 25 Mar 2018 04:54:05 -0400 (EDT) Received: from web6 ([10.202.2.216]) by compute7.internal (MEProxy); Sun, 25 Mar 2018 04:54:05 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=skunkwerks.at; h=content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc; s=fm1; bh=aIAShD2LrqnbaeyvEBMJ7tDJYMj/o KVOMa3e6tlPALg=; b=EfP+tA9y5ibNWxEPW9APnnTEBWw6FvD2uH7Kp0HU1WlRo oBtLWU8UQFj8WMNmUBWXAAgIN8RDf5p3t1Wxr8ECCoY2wL6P/V5XRxuCoM80x3de kYOlUA1Z2WHXmHYOgEDyEKnbZ7IrKkOAtxV6wUMVSp8LqwuKU6ZaF0IscwzaONIr SL5d7qwY6p32/CKAfv9c6mvtcxGVvyNu0NDDdFt1ww7hC4Aenrl0sg+5nTM4KjG1 zozQYpLQayHby4WGIX2vFOw+d0b8D6vQeJq2zGxpWtEcAOP39TzV6aF6h59ZyjJq 8Xyi1q/CuH3qATjKr8CGsDZLD/xjmonMcmu+UImag== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=aIAShD 2LrqnbaeyvEBMJ7tDJYMj/oKVOMa3e6tlPALg=; b=D38u5n06kWulUmxW80hZZG kZAcffWeEgckyhtYY+eFuH7Y4xI0lJahQki7ICFUlxM/gyGxC1aL3TaMq4H6RIt3 ZnGXcb0xqSwVfYqROHKVnataAcpVOD2GWueylUnFRFO4mbirvSmXcXs2YrzaYw8v c5/HXh89ORpD0ZaS1vkZx+MV70ymB08sn+EXc/cGdKzvC66H3Edpbzir/WWAtCV0 TRK8/jgkS6O3hRnqf5CrW4Fclbo5P+Z7ABJercbNCG0Hc5CagMp1yJCL808gFP0w JnXgI+/1X4sQcZiW8LffNpoNwH/frgYU1tzdJTHzeDj6ON7mdxWeefoxAr0VPrNg == X-ME-Sender: Received: by mailuser.nyi.internal (Postfix, from userid 99) id BAF5640E5; Sun, 25 Mar 2018 04:54:05 -0400 (EDT) Message-Id: <1521968045.2210546.1315137584.4D202E01@webmail.messagingengine.com> From: Dave Cottlehuber To: svn-src-head@freebsd.org, benno@freebsd.org MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" X-Mailer: MessagingEngine.com Webmail Interface - ajax-5ce6c4ba Date: Sun, 25 Mar 2018 09:54:05 +0100 Subject: Re: svn commit: r331463 - in head: release/amd64 usr.sbin/makefs/cd9660 In-Reply-To: <201803232056.w2NKuJr5037840@repo.freebsd.org> References: <201803232056.w2NKuJr5037840@repo.freebsd.org> X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Mar 2018 08:54:13 -0000 On Fri, 23 Mar 2018, at 21:56, Benno Rice wrote: > Author: benno > Date: Fri Mar 23 20:56:18 2018 > New Revision: 331463 > URL: https://svnweb.freebsd.org/changeset/base/331463 > > Log: > Allow makefs to properly tag UEFI El Torito boot images. Use them in > amd64 ISOs. > > UEFI booting requires an EFI System Partition (ESP). On most storage devices > this will be in a specific partition type. To allow booting from CD/ISO > filesystems, UEFI will look for an ESP in the form of a FAT filesystem image > embedded in the image. Historically FreeBSD has added one of these to its > amd64 ISO images but marked it as simply another i386 boot image. Luckily for > us most UEFI implementations are rather forgiving and work this out for us. > > This change adds the ability to mark a boot image as being a UEFI image. It > also modifies our ISO generation to use this marking for the UEFI image we > embed. > > Reported by: Thomas Schmitt > Reviewed by: emaste, imp > MFC after: 1 week > Sponsored by: iXsystems, Inc. > Differential Revision: https://reviews.freebsd.org/D14809 > > Modified: > head/release/amd64/mkisoimages.sh > head/usr.sbin/makefs/cd9660/cd9660_eltorito.c > head/usr.sbin/makefs/cd9660/cd9660_eltorito.h > > Modified: head/release/amd64/mkisoimages.sh > ============================================================================== > --- head/release/amd64/mkisoimages.sh Fri Mar 23 20:32:54 2018 (r331462) > +++ head/release/amd64/mkisoimages.sh Fri Mar 23 20:56:18 2018 (r331463) > @@ -38,7 +38,7 @@ if [ "$1" = "-b" ]; then > umount efi > rmdir efi > mdconfig -d -u $device > - bootable="-o bootimage=i386;efiboot.img -o no-emul-boot $bootable" > + bootable="-o bootimage=efi;efiboot.img -o no-emul-boot $bootable" > > shift > else > > Modified: head/usr.sbin/makefs/cd9660/cd9660_eltorito.c > ============================================================================== > --- head/usr.sbin/makefs/cd9660/cd9660_eltorito.c Fri Mar 23 20:32:54 > 2018 (r331462) > +++ head/usr.sbin/makefs/cd9660/cd9660_eltorito.c Fri Mar 23 20:56:18 > 2018 (r331463) > @@ -104,9 +104,12 @@ 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 " > - "i386, powerpc, macppc, or mac68k"); > + "efi, i386, powerpc, macppc, mac68k"); > free(temp); > free(new_image); > return 0; > @@ -338,12 +341,12 @@ cd9660_setup_boot(iso9660_disk *diskStructure, int > fir > int used_sectors; > int num_entries = 0; > int catalog_sectors; > - struct boot_catalog_entry *x86_head, *mac_head, *ppc_head, > + struct boot_catalog_entry *x86_head, *mac_head, *ppc_head, *uefi_head, > *valid_entry, *default_entry, *temp, *head, **headp, *next; > struct cd9660_boot_image *tmp_disk; > > headp = NULL; > - x86_head = mac_head = ppc_head = NULL; > + x86_head = mac_head = ppc_head = uefi_head = NULL; > > /* If there are no boot disks, don't bother building boot information */ > if (TAILQ_EMPTY(&diskStructure->boot_images)) > @@ -421,6 +424,9 @@ cd9660_setup_boot(iso9660_disk *diskStructure, int fir > break; > case ET_SYS_MAC: > headp = &mac_head; > + break; > + case ET_SYS_UEFI: > + headp = &uefi_head; > break; > default: > warnx("%s: internal error: unknown system type", > > Modified: head/usr.sbin/makefs/cd9660/cd9660_eltorito.h > ============================================================================== > --- head/usr.sbin/makefs/cd9660/cd9660_eltorito.h Fri Mar 23 20:32:54 > 2018 (r331462) > +++ head/usr.sbin/makefs/cd9660/cd9660_eltorito.h Fri Mar 23 20:56:18 > 2018 (r331463) > @@ -44,6 +44,7 @@ > #define ET_SYS_X86 0 > #define ET_SYS_PPC 1 > #define ET_SYS_MAC 2 > +#define ET_SYS_UEFI 0xef > > #define ET_BOOT_ENTRY_SIZE 0x20 > > _______________________________________________ > svn-src-head@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/svn-src-head > To unsubscribe, send any mail to "svn-src-head-unsubscribe@freebsd.org" Hi Benno, This breaks `make -DNOPORTS -s memstick ftp cdrom` for me. Rolling back to r331462 is the last working commit. This is the failure I see: 819200 bytes transferred in 0.007027 secs (116577317 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/md0: 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 ] [-t fs-type] image-file directory | manifest [extra-directory ...] cd9660 specific options: l, isolevel ISO Level ... for completeness, this is my build script: #!/bin/sh -ex date -u +%Y%m%d-%H%M sudo kldload filemon || /usr/bin/true echo 'WITH_CCACHE_BUILD=yes' > /etc/src.conf echo 'WITH_META_MODE=yes' > /etc/src-env.conf NCPU=$(sysctl -n hw.ncpu) cd /usr/src sudo zfs rollback -rRf embiggen/usr/obj/release@empty git reset --hard git clean -fdx sudo zfs snapshot \ -r envy/usr/src@$(date -u +%Y%m%d-%H%M:bebuild-$(git rev-parse --verify --short=7 HEAD)) \ || /usr/bin/true time make -j${NCPU} buildworld -s echo DONE BW date -u +%Y%m%d-%H%M time make -j${NCPU} buildkernel -s echo DONE BK date -u +%Y%m%d-%H%M sudo time /usr/bin/env NO_PKG_UPGRADE=1 /usr/src/tools/build/beinstall.sh sudo zfs set canmount=noauto \ envy/ROOT/$(beadm list -H | egrep '\bN*R\b' | cut -f 1) echo DONE BE date -u +%Y%m%d-%H%M cd /usr/src/release time make -DNOPORTS -s memstick ftp cdrom echo DONE IMG echo y| poudriere jail -d -j current_amd64 poudriere jail -c -j current_amd64 -v 12.0-CURRENT -a amd64 -m \ tar=/usr/obj/usr/src/amd64.amd64/release/base.txz echo DONE POUDRIERE date -u +%Y%m%d-%H%M echo DONE ALL