wiki:Bootstrapping

Version 11 (modified by bird, 18 years ago) ( diff )

the dummy definitions...

Bootstrapping steps:

  1. Modify env.sh to accept the uname output.
  2. Modify header.kmk to accept and correctly configure the platform / target OS.
  3. Run kBuild/env.sh to configure the kBuild environment.
  4. Copy unix like tools from you system to kBuild/bin/$BUILD_TARGET.$BUILD_TARGET_ARCH/. kBuild requires all ash, cat, cp, echo, install, ln, mkdir, mv, rm, rmdir and sed. The kBuild copies must be prefixed with kmk_. Some of these tools will be replaced later in the bootstrapping.
  5. Configure and build GNU sed:
    1. Go to the src/sed directory.
    2. Run aclocal, autoconf and automake in src/sed if needed.
    3. Create and enter src/sed/obj.
    4. Run ../configure.
    5. Run make
    6. Copy config.h to src/sed/config.h.$BUILD_TARGET (or similar, see Makefile.kmk).
    7. Copy sed/sed[.exe] to kBuild/bin/$BUILD_TARGET.$BUILD_TARGET_ARCH/
  6. Configure and build plain GNU Make:
    1. Run aclocal, autoconf and automake in src/gmake if needed.
    2. Create and enter src/gmake/obj.
    3. Run ../configure.
    4. Run make
    5. Copy config.h to src/gmake/config.h.$BUILD_TARGET (or similar, see Makefile.kmk). Append empty string #defines for LOCALEDIR, LIBDIR, INCLUDEDIR and ALIASPATH (see config.h.linux).
    6. We've now got our own make binary which will be used further down.
  7. Build src/gmake using the GNU Make we just made:
    1. Go to the src/gmake directory.
    2. make -f Makefile.kmk
    3. When it breaks fix the compiler / linker error and redo the previous step.
    4. Copy out/$BUILD_TARGET.$BUILD_TARGET_ARCH/release/kBuild/bin/$BUILD_TARGET.$BUILD_TARGET_ARCH/ to kBuild/bin/$BUILD_TARGET.$BUILD_TARGET_ARCH/.
  1. Rebuild everything using kmk (which should now be in the path):
    1. Run kBuild/env.sh (or continue in the shell from the previous step).
    2. Go to the root.
    3. kmk BUILD_TYPE=release rebuild
    4. Fix build breaks and repeat the previous step.
    5. Copy out/$BUILD_TARGET.$BUILD_TARGET_ARCH/release/kBuild/bin/$BUILD_TARGET.$BUILD_TARGET_ARCH/ to kBuild/bin/$BUILD_TARGET.$BUILD_TARGET_ARCH/.
  2. Add and commit the changes (including the binaries).

Note! On GNU/Linux make sure you have a real yacc install. GNU bison is not sufficiently compatible with yacc to make src/ash (from NetBSD) happy.

Note: See TracWiki for help on using the wiki.