From owner-freebsd-uboot@freebsd.org Mon Oct 8 20:05:02 2018 Return-Path: Delivered-To: freebsd-uboot@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5773110CA20F for ; Mon, 8 Oct 2018 20:05:02 +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 C34407B449 for ; Mon, 8 Oct 2018 20:05:01 +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; Mon, 08 Oct 2018 21:59:48 +0200 id 00DB9423.5BBBB734.0000A42B Date: Mon, 8 Oct 2018 21:59:48 +0200 From: Milan Obuch To: freebsd-uboot@freebsd.org Subject: u-boot for Seco SBC-A62 board Message-ID: <20181008215948.1460f3f9@zeta.dino.sk> X-Mailer: Claws Mail 3.16.0 (GTK+ 2.24.32; i386-portbld-freebsd10.4) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-uboot@freebsd.org X-Mailman-Version: 2.1.27 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: Mon, 08 Oct 2018 20:05:02 -0000 Hi, I am trying to run FreeBSD on this board, some info see at http://www.seco.com/prods/eu/sbc-a62-j.html and http://wikitech.seco.com/index.php/SBC-A62-J pages. I googled for u-boot for this board, found some discussion at http://www.udoo.org/forum/threads/u-boot-v2016-1-for-seco-sbc-a62.3534 and reference to https://github.com/graugans/u-boot-seco - not much. After some looking into it and tries I created port, actually copied u-boot-orangepi2, which is itself my older attempt I forgot how it was done, and changed Makefile to <--------------------------------------------------------------------> # $FreeBSD $ PORTNAME= u-boot PORTVERSION= 2013.01 CATEGORIES= sysutils PKGNAMESUFFIX?= -secosbca62 MAINTAINER= ian@FreeBSD.org COMMENT= Cross-build U-Boot loader for Seco SBC A62 LICENSE= GPLv2 CROSS_GCC= arm-none-eabi-gcc-4.9.2 BUILD_DEPENDS= ${CROSS_GCC}:devel/arm-none-eabi-gcc492 USE_GITHUB= yes GH_ACCOUNT= graugans GH_PROJECT= u-boot-seco GH_TAGNAME= 654be7a MODEL?= SecoSBCA62 CONF_TARGET?= secomx6sbca62_defconfig NO_ARCH= yes USES= gmake tar:bzip2 SSP_UNSAFE= yes # cross-LD does not support -fstack-protector U_BOOT_DIR= share/u-boot/${PORTNAME}${PKGNAMESUFFIX} PLIST_FILES= ${U_BOOT_DIR}/SPL \ ${U_BOOT_DIR}/u-boot.bin \ ${U_BOOT_DIR}/README MAKE_ARGS+= ARCH=arm \ CC=${CROSS_GCC} \ CROSS_COMPILE=arm-none-eabi- \ HOSTCC=cc do-configure: (cd ${WRKSRC}; ${GMAKE} ${MAKE_ARGS} ${CONF_TARGET}) do-install: ${MKDIR} ${STAGEDIR}/${PREFIX}/${U_BOOT_DIR} ${CP} ${WRKSRC}/SPL ${STAGEDIR}/${PREFIX}/${U_BOOT_DIR} ${CP} ${WRKSRC}/u-boot.bin ${STAGEDIR}/${PREFIX}/${U_BOOT_DIR} ${CP} ${.CURDIR}/pkg-descr ${STAGEDIR}/${PREFIX}/${U_BOOT_DIR}/README .include <--------------------------------------------------------------------> I know it is not well written, but kind of miracle happened - it builds and produces kind of result. Installation phase is not yet complete, but it ends with three files in /usr/local/share/u-boot/u-boot-secosbca62 directory. As I found for other i.MX6 board u-boot image should be written leaving first 1 KB alone, I put SPL combined with u-boot.bin onto uSD card with command dd if=u-boot.imx of=/dev/da0 bs=1k oseek=1 conv=sync Putting this uSD into board and starting throws following lines via serial console on me: U-Boot SPL 2016.01 (Oct 08 2018 - 20:09:08) Trying to boot from MMC bad magic SPL: failed to boot from all boot devices ### ERROR ### Please RESET the board ### which is not what I want, but it means I need some kind of make image operation to combine SPL, u-boot.bin and some envelope with checksum... this error message comes from SPL, at least the text given is found in strings SPL | grep SPL command output. So could someone help me to overcome this problem? I know I did not use official, mainline u-boot sources, but secomx6sbca62_defconfig config file is not present there as far as i could see, so most probably some bits for this board are missing there as well, I expect SPL would suffer from this. Regards, Milan