From owner-freebsd-arm@FreeBSD.ORG Tue Mar 24 17:51:06 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 B3F66A36 for ; Tue, 24 Mar 2015 17:51:06 +0000 (UTC) Received: from relay.mailchannels.net (tkt-001-i372.relay.mailchannels.net [174.136.5.173]) by mx1.freebsd.org (Postfix) with ESMTP id D8B1CC7F for ; Tue, 24 Mar 2015 17:51:04 +0000 (UTC) X-Sender-Id: duocircle|x-authuser|hippie Received: from smtp5.ore.mailhop.org (ip-10-213-14-133.us-west-2.compute.internal [10.213.14.133]) by relay.mailchannels.net (Postfix) with ESMTPA id B4020101B06; Tue, 24 Mar 2015 17:45:29 +0000 (UTC) X-Sender-Id: duocircle|x-authuser|hippie Received: from smtp5.ore.mailhop.org (smtp5.ore.mailhop.org [10.83.15.107]) (using TLSv1 with cipher DHE-RSA-AES256-SHA) by 0.0.0.0:2500 (trex/5.4.8); Tue, 24 Mar 2015 17:45:30 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: duocircle|x-authuser|hippie X-MailChannels-Auth-Id: duocircle X-MC-Loop-Signature: 1427219129846:305448101 X-MC-Ingress-Time: 1427219129845 Received: from c-73-34-117-227.hsd1.co.comcast.net ([73.34.117.227] helo=ilsoft.org) by smtp5.ore.mailhop.org with esmtpsa (TLSv1.2:DHE-RSA-AES256-GCM-SHA384:256) (Exim 4.82) (envelope-from ) id 1YaRCY-0001Z6-3x; Tue, 24 Mar 2015 15:57:10 +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 t2OFunIg042233; Tue, 24 Mar 2015 09:56:49 -0600 (MDT) (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: U2FsdGVkX19frR3LPstBuX9PiKweEw9F Message-ID: <1427212609.5591.10.camel@freebsd.org> Subject: Re: Digi-CCWMX53 - u-boot From: Ian Lepore To: Russell Haley Date: Tue, 24 Mar 2015 09:56:49 -0600 In-Reply-To: References: <622469F8-C245-4E84-B5E1-FE360D3C9B4C@me.com> <215C10E1-9F47-46B6-A60B-430D7DEDA090@me.com> Content-Type: multipart/mixed; boundary="=-vL65/0kiueeSHcpPsgBo" X-Mailer: Evolution 3.12.10 FreeBSD GNOME Team Port Mime-Version: 1.0 X-AuthUser: hippie Cc: freebsd-arm 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, 24 Mar 2015 17:51:06 -0000 --=-vL65/0kiueeSHcpPsgBo Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit On Mon, 2015-03-23 at 22:34 -0700, Russell Haley wrote: > Okay, I'll create a 10 jail and see what happens. Last straw is to try > this in Linux? I'm working on a make tutorial right now. > > Good doggy Russell, good doggy. > > ha ha. > Try the attached new port I just threw together for building u-boot for this board. I have a different imx53 board so I haven't run-tested this, but it builds for me on my x86 10-stable machine. Unfortunately, this is the oldest u-boot source I've ever tried to work with and most of the "standard freebsd u-boot patches" won't apply, so this is pretty much exactly what comes from Rui's github branch. (I was able to use the latest u-boot from denx for my imx53 board, but apparently Digi never contributed their changes back to denx so this ancient version is the only option right now.) To use this diff, cd to your /usr/ports dir and apply the diff using: patch -p0 Property changes on: sysutils/u-boot-ccwmx53/Makefile ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: sysutils/u-boot-ccwmx53/distinfo =================================================================== --- sysutils/u-boot-ccwmx53/distinfo (revision 0) +++ sysutils/u-boot-ccwmx53/distinfo (working copy) @@ -0,0 +1,2 @@ +SHA256 (u-boot-2013.08-ccwmx53.tar.gz) = b38d9676ac539199c2e92cff75525f593b4f1c9beeacfa5d03b2133716f08cb5 +SIZE (u-boot-2013.08-ccwmx53.tar.gz) = 12640869 Property changes on: sysutils/u-boot-ccwmx53/distinfo ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: sysutils/u-boot-ccwmx53/files/patch-api_api__storage.c =================================================================== --- sysutils/u-boot-ccwmx53/files/patch-api_api__storage.c (revision 0) +++ sysutils/u-boot-ccwmx53/files/patch-api_api__storage.c (working copy) @@ -0,0 +1,28 @@ +--- api/api_storage.c.orig 2015-01-12 14:39:08 UTC ++++ api/api_storage.c +@@ -107,10 +107,13 @@ static int dev_stor_get(int type, int fi + + if (first) { + di->cookie = (void *)get_dev(specs[type].name, 0); +- if (di->cookie == NULL) ++ if (di->cookie == NULL) { + return 0; +- else ++ } else { + found = 1; ++ if (specs[type].max_dev > 1) ++ *more = 1; ++ } + + } else { + for (i = 0; i < specs[type].max_dev; i++) +@@ -146,7 +149,8 @@ static int dev_stor_get(int type, int fi + dd = (block_dev_desc_t *)di->cookie; + if (dd->type == DEV_TYPE_UNKNOWN) { + debugf("device instance exists, but is not active.."); +- found = 0; ++ di->di_stor.block_count = 0; ++ di->di_stor.block_size = 0; + } else { + di->di_stor.block_count = dd->lba; + di->di_stor.block_size = dd->blksz; Property changes on: sysutils/u-boot-ccwmx53/files/patch-api_api__storage.c ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: sysutils/u-boot-ccwmx53/files/patch-common_cmd__elf.c =================================================================== --- sysutils/u-boot-ccwmx53/files/patch-common_cmd__elf.c (revision 0) +++ sysutils/u-boot-ccwmx53/files/patch-common_cmd__elf.c (working copy) @@ -0,0 +1,30 @@ +--- common/cmd_elf.c.orig 2013-08-22 11:38:09.000000000 -0600 ++++ common/cmd_elf.c 2015-03-24 08:54:01.000000000 -0600 +@@ -34,21 +34,12 @@ unsigned long do_bootelf_exec (ulong (*e + unsigned long ret; + + /* +- * QNX images require the data cache is disabled. +- * Data cache is already flushed, so just turn it off. +- */ +- int dcache = dcache_status (); +- if (dcache) +- dcache_disable (); +- +- /* +- * pass address parameter as argv[0] (aka command name), +- * and all remaining args +- */ +- ret = entry (argc, argv); +- +- if (dcache) +- dcache_enable (); ++ * FreeBSD wants the caches enabled while ubldr runs, and as of r276397 ++ * the kernel can tolerate being entered with internal (but not external ++ * PL310) caches enabled on armv6/7 systems. So don't disable caches ++ * here, just launch the program directly. ++ */ ++ ret = entry(argc, argv); + + return ret; + } Property changes on: sysutils/u-boot-ccwmx53/files/patch-common_cmd__elf.c ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: sysutils/u-boot-ccwmx53/files/patch-config.mk =================================================================== --- sysutils/u-boot-ccwmx53/files/patch-config.mk (revision 0) +++ sysutils/u-boot-ccwmx53/files/patch-config.mk (working copy) @@ -0,0 +1,11 @@ +--- config.mk.orig 2014-08-14 14:51:10 UTC ++++ config.mk +@@ -92,7 +92,7 @@ HOSTCC = $(call os_x_before, 10, 5, "c + HOSTCFLAGS += $(call os_x_before, 10, 4, "-traditional-cpp") + HOSTLDFLAGS += $(call os_x_before, 10, 5, "-multiply_defined suppress") + else +-HOSTCC = gcc ++HOSTCC ?= gcc + endif + + ifeq ($(HOSTOS),cygwin) Property changes on: sysutils/u-boot-ccwmx53/files/patch-config.mk ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: sysutils/u-boot-ccwmx53/pkg-descr =================================================================== --- sysutils/u-boot-ccwmx53/pkg-descr (revision 0) +++ sysutils/u-boot-ccwmx53/pkg-descr (working copy) @@ -0,0 +1,10 @@ +U-Boot loader for Digi ConnectCore Wi-i.MX53 + +Install the u-boot.bin file onto the boot disk using: + + dd if=u-boot.bin of=/dev/whatever bs=1k oseek=1 conv=sync + +This version is patched so that: + * ELF and API features are enabled to support ubldr. + +For general information about U-Boot see WWW: http://www.denx.de/wiki/U-Boot Property changes on: sysutils/u-boot-ccwmx53/pkg-descr ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property --=-vL65/0kiueeSHcpPsgBo--