From owner-freebsd-arm@FreeBSD.ORG Thu Oct 9 17:31:36 2014 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9238F6DA for ; Thu, 9 Oct 2014 17:31:36 +0000 (UTC) Received: from nibbler.fubar.geek.nz (nibbler.fubar.geek.nz [199.48.134.198]) by mx1.freebsd.org (Postfix) with ESMTP id 76BD1F70 for ; Thu, 9 Oct 2014 17:31:36 +0000 (UTC) Received: from bender.lan (97e07ab1.skybroadband.com [151.224.122.177]) by nibbler.fubar.geek.nz (Postfix) with ESMTPSA id 8655A5C0B9; Thu, 9 Oct 2014 17:31:28 +0000 (UTC) Date: Thu, 9 Oct 2014 18:31:20 +0100 From: Andrew Turner To: Jaemin Yoo Subject: Re: Q: looking up 'kernel' on loader.efi of arm64 Message-ID: <20141009183120.73ff549d@bender.lan> In-Reply-To: <5436BD08.20403@gmail.com> References: <5436BD08.20403@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: freebsd-arm@freebsd.org X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Oct 2014 17:31:36 -0000 On Fri, 10 Oct 2014 01:51:20 +0900 Jaemin Yoo wrote: > > Thanks for the help from Andrew. I could execute loader.efi for arm64 > from efi loader of my board(x-gene). Now the problem is loader can't > find 'kernel'. > > loader.efi is located at part1 disk. The disk is usb removable one and > formatted as fat32 since x-gene efi loader requires it. > > I have some questions... > > 1) What's the scheme for looking up 'kernel' from loader.efi? > 2) Is there any restriction for looking up 'kernel'? loader.efi should try to read the fat filesystem. The problem is I've only enabled the simpefs as it is all I've had to test. You can enable FAT by uncommenting the dosfs_fsops entry in sys/boot/arm64/efi/conf.c and rebuilding. For the full kernel to work you will also need to provide a dtb. Currently it tries to load /foundation.dtb. I'm planning on fixing this, however until recently the copy of UEFI I have been using didn't support passing the dtb to the loader. You should be able to skip loading the dtb to begin with to check if you can start executing the kernel. Andrew