From owner-freebsd-hackers@freebsd.org Fri Mar 6 11:25:35 2020 Return-Path: Delivered-To: freebsd-hackers@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CBEF7265A87 for ; Fri, 6 Mar 2020 11:25:35 +0000 (UTC) (envelope-from ivlevsr@yandex.ru) Received: from forward400o.mail.yandex.net (forward400o.mail.yandex.net [37.140.190.176]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 48YlfQ2q6jz4ZyR for ; Fri, 6 Mar 2020 11:25:33 +0000 (UTC) (envelope-from ivlevsr@yandex.ru) Received: from mxback26g.mail.yandex.net (mxback26g.mail.yandex.net [IPv6:2a02:6b8:0:1472:2741:0:8b7:325]) by forward400o.mail.yandex.net (Yandex) with ESMTP id 2881B14C10D3 for ; Fri, 6 Mar 2020 14:25:31 +0300 (MSK) Received: from localhost (localhost [::1]) by mxback26g.mail.yandex.net (mxback/Yandex) with ESMTP id E2R8jTGEDi-PUxu7p4N; Fri, 06 Mar 2020 14:25:30 +0300 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1583493930; bh=HGiEpxezmonVOhZAsB29cg8pkdOKoo1NJ9TtOEkddY4=; h=Message-Id:Date:Subject:To:From; b=v2PqrD6oyfSqUb/1gkIXGQjYFZB2lXQ64V0/nrCKEJhEGsinTGJQXqpD0h+Sjc9uz yteSkFJu4CamhFXWnXjs52tz70/aFDYlu0Ae5iZuFjjUb3Y/mKDRtT8gFBSWh7PzjT +4z7bM+ouHeFHSSvhbf1T+MALI6c7Vyu4mdzA65g= Received: by iva8-5e86d95f65ab.qloud-c.yandex.net with HTTP; Fri, 06 Mar 2020 14:25:30 +0300 From: Sergey Ivlev To: "freebsd-hackers@freebsd.org" Subject: Cross-building ports with release(7) MIME-Version: 1.0 X-Mailer: Yamail [ http://yandex.ru ] 5.0 Date: Fri, 06 Mar 2020 16:25:30 +0500 Message-Id: <2228511583493903@vla3-bebe75876e15.qloud-c.yandex.net> Content-Transfer-Encoding: 7bit Content-Type: text/plain X-Rspamd-Queue-Id: 48YlfQ2q6jz4ZyR X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=yandex.ru header.s=mail header.b=v2PqrD6o; dmarc=pass (policy=none) header.from=yandex.ru; spf=pass (mx1.freebsd.org: domain of ivlevsr@yandex.ru designates 37.140.190.176 as permitted sender) smtp.mailfrom=ivlevsr@yandex.ru X-Spamd-Result: default: False [-3.08 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.98)[-0.984,0]; R_DKIM_ALLOW(-0.20)[yandex.ru:s=mail]; FROM_HAS_DN(0.00)[]; DWL_DNSWL_NONE(0.00)[yandex.ru.dwl.dnswl.org : 127.0.5.0]; R_SPF_ALLOW(-0.20)[+ip4:37.140.128.0/18:c]; FREEMAIL_FROM(0.00)[yandex.ru]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-hackers@freebsd.org]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; IP_SCORE_FREEMAIL(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; RCVD_COUNT_THREE(0.00)[3]; IP_SCORE(0.00)[ipnet: 37.140.128.0/18(-4.89), asn: 13238(-3.84), country: RU(0.01)]; TO_MATCH_ENVRCPT_ALL(0.00)[]; DKIM_TRACE(0.00)[yandex.ru:+]; DMARC_POLICY_ALLOW(-0.50)[yandex.ru,none]; TO_DN_EQ_ADDR_ALL(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[yandex.ru]; ASN(0.00)[asn:13238, ipnet:37.140.128.0/18, country:RU]; RCVD_TLS_LAST(0.00)[]; RCVD_IN_DNSWL_LOW(-0.10)[176.190.140.37.list.dnswl.org : 127.0.5.1] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Mar 2020 11:25:35 -0000 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!