Building
Building ArkOS is acheived through the build
script. Here is an example of building the generic
image (suitable for running in QEMU, or dd-ing onto a flash drive):
~/ark$ ./ark/arkos/build -c ark/arkos/configs/generic --organization 2ea25035-6aa4-42fb-9955-92288ea1b972 -o ~/arkos-image
This will build the system, and you can find the base disk image in the ~/arkos-image/final_artifacts/disk.img
file. It
will assume the resulting ArkOS image is intended for the organization at 2ea25035-6aa4-42fb-9955-92288ea1b972
, which
is the TBD public organization. You should substitute in your company’s organization ID.
The generic configuration will launch the platform supervisor by default. This will be included
automatically into your image. You can view the configuration in the ark/arkos/configs/generic/overlay/etc/systemd/system/ark-platform-supervisor.service
file within your repository.
Caching
The ArkOS build system is capable of caching intermediate steps. By default, it will clean
and rebuild everything each time you run the build process. You can use the --clean
command
line option to clean only a portion of cache, if you are just iterating on that (for example, the
rootfs).
Signing
All ArkOS images are required to be signed. It’s not possible to boot or deploy an unsigned operating system. Right now, you must create a key in the catalog and make use of that.
For example:
~/ark$ ./build/ark-signature-tool --organization <my-organization-identifier> --generate-rsa 'my-key-name'
This will generate a key called “my-key-name” which can be used to sign ArkOS or software releases. See the section on configuration to determine where to list this name.
QEMU Testing
You can test your new disk image by booting it in QEMU:
sudo qemu-system-x86_64 -bios /usr/share/ovmf/OVMF.fd -drive file=~/arkos-image/final_artifacts/disk.img,if=virtio,format=raw -smp 2 -m 2048 -enable-kvm
You will need the QEMU and ovmf packages installed (qemu-system-x86
and ovmf
on Ubuntu) in order to test this.
This will boot the UEFI image, with a dual-core machine and 2GB of RAM. Feel free to play with or adjust options.
If you omit the enable-kvm
flag, you don’t need to run it under sudo
.
Building a USB Drive
You can simply dd the ~/arkos-image/final_artifacts/disk.img
file onto a USB drive, and it should become bootable into
your instance of ArkOS. The disk image has all of the partition and boot loader information set.