From owner-freebsd-arm@freebsd.org Sun Mar 8 06:16:42 2020 Return-Path: Delivered-To: freebsd-arm@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 457D025FF6C for ; Sun, 8 Mar 2020 06:16:42 +0000 (UTC) (envelope-from ivlevsr@yandex.ru) Received: from forward100o.mail.yandex.net (forward100o.mail.yandex.net [IPv6:2a02:6b8:0:1a2d::600]) (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 48Zrj42npHz3Bty for ; Sun, 8 Mar 2020 06:16:40 +0000 (UTC) (envelope-from ivlevsr@yandex.ru) Received: from forward102q.mail.yandex.net (forward102q.mail.yandex.net [IPv6:2a02:6b8:c0e:1ba:0:640:516:4e7d]) by forward100o.mail.yandex.net (Yandex) with ESMTP id 880E34AC0B0D for ; Sun, 8 Mar 2020 09:16:35 +0300 (MSK) Received: from mxback2q.mail.yandex.net (mxback2q.mail.yandex.net [IPv6:2a02:6b8:c0e:40:0:640:9c8c:4946]) by forward102q.mail.yandex.net (Yandex) with ESMTP id 8478A7F20013 for ; Sun, 8 Mar 2020 09:16:35 +0300 (MSK) Received: from localhost (localhost [::1]) by mxback2q.mail.yandex.net (mxback/Yandex) with ESMTP id FHLK3vigbg-GZFCLNN6; Sun, 08 Mar 2020 09:16:35 +0300 To: undisclosed-recipients:; DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1583648195; bh=uWSl6OoY2HWDxPM+PNkKapz6NwJzqPVZiLgvTp89r3g=; h=References:Date:Message-Id:Cc:Subject:In-Reply-To:From; b=Ot8efFaJYIJjwBkk4XPP7MkSce1x34y5sYJdPOIHWVdQ8Du9M41vwKTL0JlyXIBTP ekLVa0nx++w6m292m6lGDHUeO5SVtkIGZGYYNZn6f2nux8xn+s8y//L4tRhlgIlEPw kUUve07ObDyCAP0g3MMMmzSGk/lhYMD76ak6wHlI= Received: by vla5-e043431e7e8d.qloud-c.yandex.net with HTTP; Sun, 08 Mar 2020 09:16:35 +0300 From: Sergey Ivlev Cc: "freebsd-arm@FreeBSD.org" In-Reply-To: <76e66ea321b8d7480af75cfbd38fa55f5ac40afd.camel@freebsd.org> References: <2228511583493903@vla3-bebe75876e15.qloud-c.yandex.net> <76e66ea321b8d7480af75cfbd38fa55f5ac40afd.camel@freebsd.org> Subject: Re: Cross-building ports with release(7) MIME-Version: 1.0 X-Mailer: Yamail [ http://yandex.ru ] 5.0 Date: Sun, 08 Mar 2020 11:16:35 +0500 Message-Id: <3494471583648080@vla5-4a37cde0b550.qloud-c.yandex.net> Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=utf-8 X-Rspamd-Queue-Id: 48Zrj42npHz3Bty X-Spamd-Bar: + Authentication-Results: mx1.freebsd.org; dkim=pass header.d=yandex.ru header.s=mail header.b=Ot8efFaJ; dmarc=pass (policy=none) header.from=yandex.ru; spf=pass (mx1.freebsd.org: domain of ivlevsr@yandex.ru designates 2a02:6b8:0:1a2d::600 as permitted sender) smtp.mailfrom=ivlevsr@yandex.ru X-Spamd-Result: default: False [1.37 / 15.00]; TO_DN_EQ_ADDR_SOME(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2a02:6b8:0:1000::/52:c]; FREEMAIL_FROM(0.00)[yandex.ru]; RCVD_COUNT_THREE(0.00)[4]; DKIM_TRACE(0.00)[yandex.ru:+]; RCPT_COUNT_TWO(0.00)[2]; DMARC_POLICY_ALLOW(-0.50)[yandex.ru,none]; FROM_EQ_ENVFROM(0.00)[]; IP_SCORE(0.00)[ip: (-9.14), ipnet: 2a02:6b8::/32(-4.74), asn: 13238(-3.84), country: RU(0.01)]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[yandex.ru]; ASN(0.00)[asn:13238, ipnet:2a02:6b8::/32, country:RU]; DWL_DNSWL_NONE(0.00)[yandex.ru.dwl.dnswl.org : 127.0.5.0]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[yandex.ru:s=mail]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_LONG(-1.00)[-0.998,0]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-arm@freebsd.org]; NEURAL_SPAM_MEDIUM(0.37)[0.366,0]; IP_SCORE_FREEMAIL(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[0.0.6.0.0.0.0.0.0.0.0.0.0.0.0.0.d.2.a.1.0.0.0.0.8.b.6.0.2.0.a.2.list.dnswl.org : 127.0.5.0]; RCVD_TLS_LAST(0.00)[]; R_UNDISC_RCPT(3.00)[] X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Mar 2020 06:16:42 -0000 06.03.2020, 22:15, "Ian Lepore" : > 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. Thanks for reply! Let's suppose that I've built a local repository with packages targeting ARM (using poudriere and qemu). Is it possible than to use `pkg add -c {CHROOTDIR} arm_pkg_name` within arm_do_quirk function to install a package into the release?