├── .gitignore ├── LICENSE.md ├── OS1337-core-prerelease.img ├── README.md ├── build └── 0.CORE │ ├── build │ ├── dropbear │ │ └── compile.dbclient.sh │ ├── image │ │ ├── create.1440kb.floppy.sh │ │ ├── create.initramfs.sh │ │ ├── create.spechalfiles.sh │ │ └── fill.floppy.sh │ ├── linux │ │ ├── compile.linux.sh │ │ ├── linux-6.6.6-i486-minimal.config │ │ └── linux-6.6.6-i486-network.config │ ├── sources.list.tsv │ └── toybox │ │ ├── compile.toybox.sh │ │ └── toybox-0.8.10-i486-minimal.config │ └── fdd │ ├── bzImage │ ├── fs │ ├── bin │ │ ├── dbclient │ │ └── toybox │ ├── etc │ │ ├── init │ │ ├── inittab │ │ └── profile │ └── welcome.txt │ ├── rootfs.cpio.xz │ └── syslinux.cfg ├── docu ├── LICENSES.md ├── acknowledgements.md ├── architecture.md ├── build-order.md ├── building-packages.md ├── building.md ├── external │ ├── floppinux │ │ └── floppinux-manual.pdf │ ├── jm233333 │ │ └── tiny-kernel.md │ ├── licenses │ │ ├── 0bsd.md │ │ ├── dropbear-license.md │ │ ├── gplv2+.md │ │ └── gplv2-only.md │ └── toybox │ │ ├── mkroot.md │ │ └── mkroot.sh ├── further-sources.md ├── getting-started.md ├── ideas │ ├── architectures.tsv │ ├── components.md │ ├── custom-packages.md │ ├── editions.tsv │ ├── installer │ │ ├── INSTALLER.md │ │ └── install.sh │ ├── mockups │ │ ├── os1337-menu.txt │ │ ├── os1337-nav.txt │ │ ├── os1337-notif.txt │ │ ├── os1337-pkgi.txt │ │ └── os1337-systemcfg.txt │ ├── packages.list.tsv │ └── resolutions.tsv ├── img │ └── logo │ │ ├── OS1337_logo.odg │ │ ├── OS1337_logo.pdf │ │ ├── OS1337_logo.png │ │ └── OS1337_logo.svg ├── linux.kernel.versions.tsv ├── notes │ ├── ascii-drawing-chars.txt │ ├── kernel-config.md │ └── todo.md ├── pkgs │ ├── package.manager.link │ ├── package.repository.link │ └── packages.list.tsv ├── project-goals.md ├── roadmap.md ├── system-image-architecture.odg └── system-image-architecture.pdf └── scripts ├── README.md ├── build.sh ├── clean.sh ├── config.sh ├── launch.sh ├── pkgs ├── build-dbclient.sh ├── build-kilo.sh ├── build-linux.sh ├── build-mlb.sh ├── build-toybox.sh ├── make-fhs-filesystem.sh ├── make-image.sh ├── make-initramfs.sh ├── make-minimal-filesystem.sh └── musl-cross.sh └── profile ├── chonky ├── README.md ├── build.sh ├── config.sh ├── linux.config ├── rootfs │ ├── etc │ │ ├── init │ │ ├── inittab │ │ └── profile │ └── welcome.txt ├── syslinux.cfg └── toybox.config └── core ├── README.md ├── build.sh ├── config.sh ├── linux.config ├── rootfs ├── etc │ ├── init │ ├── inittab │ └── profile └── welcome.txt ├── syslinux.cfg └── toybox.config /.gitignore: -------------------------------------------------------------------------------- 1 | # .gitignore 2 | ## Example user template 3 | ### IntelliJ project files 4 | .idea 5 | *.iml 6 | out 7 | gen 8 | 9 | ## Working Directories used by the scripts. 10 | ### Workspace 11 | /build/working/ 12 | ### Downloads 13 | /build/downloads/ 14 | ### Build 15 | /build/os1337-core/ 16 | 17 | ## Other files to ignore and not contribute to the sourcecode tree 18 | /scripts/clean 19 | /rootfs.cpio.xz 20 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: 0BSD 2 | 3 | # OS/1337 4 | ## License 5 | 6 | TL;DR: it's [0BSD](https://en.wikipedia.org/wiki/BSD_licenses#0-clause_license_(%22BSD_Zero_Clause_License%22)), an [OSI approved](https://opensource.org/license/0bsd/), permissive license. 7 | - For the underlying software please see [LICENSES.md](docu/LICENSES.md) . 8 | 9 | --- 10 | 11 | ##### License Text: 12 | 13 | ```` 14 | Copyright © 2023-2024 15 | by Kevin Karhan 16 | and Contributors to OS/1337 17 | 18 | Permission to use, copy, modify, and/or distribute 19 | this software for any purpose with or without fee is hereby granted. 20 | 21 | 22 | 23 | Permission to use, copy, modify, and/or distribute this software for 24 | any purpose with or without fee is hereby granted. 25 | 26 | THE SOFTWARE IS PROVIDED “AS IS” AND THE AUTHOR DISCLAIMS ALL 27 | WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES 28 | OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE 29 | FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY 30 | DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN 31 | AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT 32 | OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 33 | 34 | ```` 35 | 36 | End of License Text 37 | 38 | --- 39 | 40 | --- 41 | 42 | # IMPORTANT NOTE: 43 | ## This only covers the works as per OS/1337 project and does not apply to all underlying packages! 44 | ### [Licenses for underlying packages & software can be found in /docu/LICENSES.md](docu/LICENSES.md). 45 | For details on the build in question, please check the ``source.list.tsv`` for said edition and version. 46 | - I.e. the "``CORE`` *Edition*" comes with ``Linux``, ``syslinux`` ``toybox`` and ``dropbear`` and is built against ``musl-cross``, which means aside Linux (GPLv2) & SYSLINUX (GPLv2+) [we only have BSD & MIT - like licensed code in it](build/0.CORE/build/sources.list.tsv). 47 | - Making it easy to comply with said licenses. 48 | 49 | ###### It is recommended to use public releases and not a git commit stage to make it easy to provide sources and/or enshure reproduceability where applicable, since these will likely be archived and less susceptible to link rot. 50 | 51 | - As done so by us and documented in our [LICENSES.md file](docu/LICENSES.md). 52 | 53 | #### If in doubt, read the terms of the license and/or consult a licensed lawyer/solicitor/legal advisor in your juristiction to answer specific questions. 54 | ### We legally can't and won't provide legal advice - period! 55 | 56 | --- 57 | -------------------------------------------------------------------------------- /OS1337-core-prerelease.img: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OS-1337/OS1337/4a70112a8b403953abe8a68714626f4bdad8b08a/OS1337-core-prerelease.img -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # OS/1337 2 | ### A minimalist yet useable, CLI-Oriented Toybox/Linux Distribution. 3 | ## 4 | 5 | --- 6 | 7 | ### INDEX 8 | - #### [Getting Started](docu/getting-started.md) 9 | - #### [Building OS/1337](docu/building-packages) 10 | - #### [Project Goals](docu/project-goals.md) 11 | - #### [Roadmap](docu/roadmap.md) for OS/1337 development 12 | - #### [Acknowledgements](docu/acknowledgements.md) of external helpers 13 | - #### [Further Sources](docu/further-sources.md) to read into 14 | - #### [License](LICENSE.md) 15 | - TLDR: It's [0BSD](https://en.wikipedia.org/wiki/BSD_licenses#0-clause_license_(%22BSD_Zero_Clause_License%22)) as created by Rob Landley [and used for toybox](http://www.landley.net/toybox/license.html). 16 | - ###### Please note that [this does not apply to all parts of OS/1337 - notably the Linux Kernel!](LICENSE.md#important-note) 17 | 18 | --- 19 | 20 | ## Core Features 21 | ### [TUI (GUI but in CLI!)](https://en.wikipedia.org/wiki/Text-based_user_interface) - based interface 22 | #### "Make Terminals Great Again!" 23 | 80x25 terminal (per default) with options to even run in 80x24 24 | - 25th line is used as menu- / navigation- / statusbar 25 | - as [customary from Terminals like the DEC VT320](https://youtu.be/RuZUPpmXfT0?t=208) 26 | #### 27 | ### Resource-Efficient 28 | #### "Less is more!" 29 | - Lack of X.org/Wayland/... and 'bloated' GUI apps per default make it extremely low-power friendly. 30 | - Can run on [extemely low powered systems]((https://en.wikipedia.org/wiki/Light-weight_Linux_distribution#Comparison)). 31 | - [Can be run entirely from RAM](https://en.wikipedia.org/wiki/List_of_Linux_distributions_that_run_from_RAM) 32 | ## 33 | 34 | --- 35 | ## [Roadmap](docu/roadmap.md) 36 | #### OS/1337 is still in early development and has yet to make an initial release. 37 | 38 | --- 39 | ## [Components](docu/ideas/components.md) 40 | Besides the basic core system, it's kept very lean just to enshure it's not bloated, with only concessions being made to reduce avoidable and burdensome inconveniences and incompatibilities. 41 | ### 42 | 43 | ### [Linux Kernel](https://kernel.org) 44 | Simply because a battle-tested, well maintained, versatile and with ample drivers equipped Kernel exists and rewriting it solely for the purpose of not using it is at best childish if not foolish. 45 | - OFC there are various other kernels that could also be used, like the ones of OpenBSD & FreeBSD or even Illumos [nee OpenSolaris] but that would just exceed the scope of this project. Feel free to DIY tho... 46 | - Linux as a Kernel however has by far the most versatile support for architectures and hardware installed. 47 | ### 48 | 49 | ### [Toybox Userland](https://landley.net/toybox/) 50 | Simply because the absolute bare-minimum System should comfortably fit on a 1.440kB FDD. 51 | - Toybox also [includes the most essential functions and tools](https://landley.net/toybox/help.html) so the [bare minimum system is the Toybox binary](https://landley.net/toybox/faq.html#cross) + Kernel and C library. 52 | - Not to mention [Toybox is easy to setup](https://landley.net/toybox/faq.html#install) [and build from scratch](https://landley.net/toybox/faq.html#mkroot), which is desireable for those wanting a system that can be audited at a lower cost. 53 | - OFC one could use [BusyBox](https://www.busybox.net/) or even a *BSD [Userland](https://en.wikipedia.org/wiki/User_space_and_kernel_space) if they so desire... 54 | - But that's NOT THE SCOPE OF THIS PROJECT! 55 | ### 56 | 57 | ### [musl C Library](https://musl.libc.org/) 58 | Because [Glibc](https://en.wikipedia.org/wiki/Glibc) is a mess that tends to brick systems at the slightest minor version update, basically requiring recompilation or everything. 59 | - This is totally impractical for anyone having to work with [CCSS](https://en.wikipedia.org/wiki/Proprietary_software) aka. [Commercial Closed Source Software](https://en.wikipedia.org/wiki/Commercial_software) and thus only gets binaryblobs to execute. 60 | - Also [uClibc](https://en.wikipedia.org/wiki/UClibc) and uClibc-ng are basically Abandonware at this point. 61 | ### 62 | 63 | ### [spm - Simple Package Manager](https://github.com/OS-1337/spm) 64 | After all, even a simplistic system should have the ability to install and uninstall applications. 65 | - It's very bare-bones, but it does it's job... 66 | - And yes it's a fork of [SSPM](https://github.com/SuperSimplePackageManager/SSPM). 67 | ### 68 | 69 | ### [pkgs - Repository](https://github.com/OS-1337/pkgs) 70 | Because a Package Manager without Repository is pretty much pointless. 71 | - Even tho it mostly contains just binaries to *yoink* and use. 72 | ### 73 | 74 | ### [default configurations](https://github.com/OS-1337/conf.d) 75 | To allow for easier setup and customization... 76 | - Also helps finding misconfigurations. 77 | ### 78 | 79 | ### [sources links](https://github.com/OS-1337/dl.srcs.d) 80 | To enable reproducible builds and spins. 81 | - Furthermore delivering transparency. 82 | 83 | --- 84 | ## [Project Goals](./docu/project-goals.md) 85 | 86 | ## Target Devices 87 | ### [Supported Architectures are listed here.](./docu/ideas/architectures.tsv) 88 | - To be used on Systems that are being accessed via Terminals like: 89 | - [DEC VT320](https://www.youtube.com/watch?v=RuZUPpmXfT0) 90 | - [violence.works VT-69](https://www.youtube.com/watch?v=wYfpptgb6W8) 91 | - "Slim Clients" & "Thin Clients" 92 | - [hp t620](https://support.hp.com/us-en/document/c04017240) 93 | - OFC that thin client is still fast enough to run BunsenLabs Linux and Tails but that doesn't mean it'll remain this way for very long... 94 | - Legacy Systems too slow or never designed to even run any fancy modern GUI that requires 3D acceleration 95 | - [i486SX](https://en.wikipedia.org/wiki/I486SX) and up 96 | - [Netbooks](https://en.wikipedia.org/wiki/Netbook) 97 | - [Asus Eee Series](https://en.wikipedia.org/wiki/Asus_Eee_PC) 98 | - [Eee PC 7xx](https://en.wikipedia.org/wiki/Asus_Eee_PC#Eee_700_series) 99 | - Since it's the first Netbook and despite it's underwhelming hardware is still a good baseline. 100 | - [VAIO P series](https://en.wikipedia.org/wiki/Sony_Vaio_P_series) 101 | - [Sony VAIO P11Z](https://www.notebookcheck.net/Sony-Vaio-VGN-P11Z-G.14468.0.html) 102 | - Mostly due to Intel's Fuckup that is the [GMA500](https://www.intel.com/content/www/us/en/support/products/81506/graphics/legacy-graphics/intel-graphics-media-accelerator-500-intel-gma-500.html) Onboard-GPU. 103 | - [VIA OpenBook](https://en.wikipedia.org/wiki/VIA_OpenBook) 104 | - entry level [amd64](https://en.wikipedia.org/wiki/X86-64) Devices 105 | - [Intel Cherry Trail](https://ark.intel.com/content/www/us/en/ark/products/codename/46629/products-formerly-cherry-trail.html) based devices, like cheap entry-level Windows 8.x tablets and [*"Stick PCs"*](https://en.wikipedia.org/wiki/Stick_PC)... 106 | - [Intel Compute Stick](https://en.wikipedia.org/wiki/Intel_Compute_Stick) 107 | - [Dell Wyse 3040](https://www.dell.com/en-in/shop/business-pcs-desktop-computers/wyse-3040-thin-client/spd/wyse-3040-thin-client), cheap, compact, fanless and [power-efficient](https://www.storagereview.com/review/dell-wyse-3040-review) Thin Client that can be picked up very cheaply. 108 | - Select SoC's and Embedded as well as legacy devices. 109 | - [Raspberry Pi Zero](https://www.raspberrypi.com/products/raspberry-pi-zero/) [W](https://www.raspberrypi.com/products/raspberry-pi-zero-w/) 110 | - Simply because it's technically *"the cheapest computer one can buy brand new"* with an MSRP of $5(P i0)-$10(Pi0W) and because everything that runs on a [Pi0(W)](https://en.wikipedia.org/wiki/Raspberry_Pi#Specifications) shold also run on the Pi0W2 and any other Raspberry Pi SBC due to being backwards-compatible to the [ARMv6r11](https://en.wikipedia.org/wiki/ARM11#Chips) SoC being used. 111 | - more depending on whether or not someone wants to build for and maintain them. 112 | - A *"generic ARM64+UEFI"* image is desireable, but sadly hardware to test on is not available to the maintainers as of writing. 113 | 114 | In theory it could also be used as a "Rescue System" or similar, but there are better tools out there like [Rescatux](https://www.supergrubdisk.org/rescatux/) and [Trinity Rescue Kit](https://trinityhome.org/). 115 | #### See [Project Goals](docu/project-goals.md) for OS/1337 116 | ## 117 | 118 | --- 119 | ## Target Audience 120 | ### Expedient Linux Users and *nix enthusiasts. 121 | #### This is basically ["Hard Mode Linux"](https://www.youtube.com/watch?v=_Ua-d9OeUOg&t=117s) and if you're scared by looking at a terminal window or seeing someone using it, then you are NOT ALLOWED to use it! 122 | Please realize that this isn't intended for people freshly switching to Linux. 123 | - Unless you have like decades of Unix Experience, this will be hard. 124 | - Espechally since this is is an [Embedded Linux Distribution](https://en.wikipedia.org/wiki/Linux_on_embedded_systems), not a mainsteam distro, and is thus closer to [ELKS](https://en.wikipedia.org/wiki/Embeddable_Linux_Kernel_Subset) than Debian. 125 | 126 | So please shift your expectation accordingly! 127 | 128 | ### People who demand a tiny Linux distro that is yet still useable. 129 | #### DO NOT (!!!) expect The amount of Software and Support you'll find for [Ubuntu](https://ubuntu.com/) or any other mainsteam distro here. 130 | If you just want a lightweight & Portable Desktop OS, consider [Tails](https://tails.net/), [BunsenLabs Linux](https://www.bunsenlabs.org/) or if you want something for guest and strangers to use, [Porteus Kiosk](https://porteus-kiosk.org/). 131 | - OS/1337 wants to make [TinyCore](http://www.tinycorelinux.net/) look "phat" in comparison. 132 | - OFC this is achieved by virtue of sacrificing a Xorg/Wayland-based GUI! 133 | 134 | #### In fact, the "core" system is just [toybox](http://www.landley.net/toybox/)/[Linux](https://kernel.org) + [musl](https://musl.libc.org) with [dbclient](https://github.com/mkj/dropbear/blob/master/SMALL.md), the [SSH Client](https://en.wikipedia.org/wiki/Secure_Shell)-part of Dropbear. 135 | - The "base" system only adds [dropbear](https://github.com/mkj/dropbear), [enc](https://github.com/life4/enc), [ne](https://github.com/vigna/ne) and [nail](https://sourceforge.net/projects/nail/). 136 | - The "main" system offers [tmux](https://github.com/tmux/tmux), [curl](https://curl.se/download.html), [lynx](https://lynx.invisible-island.net), [aerc](https://git.sr.ht/~rjarry/aerc), [btop](https://github.com/aristocratos/btop), [mc](https://midnight-commander.org/), [aria2](https://github.com/aria2/aria2) on top of that. 137 | - The "xtra" system then includes all packages except "servers" and "development tools". 138 | ##### A [list of all packages can be found here.](docu/pkgs/src.pkgs.list.tsv) 139 | 140 | ### Counter-Indications 141 | #### Please refrain from using OS/1337 if you just want to "Fuck Around and Find Out"! 142 | ###### This goes espechally to [Linus Sebastian of LinusTechTips](https://news.itsfoss.com/more-linux-distros-become-linus-proof/) who has weapons-grade ["Tech-Illiteracy"](https://www.youtube.com/watch?v=pYQtusd8deU) [unsarcastically!] and a [toxic followership](https://old.reddit.com/r/LinusTechTips/comments/t1e1if/you_destroyed_my_life/) to flex! 143 | #### OS/1337 is not a "DOS"! 144 | ##### Not everything that has a Text Interface is an "MS-DOS clone"! 145 | Your experience with any *DOS won't help you here... 146 | ###### [Please use FreeDOS instead.](https://www.freedos.org/) 147 | ## 148 | 149 | --- 150 | ## [Acknowlegements](docu/acknowledgements.md) 151 | 152 | ### Name 153 | #### OS/1337 154 | It's a wordplay upon [OS/2](https://en.wikipedia.org/wiki/OS/2), [OS/360](https://en.wikipedia.org/wiki/OS/360_and_successors), [OS/390](https://en.wikipedia.org/wiki/OS/390) & [z/OS](https://en.wikipedia.org/wiki/Z/OS). 155 | - Naming it OS/3 or OS/420 was deemed too risky from a trademark standpoint, and one could reason it's meant to spread confusion among users of OS/2 or the OS/360 - z/OS family. 156 | - Exacerbated by the fact that it's neither made nor endorsed by [IBM](https://en.wikipedia.org/wiki/IBM) and doesn't support the same [z/Architecture](https://en.wikipedia.org/wiki/Z/Architecture) as the aformentioned Mainframes. 157 | - It's a homage to old terminal Systems as well as to the clichee of "Hackers" that must always work with amber and/or green consoles on their ThinkPads and MacBooks wearing Fawkes Masks and black Hoodies. 158 | ### 159 | 160 | ### Inspirating Project 161 | #### [Floppinux](https://github.com/w84death/floppinux) 162 | Floppinux is a minimalist Linux distro designed to run from a single 3,5", 1440 KB Floppy Disk. 163 | - It's based on BusyBox and a current Linux Kernel. 164 | - But strips basically most of the unused features out of it. 165 | ### 166 | 167 | --- 168 | ## "Shut Up And Let Me Download!" 169 | ### "Sharing is Caring" 170 | Ready-to-Use Binary Versions are [only distributed via magnet: links](https://en.wikipedia.org/wiki/Magnet_URI_scheme) over [BitTorrent](https://en.wikipedia.org/wiki/BitTorrent) in order to enshure resilient availability and speed for everyone. 171 | - Just use [Transmission](https://transmissionbt.com/) or [LibreTorrent](https://f-droid.org/en/packages/org.proninyaroslav.libretorrent/) for Downloading if you don't know how. 172 | - If your ISP blocks BitTorrent get rid of your ISP or use a VPN. 173 | - Just don't be antisocial and use Tor to Torrent because all you'll do is exhaust valuable bandwith of exit nodes whilst compromizing your own anonymity. 174 | - This is free software, not some pirated stuff! 175 | - If you think BitTorrent has no "legitimate use" then you are banned from using OS/1337. 176 | - Same goes for those that just download from the severely bandwith-restricted webseed and/or only leech the torrent. 177 | ### 178 | 179 | ### And before anyone asks: 180 | #### YES we are aware of [ClownFlare](https://en.wikipedia.org/wiki/Cloudflare#Kiwi_Farms) existing. 181 | - [Liz Fong-Jones has done a pretty good 3 part explainer series why you should never use them at all](https://www.youtube.com/watch?v=Np9erdnM4l8&list=PLI84-gNHkUdvE1u_Kfz3qS9h75n-m-T3y&pp=iAQB) and in a way more concise and understandable form without ranting than I could do. 182 | - After all, [the current maintainer](https://twitter.com/k3vk4/status/1562956359686971392) pushed for [#DropKiwifarms](https://github.com/greyhat-academy/lists.d#why-use-it) on other occasions. 183 | ##### We won't solve scalability issues by creating de-facto monopolists or oligopolists! 184 | - Espechally if these are [knowingly and willingly supporting Terrorism by their own admission](https://en.wikipedia.org/wiki/Cloudflare#Terrorism) and are [more part of the Problems than Solutions](https://en.wikipedia.org/wiki/Cloudflare#Crime). 185 | - ["Protecting the Good Guys for free"](https://en.wikipedia.org/wiki/Cloudflare#Response_to_the_Russian_invasion_of_Ukraine) doesn't make said business less of a [protection racket](https://en.wikipedia.org/wiki/Protection_racket) as they knowingly and willingly also host [attackers wanting to extort others for ransom](https://en.wikipedia.org/wiki/Denial-of-service_attack#DDoS_extortion). 186 | ###### Otherwise it would be pretty ridiculous to advocate for decentralization, multi-vendor & multi-provider solutions if not done so in real life, because one would otherwise [contribute to the increasing Enshittification of the the Internet](https://en.wikipedia.org/wiki/Enshittification). 187 | ### 188 | 189 | --- 190 | 191 | ## [Further Reading](docu/further-sources.md) 192 | 193 | ## See Also: 194 | #### [Prof. Wim Vanderbauwhede](https://labs.ripe.net/author/anastasiya-pak/frugal-computing-for-a-sustainable-internet/) 195 | [Frugal Computing](https://arxiv.org/pdf/2303.06642v1.pdf) 196 | -------------------------------------------------------------------------------- /build/0.CORE/build/dropbear/compile.dbclient.sh: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | ./configure --disable-zlib --disable-x11 --disable-agent-forwarding 3 | LDFLAGS=-W1,--gc-sections,--static CROSS_COMPILE=i486-linux-musl-cross/bin/i486-linux-musl- CFLAGS="-Os -ffunction-sections -fdata-sections" make ARCH=x86 dbclient 4 | ls -alh 5 | echo 'done!' 6 | exit 7 | -------------------------------------------------------------------------------- /build/0.CORE/build/image/create.1440kb.floppy.sh: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | echo 'creating 1440kB 3,5" FDD Image and making it bootable...' 3 | cd ./../../fdd/ 4 | sudo dd if=/dev/zero of=./os1337.img bs=1k count=1440 5 | sudo mkdosfs ./os1337.img 6 | sudo syslinux --install ./os1337.img 7 | ls -alh 8 | echo 'done!' 9 | exit 10 | -------------------------------------------------------------------------------- /build/0.CORE/build/image/create.initramfs.sh: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | echo 'compressing filesystem into xz-compressed cpio initramfs' 3 | cd ./../../fdd/fs 4 | chmod +x ./etc/init 5 | sudo chown -R root:root . 6 | find . | cpio -H newc -o | xz -9 --check=crc32 > ../rootfs.cpio.xz 7 | ls -alh 8 | echo 'done!' 9 | exit 10 | -------------------------------------------------------------------------------- /build/0.CORE/build/image/create.spechalfiles.sh: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | echo 'creating spechal files needed for system' 3 | cd ./../../fdd/fs 4 | sudo mknod dev/console c 5 1 5 | sudo mknod dev/null c 1 3 6 | ls -alh 7 | echo 'done!' 8 | exit 9 | -------------------------------------------------------------------------------- /build/0.CORE/build/image/fill.floppy.sh: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | echo 'mounting and setting up floppy image...' 3 | cd ./../../fdd/ 4 | sudo mount -o loop ./os1337.img /mnt 5 | sudo ls -alh /mnt 6 | sudo cp bzImage /mnt 7 | sudo cp rootfs.cpio.xz /mnt 8 | sudo cp syslinux.cfg /mnt 9 | sudo ls -alh /mnt 10 | sudo umount /mnt 11 | ls -alh 12 | echo 'done!' 13 | exit 14 | -------------------------------------------------------------------------------- /build/0.CORE/build/linux/compile.linux.sh: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | LDFLAGS=--static CROSS_COMPILE=i486-linux-musl-cross/bin/i486-linux-musl- make ARCH=x86 bzImage 3 | ls -alh ./arch/x86/boot 4 | exit 5 | -------------------------------------------------------------------------------- /build/0.CORE/build/sources.list.tsv: -------------------------------------------------------------------------------- 1 | COMPONENT TYPE VERSION ARCH LICENSE SOURCE WEBSITE NOTES 2 | linux Kernel 6.6.6 src GPLv2 https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-6.6.6.tar.xz https://kernel.org/ Linux Kernel 3 | musl-cross C Library latest i486 MIT https://landley.net/bin/toolchains/latest/i486-linux-musl-cross.tar.xz https://musl.libc.org/ Small yet efficient C library 4 | toybox Userland 0.8.10 src 0BSD https://github.com/landley/toybox/archive/refs/tags/0.8.10.tar.gz https://landley.net/toybox/ Efficient Useland for Embedded Linux 5 | dropbear-client SSH Client 2022.83 src multiple, BSD-like https://matt.ucc.asn.au/dropbear/releases/dropbear-2022.83.tar.bz2 https://matt.ucc.asn.au/dropbear/dropbear.html A small SSH Client 6 | -------------------------------------------------------------------------------- /build/0.CORE/build/toybox/compile.toybox.sh: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | LDFLAGS=--static CROSS_COMPILE=i486-linux-musl-cross/bin/i486-linux-musl- make ARCH=x86 toybox 3 | ls -alh 4 | exit -------------------------------------------------------------------------------- /build/0.CORE/build/toybox/toybox-0.8.10-i486-minimal.config: -------------------------------------------------------------------------------- 1 | # 2 | # Automatically generated make config: don't edit 3 | # ToyBox version: KCONFIG_VERSION 4 | # Fri Dec 22 10:38:34 2023 5 | # 6 | # CONFIG_TOYBOX_ON_ANDROID is not set 7 | CONFIG_TOYBOX_FORK=y 8 | 9 | # 10 | # Posix commands 11 | # 12 | # CONFIG_BASENAME is not set 13 | # CONFIG_CAL is not set 14 | CONFIG_CAT=y 15 | # CONFIG_CHGRP is not set 16 | # CONFIG_CHOWN is not set 17 | # CONFIG_CHMOD is not set 18 | # CONFIG_CKSUM is not set 19 | # CONFIG_CRC32 is not set 20 | # CONFIG_CMP is not set 21 | # CONFIG_COMM is not set 22 | # CONFIG_CP is not set 23 | # CONFIG_MV is not set 24 | # CONFIG_INSTALL is not set 25 | # CONFIG_CPIO is not set 26 | # CONFIG_CUT is not set 27 | CONFIG_DATE=y 28 | CONFIG_DD=y 29 | CONFIG_DF=y 30 | # CONFIG_DIRNAME is not set 31 | CONFIG_DU=y 32 | CONFIG_ECHO=y 33 | # CONFIG_ENV is not set 34 | # CONFIG_EXPAND is not set 35 | # CONFIG_FALSE is not set 36 | # CONFIG_FILE is not set 37 | # CONFIG_FIND is not set 38 | # CONFIG_GETCONF is not set 39 | # CONFIG_GREP is not set 40 | # CONFIG_EGREP is not set 41 | # CONFIG_FGREP is not set 42 | # CONFIG_HEAD is not set 43 | # CONFIG_ICONV is not set 44 | # CONFIG_ID is not set 45 | # CONFIG_ID_Z is not set 46 | # CONFIG_GROUPS is not set 47 | # CONFIG_LOGNAME is not set 48 | # CONFIG_WHOAMI is not set 49 | # CONFIG_KILL is not set 50 | # CONFIG_KILLALL5 is not set 51 | # CONFIG_LINK is not set 52 | # CONFIG_LN is not set 53 | # CONFIG_LOGGER is not set 54 | CONFIG_LS=y 55 | # CONFIG_MKDIR is not set 56 | # CONFIG_MKDIR_Z is not set 57 | # CONFIG_MKFIFO is not set 58 | # CONFIG_MKFIFO_Z is not set 59 | # CONFIG_NICE is not set 60 | # CONFIG_NL is not set 61 | # CONFIG_NOHUP is not set 62 | # CONFIG_OD is not set 63 | # CONFIG_PASTE is not set 64 | # CONFIG_PATCH is not set 65 | CONFIG_PRINTF=y 66 | CONFIG_PS=y 67 | CONFIG_TOP=y 68 | CONFIG_IOTOP=y 69 | # CONFIG_PGREP is not set 70 | # CONFIG_PKILL is not set 71 | # CONFIG_PWD is not set 72 | # CONFIG_RENICE is not set 73 | # CONFIG_RM is not set 74 | # CONFIG_RMDIR is not set 75 | # CONFIG_SED is not set 76 | # CONFIG_SLEEP is not set 77 | # CONFIG_SORT is not set 78 | # CONFIG_SORT_FLOAT is not set 79 | # CONFIG_SPLIT is not set 80 | # CONFIG_STRINGS is not set 81 | # CONFIG_TAIL is not set 82 | # CONFIG_TAR is not set 83 | # CONFIG_TEE is not set 84 | CONFIG_TEST=y 85 | CONFIG_TEST_GLUE=y 86 | # CONFIG_TIME is not set 87 | # CONFIG_TOUCH is not set 88 | # CONFIG_TRUE is not set 89 | # CONFIG_TTY is not set 90 | # CONFIG_ULIMIT is not set 91 | # CONFIG_ARCH is not set 92 | # CONFIG_LINUX32 is not set 93 | CONFIG_UNAME=y 94 | # CONFIG_UNIQ is not set 95 | # CONFIG_UNLINK is not set 96 | # CONFIG_UUDECODE is not set 97 | # CONFIG_UUENCODE is not set 98 | # CONFIG_WC is not set 99 | # CONFIG_WHO is not set 100 | # CONFIG_XARGS is not set 101 | 102 | # 103 | # Pending (unfinished) commands 104 | # 105 | # CONFIG_ARP is not set 106 | # CONFIG_ARPING is not set 107 | # CONFIG_BC is not set 108 | # CONFIG_BOOTCHARTD is not set 109 | # CONFIG_BRCTL is not set 110 | # CONFIG_CHSH is not set 111 | # CONFIG_CROND is not set 112 | # CONFIG_CRONTAB is not set 113 | CONFIG_DHCP=y 114 | # CONFIG_DHCP6 is not set 115 | # CONFIG_DHCPD is not set 116 | # CONFIG_DEBUG_DHCP is not set 117 | # CONFIG_DIFF is not set 118 | # CONFIG_DUMPLEASES is not set 119 | # CONFIG_EXPR is not set 120 | # CONFIG_FDISK is not set 121 | # CONFIG_FOLD is not set 122 | # CONFIG_FSCK is not set 123 | # CONFIG_GETFATTR is not set 124 | # CONFIG_GETOPT is not set 125 | # CONFIG_GETTY is not set 126 | # CONFIG_GITCOMPAT is not set 127 | # CONFIG_GITCLONE is not set 128 | # CONFIG_GITINIT is not set 129 | # CONFIG_GITREMOTE is not set 130 | # CONFIG_GITFETCH is not set 131 | # CONFIG_GITCHECKOUT is not set 132 | # CONFIG_GROUPADD is not set 133 | # CONFIG_GROUPDEL is not set 134 | # CONFIG_HEXDUMP is not set 135 | # CONFIG_HD is not set 136 | CONFIG_INIT=y 137 | # CONFIG_IP is not set 138 | # CONFIG_IPCRM is not set 139 | # CONFIG_IPCS is not set 140 | # CONFIG_KLOGD is not set 141 | # CONFIG_KLOGD_SOURCE_RING_BUFFER is not set 142 | # CONFIG_LAST is not set 143 | # CONFIG_LSOF is not set 144 | # CONFIG_MAN is not set 145 | # CONFIG_MDEV is not set 146 | # CONFIG_MDEV_CONF is not set 147 | # CONFIG_MKE2FS is not set 148 | # CONFIG_MKE2FS_JOURNAL is not set 149 | # CONFIG_MKE2FS_GEN is not set 150 | # CONFIG_MKE2FS_LABEL is not set 151 | # CONFIG_MKE2FS_EXTENDED is not set 152 | # CONFIG_MODPROBE is not set 153 | # CONFIG_MORE is not set 154 | # CONFIG_ROUTE is not set 155 | CONFIG_SH=y 156 | # CONFIG_CD is not set 157 | # CONFIG_DECLARE is not set 158 | # CONFIG_EXIT is not set 159 | # CONFIG_SET is not set 160 | # CONFIG_UNSET is not set 161 | # CONFIG_EVAL is not set 162 | # CONFIG_EXEC is not set 163 | # CONFIG_EXPORT is not set 164 | # CONFIG_JOBS is not set 165 | # CONFIG_LOCAL is not set 166 | # CONFIG_SHIFT is not set 167 | # CONFIG_SOURCE is not set 168 | # CONFIG_WAIT is not set 169 | # CONFIG_STRACE is not set 170 | # CONFIG_STTY is not set 171 | # CONFIG_SULOGIN is not set 172 | # CONFIG_SYSLOGD is not set 173 | # CONFIG_TCPSVD is not set 174 | # CONFIG_TELNET is not set 175 | # CONFIG_TELNETD is not set 176 | # CONFIG_TFTP is not set 177 | # CONFIG_TFTPD is not set 178 | # CONFIG_TR is not set 179 | # CONFIG_TRACEROUTE is not set 180 | # CONFIG_USERADD is not set 181 | # CONFIG_USERDEL is not set 182 | # CONFIG_VI is not set 183 | # CONFIG_XZCAT is not set 184 | 185 | # 186 | # Other commands 187 | # 188 | # CONFIG_ACPI is not set 189 | # CONFIG_ASCII is not set 190 | # CONFIG_UNICODE is not set 191 | # CONFIG_BASE64 is not set 192 | # CONFIG_BASE32 is not set 193 | # CONFIG_BLKDISCARD is not set 194 | # CONFIG_BLKID is not set 195 | # CONFIG_FSTYPE is not set 196 | # CONFIG_BLOCKDEV is not set 197 | # CONFIG_BUNZIP2 is not set 198 | # CONFIG_BZCAT is not set 199 | # CONFIG_CHCON is not set 200 | # CONFIG_CHROOT is not set 201 | # CONFIG_CHRT is not set 202 | CONFIG_CLEAR=y 203 | # CONFIG_COUNT is not set 204 | # CONFIG_DEVMEM is not set 205 | # CONFIG_DOS2UNIX is not set 206 | # CONFIG_UNIX2DOS is not set 207 | # CONFIG_EJECT is not set 208 | # CONFIG_FACTOR is not set 209 | # CONFIG_FALLOCATE is not set 210 | # CONFIG_FLOCK is not set 211 | # CONFIG_FMT is not set 212 | CONFIG_FREE=y 213 | # CONFIG_FREERAMDISK is not set 214 | # CONFIG_FSFREEZE is not set 215 | # CONFIG_FSYNC is not set 216 | # CONFIG_GPIODETECT is not set 217 | # CONFIG_GPIOFIND is not set 218 | # CONFIG_GPIOINFO is not set 219 | # CONFIG_GPIOGET is not set 220 | # CONFIG_GPIOSET is not set 221 | # CONFIG_HELP is not set 222 | # CONFIG_HEXEDIT is not set 223 | # CONFIG_HWCLOCK is not set 224 | # CONFIG_I2CDETECT is not set 225 | # CONFIG_I2CDUMP is not set 226 | # CONFIG_I2CGET is not set 227 | # CONFIG_I2CSET is not set 228 | # CONFIG_I2CTRANSFER is not set 229 | # CONFIG_INOTIFYD is not set 230 | # CONFIG_INSMOD is not set 231 | # CONFIG_IONICE is not set 232 | # CONFIG_IORENICE is not set 233 | # CONFIG_LOGIN is not set 234 | # CONFIG_LOSETUP is not set 235 | # CONFIG_LSATTR is not set 236 | # CONFIG_CHATTR is not set 237 | CONFIG_LSMOD=y 238 | CONFIG_LSPCI=y 239 | CONFIG_LSUSB=y 240 | CONFIG_MAKEDEVS=y 241 | CONFIG_MCOOKIE=y 242 | # CONFIG_MIX is not set 243 | # CONFIG_MKPASSWD is not set 244 | # CONFIG_MKSWAP is not set 245 | # CONFIG_MODINFO is not set 246 | # CONFIG_MOUNTPOINT is not set 247 | # CONFIG_NBD_CLIENT is not set 248 | # CONFIG_NBD_SERVER is not set 249 | # CONFIG_UNSHARE is not set 250 | # CONFIG_NSENTER is not set 251 | CONFIG_ONEIT=y 252 | CONFIG_OPENVT=y 253 | # CONFIG_CHVT is not set 254 | # CONFIG_DEALLOCVT is not set 255 | # CONFIG_PARTPROBE is not set 256 | # CONFIG_PIVOT_ROOT is not set 257 | # CONFIG_PMAP is not set 258 | # CONFIG_PRINTENV is not set 259 | # CONFIG_PWDX is not set 260 | # CONFIG_PWGEN is not set 261 | # CONFIG_READAHEAD is not set 262 | # CONFIG_READELF is not set 263 | # CONFIG_READLINK is not set 264 | # CONFIG_REALPATH is not set 265 | CONFIG_REBOOT=y 266 | CONFIG_RESET=y 267 | # CONFIG_REV is not set 268 | # CONFIG_RMMOD is not set 269 | # CONFIG_RTCWAKE is not set 270 | # CONFIG_SETFATTR is not set 271 | # CONFIG_SETSID is not set 272 | # CONFIG_SHA3SUM is not set 273 | # CONFIG_SHRED is not set 274 | # CONFIG_SHUF is not set 275 | # CONFIG_STAT is not set 276 | CONFIG_SWAPOFF=y 277 | CONFIG_SWAPON=y 278 | # CONFIG_SWITCH_ROOT is not set 279 | # CONFIG_SYSCTL is not set 280 | # CONFIG_TAC is not set 281 | # CONFIG_NPROC is not set 282 | # CONFIG_TASKSET is not set 283 | # CONFIG_TIMEOUT is not set 284 | # CONFIG_TRUNCATE is not set 285 | # CONFIG_UCLAMPSET is not set 286 | # CONFIG_UPTIME is not set 287 | # CONFIG_USLEEP is not set 288 | # CONFIG_UUIDGEN is not set 289 | # CONFIG_VCONFIG is not set 290 | # CONFIG_VMSTAT is not set 291 | # CONFIG_W is not set 292 | # CONFIG_WATCH is not set 293 | # CONFIG_WATCHDOG is not set 294 | # CONFIG_WHICH is not set 295 | # CONFIG_XXD is not set 296 | # CONFIG_YES is not set 297 | 298 | # 299 | # Networking commands 300 | # 301 | # CONFIG_FTPGET is not set 302 | # CONFIG_FTPPUT is not set 303 | CONFIG_HOST=y 304 | # CONFIG_HTTPD is not set 305 | CONFIG_IFCONFIG=y 306 | # CONFIG_MICROCOM is not set 307 | CONFIG_NETCAT=y 308 | CONFIG_NETSTAT=y 309 | CONFIG_PING=y 310 | # CONFIG_RFKILL is not set 311 | # CONFIG_SNTP is not set 312 | # CONFIG_TUNCTL is not set 313 | CONFIG_WGET=y 314 | # CONFIG_WGET_LIBTLS is not set 315 | 316 | # 317 | # Linux Standard Base commands 318 | # 319 | # CONFIG_DMESG is not set 320 | # CONFIG_GZIP is not set 321 | # CONFIG_GUNZIP is not set 322 | # CONFIG_ZCAT is not set 323 | CONFIG_HOSTNAME=y 324 | CONFIG_DNSDOMAINNAME=y 325 | CONFIG_KILLALL=y 326 | # CONFIG_MD5SUM is not set 327 | # CONFIG_SHA1SUM is not set 328 | # CONFIG_SHA224SUM is not set 329 | # CONFIG_SHA256SUM is not set 330 | # CONFIG_SHA384SUM is not set 331 | # CONFIG_SHA512SUM is not set 332 | # CONFIG_MKNOD is not set 333 | # CONFIG_MKNOD_Z is not set 334 | # CONFIG_MKTEMP is not set 335 | CONFIG_MOUNT=y 336 | # CONFIG_PASSWD is not set 337 | # CONFIG_PASSWD_SAD is not set 338 | CONFIG_PIDOF=y 339 | # CONFIG_SEQ is not set 340 | CONFIG_SU=y 341 | CONFIG_SYNC=y 342 | CONFIG_UMOUNT=y 343 | 344 | # 345 | # Example commands 346 | # 347 | # CONFIG_DEMO_MANY_OPTIONS is not set 348 | # CONFIG_DEMO_NUMBER is not set 349 | # CONFIG_DEMO_SCANKEY is not set 350 | # CONFIG_DEMO_UTF8TOWC is not set 351 | # CONFIG_HELLO is not set 352 | # CONFIG_HOSTID is not set 353 | # CONFIG_LOGPATH is not set 354 | # CONFIG_SKELETON is not set 355 | # CONFIG_SKELETON_ALIAS is not set 356 | 357 | # 358 | # Android commands 359 | # 360 | # CONFIG_GETENFORCE is not set 361 | # CONFIG_LOAD_POLICY is not set 362 | # CONFIG_LOG is not set 363 | # CONFIG_RESTORECON is not set 364 | # CONFIG_RUNCON is not set 365 | # CONFIG_SENDEVENT is not set 366 | # CONFIG_SETENFORCE is not set 367 | 368 | # 369 | # 370 | # 371 | 372 | # 373 | # Toybox global settings 374 | # 375 | CONFIG_TOYBOX=y 376 | CONFIG_TOYBOX_SUID=y 377 | CONFIG_TOYBOX_LSM_NONE=y 378 | # CONFIG_TOYBOX_SELINUX is not set 379 | # CONFIG_TOYBOX_SMACK is not set 380 | # CONFIG_TOYBOX_LIBCRYPTO is not set 381 | # CONFIG_TOYBOX_LIBZ is not set 382 | # CONFIG_TOYBOX_FLOAT is not set 383 | # CONFIG_TOYBOX_HELP is not set 384 | # CONFIG_TOYBOX_HELP_DASHDASH is not set 385 | # CONFIG_TOYBOX_FREE is not set 386 | # CONFIG_TOYBOX_NORECURSE is not set 387 | # CONFIG_TOYBOX_DEBUG is not set 388 | CONFIG_TOYBOX_UID_SYS=100 389 | CONFIG_TOYBOX_UID_USR=500 390 | # CONFIG_TOYBOX_FORCE_NOMMU is not set 391 | -------------------------------------------------------------------------------- /build/0.CORE/fdd/bzImage: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OS-1337/OS1337/4a70112a8b403953abe8a68714626f4bdad8b08a/build/0.CORE/fdd/bzImage -------------------------------------------------------------------------------- /build/0.CORE/fdd/fs/bin/dbclient: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OS-1337/OS1337/4a70112a8b403953abe8a68714626f4bdad8b08a/build/0.CORE/fdd/fs/bin/dbclient -------------------------------------------------------------------------------- /build/0.CORE/fdd/fs/bin/toybox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OS-1337/OS1337/4a70112a8b403953abe8a68714626f4bdad8b08a/build/0.CORE/fdd/fs/bin/toybox -------------------------------------------------------------------------------- /build/0.CORE/fdd/fs/etc/init: -------------------------------------------------------------------------------- 1 | #!/bin/toybox bash 2 | /bin/toybox mount -t proc none /proc 3 | /bin/toybox mount -t sysfs none /sys 4 | /bin/toyboy mount -nvt tmpfs none /dev 5 | /bin/toybox lspci 6 | /bin/toybox lsusb 7 | /bin/toybox echo -ne '\007' 8 | /bin/toybox sleep 1 9 | /bin/toybox echo -ne '\007' 10 | /bin/toybox uname 11 | /bin/toybox uname -r 12 | /bin/toybox cat welcome.txt 13 | /bin/toybox oneit -rn -c /dev/tty0 /bin/toybox bash 14 | /bin/toybox oneit -rn -c /dev/console /bin/toybox bash 15 | /bin/toybox oneit -rn -c /bin/toybox openvt -c 0 -s 16 | -------------------------------------------------------------------------------- /build/0.CORE/fdd/fs/etc/inittab: -------------------------------------------------------------------------------- 1 | ::sysinit:/etc/init 2 | ::askfirst:/bin/toybox 3 | ::restart:/bin/init 4 | ::ctrlaltdel:/bin/toybox reboot 5 | ::shutdown:/bin/toybox umount -a -r 6 | ::ssh:/bin/dbclient 7 | ::profile:/etc/profile -------------------------------------------------------------------------------- /build/0.CORE/fdd/fs/etc/profile: -------------------------------------------------------------------------------- 1 | # Bash Aliases 2 | ## Based off: https://github.com/kkarhan/misc-scripts/blob/master/bash/.bash_aliases 3 | ## Useful commands 4 | alias flushcache='sudo sh -c "sync; echo 3 > /proc/sys/vm/drop_caches"' 5 | ### Flush the RAM forcefully 6 | ### See: https://www.cyberithub.com/drop-flush-clear-cache-memory-ram-in-linux/ 7 | ## faster to type, DOS-alike commands 8 | alias cls='clear' 9 | alias dir='ls -ahl' 10 | alias unixtime='date +%s' 11 | ### Output Unixtime 12 | alias ding='printf '\a'' 13 | ### Create a Beep [printing out BELL character to stdout] 14 | ### See: https://github.com/OS-1337/OS1337/issues/19#issuecomment-1867469203 15 | function isup() { ping -a -b -c 1 -D "$@"; } 16 | ### Single Ping attempt to a specific host which has to be specified i.e. "isup 192.168.0.1" 17 | ### This is done to see if a host "is up"... 18 | alias pub4='wget -O http://ip4only.me/api/ ; echo;' 19 | ### find public IPv4 adress using http://ip4only.me/ 20 | ### NOTE: Lack of IPv4 connectivity will result in a 404 error! 21 | -------------------------------------------------------------------------------- /build/0.CORE/fdd/fs/welcome.txt: -------------------------------------------------------------------------------- 1 | 2 | ╔══════════════════════════════════════════════════════════════════════════════╗ 3 | ║ Welcome to OS/1337! ║ 4 | ║ Version: 0.0.1 Release 1 ║ 5 | ╠══════════════════════════════════════════════════════════════════════════════╣ 6 | ║ This is the "CORE" Edition designed to fit a single 1440kB FDD. ║ 7 | ║ The following tools are integrated in this release: ║ 8 | ║ - Linux 6.6.6-i486 [with basic network drivers for legacy systems!] ║ 9 | ║ - toybox 0.8.10-i486 [tho not all functions are included!] ║ 10 | ║ - dbclient 2022.83-i486 [Dropbear SSH Client as single static executeable] ║ 11 | ╟──────────────────────────────────────────────────────────────────────────────╢ 12 | ║ Due to size constraints, manpages / -help texts had to be omnitted! ║ 13 | ║ You'll find those in our repo linked on: https://os1337.com ║ 14 | ║ For toybox commands, see: https://landley.net/toybox/help.html ║ 15 | ╚══════════════════════════════════════════════════════════════════════════════╝ 16 | 17 | -------------------------------------------------------------------------------- /build/0.CORE/fdd/rootfs.cpio.xz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OS-1337/OS1337/4a70112a8b403953abe8a68714626f4bdad8b08a/build/0.CORE/fdd/rootfs.cpio.xz -------------------------------------------------------------------------------- /build/0.CORE/fdd/syslinux.cfg: -------------------------------------------------------------------------------- 1 | DEFAULT linux 2 | LABEL linux 3 | SAY [ BOOTING OS/1337 VERSION 0.0.1 ] 4 | KERNEL bzImage 5 | APPEND initrd=rootfs.cpio.xz 6 | -------------------------------------------------------------------------------- /docu/LICENSES.md: -------------------------------------------------------------------------------- 1 | # OS/1337 2 | ## Licenses of Subcomponents used in OS/1337 3 | #### Provided in compliance with said licenses 4 | 5 | --- 6 | 7 | --- 8 | 9 | ## [Linux](https://kernel.org/) 10 | ### Licensed under [GNU GPLv2 only](docu/external/licenses/gplv2-only.md) 11 | - For details, please see the [documentation re: Linux Kernel Licensing in the official documentation](https://docs.kernel.org/process/license-rules.html) 12 | - Used Version: 6.6.6 13 | - Which can be [downloaded from kernel.org](https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-6.6.6.tar.xz) 14 | 15 | --- 16 | 17 | ## [toybox](http://landley.net/toybox/) 18 | ### Licensed under [0BSD](docu/external/licenses/0bsd.md) 19 | - For details, please see the [official Website for Toybox](http://landley.net/toybox/license.html) 20 | - Used Version: 0.8.10 21 | - Which can be [downloaded from the official Website](https://landley.net/toybox/downloads/toybox-0.8.10.tar.gz) 22 | 23 | --- 24 | 25 | ## [Dropbear SSH](https://matt.ucc.asn.au/dropbear/dropbear.html) 26 | ### [Multiple permissive licenses](docu/external/licenses/dropbear-license.md) 27 | - For details, please see the [LICENSE file in the official git](https://github.com/mkj/dropbear/blob/master/LICENSE) 28 | - Used Version: 2022.83 29 | - Which can be [downloaded from the official Website](https://matt.ucc.asn.au/dropbear/releases/dropbear-2022.83.tar.bz2) 30 | 31 | --- 32 | 33 | ## [SYSLINUX](https://wiki.syslinux.org/wiki/index.php?title=The_Syslinux_Project) 34 | ### Licensed under [GNU GPLv2+](docu/external/licenses/gplv2+.md) 35 | - For details, please see the [SYSLINUX Website](https://wiki.syslinux.org/wiki/index.php?title=SYSLINUX) 36 | - Used Version: 6.04 37 | - Which was [packaged by Canonical for Ubuntu 22.04 LTS](https://packages.ubuntu.com/jammy/syslinux) and it's [sourcecode is being offered via their Servers](http://archive.ubuntu.com/ubuntu/pool/main/s/syslinux/syslinux_6.04~git20190206.bf6db5b4+dfsg1.orig.tar.xz) 38 | --- 39 | -------------------------------------------------------------------------------- /docu/acknowledgements.md: -------------------------------------------------------------------------------- 1 | # OS/1337 2 | ### Acknowledgements 3 | The labour that others did contribute or was harnessed in OS71337. 4 | 5 | --- 6 | 7 | ## [Linux Kernel](https://kernel.org/) 8 | - To the countless contributors and [maintainers](https://kernel.org/category/releases.html) that make it just easy to download, configure and compile without much fidding. 9 | - To all those that keep drivers up and running for old hardware that is definitely vintage. 10 | - To those that keep it stable and secure and freely accessible to the world. 11 | 12 | ### 13 | ## [Toybox](https://github.com/landley/toybox) 14 | #### [Rob Landley et. al.](http://landley.net/toybox/) 15 | 1. For making a better alternative to [BusyBox](https://en.wikipedia.org/wiki/BusyBox) with a [more permissive license](https://en.wikipedia.org/wiki/BusyBox#Controversy_over_Toybox) known as [0BSD](https://en.wikipedia.org/wiki/BSD_licenses#0-clause_license_(%22BSD_Zero_Clause_License%22)), with an [in-depth explainer why](http://landley.net/toybox/license.html). 16 | 2. Excellent documentation on [how to build & cross-compile it from source](http://landley.net/toybox/quick.html), [the code written](http://landley.net/toybox/code.html) and a good [online manpage that shows what every command does](http://landley.net/toybox/help.html). 17 | 3. Being patient and willing to answer [noob-ish questions on my part](https://github.com/landley/toybox/issues/451). 18 | 19 | ### 20 | ## [musl C-library](https://musl.libc.org/) 21 | ### musl-cross toolchain 22 | - Thanks again to Rob Landley for providing [ready-to-roll musl-cross binaries and tarballs](http://landley.net/toybox/downloads/binaries/toolchains/latest/). 23 | 24 | ### 25 | ## [SYSLINUX](https://wiki.syslinux.org/wiki/index.php?title=The_Syslinux_Project) 26 | For being a [functioning bootloader](https://en.wikipedia.org/wiki/SYSLINUX) that just works on Floppies or basically anything. 27 | 28 | ## 29 | 30 | --- 31 | 32 | ## Notable mentions 33 | These are mostly projects that inspired me to give it a go. 34 | 35 | #### 36 | ### [Floppinux](https://github.com/w84death/floppinux) 37 | #### Krzysztof Krystian Jankowski et. al. 38 | - For [documenting how Floppinux was being built in a reproduceible manner](https://archive.org/details/floppinux-manual/). 39 | - It pretty much got me [very far](https://mstdn.social/@kkarhan/111409592616485280) in the development cycle of OS/1337. 40 | 41 | #### 42 | ### [tmsrtbt](https://en.wikipedia.org/wiki/Tomsrtbt) 43 | ##### (spelled: *"Tom's Root Boot"*) 44 | A [sadly unmaintained](http://www.toms.net/rb/) Linux Distribution designed to fit on a 3,5" 1.440 kB FDD. 45 | 46 | #### 47 | ### [floppyfw](https://en.wikipedia.org/wiki/Floppyfw) 48 | A minimalist Busybox/Linux distro that could turn any [i386-SX](https://en.wikipedia.org/wiki/I386#80386SX) with 12MB RAM, 2 NICs and a 1440kB FDD into a functional firewall. 49 | 50 | #### 51 | ### [Aboriginal Linux](http://landley.net/aboriginal/) *nee* [Firmware Linux](https://landley.net/code/firmware/old/) 52 | A minimalist Busybox/Linux Distribution maintained by Rob Landley (the ex-maintainer of BusyBox and [now-maintainer of toybox](http://landley.net/toybox/)) which aimed to be the smallest, "self-hosting" aka. self-compiling Linux Distribution. 53 | 54 | #### 55 | ### [mkroot](https://github.com/landley/mkroot) 56 | The Successor Project of Aboriginal Linux which [has been marged into toybox since 2020.](https://github.com/landley/toybox) 57 | 58 | #### 59 | ### [ttylinux](http://www.minimalinux.org/ttylinux/) 60 | A minimalist Linux distro that only needs 8MB of storage and 28MB of RAM, but uses [regular linux components](http://www.minimalinux.org/ttylinux/about.html) like glibc, bash and so forth. 61 | 62 | #### 63 | ### [TinyCore Linux](https://en.wikipedia.org/wiki/Tiny_Core_Linux) 64 | Being a [very smol and nifty distro](http://tinycorelinux.net/) abeit with way more space to work work. 65 | - It's also available with [Xorg](https://en.wikipedia.org/wiki/X.Org_Server) for a fancy [GUI Desktop](https://en.wikipedia.org/wiki/Graphical_user_interface#Popularization). 66 | 67 | #### 68 | ### [Damn Small Linux](https://en.wikipedia.org/wiki/Damn_Small_Linux) 69 | For being one of the first Linux Distros I tried and that saved my friends-, customers-, and employers' asses countless times. 70 | - Nowadays I'm a bit more lazy and use [Rescatux](https://www.supergrubdisk.org/category/download/rescatuxdownloads/rescatux-stable/) instead. 71 | ##### See also: [SystemRescueCD](https://www.system-rescue.org/) 72 | 73 | #### 74 | ### [Knoppix](https://en.wikipedia.org/wiki/Knoppix) 75 | Being [the go-to](https://www.knopper.net/knoppix/index-en.html) ["LiveCD"](https://en.wikipedia.org/wiki/Live_CD) to work with. 76 | 77 | 78 | ### 79 | ### [BunsenLabs Linux](https://en.wikipedia.org/wiki/CrunchBang_Linux#BunsenLabs) 80 | Showcasing that a [minimal yet nice Desktop for 32bit/ix86 was still useful and in demand](https://www.bunsenlabs.org/installation.html). 81 | 82 | ### 83 | ### [Ubuntu](https://ubuntu.com/) 84 | - Both [Ubuntu LTS Server](https://ubuntu.com/download/server) and [Ubuntu LTS Desktop](https://ubuntu.com/download/desktop) as they are my go-to OSes to work on that are [reliable and don't get viruses or crashes or cause a ton of headaches](https://www.youtube.com/watch?v=0eEG5LVXdKo&t=1752s). 85 | - Whilst [Ubuntu Core](https://ubuntu.com/core) may be a good solution for a lot of [IoT](https://ubuntu.com/download/iot) devices and projects, 86 | 87 | ### 88 | ### [VxWorks](https://www.windriver.com/products/vxworks) 89 | - Utilizing the same approach as used for OS/1337 by having a [seperate development envoirment on different Hardware than the target system.](https://en.wikipedia.org/wiki/VxWorks#Development_environment) 90 | - This is done out of convenience and to allow the use of development tools outside of those supported on OS/1337. 91 | - OFC it's desireable to have OS71337 *self-hosting* tho as of now this is not regarded with as high of a priority than for toybox. 92 | 93 | ### 94 | ### [Wind River Linux](https://www.windriver.com/products/linux) 95 | - Which can be considered to be similar abeit as a commercial solution with [one time purchase for licensing per project](https://en.wikipedia.org/wiki/Wind_River_Systems#Wind_River_Linux) 96 | - OFC in that regard it's not dissimilar from [RHEL](https://en.wikipedia.org/wiki/Red_Hat_Enterprise_Linux), [SLES & SLED](https://en.wikipedia.org/wiki/SUSE_Linux_Enterprise) being an Enterprise Linux Distribution. 97 | - The "Free" version is just "Yocto Linux" from [Yocto Project](docu/acknowledgements.md)#Yocto) 98 | 99 | ### 100 | ### [Yocto Project](https://www.yoctoproject.org/) 101 | - Being the official solution by the [Linux Foundation](https://www.linuxfoundation.org/) to build and create embedded Linux for IoT devices. 102 | - It still relies on the same GNUtils and libraries and thus is problematic for use-cases that don't play nice with CCSS as per their [copyleft](https://en.wikipedia.org/wiki/Copyleft) licensing, most notable [GPLv3](https://en.wikipedia.org/wiki/GNU_General_Public_License#GPLv3_criticism). 103 | - One of the reasons to use [toybox](https://en.wikipedia.org/wiki/Toybox#History) over [BusyBox](https://en.wikipedia.org/wiki/BusyBox#GPLv2/GPLv3_controversies) which [Rob Landley pointed out in great lenghts](https://www.youtube.com/watch?v=MkJkyMuBm3g#t=1m18s). 104 | - Not to mention [GNUtils](https://en.wikipedia.org/wiki/GNU_Core_Utilities) require way more storage than necessary. 105 | 106 | ### 107 | #### Various other tools I use that just work out of the box: 108 | - [mkdosfs](https://linux.die.net/man/8/mkdosfs) 109 | - [dd](https://linux.die.net/man/1/dd) 110 | - [GCC](https://en.wikipedia.org/wiki/GNU_Compiler_Collection) 111 | 112 | --- 113 | 114 | #### [Back to README](README.md) -------------------------------------------------------------------------------- /docu/architecture.md: -------------------------------------------------------------------------------- 1 | # OS/1337 2 | ### Architecture Guide 3 | 4 | This is a guide to how OS/1337 has been designed, what the design goals are and how they are being achieved. 5 | 6 | --- 7 | 8 | ## Goals 9 | 10 | ### 11 | ### 1. Creating the Smallest possible yet still useable Linux system. 12 | 13 | Small systems like [Floppinux](https://github.com/w84death/floppinux) are nice, but unless they also have some tools they are mostly a [*"demoscene"*](https://en.wikipedia.org/wiki/Demoscene)-esque exercise on how little space one needs to get things on a screen. 14 | - Whilst it comes with a [good documentation](https://archive.org/details/floppinux-manual) we [archived here as well](docu/external/floppinux/floppinux-manual.pdf) it's not a useable system in that it allows one to do anything with it but put characters on a screen. 15 | - This can be done *way better* as [Rob Landley](http://landley.net/toybox/), maintainer of [toybox](https://github.com/landley/toybox) [pointed out in a hands-on tutorial](https://www.youtube.com/watch?v=Sk9TatW9ino). 16 | 17 | *Smallness* implies if not *necessitates* the use of simple and compact solutions that are space-efficient. 18 | Cutting corners in terms of functionality is thus a necessity. 19 | - Kernel: [``linux``](https://kernel.org/) - since it's easy to build and has the widest support in terms of Hardware. 20 | - Drivers: Only 80x25 MDA console, PC beeper and *essential* stuff to be bootable and get basic access to storage and networking. 21 | - Userland: [toybox](https://github.com/landley/toybox), which also includes most of the essential tools to get a system up and running. 22 | - Which is illustrated with [``mkroot``](https://github.com/landley/toybox/blob/master/mkroot/README), a fully fledged *toybox + musl / linux Distribution* that takes up less than 5 MB. 23 | - C library: [musl](https://en.wikipedia.org/wiki/Musl) - more specifically [musl-cross](https://landley.net/bin/toolchains/latest/). 24 | - All binaries are statically linked against it to avoid *"dependency hell"* ! 25 | - Bootloader: Originally [``syslinux``](https://wiki.syslinux.org/wiki/index.php?title=The_Syslinux_Project), but currently switching over to [``mlb``](https://github.com/OS-1337/mlb). 26 | - The ``initramfs.cpio.xz`` has to be integrated into the Kernel ``bzImage``. 27 | - Additional Software: 28 | - [``kilo``](https://github.com/antirez/kilo), a lightweight text editor. 29 | - [``dropbear``](https://github.com/mkj/dropbear) - more specifically [```dbclient```](https://lists.ucc.gu.uwa.edu.au/pipermail/dropbear/2004q3/000022.html) as [SSH](https://en.wikipedia.org/wiki/Secure_Shell#OpenSSH_and_OSSH) client. 30 | - Optional Software: 31 | - [``spm``](https://github.com/OS-1337/spm) as a *simple* [Package Manager](https://en.wikipedia.org/wiki/Package_manager) to add and remove programs and expand OS/1337 from the "[``CORE``](build/0.CORE) Edtion" onwards. 32 | - A [repository](https://github.com/OS-1337/pkgs) to get the most needed packages easily. 33 | 34 | ### 35 | ### 2. Make a fully reproduceable and auditable System. 36 | 37 | Whilst in theory *"everything with available sourcecode can be audited"*, it's vital to make this feasible. 38 | - Noone's gonna audit the entire GNU/Linux stack because that's [way too expensive - even for NORAD](https://www.youtube.com/watch?v=MkJkyMuBm3g&t=715s). 39 | 40 | This means avoiding complexity and *bloat* even at the cost of functionality. 41 | 42 | ### 43 | ### 3. Make it available under a [*permissive license*](https://en.wikipedia.org/wiki/Permissive_software_license) to increase adoption. 44 | 45 | This is done by choosing [0BSD](https://en.wikipedia.org/wiki/BSD_licenses#0-clause_license_(%22BSD_Zero_Clause_License%22)) as [license](LICENSE.md). 46 | - Not every juristiction (i.e. Germany) recognizes *"Public Domain"* as a form of license (since one cannot legally disavow *Authorship*), so [the next best thing](https://www.youtube.com/watch?v=MkJkyMuBm3g&t=2030s) is neessary. 47 | 48 | [GPLv3](https://en.wikipedia.org/wiki/GNU_General_Public_License#Version_3) is extremely toxic to the point that it even harms GPLv2-only projects! 49 | - [Copyleft](https://en.wikipedia.org/wiki/Copyleft) fails at [attracting contributions and funding](https://www.youtube.com/watch?v=MkJkyMuBm3g&t=1607s) and enforcing it in a *hamfisted* approach is [evidently counterproductive](https://www.youtube.com/watch?v=MkJkyMuBm3g&t=302s). 50 | - Escalating it into *"Asshole Licensing"* like [AGPLv3](https://en.wikipedia.org/wiki/GNU_Affero_General_Public_License) and [SSPL](https://en.wikipedia.org/wiki/Server_Side_Public_License) is just an act of spite and completely disregards the reality of both IP and patent laws! 51 | 52 | ### 53 | ### 4. [Document it](docu/architecture.md) so well that it's build process and [Architecture](docu/system-image-architecture.pdf) is understandable with minimal learning. 54 | 55 | This not only applies to *commenting code*, but writing documentation so people can *manually build it from scratch* on a modest build envoirment. 56 | - This is done to not just aid *reproduceability*, *auditability* and *simplicity* but provide *trust through transparency*. 57 | 58 | It should be possible to answer *"Why?"* for every line of code just by common sense, technical dependency and documentation alone. 59 | -------------------------------------------------------------------------------- /docu/build-order.md: -------------------------------------------------------------------------------- 1 | # OS/1337 2 | ### Build Order 3 | 4 | So your OS/1337 build succeeds. 5 | 6 | --- 7 | 8 | ## 9 | ## Packages 10 | 11 | It is recommended to build the following packages in that specific order: 12 | 13 | 1. Linux Kernel 14 | 2. toybox Userland 15 | 3. dropbear SSH Client aka, ```dbclient``` 16 | 4. kilo Text Editor 17 | 5. mlb Bootloader 18 | 19 | ## 20 | ## Bootable Media 21 | 22 | In order to get a bootable media, you need to do the following steps: 23 | 24 | 1. Generate the initramfs file system structure. 25 | 2. Add the packages (i.e. toybox, dbclient, kilo) and configuration files (i.e. /etc/inittab & /etc/init.d/rc) as well as folder stucture and *"spechal files"* to it. 26 | 3. generate a cpio archive of said initramfs. 27 | 4. configure linux to either include the initramfs.cpio or automatically select it for booting. 28 | 5. Create the image file of the specified size (i.e. 1440kB) by running ``dd if=/dev/zero of=os1337.img bs=1k count=1440`` 29 | 6. Format it with a supported filesystem (i.e. FAT12) 30 | 7. use mlbinstall to make said image bootable 31 | 8. copy over the kernel & initramfs. 32 | -------------------------------------------------------------------------------- /docu/building-packages.md: -------------------------------------------------------------------------------- 1 | # OS/1337 2 | ### Building Packages 3 | 4 | With this guide, you should be able to reproduce the same binaries as released for OS/1337. 5 | 6 | --- 7 | # 8 | ## Prerequesites 9 | ##### You'll need some aboslute basics in terms of tools. 10 | Since there are a plethera of distributions, the exact names of packages may vary greaty, but you'll find that some are pretty much universally necessary. 11 | - As the maintainer uses Ubunutu LTS [22.04] as of writing, these are the packages required: 12 | 13 | ``` 14 | build-essential 15 | gcc 16 | clang 17 | llvm 18 | gcc 19 | make 20 | libncurses-dev 21 | flex 22 | bison 23 | openssl 24 | libssl-dev 25 | dkms 26 | libelf-dev 27 | libudev-dev 28 | libpci-dev 29 | libiberty-dev 30 | autoconf 31 | kconfig-frontends-nox 32 | ``` 33 | Which can be installed on Ubuntu 22.04 just by running 34 | ```` 35 | sudo apt install build-essential gcc clang llvm gcc make libncurses-dev flex bison openssl libssl-dev dkms libelf-dev libudev-dev libpci-dev libiberty-dev autoconf kconfig-frontends-nox 36 | ```` 37 | in the terminal. 38 | 39 | # 40 | 41 | --- 42 | 43 | ## Building Linux Kernel 44 | Without the Kernel, there's nothing that can handle the Hardware - period. 45 | - Unless you'd be able and willing to go with x86 Assembly on your own. 46 | 47 | ## 48 | #### Steps 49 | 50 | 1. Download the latest stable release from [kernel.org](https://kernel.org/) or any mirror of your personal trust. 51 | 2. unpack with `tar -xf ./linux-*` 52 | 3. rename by using ` mv ./linux-* ./linux` 53 | 4. `cd ./linux` 54 | 5. `make ARCH=x86 tinyconfig` 55 | 6. `make ARCH=x86 menuconfig` 56 | 7. enshure to [select the following options](build/0.CORE/build/linux/linux-6.6.6-i486-minimal.config) as enabled: 57 | 58 | ```` 59 | Processor type and features > Processor family > 486 60 | Device Drivers > Character devices > Enable TTY 61 | General Setup > Configure standard kernel features (expert users) > Enable support for printk 62 | General Setup > Initial RAM filesystem and RAM disk (initramfs/initrd) 63 | Executable file formats > Kernel support for ELF binaries 64 | Executable file formats > Kernel support for scripts starting with #! 65 | ```` 66 | 67 | - #### Note that these are the absolute bare minimum options! 68 | - ##### These do not include any drivers for anything but a raw, local TTY console in MDA text mode with keyboard. 69 | - ###### You may want to add some basics like [ethernet] networking, filesystem support or USB to have anything remotely functional at your hands. 70 | 71 | 8. Exit configuration (yes, save settings to .config) 72 | 9. `make ARCH=x86 bzImage` and let the compiler go brrr... ^ 73 | - unless you literally use a potato with a 20+ year old HDD this shouldn't take very long. 74 | 10. `cd ./..` 75 | 11. `mv ./linux/arch/x86/boot/bzImage ./i486/` 76 | 77 | ### Congratulations, you now have a kernel for [i486](https://en.wikipedia.org/wiki/I486) and anything above. 78 | 79 | --- 80 | 81 | # 82 | ## Building [toybox](https://landley.net/toybox) 83 | [Toybox](https://github.com/landley/toybox) is a single-executeable Userland that replaces the [GNUtils](https://en.wikipedia.org/wiki/GNU_Core_Utilities) and is not dissimilar form [BusyBox](https://en.wikipedia.org/wiki/BusyBox) in that regard. 84 | - It also comes with a simple init-file based init system and [shell](http://landley.net/toybox/status.html#shell) to get started. 85 | ##### Since OS/1337 is intended to be a sleek and minimalist distro that at it's core can still fit a 1440kB 3,5" FDD, it needs to save space. 86 | 87 | Furthermore, it makes the system just work. 88 | 89 | ## 90 | ### Steps 91 | 1. Download the latest release Version of [Toybox](http://landley.net/toybox/downloads/?C=M;O=D) and [musl-cross as toolchain](http://landley.net/toybox/downloads/binaries/toolchains/?C=M;O=D). 92 | 2. unpack them put the ```musl-cross```-* folder into the directory of toybox. 93 | 3. rename by using ` mv ./linux-* ./linux` 94 | 4. `cd ./linux` 95 | 5. `make ARCH=x86 allnoconfig` 96 | 6. `make ARCH=x86 menuconfig` 97 | 7. enshure to select [the following options](build/0.CORE/build/toybox/toybox-0.8.10-i486-minimal.config) as enabled: 98 | 99 | ```` 100 | cat 101 | date 102 | dd 103 | df 104 | du 105 | echo 106 | ls 107 | printf 108 | ps 109 | top 110 | iotop 111 | test 112 | test_glue 113 | uname 114 | dhcp 115 | init 116 | sh 117 | clear 118 | free 119 | slmod 120 | lspci 121 | lsusb 122 | makedevs 123 | mcookie 124 | oneit 125 | reboot 126 | reset 127 | swapoff 128 | swapon 129 | hist 130 | ifconfig 131 | netcat 132 | netstat 133 | ping 134 | wget 135 | hostname 136 | dnsdomainname 137 | killall 138 | mount 139 | pidof 140 | su 141 | sync 142 | umount 143 | roybox 144 | suid 145 | lsm none 146 | uid_sys=100 147 | uid_usr=500 148 | 149 | ```` 150 | 151 | 8. [Run](build/0.CORE/build/toybox/compile.toybox.sh) ``LDFLAGS=--static CROSS_COMPILE=i486-linux-musl-cross/bin/i486-linux-musl- make ARCH=x86 toybox`` and you should end up with an executeable named ``toybox`` in the toybox directory. 152 | 153 | 154 | --- 155 | 156 | # 157 | ## Building [dbclient](https://matt.ucc.asn.au/dropbear/dropbear.html) 158 | 159 | [dropbear](https://matt.ucc.asn.au/dropbear/dropbear.html) is a popular implementation of [ssh](https://en.wikipedia.org/wiki/Secure_Shell) that is tested against [OpenSSH](https://en.wikipedia.org/wiki/OpenSSH) and can be tweaked to generat [very tiny binaries](https://lists.ucc.gu.uwa.edu.au/pipermail/dropbear/2004q3/000022.html). 160 | 161 | For our purposes, we only need the client components, and can thus [build dbclient](https://github.com/mkj/dropbear/blob/master/SMALL.md). 162 | 163 | ## 164 | ### Steps 165 | 166 | 1. [Download](https://matt.ucc.asn.au/dropbear/dropbear.html) the [latest release of Dropbear](https://github.com/mkj/dropbear/releases) and the [``musl-cross`` toolchain]((http://landley.net/toybox/downloads/binaries/toolchains/?C=M;O=D)). 167 | 2. Unpack the downloaded tarballs and place the ``musl-cross``-* folder inside the one for dropbear. 168 | 3. Rename the folder from dropbear-* into ```dropbear```. 169 | 4. Run the [following commands](build/0.CORE/build/dropbear/compile.dbclient.sh) to build dbclient against musl by going into the dropbear folder and running: 170 | 171 | ``` 172 | ./configure --disable-zlib --disable-x11 --disable-agent-forwarding 173 | LDFLAGS=-W1,--gc-sections,--static CROSS_COMPILE=i486-linux-musl-cross/bin/i486-linux-musl- CFLAGS="-Os -ffunction-sections -fdata-sections" make ARCH=x86 dbclient 174 | ``` 175 | 176 | You should end up with an executeable named ``dbclient`` inside the dropbear folder. 177 | 178 | ... 179 | 180 | // TODO: Expand Documentation. 181 | 182 | --- 183 | ## Acknowledgements 184 | ### 185 | ### [Floppinux](https://github.com/w84death/floppinux) 186 | #### [Floppinux Manual](https://archive.org/details/floppinux-manual/) 187 | It has a [pretty detailed and accurate writeup](https://archive.org/download/floppinux-manual/floppinux-manual.pdf) on how to build a minimal Linux that fits in 1.440kB. 188 | 189 | --- 190 | 191 | #### [Back to README](README.md) -------------------------------------------------------------------------------- /docu/building.md: -------------------------------------------------------------------------------- 1 | # OS/1337 2 | ### Building Guide 3 | 4 | With this guide, you should be able to rebuild OS/1337. 5 | 6 | --- 7 | 8 | ## 1. Setup your Development / Build Envoirment 9 | - See [Package Build Guide - Prerequesites](docu/building-packages.md#Prerequesites) for details. 10 | 11 | Generally speaking, you can build it with anything that can build linux and toybox, which at least means a C compiler and means to manipulate files or if necessary make a .config file to build from. 12 | 13 | As of now, we're sadly stuck on GCC, but will gladly switch to LLVM/Clang if that's a possibility with Linux. 14 | 15 | ## 2. Getting the code ready to build. 16 | 17 | Since we want to build a ```musl + toybox / linux system```, we'll need the requisite packages and sources ready. 18 | 19 | - As OS/1337 is statically compiled against musl, more specifically the same ```musl-cross``` package used to make the reference binaries of toybox, one should've these ready and extracted into a ```./musl-cross-``` directory below the sourcecode root folder of each to-be-compiled software. [i.e. ```./linux-6.6.6/musl.cross-i486``` if you want to build ```linux-6.6.6``` for ```i486```]. 20 | 21 | - Unless you want to modify OS/1337 beyond the basic configs maintained, like "The ```CORE``` Editon", you may want to acquire the .config files from this project as well, since these are the reference material. 22 | 23 | ## 3. Make shure you have everything in place. 24 | 25 | If you use an official config and have all the necessary parts in place then you should be able to just let it automatically build OS/1337 from source on your machine. 26 | 27 | - Please make shure to have adequate system resources in terms of CPU, RAM, Storage at hand since building it will likely require a lot of it. 28 | 29 | -------------------------------------------------------------------------------- /docu/external/floppinux/floppinux-manual.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OS-1337/OS1337/4a70112a8b403953abe8a68714626f4bdad8b08a/docu/external/floppinux/floppinux-manual.pdf -------------------------------------------------------------------------------- /docu/external/jm233333/tiny-kernel.md: -------------------------------------------------------------------------------- 1 | # Linux Kernel - Build and Run a Tiny Linux Kernel on QEMU 2 | An excerpt from: [JM233333's Blog](https://blog.jm233333.com/linux-kernel/build-and-run-a-tiny-linux-kernel-on-qemu/#prerequisites) 3 | - Licensed under Creative Commons CC-BY-NC-SA 4 | 5 | ## Prerequisites 6 | ### Preface 7 | #### Environment 8 | 9 | My development environment (for reference) : 10 | ```` 11 | Ubuntu 20.04, 5.15.0-41-generic, x86_64 GNU/Linux 12 | gcc 9.4.0 13 | ```` 14 | Archive version I used (for reference) : 15 | ```` 16 | Linux Kernel 5.15.57 17 | BusyBox 1.35.0 18 | ```` 19 | Make sure your development environment meets the requirements below : 20 | ```` 21 | available disk storage : >4 GB for tiny build, >10 GB for full build 22 | ```` 23 | ## Preparation 24 | 25 | Download appropriate version of linux kernel and busybox : 26 | Package Link 27 | Linux Kernel The Linux Kernel Archives 28 | (opens new window) 29 | BusyBox BusyBox 30 | (opens new window) 31 | 32 | Download packages required to build the linux kernel (Ubuntu) : 33 | 34 | sudo apt install libelf-dev dwarves libzstd-dev zstd 35 | 36 | ## Build a Tiny Linux Kernel 37 | ### Use tinyconfig 38 | 39 | Unzip the downloaded archive, enter the directory and start to build (use 5.15.57 as example): 40 | ```` 41 | tar -xvf linux-5.15.57.tar.xz 42 | cd linux-5.15.57 43 | ```` 44 | Generate an initial config that represents a minimal kernel (see Linux Kernel Tinification 45 | 46 | (opens new window)) : 47 | ```` 48 | make tinyconfig 49 | ```` 50 | ## Kernel Configurations 51 | 52 | With tinyconfig we can run make and get a minimal kernel image, but this is not what we want - we can't even execute any programs on it. To get a minimal but meaningful kernel image, we shall enable several additional kernel configurations through menuconfig : 53 | ```` 54 | make menuconfig 55 | ```` 56 | #### Notice : For below-mentioned options, their name and position in menuconfig GUI (5.15.57) is given, which might be different in other versions of kernel. 57 | 58 | Required and highly-recommanded options are listed below : 59 | ```` 60 | [*] 64-bit kernel 61 | [*] Enable the block layer 62 | Processor type and features ---> 63 | [*] Symmetric multi-processing support 64 | General setup ---> 65 | [?] System V IPC 66 | [*] Initial RAM filesystem and RAM disk (initramfs/initrd) support 67 | Configure standard kernel features (expert users) ---> 68 | [?] Sysfs syscall support 69 | [*] Enable support for printk 70 | [*] Enable futex support 71 | [?] Load all symbols for debugging/ksymoops 72 | [?] Disable heap randomization 73 | [?] Profiling support 74 | Executable file formats ---> 75 | [*] Kernel support for ELF binaries 76 | [*] Kernel support for scripts starting with #! 77 | Device Drivers ---> 78 | [*] Block devices ---> 79 | [*] RAM block device support 80 | Character devices ---> 81 | [*] Enable TTY 82 | Serial drivers ---> 83 | [*] 8250/16550 and compatible serial support 84 | [*] Console on 8250/16550 and compatible serial port 85 | File systems ---> 86 | Pseudo filesystems ---> 87 | [*] /proc file system support 88 | [*] sysfs file system support 89 | Kernel hacking ---> 90 | Compile-time checks and compiler options ---> 91 | [*] Compile the kernel with debug info 92 | [*] Provide GDB scripts for kernel debugging 93 | Generic Kernel Debugging Instruments ---> 94 | [*] Debug filesystem 95 | [*] KGDB: kernel debugger 96 | x86 Debugging ---> 97 | [*] Early printk 98 | ```` 99 | ## Build 100 | 101 | Now we can run make and get the minimal kernel image we want : 102 | ```` 103 | make -j4 104 | ```` 105 | After make , a series of images will be generated, and we are concerned about the following (for more details about all generated images, see Difference between images in Linux kernel 106 | 107 | (opens new window)) : 108 | ```` 109 | bzImage : The generic linux kernel binary image file, which is used to boot the kernel on qemu. It is located at linux-5.15.57/arch/x86/boot/bzImage by default. 110 | vmlinux : This is the linux kernel in a statically linked executable file format, which contains useful information for debugging purposes, and is used to debug the kernel through gdb or other debug engines. It is located at linux-5.15.57/vmlinux by default, and vmlinux-gdb.py is generated together in modern-version linux kernel. 111 | ```` 112 | 113 | ## Build BusyBox 114 | 115 | Similar to linux kernel, we shall enable several additional options through menuconfig : 116 | ```` 117 | make menuconfig 118 | ```` 119 | Notice : For below-mentioned options, their name and position in menuconfig GUI (1.35.0) is given, which might be different in other versions of busybox. 120 | 121 | Required and highly-recommanded additional options are listed below : 122 | ```` 123 | Settings ---> 124 | --- Build Options 125 | [*] Build static binary (no shared libs) 126 | --- Debugging Options 127 | [*] Build with debug information 128 | [*] Disable compiler optimizations 129 | ```` 130 | After running make , we should also run make install to install BusyBox into the target directory specified by CONFIG_PREFIX . 131 | ```` 132 | CONFIG_PREFIX can be set when configuring BusyBox, or be specified alternatively at install time (i.e., with a command line like make CONFIG_PREFIX=/tmp/foo install). 133 | ```` 134 | By default (i.e. CONFIG_PREFIX not set), BusyBox will be installed into busybox-1.35.0/_install . 135 | ```` 136 | make 137 | make install 138 | ```` 139 | ## Boot the Kernel with initramfs 140 | ### What is initramfs ? 141 | 142 | When you come to this chapter, you must have several questions in your mind such as "what is initramfs ?" , etc. Since this article is a quick-start for beginners, we omit most of technical details here. 143 | 144 | In brief, initramfs is a (compressed) cpio format archive which is extracted when the kernel boots up. By default, the initramfs archive is empty (consuming 134 bytes on x86). It could also be compressed with one of several compression algorithms (e.g. gzip). 145 | ```` 146 | cpio is a GNU tool used to copy files to and from archives. See Linux Man Page - cpio(1) 147 | (opens new window) for more details. 148 | ```` 149 | In practice, initramfs is often used to perform some complex initialization operations in the user level (e.g. mount the root filesystem). However, at the same time, initramfs itself is really an easy way to directly boot the kernel. This makes it one of the best choices for beginners trying to build and run the linux kernel themselves. 150 | 151 | initramfs could be used in one of the following two ways : 152 | ```` 153 | Internal : linked into the kernel image binary. 154 | External : passed from outside at runtime. 155 | ```` 156 | We will use the external way in this chapter considering the flexibility. 157 | 158 | For more details about initramfs, see Appendix : ramfs, rootfs and initramfs. 159 | 160 | ## Generate a Minimal initramfs 161 | 162 | This section will tell you how to generate a minimal initramfs, which is almost empty, only containing a hello-world executable file. 163 | 164 | At this moment, we want to construct an image which contains exactly one executable file init . It will be executed first when the kernel boots. Notice that the name of that executable file must be init . Otherwise, we have to construct a file system (e.g. ext4) on the image to let the kernel boot. 165 | 166 | The example source code of init.c is as follows : 167 | ```` 168 | #include 169 | 170 | int main(void) { 171 | printf("hello, world!\n"); 172 | fflush(stdout); // make sure the output is visible on the screen 173 | return 0; 174 | } 175 | ```` 176 | Notice that we will not package glibc into the image (it is possible but not necessary), we should compile C programs statically : 177 | ```` 178 | gcc -static -o init init.c 179 | ```` 180 | Since we only need to package one file into the image, only one line of command with the GNU tool cpio can meet our requirement : 181 | ```` 182 | echo init | cpio -ov --format=newc > initramfs.img 183 | ```` 184 | See Linux Man Page - cpio(1) 185 | 186 | (opens new window) for more details. Note that man cpio contains some bad advice that you should not follow, as the linux kernel documentation says : 187 | ```` 188 | The cpio man page contains some bad advice that will break your initramfs archive if you follow it. It says “A typical way to generate the list of filenames is with the find command; you should give find the -depth option to minimize problems with permissions on directories that are unwritable or not searchable.” Don’t do this when creating initramfs.cpio.gz images, it won’t work. The Linux kernel cpio extractor won’t create files in a directory that doesn’t exist, so the directory entries must go before the files that go in those directories. The above script gets them in the right order. 189 | ```` 190 | ## Generate a initramfs with BusyBox 191 | 192 | This section will tell you how to generate a BusyBox-based initramfs, which contains an interactive terminal and BusyBox command line tools. 193 | 194 | The aforementioned one-line cpio-based command is really convenient. However, even if we want to package two files into the image, the generation progrcess will become much more complicated. For instance, we have to construct a file system on the image. Instead, We will introduce another method, which is more scalable, easy-to-use, and elegant. 195 | ### kernel-provided script 196 | 197 | In fact, after building the kernel, a bash script and a binary file for constructing initramfs image are generated together. They are located at linux-5.15.57/usr : 198 | ```` 199 | usr/gen_initramfs.sh is the script we directly execute to generate the image. Notice that we must call it through the path ./usr/gen_initramfs.sh (or modify the script manually), because it will execute the binary file ./usr/gen_init_cpio . 200 | 201 | usr/gen_init_cpio is a binary file used by usr/gen_initramfs.sh. It is compiled from gen_init_cpio.c . 202 | 203 | usr/default_cpio_list is an input example for usr/gen_initramfs.sh . See below. 204 | ```` 205 | One of the typical usage of the script is as follows (run ./usr/gen_initramfs.sh -h for full usage): 206 | ```` 207 | ./usr/gen_initramfs.sh -o ... 208 | ```` 209 | Where is one of the following : 210 | ```` 211 | If it is a regular file, the script will directly package it into the image. 212 | 213 | If it is a directory, the script will package all files in the directory into the image. 214 | 215 | If it is a .cpio archive, the script will take it as direct input to the image. 216 | 217 | If it is a cpio list, the script will parse the cpio list and package all the listed files (and directories) into the image according to the entries. 218 | 219 | ./usr/gen_initramfs.sh -o ./mkfs/initramfs.img ./mkfs/bin ./mkfs/cpio_list2 220 | # caution: all things in ./mkfs/bin will be mounted to / (e.g. ./mkfs/bin/xxx -> /xxx) 221 | ```` 222 | ### cpio list 223 | 224 | It is said that a cpio list is a text file containing newline-separated entries that describe the files to be included in the initramfs archive. usr/default_cpio_list provides several examples : 225 | ```` 226 | dir /dev 0755 0 0 227 | nod /dev/console 0600 0 0 c 5 1 228 | dir /root 0700 0 0 229 | 230 | Run ./usr/gen_initramfs.sh -h for complete syntax rules of cpio entries. 231 | ```` 232 | ### usage 233 | 234 | Assume that the project structure is as follows : 235 | ```` 236 | / --x-- linux-5.15.57/ 237 | | 238 | x-- busybox-1.35.0/ 239 | | 240 | x-- cpio_list 241 | ```` 242 | We can generate a BusyBox-based initramfs image through cpio list as follows : 243 | ```` 244 | cd ./linux-5.15.57/ 245 | ./usr/gen_initramfs.sh -o initramfs.img ../busybox-1.35.0/_install ../cpio_list 246 | ```` 247 | The content of cpio_list is as follows, which you can modify on demand : 248 | ```` 249 | dir /dev 0755 0 0 250 | nod /dev/console 0600 0 0 c 5 1 251 | dir /root 0700 0 0 252 | 253 | nod /dev/null 0666 0 0 c 1 3 254 | nod /dev/zero 0666 0 0 c 1 5 255 | 256 | dir /proc 0755 0 0 257 | dir /sys 0755 0 0 258 | dir /mnt 0755 0 0 259 | 260 | file /init ./init.sh 0755 0 0 261 | ```` 262 | The content of init.sh is as follows : 263 | ```` 264 | #!/bin/sh 265 | 266 | echo -e "\nhello, busybox!\n" 267 | 268 | mount -t proc none /proc 269 | mount -t sysfs none /sys 270 | # mount -t debugfs none /sys/kernel/debug 271 | 272 | echo -e "\nBoot took $(cut -d' ' -f1 /proc/uptime) seconds\n" 273 | 274 | sh 275 | ```` 276 | ## Boot on QEMU with initramfs 277 | 278 | Assume that we have generate an initramfs image (either hello-world or BusyBox-based), we can boot the kernel on qemu with it as follows : 279 | ```` 280 | qemu-system-x86_64 \ 281 | -kernel linux-5.15.57/arch/x86/boot/bzImage \ 282 | -initrd initramfs.img \ 283 | -append "console=ttyS0 root=/dev/ram init=/init" 284 | ```` 285 | ## Configure VSCode for Linux Kernel Sources 286 | - TBD. 287 | - https://github.com/amezin/vscode-linux-kernel 288 | ## ramfs, rootfs and initramfs (Optional) 289 | - TBD. 290 | ### References 291 | - [Building a tiny Linux kernel - by Anuradha Weeraman](https://weeraman.com/building-a-tiny-linux-kernel-8c07579ae79d) 292 | - [Build the Linux Kernel and Busybox and run them on QEMU](https://www.centennialsoftwaresolutions.com/post/build-the-linux-kernel-and-busybox-and-run-them-on-qemu) 293 | - [Linux Man Page - cpio(1)](https://linux.die.net/man/1/cpio) 294 | - [Linux Kernel Documentation - ramfs, rootfs and initramfs](https://www.kernel.org/doc/html/latest/filesystems/ramfs-rootfs-initramfs.html) 295 | - [StackExchange - Why do I need initramfs ?](https://unix.stackexchange.com/questions/122100/why-do-i-need-initramfs) 296 | - [Linux Kernel Documentation - Early userspace support](https://www.kernel.org/doc/html/latest/driver-api/early-userspace/early_userspace_support.html) 297 | 298 | 299 | # Appendix 300 | ## List of Error-and-Solution Pairs 301 | 302 | EaSP #1 303 | [make[1]: *** No rule to make target 'debian/canonical-certs.pem', needed by 'certs/x509_certificate_list'. Stop.](https://askubuntu.com/questions/1329538/compiling-the-kernel-5-11-11) 304 | -------------------------------------------------------------------------------- /docu/external/licenses/0bsd.md: -------------------------------------------------------------------------------- 1 | # BSD Zero Clause License 2 | 3 | ### Copyright (C) YEAR by AUTHOR EMAIL 4 | 5 | Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. 6 | 7 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 8 | -------------------------------------------------------------------------------- /docu/external/licenses/dropbear-license.md: -------------------------------------------------------------------------------- 1 | ### Dropbear contains a number of components from different sources, hence there are a few licenses and authors involved. All licenses are fairly non-restrictive. 2 | 3 | ### The majority of code is written by Matt Johnston, under the license below. 4 | 5 | Portions of the client-mode work are (c) 2004 Mihnea Stoenescu, under the 6 | same license: 7 | 8 | Copyright (c) 2002-2020 Matt Johnston 9 | Portions copyright (c) 2004 Mihnea Stoenescu 10 | All rights reserved. 11 | 12 | Permission is hereby granted, free of charge, to any person obtaining a copy 13 | of this software and associated documentation files (the "Software"), to deal 14 | in the Software without restriction, including without limitation the rights 15 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 16 | copies of the Software, and to permit persons to whom the Software is 17 | furnished to do so, subject to the following conditions: 18 | 19 | The above copyright notice and this permission notice shall be included in all 20 | copies or substantial portions of the Software. 21 | 22 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 23 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 24 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 25 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 26 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 27 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 28 | SOFTWARE. 29 | 30 | ===== 31 | 32 | ### LibTomCrypt and LibTomMath are written by Tom St Denis and others, see libtomcrypt/LICENSE and libtommath/LICENSE. 33 | 34 | ===== 35 | 36 | sshpty.c is taken from OpenSSH 3.5p1, 37 | Copyright (c) 1995 Tatu Ylonen , Espoo, Finland 38 | All rights reserved 39 | "As far as I am concerned, the code I have written for this software 40 | can be used freely for any purpose. Any derived versions of this 41 | software must be clearly marked as such, and if the derived work is 42 | incompatible with the protocol description in the RFC file, it must be 43 | called by a name other than "ssh" or "Secure Shell". " 44 | 45 | ===== 46 | 47 | loginrec.c 48 | loginrec.h 49 | atomicio.h 50 | atomicio.c 51 | and strlcat() (included in util.c) are from OpenSSH 3.6.1p2, and are licensed 52 | under the 2 point BSD license. 53 | 54 | loginrec is written primarily by Andre Lucas, atomicio.c by Theo de Raadt. 55 | 56 | strlcat() is (c) Todd C. Miller 57 | 58 | ===== 59 | 60 | ### Import code in keyimport.c is modified from PuTTY's import.c, licensed as follows: 61 | 62 | PuTTY is copyright 1997-2003 Simon Tatham. 63 | 64 | Portions copyright Robert de Bath, Joris van Rantwijk, Delian 65 | Delchev, Andreas Schultz, Jeroen Massar, Wez Furlong, Nicolas Barry, 66 | Justin Bradford, and CORE SDI S.A. 67 | 68 | Permission is hereby granted, free of charge, to any person 69 | obtaining a copy of this software and associated documentation files 70 | (the "Software"), to deal in the Software without restriction, 71 | including without limitation the rights to use, copy, modify, merge, 72 | publish, distribute, sublicense, and/or sell copies of the Software, 73 | and to permit persons to whom the Software is furnished to do so, 74 | subject to the following conditions: 75 | 76 | The above copyright notice and this permission notice shall be 77 | included in all copies or substantial portions of the Software. 78 | 79 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 80 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 81 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 82 | NONINFRINGEMENT. IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE 83 | FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF 84 | CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 85 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 86 | 87 | ===== 88 | 89 | ### curve25519.c: 90 | 91 | Modified TweetNaCl version 20140427, a self-contained public-domain C library. 92 | https://tweetnacl.cr.yp.to/ 93 | 94 | Contributors (alphabetical order) 95 | Daniel J. Bernstein, University of Illinois at Chicago and Technische 96 | Universiteit Eindhoven 97 | Bernard van Gastel, Radboud Universiteit Nijmegen 98 | Wesley Janssen, Radboud Universiteit Nijmegen 99 | Tanja Lange, Technische Universiteit Eindhoven 100 | Peter Schwabe, Radboud Universiteit Nijmegen 101 | Sjaak Smetsers, Radboud Universiteit Nijmegen 102 | 103 | Acknowledgments 104 | This work was supported by the U.S. National Science Foundation under grant 105 | 1018836. "Any opinions, findings, and conclusions or recommendations expressed 106 | in this material are those of the author(s) and do not necessarily reflect the 107 | views of the National Science Foundation." 108 | This work was supported by the Netherlands Organisation for Scientific 109 | Research (NWO) under grant 639.073.005 and Veni 2013 project 13114. 110 | -------------------------------------------------------------------------------- /docu/external/licenses/gplv2-only.md: -------------------------------------------------------------------------------- 1 | GNU GPLv2 2 | - Source: https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html 3 | 4 | --- 5 | 6 | # GNU GENERAL PUBLIC LICENSE 7 | ### Version 2, June 1991 8 | 9 | Copyright (C) 1989, 1991 Free Software Foundation, Inc. 10 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA 11 | 12 | Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. 13 | 14 | ## Preamble 15 | 16 | The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Lesser General Public License instead.) You can apply it to your programs, too. 17 | 18 | When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. 19 | 20 | To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. 21 | 22 | For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. 23 | 24 | We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. 25 | 26 | Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. 27 | 28 | Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. 29 | 30 | The precise terms and conditions for copying, distribution and modification follow. 31 | ## TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 32 | 33 | 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". 34 | 35 | Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 36 | 37 | 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. 38 | 39 | You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 40 | 41 | 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: 42 | 43 | a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. 44 | b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. 45 | c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) 46 | 47 | These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. 48 | 49 | Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. 50 | 51 | In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 52 | 53 | 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: 54 | 55 | a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, 56 | b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, 57 | c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) 58 | 59 | The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. 60 | 61 | If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 62 | 63 | 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 64 | 65 | 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 66 | 67 | 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 68 | 69 | 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. 70 | 71 | If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. 72 | 73 | It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. 74 | 75 | This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 76 | 77 | 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 78 | 79 | 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. 80 | 81 | Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 82 | 83 | 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. 84 | 85 | ## NO WARRANTY 86 | 87 | 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 88 | 89 | 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 90 | END OF TERMS AND CONDITIONS 91 | How to Apply These Terms to Your New Programs 92 | 93 | If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. 94 | 95 | To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. 96 | 97 | one line to give the program's name and an idea of what it does. 98 | Copyright (C) yyyy name of author 99 | 100 | This program is free software; you can redistribute it and/or 101 | modify it under the terms of the GNU General Public License 102 | as published by the Free Software Foundation; either version 2 103 | of the License, or (at your option) any later version. 104 | 105 | This program is distributed in the hope that it will be useful, 106 | but WITHOUT ANY WARRANTY; without even the implied warranty of 107 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 108 | GNU General Public License for more details. 109 | 110 | You should have received a copy of the GNU General Public License 111 | along with this program; if not, write to the Free Software 112 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 113 | 114 | Also add information on how to contact you by electronic and paper mail. 115 | 116 | If the program is interactive, make it output a short notice like this when it starts in an interactive mode: 117 | 118 | Gnomovision version 69, Copyright (C) year name of author 119 | Gnomovision comes with ABSOLUTELY NO WARRANTY; for details 120 | type `show w'. This is free software, and you are welcome 121 | to redistribute it under certain conditions; type `show c' 122 | for details. 123 | 124 | The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. 125 | 126 | You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: 127 | 128 | Yoyodyne, Inc., hereby disclaims all copyright 129 | interest in the program `Gnomovision' 130 | (which makes passes at compilers) written 131 | by James Hacker. 132 | 133 | signature of Ty Coon, 1 April 1989 134 | Ty Coon, President of Vice 135 | 136 | This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. 137 | -------------------------------------------------------------------------------- /docu/external/toybox/mkroot.md: -------------------------------------------------------------------------------- 1 | # Q: How do you build a working Linux system with toybox? 2 | ###### An excerpt from [Toybox FAQ - mkroot](http://landley.net/toybox/faq.html#mkroot). 3 | 4 | ## A: Toybox has a built-in system builder called "mkroot", with the Makefile target "make root". To enter the resulting root filesystem, "sudo chroot root/host/fs /init". Type "exit" to get back out. 5 | 6 | Prebuilt binary versions of these system images, suitable for running under the emulator qemu, are uploaded to the website each release if you'd like to try before building from source. 7 | 8 | You can cross compile simple three package (toybox+libc+linux) systems configured to boot to a shell prompt under qemu by setting CROSS_COMPILE= to a cross compiler prefix (or by installing cross compilers in the "ccc" subdirectory and specifying a target type with CROSS=) and also pointing the build at a Linux kernel source directory, ala: 9 | 10 | make root CROSS=sh4 LINUX=~/linux 11 | 12 | Then you can cd root/sh4; ./qemu-sh4.sh to launch the emulator. (You'll need the appropriate qemu-system-* emulator binary installed.) Type "exit" when done and it should shut down the emulator on the way out, similar to exiting the chroot version. (Except this is more like you ssh'd to a remote machine: the emulator created its own CPU with its own memory and I/O devices, and booted a kernel in it.) 13 | 14 | The build finds the three packages needed to produce this system because 15 | 1. you're in a toybox source directory, 16 | 2. your cross compiler has a libc built into it, 17 | 3. you tell it where to find a Linux kernel source directory with LINUX= on the command line. If you don't say LINUX=, it skips that part of the build and just produces a root filesystem directory (root/$CROSS/fs or root/host/fs if no $CROSS target specified), which you can chroot into if your architecture can run those binaries. (For PID other than 1, the /init script at the top of the directory sets up and cleans up the /proc mount points, so chroot root/i686/fs /init is a reasonable "poke around and look at things" smoketest.) 18 | 19 | The CROSS= shortcut expects a "ccc" symlink in the toybox source directory pointing at a directory full of cross compilers. The ones I test this with are built from the musl-libc maintainer's musl-cross-make project, built by running toybox's scripts/mcm-buildall.sh in a musl-cross-make checkout directory, and then symlinking the resulting "ccc" subdirectory into toybox where CROSS= can find them: 20 | 21 | cd ~ 22 | git clone https://github.com/landley/toybox 23 | git clone https://github.com/richfelker/musl-cross-make 24 | cd musl-cross-make 25 | ../toybox/scripts/mcm-buildall.sh # this takes a while 26 | ln -s $(realpath ccc) ../toybox/ccc 27 | 28 | ##### If you don't want to do that, you can download prebuilt binary versions and extract them into a "ccc" subdirectory under the toybox source. 29 | 30 | Once you've installed the cross compilers, "make root CROSS=help" should list all the available cross compilers it recognizes under ccc, something like: 31 | 32 | aarch64 armv4l armv5l armv7l armv7m armv7r i486 i686 m68k microblaze mips mips64 mipsel powerpc powerpc64 powerpc64le s390x sh2eb sh4 x32 x86_64 33 | 34 | (A long time ago I tried to explain what some of these architectures were.) 35 | 36 | You can build all the targets at once, and can add additonal packages to the build, by calling the script directly and listing packages on the command line: 37 | 38 | mkroot/mkroot.sh CROSS=all LINUX=~/linux dropbear 39 | 40 | An example package build script (building the dropbear ssh server, adding a port forward from 127.0.0.1:2222 to the qemu command line, and providing a ssh2dropbear.sh convenience script to the output directory) is provided in the scripts/root directory. If you add your own scripts elsewhere, just give a path to them on the command line. (No, I'm not merging more package build scripts, I learned that lesson long ago. But if you want to write your own, feel free.) 41 | 42 | #### Note: currently mkroot.sh cheats. If you don't have a .config it'll make defconfig and add CONFIG_SH and CONFIG_ROUTE to it, because the new root filesystem kinda needs those commands to function properly. If you already have a .config that _doesn't_ have CONFIG_SH in it, you won't get a shell prompt or be able to run the init script without a shell. This is currently a problem because sh and route are still in pending and thus not in defconfig, so "make root" cheats and adds them. I'm working on it. tl;dr if make root doesn't work "rm .config" and run it again, and all this should be fixed up in future when those two commands are promoted out of pending so "make defconfig" would have what you need anyway. It's designed to let yout tweak your config, which is why it uses the .config that's there when there is one, but the default is currently wrong because it's not quite finished yet. All this should be cleaned up in a future release, before 1.0. 43 | -------------------------------------------------------------------------------- /docu/external/toybox/mkroot.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # ------------------------------ Part 1: Setup ------------------------------- 4 | 5 | # Clear environment variables by restarting script w/bare minimum passed through 6 | [ -z "$NOCLEAR" ] && exec env -i NOCLEAR=1 HOME="$HOME" PATH="$PATH" \ 7 | LINUX="$LINUX" CROSS="$CROSS" CROSS_COMPILE="$CROSS_COMPILE" "$0" "$@" 8 | 9 | ! [ -d mkroot ] && echo "Run mkroot/mkroot.sh from toybox source dir." && exit 1 10 | 11 | # assign command line NAME=VALUE args to env vars, the rest are packages 12 | for i in "$@"; do 13 | [ "${i/=/}" != "$i" ] && export "$i" || { [ "$i" != -- ] && PKG="$PKG $i"; } 14 | done 15 | 16 | # Set default directory locations (overrideable from command line) 17 | : ${TOP:=$PWD/root} ${BUILD:=$TOP/build} ${LOG:=$BUILD/log} 18 | : ${AIRLOCK:=$BUILD/airlock} ${CCC:=$PWD/ccc} ${PKGDIR:=$PWD/mkroot/packages} 19 | 20 | announce() { printf "\033]2;$CROSS $*\007" >/dev/tty; printf "\n=== $*\n";} 21 | die() { echo "$@" >&2; exit 1; } 22 | 23 | # ----- Are we cross compiling (via CROSS_COMPILE= or CROSS=) 24 | 25 | if [ -n "$CROSS_COMPILE" ]; then 26 | # airlock needs absolute path 27 | [ -z "${X:=$(command -v "$CROSS_COMPILE"cc)}" ] && die "no ${CROSS_COMPILE}cc" 28 | CROSS_COMPILE="$(realpath -s "${X%cc}")" 29 | [ -z "$CROSS" ] && CROSS=${CROSS_COMPILE/*\//} CROSS=${CROSS/-*/} 30 | 31 | elif [ -n "$CROSS" ]; then # CROSS=all/allnonstop/$ARCH else list known $ARCHes 32 | [ ! -d "$CCC" ] && die "No ccc symlink to compiler directory." 33 | TARGETS="$(ls "$CCC" | sed -n 's/-.*//p' | sort -u)" 34 | 35 | if [ "${CROSS::3}" == all ]; then # loop calling ourselves for each target 36 | for i in $TARGETS; do 37 | "$0" "$@" CROSS=$i || [ "$CROSS" == allnonstop ] || exit 1 38 | done; exit 39 | 40 | else # Find matching cross compiler under ccc/ else list available targets 41 | CROSS_COMPILE="$(echo "$CCC/$CROSS"-*cross/bin/"$CROSS"*-cc)" # wildcard 42 | [ ! -e "$CROSS_COMPILE" ] && echo $TARGETS && exit # list available targets 43 | CROSS_COMPILE="${CROSS_COMPILE%cc}" # trim to prefix for cc/ld/as/nm/strip 44 | fi 45 | fi 46 | 47 | # Set per-target output directory (using "host" if not cross-compiling) 48 | : ${CROSS:=host} ${OUTPUT:=$TOP/$CROSS} ${OUTDOC:=$OUTPUT/docs} 49 | 50 | # Verify selected compiler works 51 | ${CROSS_COMPILE}cc --static -xc - -o /dev/null <<< "int main(void){return 0;}"|| 52 | die "${CROSS_COMPILE}cc can't create static binaries" 53 | 54 | # ----- Create hermetic build environment 55 | 56 | if [ -z "$NOAIRLOCK"] && [ -n "$CROSS_COMPILE" ]; then 57 | # When cross compiling set host $PATH to binaries with known behavior by 58 | # - building a host toybox later builds use as their command line 59 | # - cherry-picking specific commands from old path via symlink 60 | if [ ! -e "$AIRLOCK/toybox" ]; then 61 | announce "airlock" && 62 | PREFIX="$AIRLOCK" KCONFIG_CONFIG=.singleconfig_airlock CROSS_COMPILE= \ 63 | make clean defconfig toybox install_airlock && # see scripts/install.sh 64 | rm .singleconfig_airlock || exit 1 65 | fi 66 | export PATH="$AIRLOCK" 67 | fi 68 | 69 | # Create per-target work directories 70 | TEMP="$BUILD/${CROSS}-tmp" && rm -rf "$TEMP" && 71 | mkdir -p "$TEMP" "$OUTPUT" "$LOG" || exit 1 72 | [ -z "$ROOT" ] && ROOT="$OUTPUT/fs" && rm -rf "$ROOT" 73 | LOG="$LOG/$CROSS" 74 | 75 | # ----- log build output 76 | 77 | # Install command line recording wrapper, logs all commands run from $PATH 78 | if [ -z "$NOLOGPATH" ]; then 79 | # Move cross compiler into $PATH so calls to it get logged 80 | [ -n "$CROSS_COMPILE" ] && PATH="${CROSS_COMPILE%/*}:$PATH" && 81 | CROSS_COMPILE=${CROSS_COMPILE##*/} 82 | export WRAPDIR="$BUILD/record-commands" LOGPATH="$LOG"-commands.txt 83 | rm -rf "$WRAPDIR" "$LOGPATH" generated/obj && 84 | WRAPDIR="$WRAPDIR" CROSS_COMPILE= NOSTRIP=1 source mkroot/record-commands || 85 | exit 1 86 | fi 87 | 88 | # Start logging stdout/stderr 89 | rm -f "$LOG".{n,y} || exit 1 90 | [ -z "$NOLOG" ] && exec > >(tee "$LOG".n) 2>&1 91 | echo "Building for $CROSS" 92 | 93 | # ---------------------- Part 2: Create root filesystem ----------------------- 94 | 95 | # ----- Create new root filesystem's directory layout. 96 | 97 | # FHS wants boot media opt srv usr/{local,share}, stuff under /var... 98 | mkdir -p "$ROOT"/{dev,etc/rc,home,mnt,proc,root,sys,tmp/run,usr/{bin,sbin,lib},var} && 99 | chmod a+rwxt "$ROOT"/tmp && ln -s usr/{bin,sbin,lib} tmp/run "$ROOT" || exit 1 100 | 101 | # Write init script. Runs as pid 1 from initramfs to set up and hand off system. 102 | cat > "$ROOT"/init << 'EOF' && 103 | #!/bin/sh 104 | 105 | export HOME=/home PATH=/bin:/sbin 106 | 107 | if ! mountpoint -q dev; then 108 | mount -t devtmpfs dev dev 109 | [ $$ -eq 1 ] && ! 2>/dev/null <0 && exec 0<>/dev/console 1>&0 2>&1 110 | for i in ,fd /0,stdin /1,stdout /2,stderr 111 | do ln -sf /proc/self/fd${i/,*/} dev/${i/*,/}; done 112 | mkdir -p dev/shm 113 | chmod +t /dev/shm 114 | fi 115 | mountpoint -q dev/pts || { mkdir -p dev/pts && mount -t devpts dev/pts dev/pts;} 116 | mountpoint -q proc || mount -t proc proc proc 117 | mountpoint -q sys || mount -t sysfs sys sys 118 | echo 0 99999 > /proc/sys/net/ipv4/ping_group_range 119 | 120 | if [ $$ -eq 1 ]; then # Setup networking for QEMU (needs /proc) 121 | mountpoint -q mnt || [ -e /dev/?da ] && mount /dev/?da /mnt 122 | ifconfig lo 127.0.0.1 123 | ifconfig eth0 10.0.2.15 124 | route add default gw 10.0.2.2 125 | [ "$(date +%s)" -lt 1000 ] && timeout 2 sntp -sq 10.0.2.2 # Ask host 126 | [ "$(date +%s)" -lt 10000000 ] && sntp -sq time.google.com 127 | 128 | # Run package scripts (if any) 129 | for i in $(ls -1 /etc/rc 2>/dev/null | sort); do . /etc/rc/"$i"; done 130 | 131 | [ -z "$HANDOFF" ] && [ -e /mnt/init ] && HANDOFF=/mnt/init 132 | [ -z "$HANDOFF" ] && HANDOFF=/bin/sh && echo -e '\e[?7hType exit when done.' 133 | echo 3 > /proc/sys/kernel/printk 134 | exec oneit $HANDOFF 135 | else # for chroot 136 | /bin/sh 137 | umount /dev/pts /dev /sys /proc 138 | fi 139 | EOF 140 | chmod +x "$ROOT"/init && 141 | 142 | # Google's nameserver, passwd+group with special (root/nobody) accounts + guest 143 | echo "nameserver 8.8.8.8" > "$ROOT"/etc/resolv.conf && 144 | cat > "$ROOT"/etc/passwd << 'EOF' && 145 | root:x:0:0:root:/root:/bin/sh 146 | guest:x:500:500:guest:/home/guest:/bin/sh 147 | nobody:x:65534:65534:nobody:/proc/self:/dev/null 148 | EOF 149 | echo -e 'root:x:0:\nguest:x:500:\nnobody:x:65534:' > "$ROOT"/etc/group || exit 1 150 | 151 | # Build any packages listed on command line 152 | for i in ${PKG:+plumbing $PKG}; do 153 | pushd . 154 | announce "$i"; PATH="$PKGDIR:$PATH" source $i || die $i 155 | popd 156 | done 157 | 158 | # Build static toybox with existing .config if there is one, else defconfig+sh 159 | announce toybox 160 | [ -n "$PENDING" ] && rm -f .config 161 | grep -q CONFIG_SH=y .config 2>/dev/null && CONF=silentoldconfig || unset CONF 162 | for i in $PENDING sh route; do XX="$XX"$'\n'CONFIG_${i^^?}=y; done 163 | [ -e "$ROOT"/lib/libc.so ] || export LDFLAGS=--static 164 | PREFIX="$ROOT" make clean \ 165 | ${CONF:-defconfig KCONFIG_ALLCONFIG=<(echo "$XX")} toybox install || exit 1 166 | unset LDFLAGS 167 | 168 | # ------------------ Part 3: Build + package bootable system ------------------ 169 | 170 | # Convert comma separated values in $1 to CONFIG=$2 lines 171 | csv2cfg() { sed -E '/^$/d;s/([^,]*)($|,)/CONFIG_\1\n/g' <<< "$1" | sed '/^$/!{/=/!s/.*/&='"$2/}";} 172 | 173 | # ----- Build kernel for target 174 | 175 | if [ -z "$LINUX" ] || [ ! -d "$LINUX/kernel" ]; then 176 | echo 'No $LINUX directory, kernel build skipped.' 177 | else 178 | # Which architecture are we building a kernel for? 179 | LINUX="$(realpath "$LINUX")" 180 | [ "$CROSS" == host ] && CROSS="$(uname -m)" 181 | 182 | # Target-specific info in an (alphabetical order) if/else staircase 183 | # Each target needs board config, serial console, RTC, ethernet, block device. 184 | 185 | if [ "$CROSS" == armv5l ]; then 186 | # This could use the same VIRT board as armv7, but let's demonstrate a 187 | # different one requiring a separate device tree binary. 188 | QEMU="arm -M versatilepb -net nic,model=rtl8139 -net user" 189 | KARCH=arm KARGS=ttyAMA0 VMLINUX=arch/arm/boot/zImage 190 | KCONF=CPU_ARM926T,MMU,VFP,ARM_THUMB,AEABI,ARCH_VERSATILE,ATAGS,DEPRECATED_PARAM_STRUCT,ARM_ATAG_DTB_COMPAT,ARM_ATAG_DTB_COMPAT_CMDLINE_EXTEND,SERIAL_AMBA_PL011,SERIAL_AMBA_PL011_CONSOLE,RTC_CLASS,RTC_DRV_PL031,RTC_HCTOSYS,PCI,PCI_VERSATILE,BLK_DEV_SD,SCSI,SCSI_LOWLEVEL,SCSI_SYM53C8XX_2,SCSI_SYM53C8XX_MMIO,NET_VENDOR_REALTEK,8139CP,SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=0 191 | DTB=arch/arm/boot/dts/versatile-pb.dtb 192 | elif [ "$CROSS" == armv7l ] || [ "$CROSS" == aarch64 ]; then 193 | if [ "$CROSS" == aarch64 ]; then 194 | QEMU="aarch64 -M virt -cpu cortex-a57" 195 | KARCH=arm64 VMLINUX=arch/arm64/boot/Image 196 | else 197 | QEMU="arm -M virt" KARCH=arm VMLINUX=arch/arm/boot/zImage 198 | fi 199 | KARGS=ttyAMA0 200 | KCONF=MMU,ARCH_MULTI_V7,ARCH_VIRT,SOC_DRA7XX,ARCH_OMAP2PLUS_TYPICAL,ARCH_ALPINE,ARM_THUMB,VDSO,CPU_IDLE,ARM_CPUIDLE,KERNEL_MODE_NEON,SERIAL_AMBA_PL011,SERIAL_AMBA_PL011_CONSOLE,RTC_CLASS,RTC_HCTOSYS,RTC_DRV_PL031,VIRTIO_MENU,VIRTIO_NET,PCI,PCI_HOST_GENERIC,VIRTIO_BLK,VIRTIO_PCI,VIRTIO_MMIO,ATA,ATA_SFF,ATA_BMDMA,ATA_PIIX,PATA_PLATFORM,PATA_OF_PLATFORM,ATA_GENERIC,ARM_LPAE 201 | elif [ "$CROSS" == hexagon ]; then 202 | QEMU="hexagon -M comet" KARGS=ttyS0 VMLINUX=vmlinux 203 | KARCH="hexagon LLVM_IAS=1" KCONF=SPI,SPI_BITBANG,IOMMU_SUPPORT 204 | elif [ "$CROSS" == i486 ] || [ "$CROSS" == i686 ] || 205 | [ "$CROSS" == x86_64 ] || [ "$CROSS" == x32 ]; then 206 | if [ "$CROSS" == i486 ]; then 207 | QEMU="i386 -cpu 486 -global fw_cfg.dma_enabled=false" KCONF=M486 208 | elif [ "$CROSS" == i686 ]; then 209 | QEMU="i386 -cpu pentium3" KCONF=MPENTIUMII 210 | else 211 | QEMU=x86_64 KCONF=64BIT 212 | [ "$CROSS" == x32 ] && KCONF=X86_X32 213 | fi 214 | KARCH=x86 KARGS=ttyS0 VMLINUX=arch/x86/boot/bzImage 215 | KCONF=$KCONF,UNWINDER_FRAME_POINTER,PCI,BLK_DEV_SD,ATA,ATA_SFF,ATA_BMDMA,ATA_PIIX,NET_VENDOR_INTEL,E1000,SERIAL_8250,SERIAL_8250_CONSOLE,RTC_CLASS 216 | elif [ "$CROSS" == m68k ]; then 217 | QEMU="m68k -M q800" KARCH=m68k KARGS=ttyS0 VMLINUX=vmlinux 218 | KCONF=MMU,M68040,M68KFPU_EMU,MAC,SCSI,SCSI_LOWLEVEL,BLK_DEV_SD,SCSI_MAC_ESP,MACINTOSH_DRIVERS,NET_VENDOR_NATSEMI,MACSONIC,SERIAL_PMACZILOG,SERIAL_PMACZILOG_TTYS,SERIAL_PMACZILOG_CONSOLE 219 | elif [ "$CROSS" == mips ] || [ "$CROSS" == mipsel ]; then 220 | QEMU="mips -M malta" KARCH=mips KARGS=ttyS0 VMLINUX=vmlinux 221 | KCONF=MIPS_MALTA,CPU_MIPS32_R2,SERIAL_8250,SERIAL_8250_CONSOLE,PCI,BLK_DEV_SD,ATA,ATA_SFF,ATA_BMDMA,ATA_PIIX,NET_VENDOR_AMD,PCNET32,POWER_RESET,POWER_RESET_SYSCON 222 | [ "$CROSS" == mipsel ] && KCONF=$KCONF,CPU_LITTLE_ENDIAN && 223 | QEMU="mipsel -M malta" 224 | elif [ "$CROSS" == powerpc ]; then 225 | KARCH=powerpc QEMU="ppc -M g3beige" KARGS=ttyS0 VMLINUX=vmlinux 226 | KCONF=ALTIVEC,PPC_PMAC,PPC_OF_BOOT_TRAMPOLINE,ATA,ATA_SFF,ATA_BMDMA,PATA_MACIO,BLK_DEV_SD,MACINTOSH_DRIVERS,ADB,ADB_CUDA,NET_VENDOR_NATSEMI,NET_VENDOR_8390,NE2K_PCI,SERIO,SERIAL_PMACZILOG,SERIAL_PMACZILOG_TTYS,SERIAL_PMACZILOG_CONSOLE,BOOTX_TEXT 227 | elif [ "$CROSS" == powerpc64 ] || [ "$CROSS" == powerpc64le ]; then 228 | KARCH=powerpc QEMU="ppc64 -M pseries -vga none" KARGS=hvc0 229 | VMLINUX=vmlinux 230 | KCONF=PPC64,PPC_PSERIES,PPC_OF_BOOT_TRAMPOLINE,BLK_DEV_SD,SCSI_LOWLEVEL,SCSI_IBMVSCSI,ATA,NET_VENDOR_IBM,IBMVETH,HVC_CONSOLE,PPC_TRANSACTIONAL_MEM,PPC_DISABLE_WERROR,SECTION_MISMATCH_WARN_ONLY 231 | [ "$CROSS" == powerpc64le ] && KCONF=$KCONF,CPU_LITTLE_ENDIAN 232 | elif [ "$CROSS" = s390x ]; then 233 | QEMU="s390x" KARCH=s390 VMLINUX=arch/s390/boot/bzImage 234 | KCONF=MARCH_Z900,PACK_STACK,VIRTIO_NET,VIRTIO_BLK,SCLP_TTY,SCLP_CONSOLE,SCLP_VT220_TTY,SCLP_VT220_CONSOLE,S390_GUEST 235 | elif [ "$CROSS" == sh2eb ]; then 236 | BUILTIN=1 KARCH=sh VMLINUX=vmlinux 237 | KCONF=CPU_SUBTYPE_J2,CPU_BIG_ENDIAN,SH_JCORE_SOC,SMP,BINFMT_ELF_FDPIC,JCORE_EMAC,SERIAL_UARTLITE,SERIAL_UARTLITE_CONSOLE,HZ_100,CMDLINE_OVERWRITE,SPI,SPI_JCORE,MMC,PWRSEQ_SIMPLE,MMC_BLOCK,MMC_SPI,BINMT_FLAT,BINFMT_MISC,DNOTIFY,INOTIFY_USER,FUSE_FS,I2C,I2C_HELPER_AUTO,LOCALVERSION_AUTO,MTD,MTD_SPI_NOR,MTD_SST25L,MTD_OF_PARTS,POSIX_MQUEUE,SYSVIPC,UEVENT_HELPER,UIO,UIO_PDRV_GENIRQ,FLATMEM_MANUAL,MEMORY_START=0x10000000,CMDLINE=\"console=ttyUL0\ earlycon\" 238 | KCONF+=,BFP_SYSCALL,CRYPTO_DES,CRYPTO_DH,CRYPTO_ECHAINIV,CRYPTO_LZO,CRYPTO_MANAGER_DISABLE_TESTS,CRYPTO_RSA,CRYPTO_SHA1,CRYPTO_SHA3,INET_DIAG,SERIAL_8250 239 | # TODO NET_9P,9P_FS fails to boot in 6.3, unaligned access? 240 | elif [ "$CROSS" == sh4 ]; then 241 | QEMU="sh4 -M r2d -serial null -serial mon:stdio" KARCH=sh 242 | KARGS="ttySC1 noiotrap" VMLINUX=arch/sh/boot/zImage 243 | KCONF=CPU_SUBTYPE_SH7751R,MMU,VSYSCALL,SH_FPU,SH_RTS7751R2D,RTS7751R2D_PLUS,SERIAL_SH_SCI,SERIAL_SH_SCI_CONSOLE,PCI,NET_VENDOR_REALTEK,8139CP,PCI,BLK_DEV_SD,ATA,ATA_SFF,ATA_BMDMA,PATA_PLATFORM,BINFMT_ELF_FDPIC,BINFMT_FLAT,MEMORY_START=0x0c000000 244 | #see also SPI SPI_SH_SCI MFD_SM501 RTC_CLASS RTC_DRV_R9701 RTC_DRV_SH RTC_HCTOSYS 245 | else die "Unknown \$CROSS=$CROSS" 246 | fi 247 | 248 | # Write the qemu launch script 249 | if [ -n "$QEMU" ]; then 250 | [ -z "$BUILTIN" ] && INITRD='-initrd "$DIR"/initramfs.cpio.gz' 251 | { echo DIR='"$(dirname $0)";' qemu-system-"$QEMU" -m 256 '"$@"' $QEMU_MORE \ 252 | -nographic -no-reboot -kernel '"$DIR"'/linux-kernel $INITRD \ 253 | ${DTB:+-dtb '"$DIR"'/linux.dtb} \ 254 | "-append \"panic=1 HOST=$CROSS console=$KARGS \$KARGS\"" && 255 | echo "echo -e '\\e[?7h'" 256 | } > "$OUTPUT"/run-qemu.sh && 257 | chmod +x "$OUTPUT"/run-qemu.sh || exit 1 258 | fi 259 | 260 | announce "linux-$KARCH" 261 | pushd "$LINUX" && make distclean && popd && 262 | cp -sfR "$LINUX" "$TEMP/linux" && pushd "$TEMP/linux" && 263 | 264 | # Write linux-miniconfig 265 | mkdir -p "$OUTDOC" && 266 | { echo "# make ARCH=$KARCH allnoconfig KCONFIG_ALLCONFIG=linux-miniconfig" 267 | echo -e "# make ARCH=$KARCH -j \$(nproc)\n# boot $VMLINUX\n\n" 268 | 269 | # Expand list of =y symbols, first generic then architecture-specific 270 | for i in BINFMT_ELF,BINFMT_SCRIPT,NO_HZ,HIGH_RES_TIMERS,BLK_DEV,BLK_DEV_INITRD,RD_GZIP,BLK_DEV_LOOP,EXT4_FS,EXT4_USE_FOR_EXT2,VFAT_FS,FAT_DEFAULT_UTF8,NLS_CODEPAGE_437,NLS_ISO8859_1,MISC_FILESYSTEMS,SQUASHFS,SQUASHFS_XATTR,SQUASHFS_ZLIB,DEVTMPFS,DEVTMPFS_MOUNT,TMPFS,TMPFS_POSIX_ACL,NET,PACKET,UNIX,INET,IPV6,NETDEVICES,NET_CORE,NETCONSOLE,ETHERNET,COMPAT_32BIT_TIME,EARLY_PRINTK,IKCONFIG,IKCONFIG_PROC "$KCONF" "$KEXTRA" ; do 271 | echo "$i" >> "$OUTDOC"/linux-microconfig 272 | echo "# architecture ${X:-independent}" 273 | csv2cfg "$i" y 274 | X=${X:+extra} X=${X:-specific} 275 | done 276 | [ -n "$BUILTIN" ] && echo -e CONFIG_INITRAMFS_SOURCE="\"$OUTPUT/fs\"" 277 | for i in $MODULES; do csv2cfg "$i" m; done 278 | echo "$KERNEL_CONFIG" 279 | } > "$OUTDOC/linux-miniconfig" && 280 | make ARCH=$KARCH allnoconfig KCONFIG_ALLCONFIG="$OUTDOC/linux-miniconfig" && 281 | 282 | # Second config pass to remove stupid kernel defaults 283 | # See http://lkml.iu.edu/hypermail/linux/kernel/1912.3/03493.html 284 | sed -e 's/# CONFIG_EXPERT .*/CONFIG_EXPERT=y/' -e "$(sed -E -e '/^$/d' \ 285 | -e 's@([^,]*)($|,)@/^CONFIG_\1=y/d;$a# CONFIG_\1 is not set\n@g' \ 286 | <<< VT,SCHED_DEBUG,DEBUG_MISC,X86_DEBUG_FPU)" -i .config && 287 | yes "" | make ARCH=$KARCH oldconfig > /dev/null && 288 | cp .config "$OUTDOC/linux-fullconfig" && 289 | 290 | # Build kernel. Copy config, device tree binary, and kernel binary to output 291 | make ARCH=$KARCH CROSS_COMPILE="$CROSS_COMPILE" -j $(nproc) all || exit 1 292 | [ -n "$DTB" ] && { cp "$DTB" "$OUTPUT/linux.dtb" || exit 1 ;} 293 | if [ -n "$MODULES" ]; then 294 | make ARCH=$KARCH INSTALL_MOD_PATH=modz modules_install && 295 | (cd modz && find lib/modules | cpio -o -H newc -R +0:+0 ) | gzip \ 296 | > "$OUTPUT/modules.cpio.gz" || exit 1 297 | fi 298 | cp "$VMLINUX" "$OUTPUT"/linux-kernel && cd .. && rm -rf linux && popd ||exit 1 299 | fi 300 | 301 | # clean up and package root filesystem for initramfs. 302 | if [ -z "$BUILTIN" ]; then 303 | announce initramfs 304 | { (cd "$ROOT" && find . -printf '%P\n' | cpio -o -H newc -R +0:+0 ) || exit 1 305 | ! test -e "$OUTPUT/modules.cpio.gz" || zcat $_;} | gzip \ 306 | > "$OUTPUT"/initramfs.cpio.gz || exit 1 307 | fi 308 | 309 | mv "$LOG".{n,y} && echo "Output is in $OUTPUT" 310 | rmdir "$TEMP" 2>/dev/null || exit 0 # remove if empty, not an error 311 | -------------------------------------------------------------------------------- /docu/further-sources.md: -------------------------------------------------------------------------------- 1 | # OS/1337 2 | ### Further Sources 3 | A list of Resources for looking into in order to understand how to build and use OS/1337. 4 | 5 | --- 6 | ## Source Material 7 | ### Linux Basics 8 | #### Krzysztof Krystian Jankowski et. al. 9 | - [Floppinux Manual](https://archive.org/details/floppinux-manual/) ([PDF](https://archive.org/download/floppinux-manual/floppinux-manual.pdf)) 10 | - Basically shows how [Floppinux](https://github.com/w84death/floppinux) was created, which is a Busybox/Linux Distro. 11 | ### 12 | 13 | ### [Linux](https://kernel.org) 14 | #### Linus Torvalds et. al. 15 | - [Linux Kernel Documentation](https://github.com/torvalds/linux/tree/master/Documentation) 16 | ### 17 | 18 | ### [Toybox](https://landley.net/toybox/) 19 | #### Rob Landley et. al. 20 | - [Building Toybox from Source](https://www.youtube.com/watch?v=cz6iGrhnMKs) 21 | - [Downloading and using prebuilt Toybox Binaries](https://www.youtube.com/watch?v=TUQJFdNKiBU) 22 | - [Why toybox?](https://www.youtube.com/watch?v=SGmtP5Lg_t0) 23 | - [Toybox vs. BusyBox](https://www.youtube.com/watch?v=MkJkyMuBm3g) 24 | ### 25 | 26 | ### [musl](https://musl.libc.org/) 27 | - [Manual](https://musl.libc.org/manual.html) 28 | - [Wiki](https://wiki.musl-libc.org/) 29 | ### 30 | 31 | 32 | --- 33 | 34 | #### [Back to README](README.md) -------------------------------------------------------------------------------- /docu/getting-started.md: -------------------------------------------------------------------------------- 1 | # Welcome to OS/1337! 2 | 3 | --- 4 | ### Our Presences: 5 | - Website: https://os1337.com 6 | - Project: https://github.com/OS-1337/ 7 | 8 | --- 9 | ## What is OS/1337 ? 10 | #### A minimalist Linux Distribution inspired by: 11 | - [Floppinux](https://github.com/w84death/floppinux) 12 | - [TinyCore](www.tinycorelinux.net/downloads.html) 13 | - [Terminals](https://en.wikipedia.org/wiki/Computer_terminal) 14 | - [DEC VT-320](https://en.wikipedia.org/wiki/VT320) 15 | - as presented by [LGR](https://www.youtube.com/watch?v=RuZUPpmXfT0&pp=ygUNbGdyIGRldiB2dDMyMA%3D%3D) 16 | - [violence.works](http://violence.works/) [VT-69](https://www.youtube.com/watch?v=wYfpptgb6W8) 17 | 18 | --- 19 | ## Why make it? 20 | ### "For the lulz!" 21 | Not really, but as a benchmark to see what the absolute minimum Linux System can be. 22 | 23 | Not as a nice "Tech Demo" but actually useable system. 24 | 25 | 26 | --- 27 | #### [Back to README](README.md) -------------------------------------------------------------------------------- /docu/ideas/architectures.tsv: -------------------------------------------------------------------------------- 1 | PRIORITY TEST SYSTEM AVAILABLE? NAME BITS ENDIANESS ARCH TYPE COMMENTS 2 | 0 N/A srcs -- -- sources generic source code for all shipped versions 3 | 1 YES i486 32 LE i486 generic very old 32 bit Intel & AMD CPUs [BIOS] 4 | TBD YES rpi01 32 LE ARMv5r11 custom Image for Raspberry Pi & Pi Zero (w) [BCM2835 SoC] 5 | TBD YES amd64 64 LE i686-64 generic 64 bit AMD & Intel CPUs [BIOS] 6 | TBD YES i686 32 LE i686 generic 32 bit Intel & AMD CPUs [BIOS] 7 | TBD YES eee701 32 LE i586 custom Image for Asus Eee PC 701 [BIOS] 8 | TBD YES p11z 32 LE i686-atom custom Image for Sony Vaio P11Z Netbooks [Atom Z520 CPU] 9 | TBD YES ion330 64 LE i686-64-atom custom Image for nvidia Ion - based Nettops [Atom 330 CPU + GeForce 9400M GPU] 10 | TBD YES bpi0m2 32 LE ARMv7 custom Image for Banana Pi Zero M2 [boot.bin] 11 | TBD YES rpi0w2 64 LE ARMv7 custom Image for Raspberry Pi Zero 2 W [RP3A0-AU SoC] 12 | TBD YES iatom64 32 LE i686-64-atom custom Image for Intel Atom based Nettops [Atom 330 CPU] 13 | TBD YES t620 64 LE amd64 custom Image for HP t620 Thin Client [GX-217GA SoC] 14 | TBD YES xenon 64 BE ppc64 custom Image for modded Xbox 360's [Xenon CPU] 15 | TBD NO arm11v5 32 LE ARMv5r11 generic 32 bit low-end ARM SoCs [boot.bin] 16 | TBD NO arm64v7 64 LE ARMv7 generic 64 bit low-end ARM SoCs [UEFI] 17 | TBD NO arm64v8 64 LE ARMv8 generic 64 bit midrange ARM SoCs [UEFI] 18 | TBD NO arm64v9 64 LE ARMv9 generic 64 bit highend ARM SoCs [UEFI] 19 | TBD NO risc32e 32 LE RV32E generic 32bit generic low-end RISC-V image [RV32 Embedded subset only] 20 | TBD NO risc32i 32 LE RV32I generic 32bit generic low-end RISC-V image [RV32 Base Intreger subset only] 21 | TBD NO riscv32 32 LE RV32IMAC generic 32 bit generic mid-range RISC-V image [IMAC subsets] 22 | TBD NO riscv64 64 LE RV64IMAC generic 64 bit generic high-end RISC-V image [IMAC subsets] 23 | TBD NO itanium 64 LE IA64 generic Intel Itanium-based Servers 24 | TBD NO mWatt 64 LE ppc64le generic Image for OpenPower Microwatt [Soft-CPU] implementations 25 | TBD NO mblaze 32 LE microblaze generic For Xilinx MicroBlaze and compatible Soft-CPU inplementations [FPGA] 26 | TBD NO i586 32 LE i586 generic old 32 bit Intel & AMD CPUs [BIOS] 27 | TBD NO w3040 32 LE i686-atom custom Image for Dell Wyse 3040 Thin Client [Atom Z8350 SoC] 28 | TBD NO vortex 32 LE i486 custom Image for Vortex86 SoCs [BIOS] 29 | TBD NO cell 64 BE ppc64 custom 'Other OS' ISO for modded Playstation 3 [Cell CPU] 30 | TBD NO opirv2 64 LE riscv64 custom Image for Orange Pi RV2 [Ki X1 SoC] 31 | TBD NO rpi3 64 LE ARMv7 custom Image for Raspberry Pi 3 + CM3 [BCM2837 SoC] 32 | TBD NO rpi4 64 LE ARMv8-A custom Image for Raspberry Pi 4, Pi400 + CM4 [BCM2711 SoC] 33 | TBD NO rpi5 64 LE ARMv8-A custom Image for Raspberry Pi 5, Pi500 + CM5 [BCM2712 SoC] 34 | TBD NO iatom32 32 LE i686-atom custom Image for Intel Atom based Netbooks [Atom N270 CPU] 35 | TBD NO ion270 32 LE i686-atom custom Image for nvidia Ion - based Netbooks [Atom N270 CPU + GeForce 9400M GPU] 36 | TBD NO applea1 64 LE ARMv8.5-A custom Image for 1st Generation 'AppleSilicon' Devices [Apple M1 SoC] 37 | TBD NO viaopen 32 LE i686 custom Image for VIA OpenBook - based Netbooks [VIA Nano CPU] 38 | TBD NO oc486 32 LE i486 custom Image for OpenCores ao486 FPGA-based implementation [BIOS] 39 | TBD NO segadc 32 LE SuperH4 custom Image for SEGA Dreamcast [Hitachi SuperH-4 CPU] 40 | TBD NO pc9821x 32 LE i486-pc98 custom Image for NEC PC-9800 machines [i486 and up only] 41 | TBD NO fmt486 32 LE i486 custom Image for FM Towns [i486-based] 42 | TBD NO apple64 64 LE i686-64 custom Image for 64bit Intel-based Macs [AEFI] 43 | TBD NO apple32 32 LE i686 custom Image for 32bit Intel-based Macs [AEFI] 44 | TBD NO ppc64a 64 LE ppc64le custom Image for 64bit PowerPC-based Macs [OpenFirmware] 45 | TBD NO ppc32a 32 LE ppc32le custom Image for 32bit PowerPC-based Macs [OpenFirmware] 46 | TBD NO broadwy 32 BE ppc750 custom Image for modded Nintendo Wii [Broadway CPU] 47 | TBD NO niagara 64 BI SPARCv9 custom Image for UltraSparc T2 based Servers 48 | TBD NO xbox 32 LE i586 custom Image for modded Xbox Classic [P3 CPU] 49 | TBD NO indigo 64 BE mips3 custom Image for SGI Workstations [MIPS R4400 and higher] -------------------------------------------------------------------------------- /docu/ideas/components.md: -------------------------------------------------------------------------------- 1 | 2 | ## Component List 3 | #### See also [Packages](packages.list.tsv) 4 | ### User Interface 5 | - [Fish](https://fishshell.com/) Shell for maximum user-friendlyness. 6 | - [Bash](https://www.gnu.org/software/bash/) Shell is only kept for compatibility and scripting reasons. 7 | - [tmux](https://github.com/tmux/tmux/wiki) 8 | - Because tiling window managers are good - and tiling terminals are better. 9 | - Allows for switching between applications and flexible, on-the-fly adjustment of the terminal. 10 | - [Dialog](https://en.wikipedia.org/wiki/Dialog_(software)) for any interactive configuration. 11 | - [tasksel](https://wiki.debian.org/tasksel)-alike setup. 12 | - a [Moo Menu](https://archive.org/details/moo31)-inspired "Startmenu" / Homescreen for fast and easy access to files and tools. 13 | - an extensive list of preconfigured [aliases](https://bash.cyberciti.biz/guide/~/.bash_aliases) and [Functions](https://www.digitalocean.com/community/tutorials/an-introduction-to-useful-bash-aliases-and-functions). 14 | - detecting drives & filesystems as well as (dis-)mounting them. 15 | - creating a [RAM-Disk](https://linuxhint.com/create-ramdisk-linux/) as well as backing up & restoring data to and from it. 16 | ### Essentials for Users 17 | - [OpenSSH](https://www.openssh.com/) Client & Server 18 | - [GnuPG](https://www.gnupg.org/) ForEncryption and Authentification via Digital Signatures 19 | - [btop](https://github.com/aristocratos/btop) system monitor. 20 | - Communication 21 | - [Lynx](https://en.wikipedia.org/wiki/Lynx_(web_browser)) Browser 22 | - [mutt](https://en.wikipedia.org/wiki/Mutt_(email_client)) eMail Client 23 | - [WeeChat](https://weechat.org/) IRC Client 24 | - [Profanity](https://profanity-im.github.io/) XMPP Client 25 | - [Zulip Terminal Client](https://github.com/zulip/zulip-terminal) 26 | ### Various Backup & Restore tools 27 | - [duplicity](https://duplicity.us/) 28 | - [borg](https://www.borgbackup.org/) 29 | - [rdiff-backup](https://rdiff-backup.net/) 30 | - [pax](https://en.wikipedia.org/wiki/Pax_(command)) 31 | - [tar](https://en.wikipedia.org/wiki/Tar_(computing)) is being shipped for compatibility purposes. 32 | - [bzip2](https://en.wikipedia.org/wiki/Bzip2) for efficient compression. 33 | ### Core Components 34 | - Kernel 35 | - [Linux Kernel](https://kernel.org/) 36 | - LTS Versions prefered 37 | - System Managment & Init 38 | - [SystemD](https://systemd.io/) 39 | - Because noone wants to suffer through SystemVinit. 40 | - Also because it's superior. 41 | - Bootloaders 42 | - [SystemD-Boot](https://wiki.archlinux.org/title/Systemd-boot) on (U)EFI-based systems. 43 | - [GRUB2](https://wiki.archlinux.org/title/GRUB) on non-(U)EFI - Systems. 44 | - [U-boot](https://elinux.org/RPi_U-Boot) on SBCs and other devices. 45 | - [isolinux](https://wiki.syslinux.org/wiki/index.php?title=ISOLINUX) for [LiveCD](https://en.wikipedia.org/wiki/Live_CD) & [LiveUSB](https://en.wikipedia.org/wiki/Live_USB) systems. 46 | - Userland 47 | - [BSD Userland & Toolchain](https://github.com/dcantrell/bsdutils) 48 | - [Clang](https://clang.llvm.org/)/[LLVM](https://llvm.org/) 49 | ### Filesystem Support 50 | - [OpenZFS](https://openzfs.org/wiki/Main_Page) support. 51 | - Simply because ZFS is an excellent filesystem for huge amounts of data. 52 | - Tho the system will usually default to ext4 with ext2 as option to reduce writes and keep performance good. 53 | - [UFS](https://en.wikipedia.org/wiki/Unix_File_System), [LTFS](https://github.com/LinearTapeFileSystem), [ISO9660](https://en.wikipedia.org/wiki/ISO_9660) 54 | - [ext2](https://en.wikipedia.org/wiki/Ext2), [ext3](https://en.wikipedia.org/wiki/Ext3), [ext4](https://en.wikipedia.org/wiki/Ext4), [btrfs](https://en.wikipedia.org/wiki/Btrfs) 55 | - [NFS](https://en.wikipedia.org/wiki/Network_File_System), [CIFS](https://en.wikipedia.org/wiki/Server_Message_Block), [iSCSI](https://en.wikipedia.org/wiki/ISCSI) 56 | - other filesystems will be supported via [FUSE](https://en.wikipedia.org/wiki/Filesystem_in_Userspace) 57 | - including [IPFS](https://en.wikipedia.org/wiki/InterPlanetary_File_System) 58 | - [SSHFS](https://en.wikipedia.org/wiki/SSHFS) 59 | - & [NTFS](https://en.wikipedia.org/wiki/NTFS-3G) 60 | - [LVM](https://en.wikipedia.org/wiki/Logical_Volume_Manager_(Linux)) with [dmraid](https://en.wikipedia.org/wiki/Non-standard_RAID_levels#LINUX-MD-RAID-10), [dm-crypt](https://en.wikipedia.org/wiki/Dm-crypt) & [LUKS](https://en.wikipedia.org/wiki/Linux_Unified_Key_Setup) are ofc supported. 61 | - Option for fully-encrypted (except bootloader ofc!) as well as just /home or individual /home/user filesystems is possible and easy to setup. 62 | - This is espechally desireable for SBCs and well as Notebooks, Netbooks and public Terminals. 63 | - [VeraCrypt](https://veracrypt.fr/en/Downloads.html) may be packaged and distributed as "extra" package. 64 | ### Networking 65 | - Drivers for modern WiFi & Ethernet Devices 66 | - VPN Support 67 | - [OpenVPN](https://en.wikipedia.org/wiki/OpenVPN) 68 | - [WireGuard](https://en.wikipedia.org/wiki/WireGuard) 69 | - [SSH-Tunneling](https://en.wikipedia.org/wiki/Tunneling_protocol#SSH) 70 | - Obfuscation 71 | - [Tor](https://en.wikipedia.org/wiki/Tor_(network)) 72 | - Support for OpenVPN-over-Tor = VPN-Endpoint is an [Onion Service](https://en.wikipedia.org/wiki/Tor_(network)#Onion_services) 73 | - This should only be used to access a private network, not as a means to anonymize internet connections. 74 | - It may however be used to circumvent restrictions and general assholeism aka. banning Tor users outright. 75 | -------------------------------------------------------------------------------- /docu/ideas/custom-packages.md: -------------------------------------------------------------------------------- 1 | # OS/1337 2 | ## Custom Packages 3 | ### OS/1337 - specific 4 | #### System Configurator 5 | The System Configurator aims to be a user-friendly setup & configuration tool. Similar to [YaST](https://en.wikipedia.org/wiki/YaST) and [tasksel](https://wiki.debian.org/tasksel) it setups most stuff and sanity-checks most settings. 6 | - Package: os1337-systemcfg 7 | - Command: systemcfg 8 | #### Startmenu 9 | This basically acts as the [Startmenu](https://en.wikipedia.org/wiki/Start_menu), similar to [Moo Menu](http://reimagery.com/fsfd/menu.htm#moo) ([archived version](https://archive.org/details/moo31)), providing an easy access to installed applications. 10 | - Package: os1337-menu 11 | - Command: menu 12 | #### Navigator 13 | The Navigator is the toolbar used to switch between programs and screens. 14 | Furthermore it manages the bottom status bar in the last (25th row) similar to the [VT320](https://en.wikipedia.org/wiki/VT320) Terminal and acting as [Taskbar](https://en.wikipedia.org/wiki/Taskbar) similar to "modern" Desktop OSes. 15 | - Package: os1337-nav 16 | - Command: nav 17 | #### Notifications 18 | The Notification-Tool provides notifications as a small applet that is visible in the taskbar. 19 | This includes essentials such as battery level, system mails, etc. 20 | - Package: os1337-notifications 21 | - Command: notif 22 | #### Flusher 23 | This package aims at clearning up RAM whenever it's needed. 24 | Which is useful when dealing with poorly optimized or badly programmed software. 25 | - Package: flushcache 26 | - Command: flush 27 | #### RAMDISK Manager 28 | This tool makes it extremely simple to setup, backup & restore RAMDISKs and manage them, instead of remembering several [manual commands](https://linuxhint.com/create-ramdisk-linux/). 29 | This is extremely handy when it comes handling RAMDISKs and reduces the chances of mistakes. 30 | - Package: ramdisk-manager 31 | - Command: ramdiskm 32 | ### Previously unpackaged Software 33 | #### [ntfy](https://ntfy.sh/) - [source](https://github.com/binwiederhier/ntfy) 34 | ntfy [spelled: "notify"] is a server that accepts curl PUT/POST messages and allows retrieval of them, enabling push notifications for CLI tools. 35 | This can be a very useful tool to inform about events. 36 | #### [wsend](https://wsend.net/) - [source](https://github.com/abemassry/wsend) 37 | wsend aims to be "the opposite of wget" allowing users to upload files and retrieve them by sharing a link. 38 | #### [oshi](https://oshi.at/) - [source](https://github.com/somenonymous/OshiUpload) 39 | oshi is an opensourced filehoster that also deduplicates files automatically in the background and also allows further parameters, like limiting the lifespan of a file and setting how many times a file can be downloaded. 40 | -------------------------------------------------------------------------------- /docu/ideas/editions.tsv: -------------------------------------------------------------------------------- 1 | OS/1337 Version Codename 1440kB FDD 20MB Businesscard-CD 170MB Mini-CD 500MB Businesscard-DVD 1300MB MiniDVD 2500MB MiniDVD-DL Comments 2 | Floppy Edition CORE in development - - - - - Minimalist System to allow SSH'ing into other Systems. 3 | Basic Edition MINI -only bootfloppy- TBA - - - - A more workable system that can also be used to access local resources and be used as basis for a custom OS/1337 installation. 4 | Premium Edition MAIN -only bootfloppy- - TBA - - - Includes way more tools to make it useable as minimalist system on the go. 5 | Professional Edition XTRA -only bootfloppy- - - TBA - - Designed to be a TUI desktop for fans of frugal- and distraction-free computing. 6 | Enterprise Edition PLUS -only bootfloppy- - - - TBA - Aimed to provide the most complete option with a feckton of additional tools allowing for a daily driver TUI desktop. 7 | Package Archive PKGS -not bootable- - - - - TBA Archive of all packages to allow for manual, offline installation in airgapped envoirments. 8 | -------------------------------------------------------------------------------- /docu/ideas/installer/INSTALLER.md: -------------------------------------------------------------------------------- 1 | # Installer 2 | ### OS/1337 Installation 3 | 4 | --- 5 | 6 | ## Goal 7 | #### Installation Script for a bootable version of OS/1337 on an installed drive. 8 | 9 | --- 10 | 11 | ## Steps 12 | #### To install OS/1337 13 | 1. Choose the **Edition** 14 | - As of now, this would basically amount to only ``CORE`` or ``Chonky``. 15 | 2. Download the selected **Edition**. 16 | - Since OS/1337's ``toybox`` only includes ``wget`` w/o SSL/TLS support, it'll likely have to be downloaded via HTTP. 17 | - Security Issue here: How to check for it being the correct version? 18 | - CRC'ing isn't really an option nor signature checking - at least not in the ``CORE`` Edition. 19 | 3. Writing the Image to disk 20 | - Basically using ``dd`` to shove it onto a disk. 21 | 4. Reboot. 22 | 23 | --- 24 | 25 | -------------------------------------------------------------------------------- /docu/ideas/installer/install.sh: -------------------------------------------------------------------------------- 1 | #! /bin toybox sh 2 | 3 | ## This script will only run on OS/1337. 4 | ## To use it on any other linux distro, you'll have to change the first line into 5 | ## #! /usr/bin/env bash 6 | ## Without the ## before it. 7 | 8 | clear 9 | 10 | echo 'Welcome to the OS/1337 Installer!' 11 | echo 'This will download and write an image of OS/1337 to a device on this system!' 12 | 13 | echo 'the following devices have been detected:' 14 | echo '' 15 | 16 | lsblk -e7 17 | ## Queries for physical block devices of the system 18 | 19 | echo '' 20 | echo 'if you see no entries, then chances are there are no bootable devices being detected at all.' 21 | echo '' 22 | echo 'if you are certain that one should be detectable and it is connected and' 23 | echo 'visible from other OSes like MS-DOS, Windows or ideally another' 24 | echo 'Linux Distribution, then please let us know about it via an issue' 25 | echo 'on our GitHub. Not all Hardware can be supported tho and the' 26 | echo '"CORE" Edition for example has a lot of drivers removed in order to' 27 | echo 'fit on a 1440kB 3,5" HD FDD, including SATA & NVMe support.' 28 | echo '' 29 | 30 | exit -------------------------------------------------------------------------------- /docu/ideas/mockups/os1337-menu.txt: -------------------------------------------------------------------------------- 1 | ╔══> Startmenu <══════════════════════════════════════════════════════════════╗ 2 | ║ [ Welcome to OS/1337 ] [ Last Opened Application ] ║ 3 | ║ [ Notification Center ] [ 0 unread Notifications ] ║ 4 | ║ [ File Manager] [ Recently Opened Files ] ║ 5 | ║ [ WebBrowser ] [ Bookmarks ] ║ 6 | ║ [ eMail ] [ 0 unread eMails ] ║ 7 | ║ [ IRC ] [ disconnected ] ║ 8 | ║ [ XMPP ] [ 1 contact online ] ║ 9 | ║ [ Zulip ] [ no new messages ] ║ 10 | ║ [ btop] [ most used application ] ║ 11 | ║ [ All Programs... ] [ show all indexed apps ] ║ 12 | ╟─────────────────────────────────────────────────────────────────────────────╢ 13 | ║ [ About this System ] ║ 14 | ║ user@os1337-demo ║ 15 | ║ OS: OS/1337 v22.04 LTS - amd64 ║ 16 | ║ Host: SNUNMU T6 Pro Compute Stick PC ║ 17 | ║ Kernel: linux-6.1.0-2-generic ║ 18 | ║ Uptime: 4 hours, 20 mins ║ 19 | ║ Packages: 512 (dpkg) ║ 20 | ║ Shell: fish 3.5.1, bash 5.0.17 ║ 21 | ║ Resolution: 80x25 ║ 22 | ║ CPU: Intel Atom x7-Z8750 (4) @ 2.560GHz ║ 23 | ║ GPU: Intel Cherry Trail Graphics Controller ║ 24 | ║ Memory: 256MiB / 8192MiB ║ 25 | ╚[NAV][ ═> Start <═ ] [SCREEN 0/0][ !0 ][BAT:100%]╝ -------------------------------------------------------------------------------- /docu/ideas/mockups/os1337-nav.txt: -------------------------------------------------------------------------------- 1 | ╔══> Demo Window <════════════════════════════════════════════════════════════╗ 2 | ║ Welcome to OS/1337 ║ 3 | ║ This is the Navigation demo. ║ 4 | ╟─────────────────────────────────────────────────────────────────────────────╢ 5 | ║ Per default, OS/1337 uses an 80x25 console Window, reserving line 25 for ║ 6 | ║ a Status- & Taskbar aka. Navbar, which can be called up by typing in nav. ║ 7 | ║ ║ 8 | ║ In this regard, it acts like the Windows Taskbar, but with good keyboard ║ 9 | ║ support out of the box. ║ 10 | ║ ║ 11 | ║ ║ 12 | ║ ║ 13 | ║ ║ 14 | ║ ║ 15 | ║ ║ 16 | ║ ║ 17 | ║ ║ 18 | ║ ║ 19 | ║ ║ 20 | ║ ║ 21 | ║ ║ 22 | ║ ║ 23 | ║ ║ 24 | ║ ║ 25 | ╚[NAV][ ═> Welcome to OS/1337 <═ ] [ !0 ][BAT:100%]╝ -------------------------------------------------------------------------------- /docu/ideas/mockups/os1337-notif.txt: -------------------------------------------------------------------------------- 1 | ╔══> Notification Center <════════════════════════════════════════════════════╗ 2 | ║ There are no unread notifications... ║ 3 | ║ [Read previous Notifications] ║ 4 | ╟─────────────────────────────────────────────────────────────────────────────╢ 5 | ║ No remote Notifications are setup... ║ 6 | ║ [Setup a remote Notification using ntfy.sh] ║ 7 | ║ ║ 8 | ║ ║ 9 | ║ ║ 10 | ║ ║ 11 | ║ ║ 12 | ║ ║ 13 | ║ ║ 14 | ║ ║ 15 | ║ ║ 16 | ║ ║ 17 | ║ ║ 18 | ║ ║ 19 | ║ ║ 20 | ║ ║ 21 | ║ ║ 22 | ║ ║ 23 | ║ ║ 24 | ║ ║ 25 | ╚[NAV][ ═> Notification Center <═ ] [ !0 ][BAT:100%]╝ -------------------------------------------------------------------------------- /docu/ideas/mockups/os1337-pkgi.txt: -------------------------------------------------------------------------------- 1 | ╔══> OS/1337 Package Installer <══════════════════════════════════════════════╗ 2 | ║ ║ 3 | ║ [Update Packages] [Update enabled - all packages updated. Checked: 1h ago] ║ 4 | ║ [List installed Packages] [BASE SYSTEM INSTALLED] ║ 5 | ║ [Install Package(s)] [Remove Package(s)] [Search Package(s)] ║ 6 | ║ [Cache Package(s) locally] [Caching off. No Packages Cached.] ║ 7 | ║ [Share Package(s) in Network] [Sharing off. No Packages Cached.] ║ 8 | ║ [Package Source] [Main Repository - no Cache locally/networked] ║ 9 | ║ ║ 10 | ║ ║ 11 | ║ ║ 12 | ║ ║ 13 | ║ ║ 14 | ║ ║ 15 | ║ ║ 16 | ║ ║ 17 | ║ ║ 18 | ║ ║ 19 | ║ ║ 20 | ║ ║ 21 | ║ ║ 22 | ║ ║ 23 | ║ ║ 24 | ║ ║ 25 | ╚[NAV][ ═> OS/1337 Package Installer <═ ] [ !0 ][BAT:100%]╝ -------------------------------------------------------------------------------- /docu/ideas/mockups/os1337-systemcfg.txt: -------------------------------------------------------------------------------- 1 | ╔══> OS/1337 System Configuration <═══════════════════════════════════════════╗ 2 | ║ ║ 3 | ║ [Update OS/1337] [Update enabled - all packages updated. Checked: 1h ago] ║ 4 | ║ [User Accounts and Customizations ] [Last action: See logs] ║ 5 | ║ ║ 6 | ║ ║ 7 | ║ ║ 8 | ║ ║ 9 | ║ ║ 10 | ║ ║ 11 | ║ ║ 12 | ║ ║ 13 | ║ ║ 14 | ║ ║ 15 | ║ ║ 16 | ║ ║ 17 | ║ ║ 18 | ║ ║ 19 | ║ ║ 20 | ║ ║ 21 | ║ ║ 22 | ║ ║ 23 | ║ ║ 24 | ║ ║ 25 | ╚[NAV][ ═> OS/1337 System Configuration <═ ] [ !0 ][BAT:100%]╝ -------------------------------------------------------------------------------- /docu/ideas/packages.list.tsv: -------------------------------------------------------------------------------- 1 | PACKAGE TYPE REPO DEFAULT STATUS 2 | 3 | # CORE PACKAGES 4 | linux-kernel KERNEL 0.CORE INSTALLED 5 | linux-firmware DRIVERS 0.CORE INSTALLED 6 | systemd SYSTEM-MANAGMENT 0.CORE INSTALLED 7 | systemd-bootd BOOTLOADER 0.CORE SELECTIVELY INSTALLED 8 | GRUB2 BOOTLOADER 0.CORE SELECTIVELY INSTALLED 9 | u-boot BOOTLOADER 0.CORE SELECTIVELY INSTALLED 10 | isolinux BOOTLOADER 0.CORE SELECTIVELY INSTALLED 11 | bsdutils USERLAND 0.CORE INSTALLED 12 | openzfs-tools FILESYSTEM 0.CORE INSTALLED 13 | openzfs-dkms FILESYSTEM 0.CORE INSTALLED 14 | ltfs FILESYSTEM 0.CORE INSTALLED 15 | open-iscsi FILESYSTEM 0.CORE INSTALLED 16 | samba FILESYSTEM 0.CORE INSTALLED 17 | nfs-client FILESYSTEM 0.CORE INSTALLED 18 | lvm2 FILESYSTEM 0.CORE INSTALLED 19 | dmraid FILESYSTEM 0.CORE INSTALLED 20 | dmcrypt FILESYSTEM 0.CORE INSTALLED 21 | onionfs FILESYSTEM 0.CORE INSTALLED 22 | squashfs FILESYSTEM 0.CORE INSTALLED 23 | fish SHELL 0.CORE INSTALLED 24 | bash SHELL 0.CORE INSTALLED 25 | tmux TERMINAL MULTIPLEXER 0.CORE INSTALLED 26 | ncurses LIBRARY: UI 0.CORE INSTALLED 27 | dialog LIBRARY: UI 0.CORE INSTALLED 28 | openssh REMOTE ACCESS 0.CORE INSTALLED 29 | openssh-server REMOTE ACCESS 0.CORE INSTALLED 30 | openssh-keygen LIBRARY: CRYPTOGRAPHY 0.CORE INSTALLED 31 | gnupg TOOL: CRYPTOGRAPHY 0.CORE INSTALLED 32 | btop TOOL: SYSTEM METRICS 0.CORE INSTALLED 33 | lynx BROWSER 0.CORE INSTALLED 34 | mutt COMMUNICATION: EMAIL-CLIENT 0.CORE INSTALLED 35 | weechat COMMUNICATION: CHAT-CLIENT 0.CORE INSTALLED 36 | profanity COMMUNICATION: CHAT-CLIENT 0.CORE INSTALLED 37 | zulip-terminal-client COMMUNICATION: CHAT-CLIENT 0.CORE INSTALLED 38 | curl TOOL: HTTP-UPLOAD 0.CORE INSTALLED 39 | duplicity TOOL: BACKUP 0.CORE INSTALLED 40 | borg TOOL: BACKUP 0.CORE INSTALLED 41 | rdiff-backup TOOL:BACKUP 0.CORE INSTALLED 42 | pax TOOL: ARCHIVAL 0.CORE INSTALLED 43 | tar TOOL: ARCHIVAL 0.CORE INSTALLED 44 | bzip2 TOOL: ARCHIVAL 0.CORE INSTALLED 45 | wsend TOOL: DATA TRANSMISSION 0.CORE INSTALLED 46 | ntfy-cli TOOL: SCRIPTING 0.CORE INSTALLED 47 | 48 | # DISTRIBUTION-SPECIFIC TOOLS 49 | * os1337-systemcfg TUI SYSTEM CONFIG 0.CORE INSTALLED 50 | * os1337-menu TUI START MENU 0.CORE INSTALLED 51 | * os1337-nav TUI CONFIGURATION 0.CORE INSTALLED 52 | * flushcache RAM clearing 0.CORE INSTALLED 53 | * ramdisk-manager RAMDISK MANAGER 0.CORE INSTALLED 54 | 55 | # OPTIONAL PACKAGES 56 | zsh SHELL USER NOT INSTALLED 57 | clang COMPILER OPTIONAL NOT INSTALLED 58 | fuse API: FILESYSTEMS OPTIONAL NOT INSTALLED 59 | ntfs-3g FILESYSTEM OPTIONAL NOT INSTALLED 60 | sshfs FILESYSTEM OPTIONAL NOT INSTALLED 61 | ipfs FILESYSTEM OPTIONAL NOT INSTALLED 62 | veracrypt-console FOLESYSTEM OPTIONAL NOT INSTALLED 63 | openjdk RUNTIME OPTIONAL NOT INSTALLED 64 | * ntfy SERVER OPTIONAL NOT INSTALLED 65 | * oshi SERVER OPTIONAL NOT INSTALLED -------------------------------------------------------------------------------- /docu/ideas/resolutions.tsv: -------------------------------------------------------------------------------- 1 | MODE # RESOLUTION [px] Resolution [chars] Resolution [char] NOTES 2 | 0 720 x 350 80 x 25 9 x 14 MDA / HGC Mode - default for TTY & SSH connections 3 | 1 640 x 480 80 x 30 8 x 16 default for local consoles 4 | 0 800 x 480 80 x 25 10 x 19 Widescreen Low Resolution 5 | 2 800 x 480 100 x 30 8 x 16 Widescreen High option 6 | 2 800 x 600 100 x 30 8 x 20 Terminal High Resolution 7 | 3 800 x 600 100 x 40 8 x 15 Terminal Highest Resolution 8 | 4 1024 x 600 128 x 30 8 x 20 Netbook High Resolution 9 | 5 1024 x 768 128 x 48 8 x 16 SVGA High Resolution 10 | 4 1280 x 720 128 x 30 10 x 24 720p High Resolution 11 | 6 1280 x 720 128 x 45 10 x 16 720p Higher Resolution 12 | 7 1366 x 768 80 x 32 17 x 24 768p Low Resolution 13 | 7 1600 x 768 80 x 32 20 x 24 P11Z Low Resolution 14 | 8 1600 x 768 100 x 32 16 x 24 P11Z Medium Resolution 15 | 9 1600 x 768 160 x 32 10 x 24 P11Z High Resolution 16 | 10 1600 x 768 200 x 48 8 x 16 P11Z Higher Resolution 17 | 1 1920 x 1080 80 x 30 24 x 36 1080p Lowest Resolution 18 | 11 1920 x 1080 80 x 40 24 x 27 1080p Low Resolution 19 | 12 1920 x 1080 96 x 36 20 x 30 1080p Medium Resolution 20 | 6 1920 x 1080 128 x 45 15 x 24 1080p High Resolution 21 | 13 1920 x 1080 192 x 54 10 x 20 1080p Higher Resolution 22 | 14 1920 x 1080 240 x 72 8 x 15 1080p Highest Resolution 23 | 15 - x - - x - - x - Custom Mode [Configureable by the user] 24 | -------------------------------------------------------------------------------- /docu/img/logo/OS1337_logo.odg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OS-1337/OS1337/4a70112a8b403953abe8a68714626f4bdad8b08a/docu/img/logo/OS1337_logo.odg -------------------------------------------------------------------------------- /docu/img/logo/OS1337_logo.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OS-1337/OS1337/4a70112a8b403953abe8a68714626f4bdad8b08a/docu/img/logo/OS1337_logo.pdf -------------------------------------------------------------------------------- /docu/img/logo/OS1337_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OS-1337/OS1337/4a70112a8b403953abe8a68714626f4bdad8b08a/docu/img/logo/OS1337_logo.png -------------------------------------------------------------------------------- /docu/img/logo/OS1337_logo.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | _OS/1337 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | -------------------------------------------------------------------------------- /docu/linux.kernel.versions.tsv: -------------------------------------------------------------------------------- 1 | NAME VERSION SOURCE COMMENT 2 | linux-i386-legacy-lts 3.4.99 https://mirrors.edge.kernel.org/pub/linux/kernel/v3.x/linux-3.4.99.tar.xz Last Linux Kernel with i386 support - LTS version 3 | linux-i386-legacy 3.6.9 https://mirrors.edge.kernel.org/pub/linux/kernel/v3.x/linux-3.6.9.tar.xz Last Version of Linux with i386 support 4 | linux-disrecommend-420 4.20.0 https://www.kernel.org/pub/linux/kernel/v4.x/linux-4.20.tar.xz Meme Version Number - NOT RECOMMENDED! 5 | linux-lts-oldest 5.4.291 https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.4.291.tar.xz Oldest still supported LTS Kernel 6 | linux-initial 6.6.6 https://mirrors.edge.kernel.org/pub/linux/kernel/v6.x/linux-6.6.6.tar.xz Initial release version for OS/1337 (Kernel 6.6.6) 7 | linux-lts-latest 6.12.22 https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-6.12.22.tar.xz Latest Linux Kernel - LTS version 8 | linux-stable-latest 6.14.1 https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-6.14.1.tar.xz Latest Stable Release 9 | -------------------------------------------------------------------------------- /docu/notes/ascii-drawing-chars.txt: -------------------------------------------------------------------------------- 1 | # ascii box drawing characters 2 | ## See: https://en.wikipedia.org/wiki/Box-drawing_character 3 | 4 | ─ ━ │ ┃ ┄ ┅ ┆ ┇ ┈ ┉ ┊ ┋ ┌ ┍ ┎ ┏ 5 | ┐ ┑ ┒ ┓ └ ┕ ┖ ┗ ┘ ┙ ┚ ┛ ├ ┝ ┞ ┟ 6 | ┠ ┡ ┢ ┣ ┤ ┥ ┦ ┧ ┨ ┩ ┪ ┫ ┬ ┭ ┮ ┯ 7 | ┰ ┱ ┲ ┳ ┴ ┵ ┶ ┷ ┸ ┹ ┺ ┻ ┼ ┽ ┾ ┿ 8 | ╀ ╁ ╂ ╃ ╄ ╅ ╆ ╇ ╈ ╉ ╊ ╋ ╌ ╍ ╎ ╏ 9 | ═ ║ ╒ ╓ ╔ ╕ ╖ ╗ ╘ ╙ ╚ ╛ ╜ ╝ ╞ ╟ 10 | ╠ ╡ ╢ ╣ ╤ ╥ ╦ ╧ ╨ ╩ ╪ ╫ ╬ ╭ ╮ ╯ 11 | ╰ ╱ ╲ ╳ ╴ ╵ ╶ ╷ ╸ ╹ ╺ ╻ ╼ ╽ ╾ ╿ 12 | -------------------------------------------------------------------------------- /docu/notes/kernel-config.md: -------------------------------------------------------------------------------- 1 | # OS/1337 2 | ### Issue Analysis re: non-booting issue 3 | ## Kernel Configuration Comparisons 4 | 5 | --- 6 | 7 | ### Based off [Debian Kernel Config](docu/external/debian/config) vs. [existing Kernel Config](build/0.CORE/build/linux/linux-6.6.1-i486-minimal.config) 8 | 9 | 10 | 1. ``CONFIG_PHYSICAL_ALIGN=0x1000000`` vs. ``CONFIG_PHYSICAL_ALIGN=0x200000`` 11 | 2. ``CONFIG_PAGE_OFFSET=0xC0000000`` not defined on Debian Kernel, but set on existing config. 12 | 3. ``CONFIG_HAVE_ARCH_RANDOMIZE_KSTACK_OFFSET=y`` not defined on Debian Kernel, but set on existing config. 13 | 4. ``# CONFIG_RANDOMIZE_KSTACK_OFFSET is not set`` not defined on Debian Kernel, but set on existing config. 14 | 5. ``CONFIG_INITRAMFS_SOURCE=""``not defined on Debian Kernel, but set on existing config. 15 | 16 | 6. 17 | ``` 18 | CONFIG_DEFAULT_INIT="/bin/toybox" 19 | CONFIG_DEFAULT_HOSTNAME="(none)" 20 | # CONFIG_SYSVIPC is not set 21 | ``` 22 | not defined on Debian Kernel, but set on existing config. 23 | 24 | 7. ``CONFIG_X86_GENERIC=y`` is set on Debian Kernel, but not on existing config. 25 | 26 | --- 27 | 28 | ### Based off [Floppinux Configuration Guide](docu/external/floppinux/floppinux-manual.pdf) 29 | 30 | #### Steps are: 31 | ``` 32 | make ARCH=x86 tinyconfig 33 | make ARCH=x86 menuconfig 34 | make ARCH=x86 bzImage 35 | ``` 36 | 37 | ``menuconfig`` settings to be enabled are the following: 38 | ``` 39 | Processor type and features > Processor family > 486 40 | Device Drivers > Character devices > Enable TTY 41 | General Setup > Configure standard kernel features (expert users) > Enable support for printk 42 | General Setup > Initial RAM filesystem and RAM disk (initramfs/initrd) 43 | Executable file formats > Kernel support for ELF binaries 44 | Executable file formats > Kernel support for scripts starting with #! 45 | ``` 46 | 47 | --- 48 | 49 | ## TODO: Find solution to boot issue! 50 | 51 | --- 52 | 53 | --- 54 | -------------------------------------------------------------------------------- /docu/notes/todo.md: -------------------------------------------------------------------------------- 1 | # OS/1337 2 | ## TODO 3 | ### Immediate Tasks 4 | 5 | --- 6 | 7 | ## Completion 8 | ### Features 9 | - Create a working and bootable system [as per Floppinux Manual](https://ia804503.us.archive.org/0/items/floppinux-manual/floppinux-manual.pdf). 10 | - Enshure the following commands are built into [Toybox .config](build/0.CORE/build/toybox/0.8.10-i486.config) to [enshure aliases in /etc/profile](build/0.CORE/rootfs/etc/profile) work. 11 | - wget [(w/o SSL as of now... See Issue #1)](https://github.com/OS-1337/OS1337/issues/1) 12 | - ls 13 | - ping 14 | - date 15 | - clear 16 | - echo 17 | - Enshure the following Applications are bundled so that their mappings work. 18 | - [dbclient](build/0.CORE/build/dropbear/dbclient-2022.83-i486.Makefile) 19 | - [Dropbear SSH Client](build/0.CORE/build/dropbear) 20 | 21 | ### Test Floppy Build 22 | #### Test on Floppy Emulator [GOTEK 1M44] 23 | #### Test on real Floppy [1440kB 3,5"] 24 | 25 | ### Keep it within size constraints: 26 | - 1440kB in total 27 | - Current File Sizes: 28 | - [961kB for Linux 6.5](https://mstdn.social/@kkarhan/110986389151114648) 29 | - ~ 130kB for Toybox 0.8.10 30 | - ~ 150kB for dbclient 2022.83 [Dropbear SSH Client] 31 | - Check what can be fitted in 32 | - Possible Comfort Features 33 | - [RAMDISK Support using tmpfs](https://linuxhint.com/create-ramdisk-linux/) 34 | - Will require mount, free, umount, mkdir to work 35 | 36 | 37 | --- 38 | 39 | ## Bugfixing 40 | ### See: [Issue Tracker](https://github.com/OS-1337/OS1337/issues) 41 | 42 | --- 43 | 44 | ## Documentation 45 | 46 | - ### Expand [README.md](README.md) 47 | - #### Expand [building.md](docu/building.md) 48 | - Reproducible Build Instructions 49 | 50 | --- 51 | 52 | ## Testing 53 | - ### Test and Refine OS/1337 "CORE" / "Floppy Version". 54 | - Document findings and errors as Bugs in the [Issue Tracker](https://github.com/OS-1337/OS1337/issues) 55 | 56 | --- 57 | -------------------------------------------------------------------------------- /docu/pkgs/package.manager.link: -------------------------------------------------------------------------------- 1 | https://github.com/OS-1337/spm -------------------------------------------------------------------------------- /docu/pkgs/package.repository.link: -------------------------------------------------------------------------------- 1 | https://github.com/OS-1337/pkgs -------------------------------------------------------------------------------- /docu/pkgs/packages.list.tsv: -------------------------------------------------------------------------------- 1 | PACKAGE TYPE VERSION STATUS Comment 2 | linux CORE 6.5 INCLUDED Kernel, complied against musl-cross 3 | toybox CORE 0.8.10 INCLUDED Embedded Userland, compiled against musl-cross 4 | dbclient CORE 2022.83 INCLUDED Dropbear SSH as standalone SSH client, compiled against musl-cross 5 | musl-cross LIB LATEST USED Cross-Compiling Version of musl as C library to run applications with. 6 | musl LIB LATEST USED C-Library used to compile against, Slimmer & more Stable alternative to Glibc. 7 | mlb CORE 20240312 TO BE INTEGRATED Bootloader for the CORE/Floppy Version - replaces Syslinux. 8 | kilo CORE ??? TO BE INTEGRATED Minimalst and ultra-lightweight editor -------------------------------------------------------------------------------- /docu/project-goals.md: -------------------------------------------------------------------------------- 1 | # OS/1337 2 | ### Project Goals 3 | 4 | --- 5 | ### Primary 6 | #### Create A minimalist toybox/Linux + musl distribution 7 | - Support [i486](https://en.wikipedia.org/wiki/I486) hardware 8 | - very ubiquitous and easy to test 9 | - Get the "CORE" system to fit on a single [1.440kB 3,5" Floppy Disk](https://en.wikipedia.org/wiki/Floppy_disk#3%C2%BD-inch_floppy_disk). 10 | #### Core Functionality: 11 | - [Linux](https://en.wikipedia.org/wiki/Linux) [Kernel](https://kernel.org/) 12 | - [Toybox](https://en.wikipedia.org/wiki/Toybox) [Userland](https://en.wikipedia.org/wiki/User_space_and_kernel_space) 13 | - [dropbear](https://matt.ucc.asn.au/dropbear/dropbear.html) [- or to be precise: [dbclient](https://github.com/mkj/dropbear/blob/master/MULTI.md), the SSH Client component] 14 | - Allow for username + password - based SSH logins. 15 | - Basically turning a system into a "SSH Terminal" 16 | 17 | --- 18 | ### Secondary 19 | #### Expand the Scope without bloating it! 20 | - Add support for amd64 and arm11v5 / rpi0 21 | - ubiquitous and not too challenging to test 22 | - Keep the "BASE" system as tiny as possible. 23 | - It has to fit on a 25 MB "Business-Card" Mini-CD. 24 | --- 25 | ### Tetriary 26 | #### Add more packages. 27 | - Add support for arm64 28 | - Keep the "MAIN" system as tiny as possible. 29 | - It has to fit on a 170 MB 80mm "Mini-CD". 30 | - Keep the entire repository small and efficient. 31 | - Keep the "XTRA" system as tiny as possible. 32 | - It has to fit on a 600 MB "Business-Card" Mini-DVD. 33 | - The entire sources should fit on a 1.300 MB Mini-DVD. 34 | - All Supported Architectures should fit on a 2.500 MB Mini-DVD-DL. 35 | --- 36 | ### Long-Term Backlog 37 | #### Add support for [more architectures](./ideas/architectures.tsv). 38 | 39 | --- 40 | 41 | #### [Back to README](README.md) -------------------------------------------------------------------------------- /docu/roadmap.md: -------------------------------------------------------------------------------- 1 | # OS/1337 2 | ### Roadmap 3 | What is the intended Roadmap for OS/1337: 4 | 5 | --- 6 | ## Prereleases - v0.0.x 7 | ### Working on the prerequesites. 8 | - Getting everything sorted out to work. 9 | - Bootable system. 10 | - Sorting out issues that [prevent boot beyond loading of kernel and initramfs](https://mstdn.social/deck/@kkarhan/111409592616485280) 11 | - COMPLETED [as per Commit](https://github.com/OS-1337/OS1337/blob/66586132bab1cea7d8acc44b4e0bee44a85f26b9/OS1337-core-prerelease.img) 12 | 13 | --- 14 | ## Initial Release - v0.1 15 | ### [Basic System for i486-SX and up on 1.440kB Floppy](build/0.CORE) 16 | - Kernel: [```linux-6.6.6```](scripts/pkgs/build-linux.sh) 17 | - Minimalist just to be able to run Toybox and provide basic Ethernet Networking 18 | - Supports the following NICs: AMD, Intel, Realtek, VIA, *- TBA!* 19 | - Grapics: [MDA](https://en.wikipedia.org/wiki/IBM_Monochrome_Display_Adapter) - local console @ 80x25 *- done!* 20 | - Sound: PC Beeper *- done!* 21 | - Userland: [```toybox```](scripts/pkgs/build-toybox.sh) 22 | - Bootloader: [```mlb```](scripts/pkgs/build-mlb.sh) instead of ```syslinux``` [to save space](https://github.com/OS-1337/OS1337/issues/10). *- WIP!* 23 | - Init Script: [```/etc/init```](scripts/profile/core/rootfs/etc/init) *- done!* 24 | - Welcome Message: [```/welcome.txt```](scripts/profile/core/rootfs/welcome.txt) *- done!* 25 | - SSH Client: [```Dropbear```](scripts/pkgs/build-dbclient.sh) *- done!* 26 | - Editor: [```kilo```](scripts/pkgs/build-kilo.sh) *- done!* 27 | #### All Components are statically compiled against musl-cross *and if applicable* to their dependencies. 28 | 29 | --- 30 | ## Bugfixes - v0.1.x 31 | ### Correcting post-release mistakes where applicable. 32 | 33 | --- 34 | ## Future Releases - v0.x 35 | ### Quality of Life Features 36 | - Ramdisk for non-persistent storage 37 | - Boot-to-RAMDISK option *- already status-quo!* 38 | - LiveCD versions with more packages 39 | - [spm](https://github.com/OS-1337/spm) as [package manager](https://en.wikipedia.org/wiki/Package_manager) 40 | - See [Wishlist for Packages](https://github.com/OS-1337/pkgs/blob/main/docs/WISHLIST.tsv) 41 | - [Installer for installing onto a HDD/SSD](https://github.com/OS-1337/OS1337/issues/9) 42 | - essential partitioning tools like cfdisk, mkfs.ext2, etc. 43 | - *Netinstaller* that also allows downloading the latest image into RAM and writing it to the target drive. 44 | - Similar to the [Raspberry Pi NetInstaller](https://www.raspberrypi.com/documentation/computers/getting-started.html#install-over-the-network) abeit with a [TUI](https://en.wikipedia.org/wiki/Text-based_user_interface)-based interface. Closer to [YaST](https://en.wikipedia.org/wiki/YaST) and [Debian Installer](https://en.wikipedia.org/wiki/Debian-Installer). 45 | - [*Netboot*](https://en.wikipedia.org/wiki/Network_booting) support via [TFTP](https://en.wikipedia.org/wiki/Trivial_File_Transfer_Protocol). 46 | - [*Web-Boot*](https://github.com/OS-1337/netboot) support via [HTTP](https://en.wikipedia.org/wiki/HTTP) and [FTP](https://en.wikipedia.org/wiki/File_Transfer_Protocol) using [iPXE](https://ipxe.org) - chainloading. 47 | - Integrity-Checks using Checksums (i.e. MD5+SHA1 being XOR'd) and/or OpenPGP Signature used exclusively to sign said boot images. 48 | 49 | --- 50 | ## Future Releases - v1.0 51 | ### Further improvements down the line. 52 | - [OEM-Preinstaller similar to the one used for Ubuntu LTS](https://help.ubuntu.com/community/Ubuntu_OEM_Installer_Overview) 53 | - *Unattended Installer* Configuration File Support 54 | - i.e. ```unattended.install.conf```or rather ```unattended.install.ydl``` (using [YADL](https://github.com/greyhat-academy/yadl) as configuration file format ). 55 | - *Unattended Boot* Configuration File Support 56 | - i.e. ```unattended.boot.conf```or rather ```unattended.boot.ydl```. 57 | 58 | --- 59 | #### [Back to README](README.md) -------------------------------------------------------------------------------- /docu/system-image-architecture.odg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OS-1337/OS1337/4a70112a8b403953abe8a68714626f4bdad8b08a/docu/system-image-architecture.odg -------------------------------------------------------------------------------- /docu/system-image-architecture.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OS-1337/OS1337/4a70112a8b403953abe8a68714626f4bdad8b08a/docu/system-image-architecture.pdf -------------------------------------------------------------------------------- /scripts/README.md: -------------------------------------------------------------------------------- 1 | ## Scripts: 2 | 3 | This directory contains experimental script files to build a disc image for the project. They are not currently used to make the images in 0.CORE. 4 | 5 | Several files are copied by the scripts directly from fdd and fdd/fs in that directory. 6 | 7 | It'll use whatever configuration files are in the profile directory pointed to by profile_dir. Currently in the core directory, linux.config and toybox.config are just symbolic links to files over in build/0.CORE/build/linux and toybox. If you're working on your own custom version, make your own directory in profile and point the link there! build.sh calls the build.sh file in the profile_dir directory, so you can put in calls to your own build scripts for packages you are adding easily. 8 | 9 | The image built by these scripts is not guaranteed to be identical to one built with the scripts found in 0.CORE/build. 10 | 11 | # Files: 12 | 13 | - clean.sh - Deletes all the files created by the scripts. 14 | - build.sh - Runs all the other scripts from 0 to 5 in order. 15 | - launch.sh - Opens the image in qemu. 16 | - config.sh - Contains variables determining things like the linux version to download. 17 | - 0-5 - The various individual build steps to create the image. -------------------------------------------------------------------------------- /scripts/build.sh: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | ## This Script is intended to launch the entire build sequence for OS/1337. 3 | 4 | source ./config.sh 5 | 6 | ./$profile_dir/build.sh 7 | 8 | exit -------------------------------------------------------------------------------- /scripts/clean.sh: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | ## This Script removes any files and cleans the build directories 3 | 4 | source ./config.sh 5 | 6 | full=false 7 | while [ $# -gt 0 ] ; do 8 | case $1 in 9 | -a | --all) full=true ;; 10 | esac 11 | shift 12 | done 13 | 14 | echo 'Deleting main and working directories created in build.' 15 | sudo rm ../build/{$base_dir/,working/} -rf 16 | 17 | if $full ; then 18 | echo 'Deleting downloads.' 19 | rm ../build/downloads -rf 20 | fi 21 | 22 | exit 23 | -------------------------------------------------------------------------------- /scripts/config.sh: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | # This file includes all Helper variables and functions. 3 | 4 | # Cross compilation flag. 5 | cross_dir=i486-linux-musl-cross/bin/i486-linux-musl- 6 | 7 | # Directories to use 8 | mount_dir=/mnt/os1337-fdd 9 | profile_dir=profile/core 10 | #profile_dir=profile/chonky 11 | 12 | source ./$profile_dir/config.sh 13 | 14 | # Download Information 15 | # Versions 16 | linux_version="6.6.6" 17 | toybox_version="0.8.11" 18 | musl_version="1.2.4" 19 | dropbear_version="2024.85" 20 | mlb_version="v0.0.1" 21 | 22 | # Filenames 23 | linux_filename="linux-$linux_version.tar.xz" 24 | toybox_filename="toybox-$toybox_version.tar.gz" 25 | musl_cross_filename="i486-linux-musl-cross.tar.xz" 26 | musl_filename="musl-$musl_version.tar.gz" 27 | dropbear_filename="dropbear-$dropbear_version.tar.bz2" 28 | mlb_filename="$mlb_version.tar.gz" 29 | 30 | #URLs 31 | linux_url="https://cdn.kernel.org/pub/linux/kernel/v6.x/$linux_filename" 32 | toybox_url="http://landley.net/toybox/downloads/$toybox_filename" 33 | musl_cross_url="https://landley.net/bin/toolchains/latest/$musl_cross_filename" 34 | musl_url="https://musl.libc.org/releases/$musl_filename" 35 | dropbear_url="https://matt.ucc.asn.au/dropbear/releases/$dropbear_filename" 36 | mlb_url="https://github.com/OS-1337/mlb/archive/refs/tags/$mlb_filename" 37 | 38 | 39 | # Package Descriptions 40 | linux_desc="Linux Kernel 6.6.6" 41 | toybox_desc="toybox - latest stable release" 42 | musl_cross_desc="musl-cross - the crosscompiling toolchain" 43 | musl_desc="musl c library" 44 | dropbear_desc="dropbear - a compact SSH Server / Client" 45 | mlb_desc="mlb - the minimalist linux bootloader" 46 | 47 | function download_files(){ 48 | local url=$1 49 | local filename=$2 50 | local desc=$3 51 | 52 | if test -f $filename; then 53 | echo "File ${filename} already found." 54 | else 55 | echo "Downloading ${desc}." 56 | wget $url 57 | echo "Done downloading ${desc}." 58 | fi 59 | echo '' 60 | } 61 | -------------------------------------------------------------------------------- /scripts/launch.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | ## This script launches the OS/1337 image in QEMU for testing. 3 | 4 | source ./config.sh 5 | 6 | cd ./../build/$base_dir/ 7 | 8 | # Start up the image in qemu 9 | qemu-system-i386 -drive file=$image_name,format=raw,index=0,media=disk 10 | -------------------------------------------------------------------------------- /scripts/pkgs/build-dbclient.sh: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | ## This Script builds dbclient, the client-only version of dropbear. 3 | 4 | source ./config.sh 5 | 6 | cd ../build/downloads 7 | download_files $dropbear_url $dropbear_filename $dropbear_desc 8 | cd ../working 9 | 10 | echo 'Unpacking dropbear./n' 11 | tar -xf ../downloads/$dropbear_filename 12 | mv ./dropbear-$dropbear_version dropbear 13 | 14 | cd dropbear 15 | 16 | echo 'Building dropbear client [i486]' 17 | 18 | make clean 19 | ./configure --disable-zlib --disable-x11 --disable-agent-forwarding 20 | LDFLAGS=-W1,--gc-sections,--static CROSS_COMPILE=../$cross_dir CFLAGS="-Os -ffunction-sections -fdata-sections" make ARCH=x86 -j $(( $(nproc) + 1 )) dbclient 21 | 22 | mv ./dbclient ../../$base_dir/rootfs/bin/ 23 | 24 | cd ../../../scripts 25 | 26 | exit 27 | -------------------------------------------------------------------------------- /scripts/pkgs/build-kilo.sh: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | ## This Script builds kilo, a minimalist text editor. 3 | 4 | source ./config.sh 5 | 6 | echo 'building kilo [i486]' 7 | 8 | cd ../build/working 9 | if test -d kilo; then 10 | echo 'kilo source found.' 11 | else 12 | echo 'kilo source not found. Cloning from git.' 13 | git clone https://github.com/antirez/kilo.git 14 | fi 15 | cd kilo 16 | 17 | make clean 18 | LDFLAGS=-W1,--gc-sections,--static CROSS_COMPILE=../$cross_dir CFLAGS="-Os" ARCH=x86 make -j $(( $(nproc) + 1 )) 19 | strip kilo 20 | 21 | cp -v ./kilo ../../$base_dir/rootfs/bin/ 22 | 23 | cd ../../../scripts/ 24 | 25 | exit 26 | -------------------------------------------------------------------------------- /scripts/pkgs/build-linux.sh: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | ## This Script builds the linux kernel for OS/1337 with a lightweight configuration. 3 | 4 | source ./config.sh 5 | 6 | cd ../build/downloads 7 | download_files $linux_url $linux_filename $linux_desc 8 | 9 | cd ../working 10 | echo 'Unpacking Linux Kernel.' 11 | tar -xf ../downloads/$linux_filename 12 | mv ./linux-$linux_version ./linux 13 | 14 | cd ../../scripts 15 | 16 | echo 'Check for config file.' 17 | if test -f ./$profile_dir/linux.config; then 18 | echo "Copying kernel config." 19 | cp -v ./$profile_dir/linux.config ../build/working/linux/linux.config 20 | fi 21 | 22 | cd ../build/working/linux/ 23 | 24 | echo 'Adding musl-cross into linux.' 25 | cp -r ../i486-linux-musl-cross . 26 | 27 | if test -f linux.config; then 28 | echo "Kernel config found." 29 | mv linux.config .config 30 | else 31 | echo 'No config found. Generating tinyconfig.' 32 | make ARCH=x86 tinyconfig 33 | fi 34 | 35 | echo 'Please configure the Kernel.' 36 | make ARCH=x86 menuconfig 37 | echo 'Configured.' 38 | 39 | echo 'Building linux [i486]' 40 | 41 | LDFLAGS=--static CROSS_COMPILE=$cross_dir CFLAGS="-Os" make ARCH=x86 -j $(( $(nproc) + 1 )) bzImage 42 | echo 'Done.' 43 | 44 | cd .. 45 | mkdir -pv ./i486 46 | mv ./linux/arch/x86/boot/bzImage ../$base_dir 47 | mv ./linux/.config ../$base_dir/linux.config 48 | cd ../../scripts 49 | 50 | echo "Completed." 51 | echo "You can find the Kernel at ./build/$base_dir/bzImage" 52 | echo "Your linux configuration has been backed up to ./build/$base_dir/linux.config" 53 | 54 | exit 55 | -------------------------------------------------------------------------------- /scripts/pkgs/build-mlb.sh: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | ## This Script builds mlb, a lightweight and minimalist bootloader for OS/1337. 3 | 4 | source ./config.sh 5 | 6 | cd ../build/working 7 | if test -d mlb; then 8 | echo 'mlb source found.' 9 | else 10 | echo 'mlb source not found. Cloning from git.' 11 | git clone https://github.com/OS-1337/mlb.git 12 | fi 13 | 14 | cd mlb 15 | 16 | echo 'Adding musl-cross into mlb.' 17 | cp -r ../i486-linux-musl-cross . 18 | 19 | echo 'Building mlb [i386]. Note: nasm & xxd must be installed for this to compile.' 20 | 21 | LDFLAGS=--static CROSS_COMPILE=$cross_dir CFLAGS="-Os" make ARCH=x86 22 | echo 'Done.' 23 | 24 | sudo chmod +rwx mlbinstall 25 | mv mlbinstall ../../$base_dir 26 | cd ../../../scripts 27 | 28 | echo "Completed." 29 | echo "You can find mlbinstall at ./build/$base_dir/mlbinstall" 30 | 31 | exit 32 | -------------------------------------------------------------------------------- /scripts/pkgs/build-toybox.sh: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | ## This Script builds toybox, a compact single-executeable userland. 3 | 4 | source ./config.sh 5 | 6 | cd ../build/downloads 7 | download_files $toybox_url $toybox_filename $toybox_desc 8 | 9 | cd ../working 10 | echo 'Unpacking Toybox.' 11 | tar -xf ../downloads/$toybox_filename 12 | mv ./toybox-$toybox_version ./toybox 13 | 14 | cd ../../scripts 15 | 16 | echo 'Configuring toybox [i686]' 17 | 18 | echo 'Check for config file.' 19 | if test -f ./$profile_dir/toybox.config; then 20 | echo "Copying toybox config." 21 | cp -v ./$profile_dir/toybox.config ../build/working/toybox/.config 22 | fi 23 | 24 | cd ../build/working/toybox/ 25 | 26 | echo 'Adding musl-cross into /toybox.' 27 | cp -r ../i486-linux-musl-cross . 28 | 29 | if test -f .config; then 30 | echo "Toybox config found." 31 | else 32 | echo 'No config found.' 33 | fi 34 | 35 | make ARCH=x86 menuconfig 36 | echo 'Completed. Ready to compile for i486.' 37 | 38 | echo 'Building toybox [i686].' 39 | LDFLAGS=--static CROSS_COMPILE=$cross_dir CFLAGS="-Os" make ARCH=x86 -j $(( $(nproc) + 1 )) toybox 40 | echo 'Done.' 41 | 42 | cp -v ./toybox ../../$base_dir/rootfs/bin/ 43 | cd ../../$base_dir/rootfs/bin/ 44 | 45 | # Create symlinks for all toybox commands 46 | for i in $(./toybox); do ln -vs toybox $i; done 47 | cd ../../../../scripts/ 48 | 49 | exit 50 | -------------------------------------------------------------------------------- /scripts/pkgs/make-fhs-filesystem.sh: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | ## This script creates all the necessary files and symlinks for OS/1337 to work as a fully functional linux. 3 | 4 | source ./config.sh 5 | 6 | echo 'Setting up the build environment:' 7 | 8 | echo 'Creating folders.' 9 | mkdir -pv ../build/{$base_dir/rootfs,downloads,working} 10 | mkdir -pv ../build/$base_dir/rootfs/{bin,boot,dev,etc/{init.d,opt,sgml,xml},home,lib,proc,root,run,sbin,srv,sys,tmp,usr/{local,share,src},var/{cache,lib,lock,log,mail,opt,run,spool/mail,tmp}} 11 | ln -s /bin ../build/$base_dir/rootfs/usr/bin 12 | ln -s /sbin ../build/$base_dir/rootfs/usr/sbin 13 | ln -s /lib ../build/$base_dir/rootfs/usr/lib 14 | ln -s /lib ../build/$base_dir/rootfs/lib32 15 | 16 | echo 'Copying files.' 17 | cp -vr ./$profile_dir/rootfs ../build/$base_dir/ 18 | cp -v ./$profile_dir/syslinux.cfg ../build/$base_dir/ 19 | 20 | echo 'Creating special files needed for system.' 21 | cd ./../build/$base_dir/rootfs 22 | sudo mknod dev/console c 5 1 23 | sudo mknod dev/null c 1 3 24 | 25 | cd ../../../scripts 26 | 27 | exit 28 | -------------------------------------------------------------------------------- /scripts/pkgs/make-image.sh: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | ## This Script generates an image file with the the necessary FAT-12 filesystem in it so that all the files for OS/1337 can fit in it. 3 | 4 | source ./config.sh 5 | 6 | echo 'Creating the disk image...' 7 | 8 | cd ../build/$base_dir/ 9 | 10 | echo 'writing blank image file...' 11 | dd if=/dev/zero of=$image_name bs=1k count=$image_size 12 | echo 'Done.' 13 | 14 | echo 'formatting image with FAT12...' 15 | mkdosfs $image_name 16 | echo 'Done.' 17 | 18 | echo 'installing mlb bootloader into the image...' 19 | sudo ./mlbinstall $image_name bzImage 20 | echo 'Done.' 21 | 22 | echo 'mounting image and installing the OS/1337 into it...' 23 | sudo mkdir -p $mount_dir 24 | sudo mount -o loop $image_name $mount_dir 25 | sudo cp bzImage $mount_dir 26 | sudo cp syslinux.cfg $mount_dir 27 | sudo umount $mount_dir 28 | echo 'Done.' 29 | 30 | cd ../../scripts/ 31 | 32 | exit 33 | -------------------------------------------------------------------------------- /scripts/pkgs/make-initramfs.sh: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | ## This Script turns the pre-generated folders and files into the initramfs that OS/1337 loads and runs off. 3 | 4 | 5 | source ./config.sh 6 | 7 | cd ../build/$base_dir/rootfs 8 | 9 | echo 'Creating initramfs.' 10 | 11 | sudo chmod +rwx ./etc/init 12 | sudo chown -R root:root . 13 | find . | cpio -H newc -o | xz -9 --check=crc32 > ../rootfs.cpio.xz 14 | ls -alh 15 | echo 'Done.' 16 | 17 | exit -------------------------------------------------------------------------------- /scripts/pkgs/make-minimal-filesystem.sh: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | ## This Script generates a minimalist filesystem directory structure for OS/1337. 3 | 4 | source ./config.sh 5 | 6 | echo 'Setting up the build environment:' 7 | 8 | echo 'Creating folders.' 9 | mkdir -pv ../build/{$base_dir/rootfs/{dev,etc/init.d,proc,sys,tmp,bin},downloads,working} 10 | 11 | echo 'Copying files.' 12 | cp -vr ./$profile_dir/rootfs ../build/$base_dir/ 13 | cp -v ./$profile_dir/syslinux.cfg ../build/$base_dir/ 14 | 15 | echo 'Creating special files needed for system.' 16 | cd ./../build/$base_dir/rootfs 17 | sudo mknod dev/console c 5 1 18 | sudo mknod dev/null c 1 3 19 | 20 | cd ../../../scripts 21 | 22 | exit 23 | -------------------------------------------------------------------------------- /scripts/pkgs/musl-cross.sh: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | ## This script downloads and unpacks musl-cross, which is the C Standard Library for OS/1337. 3 | 4 | source ./config.sh 5 | 6 | cd ../build/downloads 7 | download_files $musl_cross_url $musl_cross_filename $musl_cross_desc 8 | 9 | cd ../working 10 | echo 'Unpacking musl-cross.' 11 | tar -xf ../downloads/$musl_cross_filename 12 | 13 | cd ../../scripts 14 | 15 | exit -------------------------------------------------------------------------------- /scripts/profile/chonky/README.md: -------------------------------------------------------------------------------- 1 | # "Chonky" Edition 2 | ## OS/1337 3 | 4 | --- 5 | 6 | This one is more a testbed for things, and is meant to be a build that doesn't fit on a floppy, though at the moment it would fit *on a 2880kB 3,5" ED floppy*. There may very well be more experimental things going on here. 7 | -------------------------------------------------------------------------------- /scripts/profile/chonky/build.sh: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | 3 | echo "Current directory is $PWD" 4 | ./pkgs/make-fhs-filesystem.sh 5 | #read -p "Press any key to continue... " -n1 -s 6 | 7 | ./pkgs/musl-cross.sh 8 | #read -p "Press any key to continue... " -n1 -s 9 | 10 | ./pkgs/build-toybox.sh 11 | #read -p "Press any key to continue... " -n1 -s 12 | 13 | ./pkgs/build-dbclient.sh 14 | #read -p "Press any key to continue... " -n1 -s 15 | 16 | ./pkgs/build-kilo.sh 17 | #read -p "Press any key to continue... " -n1 -s 18 | 19 | ./pkgs/build-mlb.sh 20 | #read -p "Press any key to continue... " -n1 -s 21 | 22 | ./pkgs/make-initramfs.sh 23 | #read -p "Press any key to continue... " -n1 -s 24 | 25 | ./pkgs/build-linux.sh 26 | #read -p "Press any key to continue... " -n1 -s 27 | 28 | ./pkgs/make-image.sh 29 | 30 | exit 31 | -------------------------------------------------------------------------------- /scripts/profile/chonky/config.sh: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | # Helper variables and functions specific to this profile. 3 | 4 | # Image settings 5 | image_size=2880 # kB 6 | image_name=os1337-chonky.img 7 | 8 | # Directory to build in 9 | base_dir=os1337-chonky -------------------------------------------------------------------------------- /scripts/profile/chonky/rootfs/etc/init: -------------------------------------------------------------------------------- 1 | #!/bin/toybox bash 2 | /bin/toybox mount -t proc none /proc 3 | /bin/toybox mount -t sysfs none /sys 4 | /bin/toybox clear 5 | /bin/toybox oneit -rn -c /dev/tty0 6 | /bin/toybox openvt -c 1 -s 7 | /bin/toybox uname 8 | /bin/toybox uname -r 9 | /bin/toybox cat welcome.txt 10 | /bin/toybox bash 11 | -------------------------------------------------------------------------------- /scripts/profile/chonky/rootfs/etc/inittab: -------------------------------------------------------------------------------- 1 | ::sysinit:/etc/init 2 | ::askfirst:/bin/toybox 3 | ::restart:/bin/init 4 | ::ctrlaltdel:/bin/toybox reboot 5 | ::shutdown:/bin/toybox umount -a -r 6 | ::ssh:/bin/dbclient 7 | ::profile:/etc/profile -------------------------------------------------------------------------------- /scripts/profile/chonky/rootfs/etc/profile: -------------------------------------------------------------------------------- 1 | # Bash Aliases 2 | ## Based off: https://github.com/kkarhan/misc-scripts/blob/master/bash/.bash_aliases 3 | 4 | ## Useful commands 5 | alias flushcache='sudo sh -c "sync; echo 3 > /proc/sys/vm/drop_caches"' 6 | ### Flush the RAM forcefully 7 | ### See: https://www.cyberithub.com/drop-flush-clear-cache-memory-ram-in-linux/ 8 | 9 | ## faster to type, DOS-alike commands 10 | alias cls='clear' 11 | alias dir='ls -ahl' 12 | alias unixtime='date +%s' 13 | ### Output Unixtime 14 | alias ding='printf '\a'' 15 | ### Create a Beep [printing out BELL character to stdout] 16 | ### See: https://github.com/OS-1337/OS1337/issues/19#issuecomment-1867469203 17 | 18 | function isup() { ping -a -b -c 1 -D "$@"; } 19 | ### Single Ping attempt to a specific host which has to be specified i.e. "isup 192.168.0.1" 20 | ### This is done to see if a host "is up"... 21 | 22 | alias pub4='wget -O http://ip4only.me/api/ ; echo;' 23 | ### find public IPv4 adress 24 | ### see: http://ip4only.me/ 25 | ### NOTE: Lack of IPv4 connectivity will result in a 404 error! 26 | -------------------------------------------------------------------------------- /scripts/profile/chonky/rootfs/welcome.txt: -------------------------------------------------------------------------------- 1 | 2 | ╔══════════════════════════════════════════════════════════════════════════════╗ 3 | ║ Welcome to OS/1337! ║ 4 | ║ Version: 0.0.1 Release 1 ║ 5 | ╠══════════════════════════════════════════════════════════════════════════════╣ 6 | ║ This is the "CHONKY" Edition, not really designed to fit in anything! ║ 7 | ║ The following tools are integrated in this release: ║ 8 | ║ - Linux 6.6.6-i486 [with basic network drivers for legacy systems!] ║ 9 | ║ - toybox 0.8.10-i486 [tho not all functions are included!] ║ 10 | ║ - dbclient 2022.83-i486 [Dropbear SSH Client as single static executeable] ║ 11 | ║ - And more! ║ 12 | ╟──────────────────────────────────────────────────────────────────────────────╢ 13 | ║ Due to size constraints, manpages / -help texts had to be omnitted! ║ 14 | ║ You'll find those in our repo linked on: https://os1337.com ║ 15 | ║ For toybox commands, see: https://landley.net/toybox/help.html ║ 16 | ╚══════════════════════════════════════════════════════════════════════════════╝ 17 | 18 | -------------------------------------------------------------------------------- /scripts/profile/chonky/syslinux.cfg: -------------------------------------------------------------------------------- 1 | DEFAULT linux 2 | LABEL linux 3 | SAY [ BOOTING OS/1337 VERSION 0.0.1 ] 4 | KERNEL bzImage 5 | APPEND initrd=rootfs.cpio.xz 6 | -------------------------------------------------------------------------------- /scripts/profile/chonky/toybox.config: -------------------------------------------------------------------------------- 1 | # 2 | # Automatically generated make config: don't edit 3 | # ToyBox version: KCONFIG_VERSION 4 | # Fri Dec 22 10:38:34 2023 5 | # 6 | # CONFIG_TOYBOX_ON_ANDROID is not set 7 | CONFIG_TOYBOX_FORK=y 8 | 9 | # 10 | # Posix commands 11 | # 12 | # CONFIG_BASENAME is not set 13 | # CONFIG_CAL is not set 14 | CONFIG_CAT=y 15 | # CONFIG_CHGRP is not set 16 | # CONFIG_CHOWN is not set 17 | # CONFIG_CHMOD is not set 18 | # CONFIG_CKSUM is not set 19 | # CONFIG_CRC32 is not set 20 | # CONFIG_CMP is not set 21 | # CONFIG_COMM is not set 22 | # CONFIG_CP is not set 23 | # CONFIG_MV is not set 24 | # CONFIG_INSTALL is not set 25 | # CONFIG_CPIO is not set 26 | # CONFIG_CUT is not set 27 | CONFIG_DATE=y 28 | CONFIG_DD=y 29 | CONFIG_DF=y 30 | # CONFIG_DIRNAME is not set 31 | CONFIG_DU=y 32 | CONFIG_ECHO=y 33 | # CONFIG_ENV is not set 34 | # CONFIG_EXPAND is not set 35 | # CONFIG_FALSE is not set 36 | # CONFIG_FILE is not set 37 | # CONFIG_FIND is not set 38 | # CONFIG_GETCONF is not set 39 | # CONFIG_GREP is not set 40 | # CONFIG_EGREP is not set 41 | # CONFIG_FGREP is not set 42 | # CONFIG_HEAD is not set 43 | # CONFIG_ICONV is not set 44 | # CONFIG_ID is not set 45 | # CONFIG_ID_Z is not set 46 | # CONFIG_GROUPS is not set 47 | # CONFIG_LOGNAME is not set 48 | # CONFIG_WHOAMI is not set 49 | # CONFIG_KILL is not set 50 | # CONFIG_KILLALL5 is not set 51 | # CONFIG_LINK is not set 52 | # CONFIG_LN is not set 53 | # CONFIG_LOGGER is not set 54 | CONFIG_LS=y 55 | # CONFIG_MKDIR is not set 56 | # CONFIG_MKDIR_Z is not set 57 | # CONFIG_MKFIFO is not set 58 | # CONFIG_MKFIFO_Z is not set 59 | # CONFIG_NICE is not set 60 | # CONFIG_NL is not set 61 | # CONFIG_NOHUP is not set 62 | # CONFIG_OD is not set 63 | # CONFIG_PASTE is not set 64 | # CONFIG_PATCH is not set 65 | CONFIG_PRINTF=y 66 | CONFIG_PS=y 67 | CONFIG_TOP=y 68 | CONFIG_IOTOP=y 69 | # CONFIG_PGREP is not set 70 | # CONFIG_PKILL is not set 71 | # CONFIG_PWD is not set 72 | # CONFIG_RENICE is not set 73 | # CONFIG_RM is not set 74 | # CONFIG_RMDIR is not set 75 | # CONFIG_SED is not set 76 | # CONFIG_SLEEP is not set 77 | # CONFIG_SORT is not set 78 | # CONFIG_SORT_FLOAT is not set 79 | # CONFIG_SPLIT is not set 80 | # CONFIG_STRINGS is not set 81 | # CONFIG_TAIL is not set 82 | # CONFIG_TAR is not set 83 | # CONFIG_TEE is not set 84 | CONFIG_TEST=y 85 | CONFIG_TEST_GLUE=y 86 | # CONFIG_TIME is not set 87 | # CONFIG_TOUCH is not set 88 | # CONFIG_TRUE is not set 89 | # CONFIG_TTY is not set 90 | # CONFIG_ULIMIT is not set 91 | # CONFIG_ARCH is not set 92 | # CONFIG_LINUX32 is not set 93 | CONFIG_UNAME=y 94 | # CONFIG_UNIQ is not set 95 | # CONFIG_UNLINK is not set 96 | # CONFIG_UUDECODE is not set 97 | # CONFIG_UUENCODE is not set 98 | # CONFIG_WC is not set 99 | # CONFIG_WHO is not set 100 | # CONFIG_XARGS is not set 101 | 102 | # 103 | # Pending (unfinished) commands 104 | # 105 | # CONFIG_ARP is not set 106 | # CONFIG_ARPING is not set 107 | # CONFIG_BC is not set 108 | # CONFIG_BOOTCHARTD is not set 109 | # CONFIG_BRCTL is not set 110 | # CONFIG_CHSH is not set 111 | # CONFIG_CROND is not set 112 | # CONFIG_CRONTAB is not set 113 | CONFIG_DHCP=y 114 | # CONFIG_DHCP6 is not set 115 | # CONFIG_DHCPD is not set 116 | # CONFIG_DEBUG_DHCP is not set 117 | # CONFIG_DIFF is not set 118 | # CONFIG_DUMPLEASES is not set 119 | # CONFIG_EXPR is not set 120 | # CONFIG_FDISK is not set 121 | # CONFIG_FOLD is not set 122 | # CONFIG_FSCK is not set 123 | # CONFIG_GETFATTR is not set 124 | # CONFIG_GETOPT is not set 125 | # CONFIG_GETTY is not set 126 | # CONFIG_GITCOMPAT is not set 127 | # CONFIG_GITCLONE is not set 128 | # CONFIG_GITINIT is not set 129 | # CONFIG_GITREMOTE is not set 130 | # CONFIG_GITFETCH is not set 131 | # CONFIG_GITCHECKOUT is not set 132 | # CONFIG_GROUPADD is not set 133 | # CONFIG_GROUPDEL is not set 134 | # CONFIG_HEXDUMP is not set 135 | # CONFIG_HD is not set 136 | CONFIG_INIT=y 137 | # CONFIG_IP is not set 138 | # CONFIG_IPCRM is not set 139 | # CONFIG_IPCS is not set 140 | # CONFIG_KLOGD is not set 141 | # CONFIG_KLOGD_SOURCE_RING_BUFFER is not set 142 | # CONFIG_LAST is not set 143 | # CONFIG_LSOF is not set 144 | # CONFIG_MAN is not set 145 | # CONFIG_MDEV is not set 146 | # CONFIG_MDEV_CONF is not set 147 | # CONFIG_MKE2FS is not set 148 | # CONFIG_MKE2FS_JOURNAL is not set 149 | # CONFIG_MKE2FS_GEN is not set 150 | # CONFIG_MKE2FS_LABEL is not set 151 | # CONFIG_MKE2FS_EXTENDED is not set 152 | # CONFIG_MODPROBE is not set 153 | # CONFIG_MORE is not set 154 | # CONFIG_ROUTE is not set 155 | CONFIG_SH=y 156 | # CONFIG_CD is not set 157 | # CONFIG_DECLARE is not set 158 | # CONFIG_EXIT is not set 159 | # CONFIG_SET is not set 160 | # CONFIG_UNSET is not set 161 | # CONFIG_EVAL is not set 162 | # CONFIG_EXEC is not set 163 | # CONFIG_EXPORT is not set 164 | # CONFIG_JOBS is not set 165 | # CONFIG_LOCAL is not set 166 | # CONFIG_SHIFT is not set 167 | # CONFIG_SOURCE is not set 168 | # CONFIG_WAIT is not set 169 | # CONFIG_STRACE is not set 170 | # CONFIG_STTY is not set 171 | # CONFIG_SULOGIN is not set 172 | # CONFIG_SYSLOGD is not set 173 | # CONFIG_TCPSVD is not set 174 | # CONFIG_TELNET is not set 175 | # CONFIG_TELNETD is not set 176 | # CONFIG_TFTP is not set 177 | # CONFIG_TFTPD is not set 178 | # CONFIG_TR is not set 179 | # CONFIG_TRACEROUTE is not set 180 | # CONFIG_USERADD is not set 181 | # CONFIG_USERDEL is not set 182 | # CONFIG_VI is not set 183 | # CONFIG_XZCAT is not set 184 | 185 | # 186 | # Other commands 187 | # 188 | # CONFIG_ACPI is not set 189 | # CONFIG_ASCII is not set 190 | # CONFIG_UNICODE is not set 191 | # CONFIG_BASE64 is not set 192 | # CONFIG_BASE32 is not set 193 | # CONFIG_BLKDISCARD is not set 194 | # CONFIG_BLKID is not set 195 | # CONFIG_FSTYPE is not set 196 | # CONFIG_BLOCKDEV is not set 197 | # CONFIG_BUNZIP2 is not set 198 | # CONFIG_BZCAT is not set 199 | # CONFIG_CHCON is not set 200 | # CONFIG_CHROOT is not set 201 | # CONFIG_CHRT is not set 202 | CONFIG_CLEAR=y 203 | # CONFIG_COUNT is not set 204 | # CONFIG_DEVMEM is not set 205 | # CONFIG_DOS2UNIX is not set 206 | # CONFIG_UNIX2DOS is not set 207 | # CONFIG_EJECT is not set 208 | # CONFIG_FACTOR is not set 209 | # CONFIG_FALLOCATE is not set 210 | # CONFIG_FLOCK is not set 211 | # CONFIG_FMT is not set 212 | CONFIG_FREE=y 213 | # CONFIG_FREERAMDISK is not set 214 | # CONFIG_FSFREEZE is not set 215 | # CONFIG_FSYNC is not set 216 | # CONFIG_GPIODETECT is not set 217 | # CONFIG_GPIOFIND is not set 218 | # CONFIG_GPIOINFO is not set 219 | # CONFIG_GPIOGET is not set 220 | # CONFIG_GPIOSET is not set 221 | # CONFIG_HELP is not set 222 | # CONFIG_HEXEDIT is not set 223 | # CONFIG_HWCLOCK is not set 224 | # CONFIG_I2CDETECT is not set 225 | # CONFIG_I2CDUMP is not set 226 | # CONFIG_I2CGET is not set 227 | # CONFIG_I2CSET is not set 228 | # CONFIG_I2CTRANSFER is not set 229 | # CONFIG_INOTIFYD is not set 230 | # CONFIG_INSMOD is not set 231 | # CONFIG_IONICE is not set 232 | # CONFIG_IORENICE is not set 233 | # CONFIG_LOGIN is not set 234 | # CONFIG_LOSETUP is not set 235 | # CONFIG_LSATTR is not set 236 | # CONFIG_CHATTR is not set 237 | CONFIG_LSMOD=y 238 | CONFIG_LSPCI=y 239 | CONFIG_LSUSB=y 240 | CONFIG_MAKEDEVS=y 241 | CONFIG_MCOOKIE=y 242 | # CONFIG_MIX is not set 243 | # CONFIG_MKPASSWD is not set 244 | # CONFIG_MKSWAP is not set 245 | # CONFIG_MODINFO is not set 246 | # CONFIG_MOUNTPOINT is not set 247 | # CONFIG_NBD_CLIENT is not set 248 | # CONFIG_NBD_SERVER is not set 249 | # CONFIG_UNSHARE is not set 250 | # CONFIG_NSENTER is not set 251 | CONFIG_ONEIT=y 252 | CONFIG_OPENVT=y 253 | # CONFIG_CHVT is not set 254 | # CONFIG_DEALLOCVT is not set 255 | # CONFIG_PARTPROBE is not set 256 | # CONFIG_PIVOT_ROOT is not set 257 | # CONFIG_PMAP is not set 258 | # CONFIG_PRINTENV is not set 259 | # CONFIG_PWDX is not set 260 | # CONFIG_PWGEN is not set 261 | # CONFIG_READAHEAD is not set 262 | # CONFIG_READELF is not set 263 | # CONFIG_READLINK is not set 264 | # CONFIG_REALPATH is not set 265 | CONFIG_REBOOT=y 266 | CONFIG_RESET=y 267 | # CONFIG_REV is not set 268 | # CONFIG_RMMOD is not set 269 | # CONFIG_RTCWAKE is not set 270 | # CONFIG_SETFATTR is not set 271 | # CONFIG_SETSID is not set 272 | # CONFIG_SHA3SUM is not set 273 | # CONFIG_SHRED is not set 274 | # CONFIG_SHUF is not set 275 | # CONFIG_STAT is not set 276 | CONFIG_SWAPOFF=y 277 | CONFIG_SWAPON=y 278 | # CONFIG_SWITCH_ROOT is not set 279 | # CONFIG_SYSCTL is not set 280 | # CONFIG_TAC is not set 281 | # CONFIG_NPROC is not set 282 | # CONFIG_TASKSET is not set 283 | # CONFIG_TIMEOUT is not set 284 | # CONFIG_TRUNCATE is not set 285 | # CONFIG_UCLAMPSET is not set 286 | # CONFIG_UPTIME is not set 287 | # CONFIG_USLEEP is not set 288 | # CONFIG_UUIDGEN is not set 289 | # CONFIG_VCONFIG is not set 290 | # CONFIG_VMSTAT is not set 291 | # CONFIG_W is not set 292 | # CONFIG_WATCH is not set 293 | # CONFIG_WATCHDOG is not set 294 | # CONFIG_WHICH is not set 295 | # CONFIG_XXD is not set 296 | # CONFIG_YES is not set 297 | 298 | # 299 | # Networking commands 300 | # 301 | # CONFIG_FTPGET is not set 302 | # CONFIG_FTPPUT is not set 303 | CONFIG_HOST=y 304 | # CONFIG_HTTPD is not set 305 | CONFIG_IFCONFIG=y 306 | # CONFIG_MICROCOM is not set 307 | CONFIG_NETCAT=y 308 | CONFIG_NETSTAT=y 309 | CONFIG_PING=y 310 | # CONFIG_RFKILL is not set 311 | # CONFIG_SNTP is not set 312 | # CONFIG_TUNCTL is not set 313 | CONFIG_WGET=y 314 | # CONFIG_WGET_LIBTLS is not set 315 | 316 | # 317 | # Linux Standard Base commands 318 | # 319 | # CONFIG_DMESG is not set 320 | # CONFIG_GZIP is not set 321 | # CONFIG_GUNZIP is not set 322 | # CONFIG_ZCAT is not set 323 | CONFIG_HOSTNAME=y 324 | CONFIG_DNSDOMAINNAME=y 325 | CONFIG_KILLALL=y 326 | # CONFIG_MD5SUM is not set 327 | # CONFIG_SHA1SUM is not set 328 | # CONFIG_SHA224SUM is not set 329 | # CONFIG_SHA256SUM is not set 330 | # CONFIG_SHA384SUM is not set 331 | # CONFIG_SHA512SUM is not set 332 | # CONFIG_MKNOD is not set 333 | # CONFIG_MKNOD_Z is not set 334 | # CONFIG_MKTEMP is not set 335 | CONFIG_MOUNT=y 336 | # CONFIG_PASSWD is not set 337 | # CONFIG_PASSWD_SAD is not set 338 | CONFIG_PIDOF=y 339 | # CONFIG_SEQ is not set 340 | CONFIG_SU=y 341 | CONFIG_SYNC=y 342 | CONFIG_UMOUNT=y 343 | 344 | # 345 | # Example commands 346 | # 347 | # CONFIG_DEMO_MANY_OPTIONS is not set 348 | # CONFIG_DEMO_NUMBER is not set 349 | # CONFIG_DEMO_SCANKEY is not set 350 | # CONFIG_DEMO_UTF8TOWC is not set 351 | # CONFIG_HELLO is not set 352 | # CONFIG_HOSTID is not set 353 | # CONFIG_LOGPATH is not set 354 | # CONFIG_SKELETON is not set 355 | # CONFIG_SKELETON_ALIAS is not set 356 | 357 | # 358 | # Android commands 359 | # 360 | # CONFIG_GETENFORCE is not set 361 | # CONFIG_LOAD_POLICY is not set 362 | # CONFIG_LOG is not set 363 | # CONFIG_RESTORECON is not set 364 | # CONFIG_RUNCON is not set 365 | # CONFIG_SENDEVENT is not set 366 | # CONFIG_SETENFORCE is not set 367 | 368 | # 369 | # 370 | # 371 | 372 | # 373 | # Toybox global settings 374 | # 375 | CONFIG_TOYBOX=y 376 | CONFIG_TOYBOX_SUID=y 377 | CONFIG_TOYBOX_LSM_NONE=y 378 | # CONFIG_TOYBOX_SELINUX is not set 379 | # CONFIG_TOYBOX_SMACK is not set 380 | # CONFIG_TOYBOX_LIBCRYPTO is not set 381 | # CONFIG_TOYBOX_LIBZ is not set 382 | # CONFIG_TOYBOX_FLOAT is not set 383 | # CONFIG_TOYBOX_HELP is not set 384 | # CONFIG_TOYBOX_HELP_DASHDASH is not set 385 | # CONFIG_TOYBOX_FREE is not set 386 | # CONFIG_TOYBOX_NORECURSE is not set 387 | # CONFIG_TOYBOX_DEBUG is not set 388 | CONFIG_TOYBOX_UID_SYS=100 389 | CONFIG_TOYBOX_UID_USR=500 390 | # CONFIG_TOYBOX_FORCE_NOMMU is not set 391 | -------------------------------------------------------------------------------- /scripts/profile/core/README.md: -------------------------------------------------------------------------------- 1 | # "Core" Edition 2 | ## OS/1337 3 | 4 | --- 5 | 6 | This is intended to be the same as the main build, or as close as possible. A minimum configuration that fits on a 1440kB 3,5" HD floppy disk. 7 | 8 | --- 9 | 10 | ### Scope of the "Core Edition" 11 | #### Be better than Floppinux! 12 | 13 | The Core Edition should work as a minimalist Floppy that one can use to install OS/1337 on ``legacy`` systems or at the very least use them and be able to do absolute basics with them. 14 | 15 | - ``Linux`` Kernel 6.6.6 16 | - Networking Support 17 | - TCP/IPv4 18 | - Ethernet 19 | - ``3Com`` ISA Cards 20 | - ``AMD`` ISA Cards 21 | - ``Intel`` ISA Cards 22 | - ``VIA`` ISA Cards 23 | - Basic Terminal / Console Support 24 | - ANSI/ISO ``AT`` QWERTY Keyboard 25 | - Local 80x25 Terminal 26 | - [```MDA```](https://en.wikipedia.org/wiki/IBM_Monochrome_Display_Adapter) - Compliant Display Output through BIOS interrupts. 27 | - Necessary Drivers for ISA support 28 | - ``toybox` Userland 0.8.10 29 | - Basic Tools 30 | - ``cat`` 31 | - ``clear`` 32 | - ``date`` 33 | - ``dd`` 34 | - ``df`` 35 | - ``dhcp`` 36 | - ``dnsdomainname`` 37 | - ``du`` 38 | - ``echo`` 39 | - ``free`` 40 | - ``host`` 41 | - ``hostname`` 42 | - ``ifconfig`` 43 | - ``init`` 44 | - ``killall`` 45 | - ``ls`` 46 | - ``lsmod`` 47 | - ``lspci`` 48 | - ``lsusb`` 49 | - ``makedevs`` 50 | - ``mcookie`` 51 | - ``mount`` 52 | - ``netcat`` 53 | - ``netstat`` 54 | - ``oneit`` 55 | - ``pidof`` 56 | - ``ping`` 57 | - ``reboot`` 58 | - ``reset`` 59 | - ``sh`` (``toysh``, a minimalist ``bash`` implementation) 60 | - ``swapoff`` 61 | - ``swapon`` 62 | - ``su`` 63 | - ``sync`` 64 | - ``uname`` 65 | - ``umount`` 66 | - ``wget`` (w/o ``HTTPS`` support!) 67 | - Dropbear 2022.83 68 | - ``dbclient`` [compiled as a standalone ``ssh`` client] 69 | - ``kilo`` 70 | - A minimalist Text Editor 71 | -------------------------------------------------------------------------------- /scripts/profile/core/build.sh: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | ## This script builds the "core Edition" of OS/1337. 3 | 4 | echo "Current directory is $PWD" 5 | 6 | # Download musl-cross, if it isn't present.. 7 | ./pkgs/musl-cross.sh 8 | # read -p "Press any key to continue... " -n1 -s 9 | 10 | # Download toybox, if it isn't present, then build it. 11 | ./pkgs/build-toybox.sh 12 | # read -p "Press any key to continue... " -n1 -s 13 | 14 | # Download dropbear, if it isn't present, then build dbclient. 15 | ./pkgs/build-dbclient.sh 16 | # read -p "Press any key to continue... " -n1 -s 17 | 18 | # Create the initramfs structure. 19 | ./pkgs/make-initramfs.sh 20 | # read -p "Press any key to continue... " -n1 -s 21 | 22 | # Download and Build the linux kernel. 23 | # - since the initramfs is being included into it [for ease of use with mlb], it needs to be build *after* the initramfs. 24 | ./pkgs/build-linux.sh 25 | # read -p "Press any key to continue... " -n1 -s 26 | 27 | # Generate the image file for booting. 28 | ./pkgs/make-image.sh 29 | # read -p "Press any key to continue... " -n1 -s 30 | 31 | # Format the image with a clean filesystem in. 32 | ./pkgs/make-minimal-filesystem.sh 33 | # read -p "Press any key to continue... " -n1 -s 34 | 35 | # Download and build mlb, if it doesn't exist. 36 | # - Then install mlb as bootloader onto the image. 37 | ./pkgs/build-mlb.sh 38 | # read -p "Press any key to continue... " -n1 -s 39 | 40 | echo "OS/1337 was build. You'll find it under $PWD/os1337.img." 41 | 42 | exit -------------------------------------------------------------------------------- /scripts/profile/core/config.sh: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | # Helper variables and functions specific to the "Core Edition" profile. 3 | 4 | # Image settings 5 | image_size=1440 # kB 6 | image_name=os1337-core.img 7 | 8 | # Directory to build in 9 | base_dir=os1337-core -------------------------------------------------------------------------------- /scripts/profile/core/rootfs/etc/init: -------------------------------------------------------------------------------- 1 | #!/bin/toybox bash 2 | ## init file for OS/1337 "core" edition 3 | /bin/toybox mount -t proc none /proc 4 | /bin/toybox mount -t sysfs none /sys 5 | /bin/toyboy mount -nvt tmpfs none /dev 6 | ## mount /proc, /sys & /dev 7 | /bin/toybox lspci 8 | /bin/toybox lsusb 9 | ## Check PCI & USB devices 10 | /bin/toybox echo -ne '\007' 11 | ## first beep 12 | /bin/toybox sleep 1 13 | /bin/toybox echo -ne '\007' 14 | ## second beep 15 | /bin/toybox uname 16 | /bin/toybox uname -r 17 | ## System info 18 | /bin/toybox cat welcome.txt 19 | ## printing welcome message 20 | /bin/toybox sleep 1 21 | /bin/toybox echo -ne '\007' 22 | ## 3rd beep - signalling the system is booted up. 23 | /bin/toybox oneit -rn -c /dev/tty0 /bin/toybox bash 24 | /bin/toybox oneit -rn -c /dev/console /bin/toybox bash 25 | /bin/toybox oneit -rn -c /bin/toybox openvt -c 0 -s 26 | ## Lauching virtual terminal sessions on tty, console and VGA/MDA output 27 | -------------------------------------------------------------------------------- /scripts/profile/core/rootfs/etc/inittab: -------------------------------------------------------------------------------- 1 | ::sysinit:/etc/init 2 | ::askfirst:/bin/toybox 3 | ::restart:/bin/init 4 | ::ctrlaltdel:/bin/toybox reboot 5 | ::shutdown:/bin/toybox umount -a -r 6 | ::ssh:/bin/dbclient 7 | ::profile:/etc/profile -------------------------------------------------------------------------------- /scripts/profile/core/rootfs/etc/profile: -------------------------------------------------------------------------------- 1 | # Bash Aliases 2 | ## Based off: https://github.com/kkarhan/misc-scripts/blob/master/bash/.bash_aliases 3 | ## Useful commands 4 | alias flushcache='sudo sh -c "sync; echo 3 > /proc/sys/vm/drop_caches"' 5 | ### Flush the RAM forcefully 6 | ### See: https://www.cyberithub.com/drop-flush-clear-cache-memory-ram-in-linux/ 7 | ## faster to type, DOS-alike commands 8 | alias cls='clear' 9 | alias dir='ls -ahl' 10 | alias unixtime='date +%s' 11 | ### Output Unixtime 12 | alias ding='printf '\a'' 13 | ### Create a Beep [printing out BELL character to stdout] 14 | ### See: https://github.com/OS-1337/OS1337/issues/19#issuecomment-1867469203 15 | function isup() { ping -a -b -c 1 -D "$@"; } 16 | ### Single Ping attempt to a specific host which has to be specified i.e. "isup 192.168.0.1" 17 | ### This is done to see if a host "is up"... 18 | alias pub4='wget -O http://ip4only.me/api/ ; echo;' 19 | ### find public IPv4 adress using http://ip4only.me/ 20 | ### NOTE: Lack of IPv4 connectivity will result in a 404 error! 21 | -------------------------------------------------------------------------------- /scripts/profile/core/rootfs/welcome.txt: -------------------------------------------------------------------------------- 1 | 2 | ╔══════════════════════════════════════════════════════════════════════════════╗ 3 | ║ Welcome to OS/1337! ║ 4 | ║ Version: 0.0.1 Release 2 ║ 5 | ╠══════════════════════════════════════════════════════════════════════════════╣ 6 | ║ This is the "CORE" Edition designed to fit a single 1440kB FDD. ║ 7 | ║ The following tools are integrated in this release: ║ 8 | ║ - mlb bootloader [because syslinux is too wasteful!] ║ 9 | ║ - musl-cross-i486 2024-03-25 [because GlibC is unreliable...] ║ 10 | ║ - Linux 6.6.6-i486 [with basic network drivers for legacy systems!] ║ 11 | ║ - toybox 0.8.11-i486 [tho not all functions are included!] ║ 12 | ║ - dbclient 2024.85-i486 [Dropbear SSH Client as single static executeable] ║ 13 | ╟──────────────────────────────────────────────────────────────────────────────╢ 14 | ║ Due to size constraints, manpages / -help texts had to be omnitted! ║ 15 | ║ You'll find those in our repo linked on: https://os1337.com ║ 16 | ║ For toybox commands, see: https://landley.net/toybox/help.html ║ 17 | ╚══════════════════════════════════════════════════════════════════════════════╝ 18 | 19 | -------------------------------------------------------------------------------- /scripts/profile/core/syslinux.cfg: -------------------------------------------------------------------------------- 1 | DEFAULT linux 2 | LABEL linux 3 | SAY [ BOOTING OS/1337 VERSION 0.0.1 ] 4 | KERNEL bzImage 5 | APPEND initrd=rootfs.cpio.xz 6 | -------------------------------------------------------------------------------- /scripts/profile/core/toybox.config: -------------------------------------------------------------------------------- 1 | ../../../build/0.CORE/build/toybox/toybox-0.8.10-i486-minimal.config --------------------------------------------------------------------------------