├── .gitignore ├── .github ├── FUNDING.yml └── workflows │ ├── build-mac.yml │ └── nightly-mac.yml ├── ramdisk └── test.txt ├── lxboot.conf ├── .gitmodules ├── LICENSE ├── Makefile └── readme.md /.gitignore: -------------------------------------------------------------------------------- 1 | *.hdd 2 | *.tar 3 | -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | patreon: luxOS 2 | -------------------------------------------------------------------------------- /ramdisk/test.txt: -------------------------------------------------------------------------------- 1 | some file that will just go in the ramdisk -------------------------------------------------------------------------------- /lxboot.conf: -------------------------------------------------------------------------------- 1 | [entry] 2 | name luxOS 3 | disk boot 4 | kernel /lux 5 | ramdisk /ramdisk.tar 6 | boot 7 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "lxfs"] 2 | path = lxfs 3 | url = https://github.com/lux-operating-system/lxfs 4 | [submodule "boot-x86_64"] 5 | path = boot-x86_64 6 | url = https://github.com/lux-operating-system/boot-x86_64 7 | [submodule "toolchain-x86_64"] 8 | path = toolchain-x86_64 9 | url = https://github.com/lux-operating-system/toolchain-x86_64 10 | [submodule "kernel"] 11 | path = kernel 12 | url = https://github.com/lux-operating-system/kernel 13 | [submodule "lucerna"] 14 | path = lucerna 15 | url = https://github.com/lux-operating-system/lucerna 16 | [submodule "lumen"] 17 | path = lumen 18 | url = https://github.com/lux-operating-system/lumen 19 | [submodule "servers"] 20 | path = servers 21 | url = https://github.com/lux-operating-system/servers 22 | [submodule "utilities"] 23 | path = utilities 24 | url = https://github.com/lux-operating-system/utilities 25 | [submodule "ports"] 26 | path = ports 27 | url = https://github.com/lux-operating-system/ports 28 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2024 by the luxOS authors 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /.github/workflows/build-mac.yml: -------------------------------------------------------------------------------- 1 | name: build - macOS 2 | 3 | on: 4 | [push, pull_request, workflow_dispatch] 5 | 6 | jobs: 7 | build: 8 | runs-on: macos-latest 9 | 10 | steps: 11 | - uses: actions/checkout@v4 12 | with: 13 | submodules: recursive 14 | token: ${{ secrets.PAT_TOKEN }} 15 | 16 | - name: Install dependencies 17 | run: brew install nasm curl make 18 | 19 | - name: Fetch and install toolchain 20 | run: | 21 | curl https://jewelcodes.io/lux/toolchain-macos-arm64.tar.xz -o toolchain-macos-arm64.tar.xz 22 | tar -xvJf toolchain-macos-arm64.tar.xz 23 | mv toolchain $HOME/work/toolchain 24 | mv host $HOME/work/host 25 | echo "$HOME/work/toolchain/bin" >> $GITHUB_PATH 26 | 27 | - name: Verify toolchain is executable 28 | run: x86_64-lux-gcc -v 29 | 30 | - name: Build LXFS disk image manager 31 | run: make -C lxfs 32 | 33 | - name: Build x86_64 boot loader 34 | run: make -C boot-x86_64 35 | 36 | - name: Build kernel 37 | run: make -C kernel 38 | 39 | - name: Build lucerna 40 | run: make -C lucerna 41 | 42 | - name: Install lucerna 43 | run: make install -C lucerna 44 | 45 | - name: Build servers 46 | run: make -C servers 47 | 48 | - name: Install servers 49 | run: make install -C servers 50 | 51 | - name: Build lumen 52 | run: make -C lumen 53 | 54 | - name: Clean up artifacts 55 | run: | 56 | rm -rf toolchain-macos-arm64.tar.xz $HOME/work/toolchain $HOME/work/host 57 | make clean 58 | -------------------------------------------------------------------------------- /.github/workflows/nightly-mac.yml: -------------------------------------------------------------------------------- 1 | name: nightly - macOS 2 | 3 | on: 4 | schedule: 5 | - cron: "0 3 * * *" # run daily at 3:00 AM UTC 6 | 7 | workflow_dispatch: 8 | 9 | jobs: 10 | build: 11 | runs-on: macos-latest 12 | 13 | steps: 14 | - uses: actions/checkout@v4 15 | with: 16 | submodules: recursive 17 | token: ${{ secrets.PAT_TOKEN }} 18 | 19 | - name: Install dependencies 20 | run: brew install nasm curl make 21 | 22 | - name: Fetch and install toolchain 23 | run: | 24 | curl https://jewelcodes.io/lux/toolchain-macos-arm64.tar.xz -o toolchain-macos-arm64.tar.xz 25 | tar -xvJf toolchain-macos-arm64.tar.xz 26 | mv toolchain $HOME/work/toolchain 27 | mv host $HOME/work/host 28 | echo "$HOME/work/toolchain/bin" >> $GITHUB_PATH 29 | 30 | - name: Verify toolchain is executable 31 | run: x86_64-lux-gcc -v 32 | 33 | - name: Build LXFS disk image manager 34 | run: make -C lxfs 35 | 36 | - name: Build x86_64 boot loader 37 | run: make -C boot-x86_64 38 | 39 | - name: Build kernel 40 | run: make -C kernel 41 | 42 | - name: Build lucerna 43 | run: make -C lucerna 44 | 45 | - name: Install lucerna 46 | run: make install -C lucerna 47 | 48 | - name: Build servers 49 | run: make -C servers 50 | 51 | - name: Install servers 52 | run: make install -C servers 53 | 54 | - name: Build lumen 55 | run: make -C lumen 56 | 57 | - name: Create disk image 58 | run: make 59 | 60 | - name: Timestamp disk image 61 | run: mv lux.hdd lux-nightly-$(date +"%Y-%m-%d").hdd 62 | 63 | - name: Archive disk image 64 | uses: actions/upload-artifact@v4 65 | with: 66 | name: disk-image 67 | path: lux*.hdd 68 | 69 | - name: Clean up artifacts 70 | run: | 71 | rm -rf *.hdd toolchain-macos-arm64.tar.xz $HOME/work/toolchain $HOME/work/host 72 | make clean 73 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | all: 2 | @echo "\x1B[0;1;35m make\x1B[0m lxfs" 3 | @make -C lxfs 4 | @echo "\x1B[0;1;35m make\x1B[0m boot-x86_64" 5 | @make -C boot-x86_64 6 | @echo "\x1B[0;1;35m make\x1B[0m kernel" 7 | @make -C kernel 8 | @echo "\x1B[0;1;35m make\x1B[0m lucerna" 9 | @make -C lucerna 10 | @echo "\x1B[0;1;35m make\x1B[0m install lucerna" 11 | @make install -C lucerna 12 | @echo "\x1B[0;1;35m make\x1B[0m servers" 13 | @make -C servers 14 | @echo "\x1B[0;1;35m make\x1B[0m install servers" 15 | @make install -C servers 16 | @echo "\x1B[0;1;35m make\x1B[0m lumen" 17 | @make -C lumen 18 | @echo "\x1B[0;1;35m make\x1B[0m utilities" 19 | @make -C utilities 20 | @echo "\x1B[0;1;35m make\x1B[0m install utilities" 21 | @make install -C utilities 22 | @echo "\x1B[0;1;35m lxfs\x1B[0m create" 23 | @./lxfs/lxfs create lux.hdd 10 24 | @echo "\x1B[0;1;35m lxfs\x1B[0m format" 25 | @./lxfs/lxfs format lux.hdd 9 26 | @echo "\x1B[0;1;35m lxfs\x1B[0m mbr" 27 | @./lxfs/lxfs mbr lux.hdd boot-x86_64/mbr.bin 28 | @echo "\x1B[0;1;35m lxfs\x1B[0m boot" 29 | @./lxfs/lxfs boot lux.hdd 0 30 | @echo "\x1B[0;1;35m lxfs\x1B[0m bootsec" 31 | @./lxfs/lxfs bootsec lux.hdd 0 boot-x86_64/bootsec.bin 32 | @echo "\x1B[0;1;35m lxfs\x1B[0m bootblk" 33 | @./lxfs/lxfs bootblk lux.hdd 0 boot-x86_64/lxboot.bin 34 | @echo "\x1B[0;1;35m lxfs\x1B[0m cp lxboot.conf" 35 | @./lxfs/lxfs cp lux.hdd 0 lxboot.conf lxboot.conf 36 | @echo "\x1B[0;1;35m lxfs\x1B[0m cp lux" 37 | @./lxfs/lxfs cp lux.hdd 0 kernel/lux lux 38 | @cp lumen/lumen ramdisk/ 39 | @cp -r servers/out/* ramdisk/ 40 | @cp -r utilities/out/* ramdisk/ 41 | @echo "\x1B[0;1;35m tar \x1B[0m c ramdisk.tar" 42 | @cd ramdisk; tar --format ustar -c * > ../ramdisk.tar; cd .. 43 | @echo "\x1B[0;1;35m lxfs\x1B[0m cp ramdisk.tar" 44 | @./lxfs/lxfs cp lux.hdd 0 ramdisk.tar ramdisk.tar 45 | @./lxfs/lxfs mkdir lux.hdd 0 /bin 46 | @./lxfs/lxfs mkdir lux.hdd 0 /dev 47 | @./lxfs/lxfs mkdir lux.hdd 0 /proc 48 | @./lxfs/lxfs cp lux.hdd 0 ramdisk/nterm /bin/nterm 49 | @./lxfs/lxfs cp lux.hdd 0 ramdisk/hello /bin/hello 50 | @./lxfs/lxfs cp lux.hdd 0 ramdisk/lush /bin/lush 51 | @./lxfs/lxfs cp lux.hdd 0 ramdisk/echo /bin/echo 52 | @./lxfs/lxfs cp lux.hdd 0 ramdisk/pwd /bin/pwd 53 | @./lxfs/lxfs cp lux.hdd 0 ramdisk/ls /bin/ls 54 | @./lxfs/lxfs cp lux.hdd 0 ramdisk/cat /bin/cat 55 | @./lxfs/lxfs cp lux.hdd 0 ramdisk/luxfetch /bin/luxfetch 56 | @./lxfs/lxfs cp lux.hdd 0 ramdisk/head /bin/head 57 | @./lxfs/lxfs cp lux.hdd 0 ramdisk/reset /bin/reset 58 | @./lxfs/lxfs cp lux.hdd 0 ramdisk/chmod /bin/chmod 59 | @./lxfs/lxfs cp lux.hdd 0 ramdisk/touch /bin/touch 60 | @./lxfs/lxfs cp lux.hdd 0 ramdisk/rm /bin/rm 61 | @./lxfs/lxfs mkdir lux.hdd 0 /test 62 | 63 | clean: 64 | @echo "\x1B[0;1;35m make\x1B[0m clean lxfs" 65 | @make -C lxfs clean 66 | @echo "\x1B[0;1;35m make\x1B[0m clean boot-x86_64" 67 | @make -C boot-x86_64 clean 68 | @echo "\x1B[0;1;35m make\x1B[0m clean kernel" 69 | @make -C kernel clean 70 | @echo "\x1B[0;1;35m make\x1B[0m clean lucerna" 71 | @make -C lucerna clean 72 | @echo "\x1B[0;1;35m make\x1B[0m clean lumen" 73 | @make -C lumen clean 74 | @echo "\x1B[0;1;35m make\x1B[0m clean servers" 75 | @make -C servers clean 76 | @echo "\x1B[0;1;35m make\x1B[0m clean utilities" 77 | @make -C utilities clean 78 | 79 | toolchain: 80 | @cd toolchain-x86_64; ./build-toolchain.sh 81 | 82 | qemu: 83 | @qemu-system-x86_64 -monitor stdio -m 4096 -smp 4 -cpu Skylake-Client \ 84 | -drive file=lux.hdd,format=raw,if=none,id=disk \ 85 | -device nvme,serial=12345678,drive=disk 86 | -------------------------------------------------------------------------------- /readme.md: -------------------------------------------------------------------------------- 1 |