NetBSD-Users archive

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

Compiling the (new) kernel with build.sh



Hi peeps!

Sofar, everything I was doing while installing, configuring and updating NetBSD has been running more or less smoothly. When you work your way into a new OS, you ALWAYS run into some sort of trouble, because things are done just a little differently than you're used to. But thankfully, I am able to learn. :-)

I updated my system to 4.99.64 successfully[1], but I had to do that slightly differently than I actually wanted to. :-/ One thing that I found out quite by accident: If I don't make 'sets' after 'distribution', several things are missing when I try to install the userland. Strangely, this is noted nowhere in the documentation. All I've read sofar says that the target 'distribution' is enough. If I'm wrong about that, please correct me (-v if possible), I WANT to learn!

The second thing that irritated me was building a custom kernel. When using the GENERIC kernel I just made it with build.sh along with the userland. But when I created a new config file for my custom kernel (which was basicly the GENERIC file plus smp and cgd minus a whole lot of devices that don't exist in my machine), I get this: [2]

Note the first line after build.sh starts:
  cd: can't cd to tools
The tooldir is there! It is under /usr/build/tools/ and TOOLDIR points to it:

  export DESTDIR=/usr/build/dest.sparc64
  export MACHINE=sparc64
  export MAKEOBJDIRPREFIX=/usr/build/obj.sparc64
  export MKUNPRIVED=yes
  export PWD=/usr/src
  export RELEASEDIR=/usr/build/release
  export SHELL=/bin/sh
  export TERM=xterm
  export TOOLDIR=/usr/build/tools
  export USER=christian

The fact that build.sh can't cd to tools/ seems to be the problem, as the build then breaks because of this:
  obj ===> gnu/lib/crtstuff4
  USETOOLS=no, but this component requires a version-specific
    host toolchain

Where did I go wrong here? Did I forget to set something? Permissions for tools/ are ok (belongs to the same user running build.sh).

The old-fashioned method:
  config KERNEL
  cd ../compile/KERNEL
  make depend
  make

works fine. That's how I got the system running, BTW. and that is also the slightly different method I used. :-)

I think I may need a whack on the head like DiNozzo. :-)

Regards,
Chris

[1] I am running sparc64 and wanted to use the second CPU as well as
    a new function for cgd(4).
[2] Trying to make a custom kernel...
$ ./build.sh kernel=SUNNY
===> build.sh command: ./build.sh kernel=SUNNY
===> build.sh started: Sat Jun 14 12:15:49 CEST 2008
===> NetBSD version:   4.99.64
===> MACHINE:          sparc64
===> MACHINE_ARCH:     sparc64
===> Build platform:   NetBSD 4.99.64 sparc64
===> HOST_SH:          /bin/sh
cd: can't cd to tools
obj ===> lib
obj ===> lib/csu
obj ===> lib/csu/sparc64
obj ===> lib/libc
obj ===> lib/libarch
obj ===> lib/libatf-c
obj ===> lib/libatf-c++

[...]

obj ===> gnu
obj ===> gnu/lib
obj ===> gnu/lib/libopcodes
obj ===> gnu/lib/libbfd
obj ===> gnu/lib/libiberty
obj ===> gnu/lib/crtstuff4
USETOOLS=no, but this component requires a version-specific host toolchain

*** Failed target:  .BEGIN
*** Failed command: false
*** Error code 1

Stop.
nbmake: stopped in /usr/src/gnu/lib/crtstuff4

*** Failed target:  obj-crtstuff4
*** Failed command: _makedirtarget() { dir="$1"; shift; target="$1"; shift; case "${dir}" in /*) this="${dir}/"; real="${dir}" ;; .) this="gnu/lib/"; real="/usr/src/gnu/lib" ;; *) this="gnu/lib/${dir}/"; real="/usr/src/gnu/lib/${dir}" ;; esac; show=${this:-.}; echo "${target} ===> ${show%/}${1:+ (with: $@)}"; cd "${real}" && /usr/build/tools/bin/nbmake _THISDIR_="${this}" "$@" ${target}; }; _makedirtarget crtstuff4 obj
*** Error code 1

Stop.
nbmake: stopped in /usr/src/gnu/lib

*** Failed target:  obj-lib
*** Failed command: _makedirtarget() { dir="$1"; shift; target="$1"; shift; case "${dir}" in /*) this="${dir}/"; real="${dir}" ;; .) this="gnu/"; real="/usr/src/gnu" ;; *) this="gnu/${dir}/"; real="/usr/src/gnu/${dir}" ;; esac; show=${this:-.}; echo "${target} ===> ${show%/}${1:+ (with: $@)}"; cd "${real}" && /usr/build/tools/bin/nbmake _THISDIR_="${this}" "$@" ${target}; }; _makedirtarget lib obj
*** Error code 1

Stop.
nbmake: stopped in /usr/src/gnu

*** Failed target:  obj-gnu
*** Failed command: _makedirtarget() { dir="$1"; shift; target="$1"; shift; case "${dir}" in /*) this="${dir}/"; real="${dir}" ;; .) this=""; real="/usr/src" ;; *) this="${dir}/"; real="/usr/src/${dir}" ;; esac; show=${this:-.}; echo "${target} ===> ${show%/}${1:+ (with: $@)}"; cd "${real}" && /usr/build/tools/bin/nbmake _THISDIR_="${this}" "$@" ${target}; }; _makedirtarget gnu obj
*** Error code 1

Stop.
nbmake: stopped in /usr/src

ERROR: Failed to make obj in tools
*** BUILD ABORTED ***


Home | Main Index | Thread Index | Old Index