@@ -0,0 +1,6 @@
|
|||||||
|
*.img
|
||||||
|
*.bin
|
||||||
|
*.d
|
||||||
|
*.o
|
||||||
|
*.sys
|
||||||
|
/var
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
-- System paw v1 --
|
||||||
|
|
||||||
|
Hewwo critter!~ System paw is a wovely operating system meant for critters of all kinds to get
|
||||||
|
their work (or fun! >:3) done while having their machine resources managed cleanly behind the
|
||||||
|
scenes. SPx is architected by a fluffy kitty cat who likes eating bugs and mice and RATS NOM
|
||||||
|
NOM NOM !!!! This kitty will protect your wittle den, don't worry critter!
|
||||||
|
|
||||||
|
-- Confidentiality of implementation --
|
||||||
|
|
||||||
|
This repository and its sources as of Thu Apr 16 is CONFIDENTIAL and PROPRIETARY.
|
||||||
|
Unauthorized distribution or modification is strictly prohibited.
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
#
|
||||||
|
# Copyright (c) 2026, Mirocom Laboratories
|
||||||
|
# All rights reserved.
|
||||||
|
#
|
||||||
|
# The following sources are CONFIDENTIAL and PROPRIETARY
|
||||||
|
# property of Mirocom Laboratories. Unauthorized copying,
|
||||||
|
# use, distrubution or modification of this file, in whole
|
||||||
|
# and in part, is strictly prohibited without the prior written
|
||||||
|
# consent from Mirocom Laboratories.
|
||||||
|
#
|
||||||
|
|
||||||
|
MAKE=make
|
||||||
|
|
||||||
|
cd usr/src/; \
|
||||||
|
$MAKE
|
||||||
Executable
+60
@@ -0,0 +1,60 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
#
|
||||||
|
# Copyright (c) 2026, Mirocom Laboratories
|
||||||
|
# All rights reserved.
|
||||||
|
#
|
||||||
|
# The following sources are CONFIDENTIAL and PROPRIETARY
|
||||||
|
# property of Mirocom Laboratories. Unauthorized copying,
|
||||||
|
# use, distrubution or modification of this file, in whole
|
||||||
|
# and in part, is strictly prohibited without the prior written
|
||||||
|
# consent from Mirocom Laboratories.
|
||||||
|
#
|
||||||
|
|
||||||
|
#
|
||||||
|
# Check if a list of programs are installed on the system
|
||||||
|
#
|
||||||
|
# <@>: List of programs to check
|
||||||
|
#
|
||||||
|
check_deps() {
|
||||||
|
for dep in $@; do
|
||||||
|
printf "Checking if $dep is installed... "
|
||||||
|
which $dep &>/dev/null
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
echo "no"
|
||||||
|
echo "Please install $dep!"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "yes"
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
#
|
||||||
|
# Obtain the Mirocom gcc toolchain
|
||||||
|
#
|
||||||
|
get_toolchain() {
|
||||||
|
if [ ! -d var/cc/toolchain ]; then
|
||||||
|
git clone https://git.mirocom.org/Mirocom/mirocom-toolchain --depth=1 var/cc/toolchain
|
||||||
|
cd var/cc/toolchain
|
||||||
|
tar -xzvf toolchain.tar.gz
|
||||||
|
mv public/* .; rm -rf public/
|
||||||
|
cd ../../../
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
#
|
||||||
|
# Obtain all deps
|
||||||
|
#
|
||||||
|
get_deps() {
|
||||||
|
get_toolchain
|
||||||
|
}
|
||||||
|
|
||||||
|
# Make sure everything is installed
|
||||||
|
check_deps \
|
||||||
|
git \
|
||||||
|
make \
|
||||||
|
gcc \
|
||||||
|
xorriso
|
||||||
|
|
||||||
|
# Obtain all the deps we need
|
||||||
|
get_deps
|
||||||
Executable
+44
@@ -0,0 +1,44 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
#
|
||||||
|
# Copyright (c) 2026, Mirocom Laboratories
|
||||||
|
# All rights reserved.
|
||||||
|
#
|
||||||
|
# The following sources are CONFIDENTIAL and PROPRIETARY
|
||||||
|
# property of Mirocom Laboratories. Unauthorized copying,
|
||||||
|
# use, distribution or modification of this file, in whole
|
||||||
|
# and in part, is strictly prohibited without the prior written
|
||||||
|
# consent from Mirocom Laboratories.
|
||||||
|
#
|
||||||
|
|
||||||
|
TARGET=x86_64-pc-mirocom
|
||||||
|
MAKE=make
|
||||||
|
|
||||||
|
mkdir -p var/
|
||||||
|
mkdir -p var/cc/root/usr/include/
|
||||||
|
mkdir -p var/cc/root/usr/bin/
|
||||||
|
|
||||||
|
# Don't build again if the lock exists
|
||||||
|
if [ -f var/cc/.lock ]; then
|
||||||
|
echo "var/cc/.lock exists, skipping toolchain build"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
pushd var/cc/toolchain
|
||||||
|
bash build.sh
|
||||||
|
|
||||||
|
mkdir -p gcc
|
||||||
|
pushd gcc
|
||||||
|
|
||||||
|
# Configure gcc
|
||||||
|
../gcc-patched/configure --target=$TARGET \
|
||||||
|
--prefix=$(pwd) --with-sysroot=$(pwd)/../../root/ \
|
||||||
|
--disable-nls --enable-languages=c --disable-multilib
|
||||||
|
|
||||||
|
# Build gcc
|
||||||
|
$MAKE all-gcc
|
||||||
|
$MAKE install-gcc
|
||||||
|
|
||||||
|
# Lock the directory
|
||||||
|
popd
|
||||||
|
popd
|
||||||
|
touch var/cc/.lock
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
#
|
||||||
|
# Copyright (c) 2026, Mirocom Laboratories
|
||||||
|
# All rights reserved.
|
||||||
|
#
|
||||||
|
# The following sources are CONFIDENTIAL and PROPRIETARY
|
||||||
|
# property of Mirocom Laboratories. Unauthorized copying,
|
||||||
|
# use, distrubution or modification of this file, in whole
|
||||||
|
# and in part, is strictly prohibited without the prior written
|
||||||
|
# consent from Mirocom Laboratories.
|
||||||
|
#
|
||||||
|
|
||||||
|
include mk/sys.mk
|
||||||
|
|
||||||
|
.PHONY: all
|
||||||
|
all: sp1
|
||||||
|
|
||||||
|
.PHONY: sp1
|
||||||
|
sp1:
|
||||||
|
cd sp1/; $(MAKE) $(PASSDOWN_ARGS)
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
-------------------------------------------------------------
|
||||||
|
Copyright (c) 2026, Mirocom Laboratories
|
||||||
|
All rights reserved.
|
||||||
|
|
||||||
|
The following sources are CONFIDENTIAL and PROPRIETARY
|
||||||
|
property of Mirocom Laboratories. Unauthorized copying,
|
||||||
|
use, distrubution or modification of this file, in whole
|
||||||
|
and in part, is strictly prohibited without the prior written
|
||||||
|
consent from Mirocom Laboratories.
|
||||||
|
-------------------------------------------------------------
|
||||||
@@ -0,0 +1,49 @@
|
|||||||
|
#
|
||||||
|
# Copyright (c) 2026, Mirocom Laboratories
|
||||||
|
# All rights reserved.
|
||||||
|
#
|
||||||
|
# The following sources are CONFIDENTIAL and PROPRIETARY
|
||||||
|
# property of Mirocom Laboratories. Unauthorized copying,
|
||||||
|
# use, distrubution or modification of this file, in whole
|
||||||
|
# and in part, is strictly prohibited without the prior written
|
||||||
|
# consent from Mirocom Laboratories.
|
||||||
|
#
|
||||||
|
|
||||||
|
CC_PREFIX = x86_64-pc-mirocom
|
||||||
|
ARCH_TARGET = amd64
|
||||||
|
|
||||||
|
CC = \
|
||||||
|
var/cc/toolchain/gcc/bin/$(CC_PREFIX)-gcc
|
||||||
|
LD = \
|
||||||
|
var/cc/toolchain/build-binutils/bin/$(CC_PREFIX)-ld
|
||||||
|
AR = \
|
||||||
|
var/cc/toolchain/build-binutils/bin/$(CC_PREFIX)-ar
|
||||||
|
|
||||||
|
SYS_CFLAGS = \
|
||||||
|
-nostdlib \
|
||||||
|
-nostdinc \
|
||||||
|
-ffreestanding \
|
||||||
|
-fexceptions \
|
||||||
|
--std=gnu11 \
|
||||||
|
-mcmodel=kernel \
|
||||||
|
-Wno-attributes \
|
||||||
|
-fno-stack-protector\
|
||||||
|
-D_SP1_MULTICORE
|
||||||
|
|
||||||
|
ifeq ($(ARCH_TARGET),x86_64)
|
||||||
|
SYS_CFLAGS += \
|
||||||
|
-mno-sse \
|
||||||
|
-mno-sse2 \
|
||||||
|
-mno-sse3 \
|
||||||
|
-mno-avx \
|
||||||
|
-mno-avx2 \
|
||||||
|
-mno-80387 \
|
||||||
|
-mno-3dnow \
|
||||||
|
-mno-mmx
|
||||||
|
endif
|
||||||
|
|
||||||
|
PASSDOWN_ARGS = \
|
||||||
|
ARCH=$(ARCH_TARGET) \
|
||||||
|
SYS_CC=$(CC) \
|
||||||
|
SYS_LD=$(LD) \
|
||||||
|
SYS_CFLAGS="$(SYS_CFLAGS)"
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
#
|
||||||
|
# Copyright (c) 2026, Mirocom Laboratories
|
||||||
|
# All rights reserved.
|
||||||
|
#
|
||||||
|
# The following sources are CONFIDENTIAL and PROPRIETARY
|
||||||
|
# property of Mirocom Laboratories. Unauthorized copying,
|
||||||
|
# use, distrubution or modification of this file, in whole
|
||||||
|
# and in part, is strictly prohibited without the prior written
|
||||||
|
# consent from Mirocom Laboratories.
|
||||||
|
#
|
||||||
|
|
||||||
|
.PHONY: all
|
||||||
|
all: $(ARCH)
|
||||||
|
|
||||||
|
.PHONY: $(ARCH)
|
||||||
|
$(ARCH):
|
||||||
|
cd $(ARCH); $(MAKE)
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
#
|
||||||
|
# Copyright (c) 2026, Mirocom Laboratories
|
||||||
|
# All rights reserved.
|
||||||
|
#
|
||||||
|
# The following sources are CONFIDENTIAL and PROPRIETARY
|
||||||
|
# property of Mirocom Laboratories. Unauthorized copying,
|
||||||
|
# use, distrubution or modification of this file, in whole
|
||||||
|
# and in part, is strictly prohibited without the prior written
|
||||||
|
# consent from Mirocom Laboratories.
|
||||||
|
#
|
||||||
|
|
||||||
|
ASMFILES = $(shell find . -name "*.S")
|
||||||
|
ASMOFILES = $(ASMFILES:.S=.S.o)
|
||||||
|
|
||||||
|
MISC_OFILES = $(shell find ../../ -name "*.o")
|
||||||
|
|
||||||
|
CC = \
|
||||||
|
../../../../$(SYS_CC)
|
||||||
|
|
||||||
|
LD = \
|
||||||
|
../../../../$(SYS_LD)
|
||||||
|
|
||||||
|
CFLAGS = \
|
||||||
|
$(SYS_CFLAGS)
|
||||||
|
|
||||||
|
.PHONY: all
|
||||||
|
all: $(ASMOFILES)
|
||||||
|
$(LD) -Tconf/link.ld $(MISC_OFILES) -o ../../../../sp1.sys
|
||||||
|
|
||||||
|
%.S.o: %.S
|
||||||
|
$(CC) -c $(CFLAGS) $< -o $@
|
||||||
@@ -0,0 +1,54 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2026, Mirocom Laboratories
|
||||||
|
* All rights reserved.
|
||||||
|
*
|
||||||
|
* The following sources are CONFIDENTIAL and PROPRIETARY
|
||||||
|
* property of Mirocom Laboratories. Unauthorized copying,
|
||||||
|
* use, distribution or modification of this file, in whole
|
||||||
|
* and in part, is strictly prohibited without the prior written
|
||||||
|
* consent from Mirocom Laboratories.
|
||||||
|
*/
|
||||||
|
|
||||||
|
OUTPUT_FORMAT(elf64-x86-64)
|
||||||
|
OUTPUT_ARCH(i386:x86-64)
|
||||||
|
ENTRY(_start)
|
||||||
|
|
||||||
|
PHDRS
|
||||||
|
{
|
||||||
|
text PT_LOAD FLAGS((1 << 0) | (1 << 2)) ;
|
||||||
|
rodata PT_LOAD FLAGS((1 << 2)) ;
|
||||||
|
data PT_LOAD FLAGS((1 << 1) | (1 << 2)) ;
|
||||||
|
}
|
||||||
|
|
||||||
|
SECTIONS
|
||||||
|
{
|
||||||
|
. = 0xFFFFFFFF80000000;
|
||||||
|
|
||||||
|
.text : {
|
||||||
|
*(.text .text.*)
|
||||||
|
} :text
|
||||||
|
|
||||||
|
. += CONSTANT(MAXPAGESIZE);
|
||||||
|
|
||||||
|
.rodata : {
|
||||||
|
*(.rodata .rodata.*)
|
||||||
|
} :rodata
|
||||||
|
|
||||||
|
. += CONSTANT(MAXPAGESIZE);
|
||||||
|
|
||||||
|
.data : {
|
||||||
|
*(.data)
|
||||||
|
} :data
|
||||||
|
|
||||||
|
.bss : {
|
||||||
|
*(COMMON)
|
||||||
|
*(.bss .bss.*)
|
||||||
|
} :data
|
||||||
|
|
||||||
|
. += CONSTANT(MAXPAGESIZE);
|
||||||
|
|
||||||
|
/DISCARD/ : {
|
||||||
|
*(.eh_frame .eh_frame.*)
|
||||||
|
*(.note .note.*)
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2026, Mirocom Laboratories
|
||||||
|
* All rights reserved.
|
||||||
|
*
|
||||||
|
* The following sources are CONFIDENTIAL and PROPRIETARY
|
||||||
|
* property of Mirocom Laboratories. Unauthorized copying,
|
||||||
|
* use, distribution or modification of this file, in whole
|
||||||
|
* and in part, is strictly prohibited without the prior written
|
||||||
|
* consent from Mirocom Laboratories.
|
||||||
|
*/
|
||||||
|
|
||||||
|
.text
|
||||||
|
.globl _start
|
||||||
|
_start:
|
||||||
|
cli
|
||||||
|
cld
|
||||||
|
|
||||||
|
xor %rbp, %rbp
|
||||||
|
|
||||||
|
cli
|
||||||
|
1: hlt
|
||||||
|
jmp 1b
|
||||||
Reference in New Issue
Block a user