From owner-freebsd-uboot@freebsd.org Thu Jan 9 10:54:07 2020 Return-Path: Delivered-To: freebsd-uboot@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 552BB1E98B0 for ; Thu, 9 Jan 2020 10:54:07 +0000 (UTC) (envelope-from freebsd-uboot@dino.sk) Received: from mailhost.netlabit.sk (mailhost.netlabit.sk [84.245.65.72]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 47tjfP5ySkz3xnC for ; Thu, 9 Jan 2020 10:54:05 +0000 (UTC) (envelope-from freebsd-uboot@dino.sk) Received: from zeta.dino.sk (fw3.dino.sk [84.245.95.254]) (AUTH: LOGIN milan) by mailhost.netlabit.sk with ESMTPA; Thu, 09 Jan 2020 11:54:02 +0100 id 00E54836.5E17064A.00010C2B Date: Thu, 9 Jan 2020 11:54:02 +0100 From: Milan Obuch To: Emmanuel Vadot Cc: freebsd-uboot@freebsd.org Subject: Re: u-boot for Zynq Zybo-Z7 board Message-ID: <20200109115249.234ae93f@zeta.dino.sk> In-Reply-To: <20190722195039.c0ab5b4d756791115a9093c0@bidouilliste.com> References: <20190722143005.152779f3@zeta.dino.sk> <20190722174807.eb64f11514b20808ee6b4ca3@bidouilliste.com> <20190722193411.350ad34e@zeta.dino.sk> <20190722195039.c0ab5b4d756791115a9093c0@bidouilliste.com> X-Mailer: Claws Mail 3.17.4 (GTK+ 2.24.32; i386-portbld-freebsd11.3) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 47tjfP5ySkz3xnC X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of freebsd-uboot@dino.sk designates 84.245.65.72 as permitted sender) smtp.mailfrom=freebsd-uboot@dino.sk X-Spamd-Result: default: False [-4.98 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+mx]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; RCVD_TLS_LAST(0.00)[]; DMARC_NA(0.00)[dino.sk]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; RCVD_IN_DNSWL_NONE(0.00)[72.65.245.84.list.dnswl.org : 127.0.10.0]; IP_SCORE(-2.68)[ip: (-7.96), ipnet: 84.245.64.0/18(-3.98), asn: 16160(-1.53), country: SK(0.09)]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:16160, ipnet:84.245.64.0/18, country:SK]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: freebsd-uboot@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussions about the use of uboot with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Jan 2020 10:54:07 -0000 On Mon, 22 Jul 2019 19:50:39 +0200 Emmanuel Vadot wrote: > On Mon, 22 Jul 2019 19:34:11 +0200 > Milan Obuch wrote: > > > On Mon, 22 Jul 2019 17:48:07 +0200 > > Emmanuel Vadot wrote: > > > > > On Mon, 22 Jul 2019 14:30:05 +0200 > > > Milan Obuch wrote: > > > > > > > Hi, > > > > > > > > as there is support for older version, Zybo, it should be > > > > possible to run FreeBSD on newer board too. We have a port > > > > sysutils/u-boot-zybo for it, but it does not run correctly on > > > > newer board, so I copied this port and modified Makefile to > > > > contain > > > > > > > > MASTERDIR= ${.CURDIR}/../u-boot-master > > > > > > > > MODEL= zybo-z7 > > > > BOARD_CONFIG= zynq_zybo_z7_defconfig > > > > FAMILY= zynq_7000 > > > > > > > > UBOOT_VERSION= 2019.01 > > > > > > > > .include "${MASTERDIR}/Makefile" [ snip ] > > > I would prefer that we fix the u-boot port using 2019.07 > > > I've never looked to what was the problem but if you have a board > > > could you test building after applying this patch to the u-boot > > > source tree : > > > > > > diff --git a/scripts/Makefile.spl b/scripts/Makefile.spl > > > index 7af6b120b6..34e74506e3 100644 > > > --- a/scripts/Makefile.spl > > > +++ b/scripts/Makefile.spl > > > @@ -200,7 +200,7 @@ MKIMAGEFLAGS_boot.bin = -T zynqmpimage -R $ > > > (srctree)/$(CONFIG_BOOT_INIT_FILE) \ endif > > > > > > $(obj)/$(SPL_BIN)-align.bin: $(obj)/$(SPL_BIN).bin > > > - @dd if=$< of=$@ conv=block,sync bs=4 2>/dev/null; > > > + @dd if=$< of=$@ conv=block,sync bs=4 cbs=4 2>/dev/null; > > > > > > spl/boot.bin: $(obj)/$(SPL_BIN)-align.bin FORCE > > > $(call if_changed,mkimage) > > > > > > It might not work at all, I have no idea what cbs means for dd > > > and failed to understand with the man page. Thomas Skibo reported working patch for this issue some time ago and I was able after some tinkering (and finding time to do it) produce working port. I verified it is possible to create working system from generic image available at ftp.freebd.org for sd (I downloaded snapshot file FreeBSD-13.0-CURRENT-arm-armv7-GENERICSD-20200102-r356261.img) simply by copying boot.bin, boot.scr, u-boot.img and uEnv.txt files to root directory of FAT partition therein. Only remaining issue is to copy zybo-z7.dtb into image, as it is not yet in out src tree (solved locally here, too). My port is OK with both u-boot version 2019.10 currently in ports and just recently released version 2020.01 - both build and run equally well. New port is just submitted, see https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=243211 Regards, Milan