Re: Quick hack to make fast kernel builds easier
- From: "M. Warner Losh" <imp@xxxxxxxxxx>
- Date: Sun, 11 Jan 2009 14:23:50 -0700 (MST)
In message: <20090111191251.GA74450@xxxxxxxxxxx>
David Schultz <das@xxxxxxxxxxx> writes:
: On Sun, Jan 11, 2009, Ed Schouten wrote:
: > I often just run `make' in /usr/obj/...,
: > which also saves some typing, but unfortunately that doesn't work when
: > cross compiling.
:
: Also, as far as I know, there's no convenient way to rebuild a
: single module for another architecture. I use the following script
: called 'arch' to set the appropriate environment variables, so if
: I've already run 'make universe' and I want to rebuild libc for
: sparc64, I say:
:
: cd /usr/src/lib/libc && arch sparc64 make
:
: It would be nice if there were a better mechanism for this that's
: integrated into the build system.
I do one of the following:
(1) env TARGET=arm make buildworld -DNO_CLEAN
or
(2) env TARGET=arm make buildenv
$ cd lib/libc && make
These both work out well enough in practice for me. I've wanted a
target that was 'reworld' that just did an 'all' and maybe a few other
things, but I've never had the time to polish this up (had it in a
couple of trees that I lost due to disk failure).
I do agree it would be nice if there was some way to do 'all' for a
subdirectory with a 'trust me, I know what I'm doing, so don't do all
that other stuff' flag.
Warner
: #!/bin/sh
:
: arch=$1
: basepath=/usr/src
:
: export __MAKE_CONF=/dev/null
: export MAKEOBJDIRPREFIX=/usr/obj/${arch}
: export MACHINE_ARCH=${arch}
: export MACHINE=${arch}
: export CPUTYPE=
: export GROFF_BIN_PATH=/usr/obj/${arch}${basepath}/tmp/legacy/usr/bin
: export GROFF_FONT_PATH=/usr/obj/${arch}${basepath}/tmp/legacy/usr/share/groff_font
: export GROFF_TMAC_PATH=/usr/obj/${arch}${basepath}/tmp/legacy/usr/share/tmac
: export _SHLIBDIRPREFIX=/usr/obj/${arch}${basepath}/tmp
: export INSTALL="sh /usr/src/tools/install.sh"
: export PATH=/usr/obj/${arch}${basepath}/tmp/legacy/usr/sbin:/usr/obj/${arch}${basepath}/tmp/legacy/usr/bin:/usr/obj/${arch}${basepath}/legacy/usr/games:/usr/obj/${arch}${basepath}/tmp/usr/sbin:/usr/obj/${arch}${basepath}/tmp/usr/bin:/usr/obj/${arch}${basepath}/tmp/usr/games:/sbin:/bin:/usr/sbin:/usr/bin
: DESTDIR=/usr/obj/${arch}${basepath}/tmp
:
: shift
: $*
:
:
_______________________________________________
freebsd-arch@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-arch
To unsubscribe, send any mail to "freebsd-arch-unsubscribe@xxxxxxxxxxx"
- Follow-Ups:
- References:
- Quick hack to make fast kernel builds easier
- From: M. Warner Losh
- Re: Quick hack to make fast kernel builds easier
- From: Ed Schouten
- Re: Quick hack to make fast kernel builds easier
- From: David Schultz
- Quick hack to make fast kernel builds easier
- Prev by Date: Re: Quick hack to make fast kernel builds easier
- Next by Date: Re: Quick hack to make fast kernel builds easier [really cross-build support]
- Previous by thread: Re: Quick hack to make fast kernel builds easier
- Next by thread: Re: Quick hack to make fast kernel builds easier [really cross-build support]
- Index(es):
Relevant Pages
|