Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 21 Aug 2016 14:30:20 -0700
From:      Adrian Chadd <adrian@freebsd.org>
To:        Sean Bruno <sbruno@freebsd.org>,  "freebsd-arch@freebsd.org" <freebsd-arch@freebsd.org>
Subject:   Re: metalog -> makefs is broken again in -HEAD
Message-ID:  <CAJ-VmokLsNnXK60U=vbGgCYOceeVCJP3MOHgW3A9-q=qrgX7HQ@mail.gmail.com>
In-Reply-To: <f8ccbbd6-9c3e-419d-9044-e088d9a6715d@freebsd.org>
References:  <CAJ-VmoknWRf0bkfksp61pamKsLky_b=indGogS%2BJtFrFa%2BXaFw@mail.gmail.com> <60a8da58-dbd5-dd26-6047-745bcf6a21f4@freebsd.org> <894b4841-166c-422f-9fe8-50ed261d76bb@FreeBSD.org> <1836ae28-b510-06dd-b83f-d08060cf87ac@freebsd.org> <8478b8aa-b8cf-7383-9923-249fced3dac3@FreeBSD.org> <4c28236a-f9ca-4601-336f-0829842b6d1a@freebsd.org> <270be6c4-16f9-3b89-c3b3-5983ec85834f@FreeBSD.org> <a0515f16-d40f-35b5-29bd-523924b4a8a3@freebsd.org> <68cb112b-9334-045a-d860-7011573a2b47@freebsd.org> <CAJ-Vmo=1p4t8zEfBm9CUyc-A9tKY3mrt9-ZeoUQS%2BBmtKCYg=w@mail.gmail.com> <c4d2d523-b23b-6ca8-c40b-32b33d524b5a@freebsd.org> <CAJ-VmomdK1X3erpNOYRHsZUHRqyz=qcXp2gz4XRajPW0z3YURQ@mail.gmail.com> <203719a3-a66b-5389-ff52-a20b661f8b9b@freebsd.org> <CAJ-VmokLFcm3Q3wLcv-T5w=HiOuuUfL6-buxVV_YRcxzAuY-bQ@mail.gmail.com> <f3671634-1dd3-252c-94c6-7e4d0d50d8f0@freebsd.org> <CAJ-VmokGOVotMWpD4kqTwQJcxMR2o9qykpqPEFZ4TSNS7AgBFQ@mail.gmail.com> <CAJ-Vmo=_nGonk-u6hdpA1JPfBf%2B6_yjCk2ju7RN7Djxb-b1Ypg@mail.gmail.com> <f8ccbbd6-9c3e-419d-9044-e088d9a6715d@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On 21 August 2016 at 09:11, Sean Bruno <sbruno@freebsd.org> wrote:
> Ok, figured a hack for not installing the atheros tools:
> ----------------------------------------------------------------------
> diff --git a/build/bin/build_freebsd b/build/bin/build_freebsd
> index d7fe4c2..04169b4 100755
> --- a/build/bin/build_freebsd
> +++ b/build/bin/build_freebsd
> @@ -112,7 +112,7 @@ fi
>
>  while [ -n "$1" ]; do
>         echo "*** Stage         : $1"
> -       if [ "$1" = "installworld" ]; then
> +       if [ "$1" = "installworld" -a ${X_BUILD_BASE_CFG} = "mips_ap" ];
> then
>                 mkdir -p ${X_DESTDIR}/usr/local/bin/
>                 mkdir -p ${X_DESTDIR}/bsdbox/
>                 mkdir -p ${X_DESTDIR}/usr/local/libdata/athprom/
>

This happens because when adding LOCAL_TOOL_DIRS to install the ath
bits, it's installing it in /usr/local/* without doing an install -d
/usr/local/bin , /usr/local/libexec/, etc beforehand.

I bet doing a "make installworld" without /usr/local/ fully populated
(ie, no ports) won't create the /usr/local/ subdirectories.

> ---------------------------------------------------------------------
>
> I can't quite see how to fix the last two errors I'm seeing:
>
> *** Target              : fullroot
> *** Deleting old file system..
> install: open /home/sbruno/bsd/fbsd_head/../mfsroot/METALOG.malta.tmp:
> No such file or directory
> *** Creating new filesystem...
> **** Done.
> *** Target Done.
> *** Target              : fullfsimage
> *** Running makefs to build image ..
> *** from /home/sbruno/bsd/fbsd_head/../mfsroot/malta ..
> makefs: ./boot/kernel.MALTA: missing directory in specification
> makefs: failed at line 26663 of the specification
>

This happens because the option that sets the kernel directory for the
installworld/installkernel pass (KODIR and KMODDIR) doesn't first do
an install -d /boot/kernel.XXX/, so the metalog entry isn't populated.

I could write another tool like filter.pl that allows for entries to
be inserted before other entries, so we could say "hey, please
populate /boot/kernel.XXX before you populate /boot/kernel.XXX/YYY",
but I think I'd rather just fix it in -HEAD.



-adrian



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAJ-VmokLsNnXK60U=vbGgCYOceeVCJP3MOHgW3A9-q=qrgX7HQ>