Sortix 1.1dev nightly manual
This manual documents Sortix 1.1dev nightly, a development build that has not been officially released. You can instead view this document in the latest official manual.
|CROSS-DEVELOPMENT(7)||Miscellaneous Information Manual||CROSS-DEVELOPMENT(7)|
operating system development from another operating system development(7) manual page describes the primary way of building the operating system, which is under itself. The secondary way is to cross-compile it from a sufficiently similar operating system such as Linux with the GNU tools installed. The build system assumes the presence of some GNU extensions in the standard command line tools. This document will detail the process of bootstrapping a Sortix system from another operating system. Be sure you are reading the latest version of this document, rather than an old copy installed on the system or on an online manual page viewer, if you want to build the latest development code rather than the stable release. To view the instructions for the latest source code using the command line:The following sections describe these variables in detail.This will modify theThese tools produce platform independent output so you may wish to install them into $HOME/bin and $HOME/sbin or /usr/local/bin and /usr/local/sbin or where it suits you in yourThis will create a system root at $SORTIX/sysroot. The system root directory is always the sysroot subdirectory of the main source code directory.You can remove the temporary ~/src/binutils-build directory when finished.You can remove the temporary ~/src/gcc-build directory when finished. Notice how special make targets are used to selectively build only parts of gcc. It is not possible or desirable to build all of gcc here.This creates a bootable sortix.iso. development(7) manual page documents how to develop Sortix and how to use the build system. This manual page only documents how to set up a cross-development environment and is not sufficient to develop Sortix, or to make a fully functional and installable Sortix system. The above instructions only gives you a cross-compilation of the base system without any of the nessesary ports of third party software. The following-development(7) manual page documents what needs to be done to stay updated with the latest developments. You will need to read the new version of that document whenever you update the source code. grub-mkrescue(1) gives the error
cd /latest/source/code && man share/man/man7/cross-development.7
- GRUB (for iso creation)
- xorriso (for iso creation)
- mtools (for iso creation) (if on UEFI systems)
- Sortix binutils
- Sortix gcc
- Retrieving all the source code.
- Installing the build tools.
- Creating a system root with the system headers.
- Creating a cross-compiler.
- Cross-compiling the operating system.
- The path to the directory containing the Sortix source code. This could for instance be /home/user/sortix.
- The Sortix target platform. This could for instance be x86_64-sortix.
- The directory path where the cross-toolchain will be installed. This could for instance be /home/user/opt/x86_64-sortix.
PATHvariable in this particular shell session. You can make this permanent by adding that line to your ~/.profile or the applicable file for your shell and system. Consult your shell documentation. Otherwise type it in all Sortix-related shells before doing anything. development(7). You can install the build utilities by running:
cd "$SORTIX" && make clean-build-tools && make PREFIX="$CROSS_PREFIX" build-tools && make PREFIX="$CROSS_PREFIX" install-build-tools
cd "$SORTIX" && make distclean && make sysroot-base-headers HOST=$SORTIX_PLATFORM
mkdir ~/src/binutils-build && cd ~/src/binutils-build && ../sortix-binutils/configure \ --target=$SORTIX_PLATFORM \ --with-sysroot="$SORTIX/sysroot" \ --prefix="$CROSS_PREFIX" \ --disable-werror && make && make install
mkdir ~/src/gcc-build && cd ~/src/gcc-build && ../sortix-gcc/configure \ --target=$SORTIX_PLATFORM \ --with-sysroot="$SORTIX/sysroot" \ --prefix="$CROSS_PREFIX" \ --enable-languages=c,c++ && make all-gcc all-target-libgcc && make install-gcc install-target-libgcc
PATHis it now possible to build the operating system as described in development(7) by setting
HOSTto your value of $SORTIX_PLATFORM. This tells the build system you are cross-compiling and it will run the appropriate cross-compiler. For instance, to build an bootable cdrom image using a x86_64-sortix cross-compiler you can run:
cd "$SORTIX" && make HOST=x86_64-sortix sortix.iso
then your GRUB installation is defective. You need to install mformat(1) to use grub-mkrescue(1) in your case. make(1), development(7), following-development(7), installation(7), porting-guide(7), sysinstall(8)
xorriso: FAILURE: Cannot find path '/efi.img' in loaded ISO image
|December 29, 2015||Debian|