Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 06 Mar 2020 16:25:30 +0500
From:      Sergey Ivlev <ivlevsr@yandex.ru>
To:        "freebsd-hackers@freebsd.org" <freebsd-hackers@freebsd.org>
Subject:   Cross-building ports with release(7)
Message-ID:  <2228511583493903@vla3-bebe75876e15.qloud-c.yandex.net>

next in thread | raw e-mail | index | archive | help
Hello!

I've successfully built FreeBSD 13.0-CURRENT (r358609) image for ARMv7 on AMD64 host using release(7).

I wonder is it possible for AMD64 host to build/install ports into the image?

I've defined arm_do_quirk function in my configuration file, where I'm calling `make DESTDIR=${CHROOTDIR}/${DESTDIR} TARGET=arm TARGET_ARCH=armv7 ... build install clean`.  But it ended up with error, of course, because that make(1) chroots into ${CHROOTDIR}/${DESTDIR} and runs executables from there, but ${CHROOTDIR}/${DESTDIR} is where **built target** located (i.e. where files for ARMv7; ${CHROOTDIR}/${DESTDIR} is {my chrrot dir}/usr/obj/usr/src/arm.armv7/release/{kernel name}).  Altering the PATH variable so it will specify ${CHROOTDIR} as the first entry, doesn't help either -- I end up with the same ``exec format error'' (env PATH="${CHROOTDIR}:${PATH}" make DESTDIR=...).

I had also tried to `chroot ${CHROOTDIR} make DESTDIR=${DESTDIR} TARGET=arm TARGET_ARCH=armv7 ... build install clean`, but mount_nullfs(8) failed under chroot(8).

Therefore, my question is: is it possible while building an image for ARMv7 on AMD64 host with release(7) also building and installing ports into the result image?

Thanks in advance!



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?2228511583493903>