From owner-freebsd-arm@FreeBSD.ORG Sun Apr 19 23:50:01 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 C0993406; Sun, 19 Apr 2015 23:50:01 +0000 (UTC) Received: from ipmail05.adl6.internode.on.net (ipmail05.adl6.internode.on.net [150.101.137.143]) by mx1.freebsd.org (Postfix) with ESMTP id 26453F28; Sun, 19 Apr 2015 23:50:00 +0000 (UTC) Received: from ppp118-210-222-10.lns20.adl6.internode.on.net (HELO midget.dons.net.au) ([118.210.222.10]) by ipmail05.adl6.internode.on.net with ESMTP; 20 Apr 2015 09:14:45 +0930 Received: from [10.0.2.26] ([10.0.2.26]) (authenticated bits=0) by midget.dons.net.au (8.15.1/8.14.9) with ESMTPSA id t3JNiZAD020433 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 20 Apr 2015 09:14:43 +0930 (CST) (envelope-from darius@dons.net.au) Subject: Re: crochet build fails at ubldr Wandboard-Dual Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2098\)) Content-Type: text/plain; charset=utf-8 From: "O'Connor, Daniel" In-Reply-To: <32B72D5A-742C-4B58-AD65-EA33B306D30C@kientzle.com> Date: Mon, 20 Apr 2015 09:14:35 +0930 Cc: Waitman Gobble , freebsd-arm , Ian Lepore Content-Transfer-Encoding: quoted-printable Message-Id: References: <1429456908.1182.82.camel@freebsd.org> <1429458041.1182.86.camel@freebsd.org> <1CA4192E-F6B5-4BD8-8BF8-8F725E1EC7BA@kientzle.com> <32B72D5A-742C-4B58-AD65-EA33B306D30C@kientzle.com> To: Tim Kientzle X-Mailer: Apple Mail (2.2098) X-Spam-Score: -2.899 () ALL_TRUSTED,BAYES_00,URIBL_BLOCKED X-Scanned-By: MIMEDefang 2.75 on 10.0.2.1 X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Apr 2015 23:50:01 -0000 > On 20 Apr 2015, at 08:41, Tim Kientzle wrote: >>>=20 >>> Crochet does use the standard build machinery; the only significant = difference is that it builds ubldr separately after a successful = buildworld. ... >>=20 >> So maybe its truly a documentation issue since everyone is convinced = crochet is correct. I didnt see that mentioned in the docs. >>=20 > You=E2=80=99ve certainly encountered a problem but I don=E2=80=99t yet = have enough information to say anything more. Certainly, Ian is right = that you should not have to set LIBSTAND to make this work. >=20 > Unfortunately, it will be at least a few days before I have a chance = to try reproducing what you=E2=80=99re seeing. If you can reproduce it = consistently, please let me know; I could work up some patches based on = Ian=E2=80=99s suggestions and you could try them to see if they change = anything. >=20 > Another things to try: blow away Crochet=E2=80=99s work directory = before you next rebuild. In particular, that will ensure that your = world build and ubldr build are consistent with each other. I had this issue also and worked around it by modifying the loader = Makefiles to set LIBSTAND. diff --git a/sys/boot/arm/uboot/Makefile b/sys/boot/arm/uboot/Makefile index e0ea828..cbd173e 100644 --- a/sys/boot/arm/uboot/Makefile +++ b/sys/boot/arm/uboot/Makefile @@ -113,6 +113,8 @@ CFLAGS+=3D -I${.CURDIR}/../../../../lib/libstand/ # clang doesn't understand %D as a specifier to printf NO_WERROR.clang=3D +LIBSTAND=3D ${.OBJDIR}/../../../../lib/libstand/libstand.a + DPADD=3D ${LIBFICL} ${LIBUBOOT} ${LIBFDT} ${LIBUBOOT_FDT} = ${LIBSTAND} LDADD=3D ${LIBFICL} ${LIBUBOOT} ${LIBFDT} ${LIBUBOOT_FDT} = -lstand diff --git a/sys/boot/efi/loader/Makefile b/sys/boot/efi/loader/Makefile index 5585f78..55b8673 100644 --- a/sys/boot/efi/loader/Makefile +++ b/sys/boot/efi/loader/Makefile @@ -29,6 +29,8 @@ SRCS=3D autoload.c \ .PATH: ${.CURDIR}/../../i386/libi386 .include "${.CURDIR}/arch/${MACHINE}/Makefile.inc" +LIBSTAND=3D ${.OBJDIR}/../../../../lib/libstand/libstand.a + CFLAGS+=3D -I${.CURDIR} CFLAGS+=3D -I${.CURDIR}/arch/${MACHINE} CFLAGS+=3D -I${.CURDIR}/../include I did it that way because I noticed some other loader Makfiles set = LIBSTAND so I assumed it was removed incorrectly from the arm and uefi = ones. I nuked the work directory with no effect. Crochet used the following command to build -=20 sudo env MAKEOBJDIRPREFIX=3D/src/arm/crochet/work/obj/arm.armv6 = MACHINE_ARCH=3Darmv6 MACHINE=3Darm CPUTYPE=3D = GROFF_BIN_PATH=3D/src/arm/crochet/work/obj/arm.armv6/src/FreeBSD-HEAD/tmp/= legacy/usr/bin = GROFF_FONT_PATH=3D/src/arm/crochet/work/obj/arm.armv6/src/FreeBSD-HEAD/tmp= /legacy/usr/share/groff_font = GROFF_TMAC_PATH=3D/src/arm/crochet/work/obj/arm.armv6/src/FreeBSD-HEAD/tmp= /legacy/usr/share/tmac = _SHLIBDIRPREFIX=3D/src/arm/crochet/work/obj/arm.armv6/src/FreeBSD-HEAD/tmp= _LDSCRIPTROOT=3D VERSION=3D"FreeBSD 11.0-CURRENT armv6 1100069" = INSTALL=3D"sh /src/FreeBSD-HEAD/tools/install.sh" = PATH=3D/src/arm/crochet/work/obj/arm.armv6/src/FreeBSD-HEAD/tmp/legacy/usr= /sbin:/src/arm/crochet/work/obj/arm.armv6/src/FreeBSD-HEAD/tmp/legacy/usr/= bin:/src/arm/crochet/work/obj/arm.armv6/src/FreeBSD-HEAD/tmp/legacy/bin:/s= rc/arm/crochet/work/obj/arm.armv6/src/FreeBSD-HEAD/tmp/usr/sbin:/src/arm/c= rochet/work/obj/arm.armv6/src/FreeBSD-HEAD/tmp/usr/bin:/sbin:/bin:/usr/sbi= n:/usr/bin CC=3D"cc " CXX=3D"c++ " DEPFLAGS=3D"" CPP=3D"cpp " AS=3D"as" = AR=3D"ar" LD=3D"ld" NM=3Dnm OBJDUMP=3Dobjdump OBJCOPY=3D"objcopy" = RANLIB=3Dranlib STRINGS=3D SIZE=3D"size" make UBLDR_LOADADDR=3D0x88000000 = -m /src/FreeBSD-HEAD/share/mk all=20 Adding = LIBSTAND=3D/src/arm/crochet/work/obj/arm.armv6/src/FreeBSD-HEAD/lib/libsta= nd/libstand.a made it work, so I then modified the makefiles. (I was the person who reported it on IRC :) -- Daniel O'Connor "The nice thing about standards is that there are so many of them to choose from." -- Andrew Tanenbaum GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C