From owner-freebsd-arm@FreeBSD.ORG Tue Oct 7 12:31:47 2014 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F0D4FD9C for ; Tue, 7 Oct 2014 12:31:47 +0000 (UTC) Received: from mail-pa0-x232.google.com (mail-pa0-x232.google.com [IPv6:2607:f8b0:400e:c03::232]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C622D936 for ; Tue, 7 Oct 2014 12:31:47 +0000 (UTC) Received: by mail-pa0-f50.google.com with SMTP id kx10so7206225pab.9 for ; Tue, 07 Oct 2014 05:31:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=yGhNSfP5nGPLCLUHI36JdrmVnWaWelPodYcViF43EhY=; b=LJDIVE/M69klXYjTAWUpcp2M0SOSyGGdhPvei3qahK1D7QLHrsq4LM7XMFVFwKNOyi MttnOsnb8yE7R4+hN7xIdlZUSIyoTx9v+ANYcQfQTm7kxQ+nOQp6lZz9JjavPnqYEI6K bV1pSFAYSnmHkz1FeEQvywRdB+E5l6zsZYZ7j4tMOvcN/W0K9pUl2JNfh0FR8GDGSWDF 4EREf453z94W5OBPmj1r8YgT0jZ2pFo/e0OKesMyrFlHR2zZH1izZJbDZf//GFs77CI+ s1OQ0KXRH16gnxLlGxDu4+DZBvQYSE11F0zdOMrGqSxR5ihWvQSzlhgPh59WQQ5o5+LU 7kRA== X-Received: by 10.68.132.225 with SMTP id ox1mr3410695pbb.71.1412685107406; Tue, 07 Oct 2014 05:31:47 -0700 (PDT) Received: from [172.30.1.41] ([112.168.75.52]) by mx.google.com with ESMTPSA id qs4sm15839419pbb.90.2014.10.07.05.31.45 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 07 Oct 2014 05:31:46 -0700 (PDT) Message-ID: <5433DD2E.1050807@gmail.com> Date: Tue, 07 Oct 2014 21:31:42 +0900 From: Jaemin Yoo User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.1.0 MIME-Version: 1.0 To: freebsd-arm@freebsd.org Subject: Re: Q: linking method for armv8 kernel build References: <5432A1B5.30406@gmail.com> <20141006154314.1b909772@bender.lan> In-Reply-To: <20141006154314.1b909772@bender.lan> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit 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: Tue, 07 Oct 2014 12:31:48 -0000 2014-10-06 PM 11:43, Andrew Turner wrote: > On Mon, 06 Oct 2014 23:05:41 +0900 > Jaemin Yoo wrote: > >> Hello, I just began to download and build kernel for armv8 according >> to the following howto page. (https://wiki.freebsd.org/arm64) >> >> I could create the kernel image without problem. But 'file' says >> it's dynamically linked. I expected statically linked image to load >> it on dram using uboot. >> >> Is it meant to be? or am I missing some configuration? > > All examples of the FreeBSD kernel I've looked at say they are > dynamically linked. The requirement is the kernel needs to be loaded at > a 2MiB aligned address for the VA->PA translation to work. It will > create the page table so the kernel base points to the load address. > > You may have problems loading it with U-Boot. It expects to be loaded > by the loader as it passes in the device tree. U-Boot has been found to > be difficult to support on 32-bit arm. Is there a reason to prefer it > over UEFI? > > Andrew > Thanks. I'm doing most work at linux and vmlinux is mostly(?) statically linked. So I thought same goes for freebsd too. There are some 'UND' functions in kernel but I guess it's okay if they are not used. I got a 64bit arm board which runs linux from APM. It came with binary and source codes of u-boot. So I planned to enable bootelf and load kernel on dram after adding uart driver for the board. I just want to see freebsd kernel boot on arm64 with minimal changes. Best Regards, Jaemin ps. I hope to contribute for enabling freebsd on arm64. :)