Port-sparc archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Build method



On Wed, Nov 23, 2011 at 12:00:52PM -0800, AGC wrote:
>  The online docs show a completely different 
> process for getting the source, building toolchains, userland and the 
> kernel than for just a straight kernel recompile.

There are ways to rebuild the kernel if you already run a "new enough"
userland - which is almost always the case when doing some minor update
from older -current to current -current.

In your case you basicaly need to do "build.sh tools" (which is done
automatically the first time, if needed, for most other build.sh
invocations) and "build.sh kernel=MY-VERSION-OF-GENERIC"

This will give you a new kernel.

To get a new userland there are several similar, but slightly different ways,
all with the same net effect. I still would recommend to just download new
sets from the daily builds - it will probably safe you a week or more.
Even better: download a full CD image and boot it, let it update your system
(with "stock" GENERIC kernel for now), then replace the kernel with your
homebuild one (but make sure you have build the kernel from sources newer than
the install CD).

If you want to build, the fastesd way is probably:

  "build.sh build"

then install and boot the kernel you build above, and only after that install
the fresh build userland:

  "build.sh install=/"

This will update everything besides a few things in /etc - but the
"postinstall" script run as last step of the install will fix or notify
the important missing things.

The polical correct way is to do "build.sh release sets" and then extract
the sets after booting the new kernel - but this needs quite a bit more time
than the (probably good enough) build/install combo above.

All other options to build.sh (like -O /lotsofspace/obj and others) should
be identical for all build.sh invocations.

Again, the way I would do it:

 - download new install CD image from the daily builds
 - boot install CD, do upgrade install
 - cvs up your cvs checkout (should be way faster than the initial cvs run)
 - copy GENERIC and edit the copy with your additional options
 - build.sh tools kernel=... to get build tools and a new custom kernel
 - copy new kernel to / and reboot

If your install CD is not a lot older than your source update, you can
skip the "build.sh tools" step and manually build the kernel - this saves
you a build of gcc:

 - cd /netbsd.cvs/sys/arch/sparc/conf
 - cp GENERIC MYGENERIC
 - vi MYGENERIC (add options ....)
 - setenv USETOOLS never (or: USETOOLS=never; export USETOOLS)
 - config MYGENERIC
 - cd ../compile/MYGENERIC
 - make && make depend


Sorry if I have added more to your confusion - so many options.

Martin


Home | Main Index | Thread Index | Old Index