Installworld failed
Ian Lepore
ian at freebsd.org
Wed Apr 6 20:25:59 UTC 2016
On Tue, 2016-04-05 at 23:14 -0700, Russell Haley wrote:
> On Sun, Apr 3, 2016 at 12:35 PM, Russell Haley <russ.haley at gmail.com> wrote:
>
> >
[mixed top/bottom posting stuff trimmed]
> >
> > This usually is because MAKEOBJDIRPREFIX isn't set anymore
> > now that you are root.
> >
>
> So what's interesting for me is I've always run my cross builds in a jail
> and just run it from /usr/src. The idea that I don't need sudo to build
> (just install) is new to me.
>
> I tried adding MAKEOBJDIRPREFIX=$(PWD)/../obj to all my make commands but
> that didn't work (and later noted Ian's script indicates this is an issue).
> I lucked out and found something that said sudo can retain the current
> users environment. The FreeBSD flag is -E. So I tried that with limited
> success. The final problem was my destdir was not an absolute path. SO the
> update to the wiki would be:
>
> export MAKEOBJDIRPREFIX=$(pwd)/obj
> export DEST=$(pwd)/nfsroot
>
> cd src
> make buildworld TARGET_ARCH=armv6
> make buildkernel TARGET_ARCH=armv6 KERNCONF=IMX6
>
> sudo -E make installworld TARGET_ARCH=armv6 DESTDIR=$DEST
> sudo -E make distribution TARGET_ARCH=armv6 DESTDIR=$DEST
> sudo -E make installkernelTARGET_ARCH=armv6 KERNCONF=IMX6 DESTDIR=$DEST
>
> Alternatively I tested DESTDIR as DESTDIR=$(pwd)/../nfsroot which also
> worked.
>
> So now after looking back at Ian's cross build script further down, my
> question is why doesn't it fail due to the same issue?
>
> Thanks,
>
> Russ
Doh! It works for me because my sudoers file contains:
Defaults env_keep += "PKG_PATH PKG_DBDIR PKG_TMPDIR PACKAGEROOT PACKAGESITE PKGDIR"
Defaults env_keep += "TMPDIR FTP_PASSIVE_MODE XDG_SESSION_COOKIE"
Defaults env_keep += "PORTSDIR PORTS_INDEX PORTS_DBDIR PACKAGES PKGTOOLS_CONF"
Defaults env_keep += "MAKEOBJDIRPREFIX MODULES_OVERRIDE SUBDIR_OVERRIDE"
I guess I should mention that on the wiki page.
-- Ian
More information about the freebsd-arm
mailing list