Skip to content

Latest commit

 

History

History
58 lines (48 loc) · 3.54 KB

BUILDING.md

File metadata and controls

58 lines (48 loc) · 3.54 KB

pkgs

Packages Repository

Build Guide

How to make Packages for OS/1337


Requirements

Basic Build Envoirment

OS/1337 doesn't have any compiler-based dependencies tho as of now only GCC is documented.

  • Please feel free to try LLVM and document your findings with an issue or feel free to make a Pull Request.

Dependencies

AVOID DEPENDENCY HELL!

OS/1337 intends to be lightweight and packages should do the same.

  • If your software depends on anything beyond toybox + musl / linux, then you must include it with it!
You cannot rely upon any other dependencies nor dependency checking or resolution at all!

Otherwise it would baloon the repository's size for no good reason.

  • All packages must be compiled as statically linked and contain their dependencies!

In order to save space as well as avoid bricking userspace, OS/1337 uses musl as it's C standard library.

  • Since we want to keep it simple and safe, we recommend using the same toolchain as Toybox does since that provides us with native and cross-compiling versions of musl to link against, since most build systems will default to glibc or whatever standard C-Library said OS/compiler/toolchain uses per default.

Settings

Statically linked, single Binaries

In terms of building, it is required to make them as static binaries.

For example, if you want to target i486 and up you want to use the following commands:

LDFLAGS=--static CROSS_COMPILE=i486-linux-musl-cross/bin/i486-linux-musl- 

FAQs

How can I see if my program actually works?

Test it in a VM i.e. QEMU with OS/1337 in it.

  • Your Application will most likely not run at all on your host OS you build it on unless it's identical to the targeted system and you build under OS71337.

My Application doesn't run or crashes or doesn't work as intended!

Calm down and see if you have all the prerequesites and settings correct as per documentation.

If in doubt, ask some developers of said Software if they want to take a closer look.

  • If said software is open-source and the developmers aim at both portability and compatibility they'll likely be able and willing to take a closer look at it.