wiki

zandra's wiki
git clone git://zandra.org/wiki
Log | Files | Refs | README

installation-guide.md (1346B)


      1 # Zandra Installation Guide
      2 
      3 ## Prerequisites
      4 
      5 * GNU Binutils with target triplet
      6 * GCC with target triplet
      7 * mk (from [9base](http://tools.suckless.org/9base) or
      8   [plan9port](https://9fans.github.io/plan9port/))
      9 * [pkgtools](http://git.zandra.xyz/pkgtools)
     10 
     11 ## Building the base packages
     12 
     13 First, it is necessary to configure the build system. To do so, create a
     14 `config.mk` by copying `config.def.mk` and edit it. You can change the target
     15 architecture, compile flags, and more here.
     16 
     17 After this, you can begin the build process:
     18 
     19 ```
     20 [user@zandra ~]$ export mkbuild=$(pwd)/mkbuild # required for mkbuild
     21 [user@zandra ~]$ export configmk=$(pwd)/config.mk # required for mkbuild
     22 [user@zandra ~]$ export PATH="/opt/cross/bin:$PATH" # add cross compiler to $PATH
     23  
     24 [user@zandra ~]$ mk init # initialize git submodules
     25 [user@zandra ~]$ mk # build base packages
     26 ```
     27 
     28 ## Installing the packages to a root directory
     29 
     30 ```
     31 [user@zandra ~]$ export ROOT="rootdir" # replace with desired path (an existing directory)
     32 [user@zandra ~]$ mk install
     33 ```
     34 
     35 ## Making a bootable image
     36 
     37 If you would like to create an image complete with a bootloader to use in a VM
     38 or put on a USB drive, make sure `/dev/loop0` is not being used on your host
     39 system, and then run `ROOT="rootdir" mk bootable`, replacing "rootdir" with a
     40 path to the root directory used previously.