From owner-freebsd-hackers@freebsd.org Fri Mar 6 17:15:52 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 A30DB26C8B0 for ; Fri, 6 Mar 2020 17:15:52 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound2m.ore.mailhop.org (outbound2m.ore.mailhop.org [54.149.155.156]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 48YvQb6b5Nz3yWS for ; Fri, 6 Mar 2020 17:15:51 +0000 (UTC) (envelope-from ian@freebsd.org) ARC-Seal: i=1; a=rsa-sha256; t=1583514950; cv=none; d=outbound.mailhop.org; s=arc-outbound20181012; b=rolx7/IzpOwqZaXMAib7XRBoCw6Q3mHTuZhiSSbh1nkpp6iN9vlQA0/Hzx1wvbnjr48NcK51Gr79e kjhRVeu+1f2AybVX8Yyzvog/I39DkPfQwMFZWKLr0JXbI59O+sUgj+L6kvIdMckoW/JCvH3jRv5rfJ H2RGLfEMA4peXkaxqVSZWAc0FEG5M11UCSEtXPmDkkNwQU0fG9xxvU2sb6OJvtUsplbom8bMcCx4XA kGQHYFbiIXF6VB0XUyiy+eROlpjRJXTyovKlfMlfJNReqtAWbVijChqomSeLnHHFmumarJXf2NpCDV PKsvrXOpMKH1h5Q6s1Fgl5d4axuvhiA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=arc-outbound20181012; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:to:from:subject:message-id:dkim-signature:from; bh=CiZIgykwn4GOVmimZU7eQ/naMYSo5zy/UBps3BomjxQ=; b=M4E67p3p3AMxQ5I/Vmyt8wQvA9dHMF3xZ5voT0xcfEd9nVCcx01EVQErrcdRK33PyiFTBJNbpmMOV Uc/GwVITx8vD/GUNwyM7FFrwHGfyJQ1zJqGqtu237BbyjGfkhxb8Sdu1WRS3dy0J2n2VBT/TqiTWod nJP/5TrBYpA2CwqIHn+0We5edHdNPqxr3uW5dgcHdNHeO3hv/F2lNBKpslAnlvT4vZjrZpf0zrSEOZ M83SpZicG6WNMw607N/kq54JdchExuQUvgjv5CcBCto1v/pvCt1PulJCPRfbzIiidNhC71bixcduhp 9GEvNLpwK9LmImeZmW96gg0iQYxYVjw== ARC-Authentication-Results: i=1; outbound4.ore.mailhop.org; spf=softfail smtp.mailfrom=freebsd.org smtp.remote-ip=67.177.211.60; dmarc=none header.from=freebsd.org; arc=none header.oldest-pass=0; DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=dkim-high; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:to:from:subject:message-id:from; bh=CiZIgykwn4GOVmimZU7eQ/naMYSo5zy/UBps3BomjxQ=; b=EYUbBGcsRG5vZGTE2FNO0vXPjD6LDoPq/WRqd9ec88ddyxtXgmRmWYpgokvXIZ6siuOOe202mQCJg Fcg6bnrMxPrcEPBfnat4ugMi/8j+FB6WYQuUg2uUajjq7gLJe3JHQIHIBBFCXX9SXc48eeOnZtqT/l w0qmlkip1TOk9dlWImt8IXdjp79JCQ7Kz+658dfIMyz4h3DrBINnGEWZ393jNy06dooWe3dOzgjr6g uiWPbrYP934wn6OUn2MrhN+mLwf2LdirT7tD/ga3lFROaa9n/NAKTF8K2tnb7ZvOWOVOfylFwULULg nEcQON2GE0S76lqG/2eNFVHmKlOJx0A== X-MHO-RoutePath: aGlwcGll X-MHO-User: 1f178112-5fce-11ea-9eb3-25e2dfa9fa8d X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 67.177.211.60 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [67.177.211.60]) by outbound4.ore.mailhop.org (Halon) with ESMTPSA id 1f178112-5fce-11ea-9eb3-25e2dfa9fa8d; Fri, 06 Mar 2020 17:15:48 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id 026HFlH2028688; Fri, 6 Mar 2020 10:15:47 -0700 (MST) (envelope-from ian@freebsd.org) Message-ID: <76e66ea321b8d7480af75cfbd38fa55f5ac40afd.camel@freebsd.org> Subject: Re: Cross-building ports with release(7) From: Ian Lepore To: Sergey Ivlev , "freebsd-hackers@freebsd.org" , "freebsd-arm@FreeBSD.org" Date: Fri, 06 Mar 2020 10:15:47 -0700 In-Reply-To: <2228511583493903@vla3-bebe75876e15.qloud-c.yandex.net> References: <2228511583493903@vla3-bebe75876e15.qloud-c.yandex.net> Content-Type: text/plain; charset="ASCII" X-Mailer: Evolution 3.28.5 FreeBSD GNOME Team Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 48YvQb6b5Nz3yWS X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-0.38 / 15.00]; local_wl_from(0.00)[freebsd.org]; NEURAL_SPAM_MEDIUM(0.60)[0.602,0]; ASN(0.00)[asn:16509, ipnet:54.148.0.0/15, country:US]; NEURAL_HAM_LONG(-0.98)[-0.982,0] 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 17:15:52 -0000 On Fri, 2020-03-06 at 16:25 +0500, Sergey Ivlev wrote: > 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! > Cross-building ports is done with poudriere and qemu. There is some info on setting it up in https://wiki.freebsd.org/QemuUserModeHowTo but I think that's pretty out of date. There may be newer how-to info that I'm not aware of. I'm going to CC the freebsd-arm@ list on this reply, because the folks there probably know of better information resources for all this. I also have no idea how to integrate poudriere-based building with release(7) stuff. It may be a matter of building a local package repo using poudriere, then configuring the release script stuff to use it. -- Ian