From owner-freebsd-arm@FreeBSD.ORG Sun Feb 1 17:47:44 2015 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 3D6487A0 for ; Sun, 1 Feb 2015 17:47:44 +0000 (UTC) Received: from smtp3.ore.mailhop.org (smtp3.ore.mailhop.org [54.149.88.251]) (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 1C93CEB4 for ; Sun, 1 Feb 2015 17:47:43 +0000 (UTC) Received: from [73.34.117.227] (helo=ilsoft.org) by smtp3.ore.mailhop.org with esmtpsa (TLSv1.2:DHE-RSA-AES256-GCM-SHA384:256) (Exim 4.82) (envelope-from ) id 1YHycZ-0006YA-11; Sun, 01 Feb 2015 17:47:43 +0000 Received: from revolution.hippie.lan (revolution.hippie.lan [172.22.42.240]) by ilsoft.org (8.14.9/8.14.9) with ESMTP id t11HldM8075168; Sun, 1 Feb 2015 10:47:39 -0700 (MST) (envelope-from ian@freebsd.org) X-Mail-Handler: DuoCircle Outbound SMTP X-Originating-IP: 73.34.117.227 X-Report-Abuse-To: abuse@duocircle.com (see https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information for abuse reporting information) X-MHO-User: U2FsdGVkX18gmuvbX/LR5+7egB7sOPGh Message-ID: <1422812859.15718.279.camel@freebsd.org> Subject: Re: porting for Novena and other new iMX6 boards From: Ian Lepore To: ticso@cicely.de Date: Sun, 01 Feb 2015 10:47:39 -0700 In-Reply-To: <20150128190737.GJ58886@cicely7.cicely.de> References: <20150128190737.GJ58886@cicely7.cicely.de> Content-Type: text/plain; charset="us-ascii" X-Mailer: Evolution 3.12.8 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Cc: freebsd-arm@freebsd.org, Bernd Walter 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: Sun, 01 Feb 2015 17:47:44 -0000 On Wed, 2015-01-28 at 20:07 +0100, Bernd Walter wrote: > I do own a few iMX6 boards, which are not directly supported by > FreeBSD. > My latest addition is one of those famous Novena boards. > > The filesystem on the supplied micro-SD card lists: > [57]cicely13# ls -al > total 7464 > drwxr-xr-x 1 root wheel 16384 Jan 1 1980 . > drwxr-xr-x 37 root wheel 1024 Dec 13 10:36 .. > -rwxr-xr-x 1 root wheel 39835 Nov 14 22:28 novena.dtb > -rwxr-xr-x 1 root wheel 39835 Nov 14 22:29 novena.recovery.dtb > -rwxr-xr-x 1 root wheel 304876 Nov 14 22:27 u-boot.img > -rwxr-xr-x 1 root wheel 35840 Nov 14 22:27 u-boot.spl > -rwxr-xr-x 1 root wheel 3598728 Nov 14 22:29 zImage.recovery > -rwxr-xr-x 1 root wheel 3598728 Nov 14 22:28 zimage > > I think I can handle setting up a FreeBSD kernel with the required > IO specifications as long as those definitions are compiled into > the kernel. > However I'm unsure about the whole uboot story and could use some help. > As far as I know we do need special features from that uboot to > boot a FreeBSD kernel with loader support. > For the kernel, just use the generic IMX6 kernel. There really shouldn't be any other imx6 kernel configs anymore, but I've been lax in deleting obsolete stuff. For u-boot, I'd say you should start with sysutils/u-boot-wandboard from ports. You probably need to keep all the patches in files/ except the one for include/configs/edm_cf_imx6.h. To handle config, you may need to do no more than find the right .h file for your board and cut and paste the entire bottom of the patched wandboard config file into your board's config file. That is, from the "FreeBSD customizations from here down" marker to the end. For the dts source, look first in sys/gnu/dts/arm and see if your board is already there. If it is, that's the one to use, if it's not, see if your vendor has published their dts source in github or somewhere. Oh, I just noticed you have the .dtb from the vendor, you can use that, just copy it into /boot/dtb/ in your root filesystem. The freebsd imx6 code is designed to use vendor-supplied dts assuming they stuck to the documented bindings for imx6. Given that the dtb should be named imx6q-novena.dtb, I'm afraid maybe it's not fully standard. -- Ian