1 # Zandra 2 3 [Zandra](http://zandra.org) is a minimal Linux distribution 4 forked from [morpheus linux](http://morpheus.2f30.org). It aims to be 5 simple, small, and efficient. Zandra will hopefully get to a point 6 where it has a stable release cycle, with security patches of course. 7 8 ## Prerequisites 9 10 * A x86\_64-linux-musl toolchain (GNU Binutils, GCC, linux-headers, 11 and musl-libc). Can be built using 12 [musl-cross-make](https://github.com/richfelker/musl-cross-make). 13 * mk from [9base](http://tools.suckless.org/9base/) or 14 [plan9port](https://github.com/9fans/plan9port). 15 * [Zandra pkgtools](http://git.zandra.xyz/pkgtools/log.html) 16 17 ## Compiling 18 19 To compile the base packages, edit config.mk then do the following: 20 21 export configmk=$(pwd)/config.mk # in zandra base directory 22 export mkbuild=$(pwd)/mkbuild # in zandra base directory 23 24 # add cross compiler to $PATH (replace /opt/cross/bin if installed somewhere else) 25 export PATH="/opt/cross/bin:$PATH" 26 mk init # initialize git submodules 27 mk 28 29 Currently we are in the process of updating packages to their current 30 versions (before Zandra they were last updated in 2015). Note that 31 most ports on the testing branch, with the exception of a few, are 32 outdated and the URLs may not even work. 33 34 ## Building Packages 35 36 Go to the directory of the package you would like to package, then run 37 `mk package`. You can then host your own package mirrors. 38 39 ## Installing 40 41 You can install to a root using the following: 42 43 export ROOT="desired root" 44 mk 45 mk install 46 47 A bootable image can be made using the "bootable" target. IT ASSUMES 48 `/dev/loop0` IS FREE SO IF IT'S NOT, DON'T RUN THE SCRIPT!! 49 50 If you would like to run Zandra on bare metal, it is recommended that 51 you recompile the kernel (or edit the kernel config before building) 52 with the drivers you need. 53 54 ## Installing packages within Zandra 55 56 Connect to the internet first by turning on your network device using 57 `ip` (best to read the manual first), then running `sdhcp`. If that 58 worked, you can now download a package by searching for it through 59 `searchpkg` piped into `fetchpkg`, then `installpkg`. A frontend is on 60 the to-do list. Note that `searchpkg` uses `grep` regular expressions, 61 and will return anything that matches the regex, so it is advised that 62 you run `searchpkg` by itself first to make sure you are only 63 downloading exactly what you want. The syntax below also works. 64 65 # note: package names end in '#', version follows 66 searchpkg '^foo#' | fetchpkg 67 installpkg foo#1.0.pkg.tgz # replace with actual version 68 69 You can remove packages by running `removepkg foo`.