Date: Sun, 19 Apr 2015 16:18:31 -0600 From: Ian Lepore <ian@freebsd.org> To: Waitman Gobble <gobble.wa@gmail.com> Cc: Tim Kientzle <tim@kientzle.com>, freebsd-arm@freebsd.org Subject: Re: crochet build fails at ubldr Wandboard-Dual Message-ID: <1429481911.1182.95.camel@freebsd.org> In-Reply-To: <CAFuo_fx-uqfThQhutvZugAK16HjY2sxtegRcGydkLu0Si_h6uQ@mail.gmail.com> References: <CAFuo_fy5tPjQDbtuSwcBEt4UMuu2tv8zRLLwBrpZPUGcyEMKEA@mail.gmail.com> <CAFuo_fx6Ztb2Rn8dPmZ3HBJniChvkZX54qmF_oaA87LJeHCFFQ@mail.gmail.com> <1429456908.1182.82.camel@freebsd.org> <CAFuo_fzHtCF6F%2B%2BUGqSdhzvbkTjxRtoT8sXFKV%2BCr4UpsGmymQ@mail.gmail.com> <1429458041.1182.86.camel@freebsd.org> <1CA4192E-F6B5-4BD8-8BF8-8F725E1EC7BA@kientzle.com> <CAFuo_fx-uqfThQhutvZugAK16HjY2sxtegRcGydkLu0Si_h6uQ@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, 2015-04-19 at 14:57 -0700, Waitman Gobble wrote: > Waitman Gobble > Los Altos, California USA > 510 830 7975 > On Apr 19, 2015 1:26 PM, "Tim Kientzle" <tim@kientzle.com> wrote: > > > > > > >>> > > >>> Somebody reported this on IRC yesterday as well, but I can't repr= oduce > > >>> it here. I don't use crochet, so it must be doing something a bi= t > > >>> different to end up with the lib from /usr instead of the local o= ne in > > >>> objdir. There should be no need to set LIBSTAND externally. > > >>> > > >> > > >> Thanks for the reply. Unfortunately I missed the discussion on IRC= . > > >> > > >> I suppose I'll have to backtrack through and find out where it > > >> _should_ be set to solve the problem. (?) For now, the workaround = gets > > >> the build to finish. > > >> > > > > > > It shouldn't be set anywhere, it should just work. That's kind of = my > > > point... my build process is just the standard "make buildworld > > > TARGET_ARCH=3Darmv6hf UBDLR_ADDR=3D<whatever>" and it just works. = I don't > > > know what crochet is doing differently (and you only included a fra= gment > > > of the build log that didn't include the command used to start the > > > build). > > > > > > > > > Crochet does use the standard build machinery; the only significant > difference is that it builds ubldr separately after a successful > buildworld. Building ubldr separately allows it to reuse the buildworl= d > results when building for multiple boards with the same TARGET_ARCH but > varying UBLDR_LOADADDR. > > > > The detailed logic is in lib/freebsd.sh, I=FFve pasted it below (with= a few > variables substituted in and some error checking removed to clarify): > > > > cd ${FREEBSD_SRC} > > ubldr_makefiles=3D${FREEBSD_SRC}/share/mk > > buildenv=3D`make TARGET_ARCH=3D$TARGET_ARCH buildenvvars` > > > > cd ${FREEBSD_SRC}/sys/boot > > eval $buildenv make UBLDR_LOADADDR=3D0x11000000 -m $ubldr_makefil= es obj > > eval $buildenv make UBLDR_LOADADDR=3D0x11000000 -m $ubldr_makefil= es > clean > > eval $buildenv make UBLDR_LOADADDR=3D0x11000000 -m $ubldr_makefil= es > depend > > eval $buildenv make UBLDR_LOADADDR=3D0x11000000 -m $ubldr_makefil= es all > > > > cd arm/uboot > > eval $buildenv make UBLDR_LOADADDR=3D0x11000000 DESTDIR=3D${UBLDR= _DIR}/ > BINDIR=3Dboot NO_MAN=3Dtrue -m $ubldr_makefiles install > > > > The last bit here is just a way to get the FreeBSD makefiles to copy = the > built executable to a known location (otherwise, Crochet has to reprodu= ce > the FreeBSD build system logic for determining which objdir layout to u= se). > > > > Cheers, > > > > Tim > > >=20 > Thanks, >=20 > So maybe its truly a documentation issue since everyone is convinced > crochet is correct. I didnt see that mentioned in the docs. >=20 > Waitman I'm not in at all convinced that crochet is correct. It used to work and now it doesn't, but maybe it used to work by accident and some recent change has made that accident less fortunate. The technique Tim mentions above of using "eval $buildenv" strikes me as fragile at best. It might be a bit better if eval were replaced with env. To be really robust it should probably be something like "make buildworld installworld SUBDDIR_OVERRIDE=3Dsys/boot TARGET_ARCH=3Dwhatever UBLDR_LOADADDR=3Dwhatever DESTDIR=3Dwhatever" -- Ian
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1429481911.1182.95.camel>