From owner-freebsd-hackers@freebsd.org Fri Sep 21 18:28:22 2018 Return-Path: Delivered-To: freebsd-hackers@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 B5F7A10A0845 for ; Fri, 21 Sep 2018 18:28:22 +0000 (UTC) (envelope-from wojtek@puchar.net) Received: from puchar.net (puchar.net [194.1.144.90]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "puchar.net", Issuer "puchar.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 382E18ACA3 for ; Fri, 21 Sep 2018 18:28:22 +0000 (UTC) (envelope-from wojtek@puchar.net) Received: Received: from 127.0.0.1 (localhost [127.0.0.1]) by puchar.net (8.15.2/8.15.2) with ESMTPS id w8LIS4AA055489 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Fri, 21 Sep 2018 20:28:04 +0200 (CEST) (envelope-from puchar-wojtek@puchar.net) Received: from localhost (puchar-wojtek@localhost) by puchar.net (8.15.2/8.15.2/Submit) with ESMTP id w8LIRx2s055486 for ; Fri, 21 Sep 2018 20:27:59 +0200 (CEST) (envelope-from puchar-wojtek@puchar.net) Date: Fri, 21 Sep 2018 20:27:59 +0200 (CEST) From: Wojciech Puchar To: freebsd-hackers@freebsd.org Subject: attempt to make UEFI bootable pendrive Message-ID: User-Agent: Alpine 2.20 (BSF 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset=US-ASCII X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Sep 2018 18:28:22 -0000 i've made pendrive with GPT as for UEFI boot gpart da0 shows => 40 30998448 da0 GPT (15G) 40 1600 1 efi (800K) 1640 24 - free - (12K) 1664 30996800 2 freebsd-ufs (15G) 30998464 24 - free - (12K) efi partition filled from /boot/boot1.efifat, partition 2 with FreeBSD installed, /boot populated etc. all done as per https://wiki.freebsd.org/UEFI tried with qemu as in this tutorial the result is as follows: >> FreeBSD EFI boot block Loader path: /boot/loader.efi Initializing modules: ZFS UFS Load Path: \EFI\BOOT\BOOTX64.EFI Load Device: PciRoot(0x0)/Pci(0x1,0x1)/Ata(0x0)/HD(1,GPT,2C0157FF-BDC7-11E8-A22C-3C52820D28A6,0x28,0x640) BootCurrent: 0004 BootOrder: 0000 0001 0002 0003 0004[*] 0005 0006 0007 Probing 6 block devices......*.. done ZFS found no pools UFS found 1 partition Failed to start image provided by UFS (9) !!!! X64 Exception Type - 0E(#PF - Page-Fault) CPU Apic ID - 00000000 !!!! ExceptionData - 0000000000000000 I:0 R:0 U:0 W:0 P:0 PK:0 S:0 RIP - 0000000007F16F6F, CS - 0000000000000038, RFLAGS - 0000000000000202 RAX - 0000000000000001, RCX - 0000000000000010, RDX - 0000000007F0A75C RBX - 000000000000000E, RSP - 0000000007F0A690, RBP - 0000000007F0A75C RSI - 0000000007F0A75C, RDI - 000000000000000E R8 - 0000000000000000, R9 - 00000000068A7270, R10 - 000000008010E640 R11 - 0000000000000000, R12 - 00000000068AF420, R13 - 0000000000000001 R14 - 0000000007F0A75C, R15 - 0000000000000000 DS - 0000000000000030, ES - 0000000000000030, FS - 0000000000000030 GS - 0000000000000030, SS - 0000000000000030 CR0 - 0000000080010033, CR2 - FFFFFFFFFFFFFFF6, CR3 - 0000000007C01000 CR4 - 0000000000000668, CR8 - 0000000000000000 DR0 - 0000000000000000, DR1 - 0000000000000000, DR2 - 0000000000000000 DR3 - 0000000000000000, DR6 - 00000000FFFF0FF0, DR7 - 0000000000000400 GDTR - 0000000007BEEA98 0000000000000047, LDTR - 0000000000000000 IDTR - 00000000072BF018 0000000000000FFF, TR - 0000000000000000 FXSAVE_STATE - 0000000007F0A2F0 !!!! Find image based on IP(0x7F16F6F) /home/jenkins/workspace/edk2/rpms/build/edk2-g4423f0bc61/Build/OvmfX64/DEBUG_GCC5/X64/MdeModulePk what i am doing wrong?