From owner-freebsd-arm@freebsd.org Mon Oct 16 03:57:15 2017 Return-Path: Delivered-To: freebsd-arm@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C1FD5E2CC2D for ; Mon, 16 Oct 2017 03:57:15 +0000 (UTC) (envelope-from fbsd@www.zefox.net) Received: from www.zefox.net (www.zefox.net [69.239.235.194]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "www.zefox.org", Issuer "www.zefox.org" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 039AB6A9D8 for ; Mon, 16 Oct 2017 03:57:14 +0000 (UTC) (envelope-from fbsd@www.zefox.net) Received: from www.zefox.net (localhost [127.0.0.1]) by www.zefox.net (8.15.2/8.15.2) with ESMTPS id v9G3vH5b092730 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sun, 15 Oct 2017 20:57:18 -0700 (PDT) (envelope-from fbsd@www.zefox.net) Received: (from fbsd@localhost) by www.zefox.net (8.15.2/8.15.2/Submit) id v9G3vHYL092729; Sun, 15 Oct 2017 20:57:17 -0700 (PDT) (envelope-from fbsd) Date: Sun, 15 Oct 2017 20:57:17 -0700 From: bob prohaska To: freebsd-arm@freebsd.org Subject: Re: Difficulty with armv6 to v7 transition. Message-ID: <20171016035716.GA92612@www.zefox.net> References: <20171009175216.GA52497@www.zefox.net> <1507573171.84167.9.camel@freebsd.org> <20171011023356.GA57571@www.zefox.net> <20171011030021.GB57571@www.zefox.net> <20171013020604.GA70845@www.zefox.net> <20171013175943.GA74121@www.zefox.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171013175943.GA74121@www.zefox.net> User-Agent: Mutt/1.5.24 (2015-08-30) X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Oct 2017 03:57:15 -0000 With the kernel at r324562, /usr/src at r324599, /usr/src/Makefile.inc1 showing #.if make(buildworld) #BUILD_ARCH!= uname -p BUILD_ARCH!= echo armv7 #.if ${MACHINE_ARCH} != ${BUILD_ARCH} #.error To cross-build, set TARGET_ARCH. #.endif #.endif and /etc/make.conf containing KERNCONF=RPI2 TARGET=arm TARGET_ARCH=armv7 DESTDIR=/ make buildworld ran until it crashed with a PT2MAP panic, as it has done many times before. The log file reached 26 MB, it probably had to go a little over 30 MB to finish. The console, top and logfile are at http://www.zefox.net/~fbsd/rpi2/crashes/crash_10_15_17/ The machine has been rebooted to a v6 kernel which has built world in the past, r322520, though it too has crashed with PT2MAP errors at least once. /usr/src/Makefile.inc1 has been restored and buildworld restarted with make -j4 buildworld TARGET_ARCH=armv7 > buildworld.log & There are no immediate errors, I'll let the build run unless someone suggests a reason to try something else. The reply threads have become somewhat tangled, I'll trim here for sake of brevity. Thanks for reading!! bob prohaska > > bob prohaska > > On Thu, Oct 12, 2017 at 07:06:04PM -0700, bob prohaska wrote: > > It's starting to look as if the trouble might have little or nothing > > to do with the armv6-armv7 transition and instead has some other cause. > > > > At this point /etc/make.conf contains > > KERNCONF=RPI2 > > TARGET=arm > > TARGET_ARCH=armv7 > > DESTDIR=/ > > > > Buildkernel works, installkernel demanded a DESTDIR and worked once it > > was added, so /etc/make.conf is being read and acted upon. > > > > If make buildworld is invoked, using the make.conf file above, make reports > > make[1]: "/usr/src/Makefile.inc1" line 450: To cross-build, set TARGET_ARCH. > > *** [buildworld] Error code 1 > > > > I had to reconstruct all of /usr after mistakenly deleting it during an > > attempted housecleaning. The restored /usr seems to boot normally and > > builds kernels just fine, but does not allow su to root, so permissions > > (or something) are not entirely correct. > > > > Might this be related to the failure to recognize or act upon the > > TARGET_ARCH=armv7 setting? /usr/src is at 324562, along with the > > kernel. Userland dates from late June. > > > > Thanks for reading, and any ideas. > > > > bob prohaska > > > > On Tue, Oct 10, 2017 at 08:00:21PM -0700, bob prohaska wrote: > > > On Tue, Oct 10, 2017 at 08:41:17PM -0600, Warner Losh wrote: > > > > On Tue, Oct 10, 2017 at 8:39 PM, Warner Losh wrote: > > > > > > > > > > > > > > > > > > > On Tue, Oct 10, 2017 at 8:33 PM, bob prohaska wrote: > > > > > > > > > >> On Mon, Oct 09, 2017 at 12:19:31PM -0600, Ian Lepore wrote: > > > > >> > On Mon, 2017-10-09 at 10:52 -0700, bob prohaska wrote: > > > > >> > > On an RPI2 model B, invoking? > > > > >> > > make -j4 -DNO_CLEAN MACHINE_ARCH=armv7 buildworld > buildworld.log > > > > >> > > > > > >> > Never set MACHINE_ARCH when building, use TARGET_ARCH. ?Be sure to set > > > > >> > TARGET_ARCH when installing as well. > > > > >> > > > > >> Tried it, like so: > > > > >> root@www:/usr/src # make -j4 buildworld TARGET_ARCH=armv7 > > > > > >> buildworld.log & [1] 1006 > > > > >> root@www:/usr/src # 1 error > > > > >> > > > > >> [1] Exit 2 make -j4 buildworld > > > > >> TARGET_ARCH=armv7 > buildworld.log > > > > >> root@www:/usr/src # more *.log > > > > >> --- buildworld --- > > > > >> make[1]: "/usr/src/Makefile.inc1" line 450: To cross-build, set > > > > >> TARGET_ARCH. > > > > >> *** [buildworld] Error code 1 > > > > >> > > > > >> make: stopped in /usr/src > > > > >> > > > > >> I also tried setting TARGET=arm and WITHOUT_SYSTEM_COMPILER=yes in various > > > > >> iterations. Should the variables be set somewhere else, in a config file? > > > > >> > > > > >> At this point the kernel is at r324499, along with the sources. Userland > > > > >> dates from late June (operator error). Kernels build, but could that make > > > > >> the trouble I'm seeing? Clang -v reports > > > > >> > > > > >> FreeBSD clang version 4.0.0 (tags/RELEASE_400/final 297347) (based on > > > > >> LLVM 4.0.0) > > > > >> Target: armv6-unknown-freebsd12.0-gnueabihf > > > > >> Thread model: posix > > > > >> InstalledDir: /usr/bin > > > > >> > > > > >> Thanks again! > > > > > > > > > > > > > > > uname -a says what? > > > > > > > > > > > > root@www:/usr/src # > > > root@www:/usr/src # uname -a > > > FreeBSD www.zefox.com 12.0-CURRENT FreeBSD 12.0-CURRENT #0 r324499: Tue Oct 10 18:06:39 PDT 2017 root@www.zefox.com:/usr/obj/usr/src/sys/RPI2 arm > > > > > > > What happens if you do a build with TARGET_ARCH=armv7? > > > > > > > > > > root@www:/usr/src # make TARGET_ARCH=armv7 buildworld > buildworld.log > > > make[1]: "/usr/src/Makefile.inc1" line 450: To cross-build, set TARGET_ARCH. > > > root@www:/usr/src # > > > > > > FWIW, /etc/make.conf does not exist. Seemingly the variable isn't recognized. > > > Maybe a config error someplace? > > > > > > Thanks again, > > > > > > bob prohaska > > >