Date: Fri, 2 Dec 2005 09:48:57 +0200 From: Ruslan Ermilov <ru@FreeBSD.org> To: Doug Ambrisko <ambrisko@FreeBSD.org> Cc: cvs-src@FreeBSD.org, src-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src Makefile.inc1 src/lib/libc/gen __xuname.c getosreldate.c Message-ID: <20051202074857.GP20961@ip.net.ua> In-Reply-To: <20051202005110.21C0916A45A@hub.freebsd.org> References: <200512020050.jB20oU8c000911@repoman.freebsd.org> <20051202005110.21C0916A45A@hub.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
[-- Attachment #1 --]
On Fri, Dec 02, 2005 at 12:51:10AM +0000, Doug Ambrisko wrote:
> ambrisko 2005-12-02 00:50:30 UTC
>
> FreeBSD src repository
>
> Modified files:
> . Makefile.inc1
> lib/libc/gen __xuname.c getosreldate.c
> Log:
> Add support to easily build FreeBSD unpacked in a chroot of another
> FreeBSD machine. To do this add the man 1 uname changes to __xuname.c
> so we can override the settings it reports. Add OSVERSION override
> to getosreldate. Finally which Makefile.inc1 to use uname -m instead
> of sysctl -n hw.machine_arch to get the arch. type.
>
> With these change you can put a complete FreeBSD OS image into a
> chroot set:
> UNAME_s=FreeBSD
> UNAME_r=4.7-RELEASE
> UNAME_v="FreeBSD $UNAME_r #1: Fri Jul 22 20:32:52 PDT 2005 fake@fake:/usr/obj/usr/src/sys/FAKE"
> UNAME_m=i386
> UNAME_p=i386
> OSVERSION=470000
> on an amd64 or i386 and it just work including building ports and using
> pkg_add -r etc. The caveat for this example is that these patches
> have to be applied to FreeBSD 4.7 and the uname(1) changes need to
> be merged. This also addresses issue with libtool.
>
> This is usefull for when a build machine has been trashed for an
> old release and we want to do a build on a new machine that FreeBSD
> 4.7 won't run on ...
>
> Revision Changes Path
> 1.525 +1 -1 src/Makefile.inc1
> 1.10 +8 -0 src/lib/libc/gen/__xuname.c
> 1.8 +5 -0 src/lib/libc/gen/getosreldate.c
>
>
> Index: src/Makefile.inc1
> diff -u src/Makefile.inc1:1.524 src/Makefile.inc1:1.525
> --- src/Makefile.inc1:1.524 Thu Dec 1 17:08:56 2005
> +++ src/Makefile.inc1 Fri Dec 2 00:50:29 2005
> @@ -122,7 +122,7 @@
> .error CPUTYPE global should be set with ?=.
> .endif
> .if make(buildworld)
> -BUILD_ARCH!= sysctl -n hw.machine_arch
> +BUILD_ARCH!= uname -m
> .if ${MACHINE_ARCH} != ${BUILD_ARCH}
> .error To cross-build, set TARGET_ARCH.
> .endif
>
I think you broke native pc98 builds. This should be "uname -p".
Cheers,
--
Ruslan Ermilov
ru@FreeBSD.org
FreeBSD committer
[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (FreeBSD)
iD8DBQFDj/xpqRfpzJluFF4RAlThAJ4nVxUbKN3Hj3d50FloNuaVKJyBVQCfVqv0
G8n5hDElIx9EGfUufKgvn74=
=P9zz
-----END PGP SIGNATURE-----
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20051202074857.GP20961>
