Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
338 changes: 338 additions & 0 deletions LICENSE

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,7 @@ chmod +x build.sh
This will generate a file `image.iso` inside your working directory. Use VMWare or your favourite VM emulator (or put it on a liveCD if you're brave enough) to run and test it out. Or run `qemu.sh` to run it on QEMU.

![An image of COS saying 'Hello, world!'](images/hello%20world%20with%20cosh.png)

## License

This project is released under the GPLv2 license. To find out more, read [LICENSE](LICENSE).
16 changes: 16 additions & 0 deletions kernel/include/kclib/ctype.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
/*
* ctype.h
* Copyright (C) 2026 Aditya Kumar
*
* This program is free software; you can redistribute it and/or modify it under the terms of the
* GNU General Public License as published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
* even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with this program; if
* not, see <https://www.gnu.org/licenses/>.
*/

#pragma once

int isalnum (int c);
Expand Down
16 changes: 16 additions & 0 deletions kernel/include/kclib/stdio.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
/*
* stdio.h
* Copyright (C) 2026 Aditya Kumar
*
* This program is free software; you can redistribute it and/or modify it under the terms of the
* GNU General Public License as published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
* even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with this program; if
* not, see <https://www.gnu.org/licenses/>.
*/

#pragma once

#include <stdarg.h>
Expand Down
16 changes: 16 additions & 0 deletions kernel/include/kclib/string.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
/*
* string.h
* Copyright (C) 2026 Aditya Kumar
*
* This program is free software; you can redistribute it and/or modify it under the terms of the
* GNU General Public License as published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
* even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with this program; if
* not, see <https://www.gnu.org/licenses/>.
*/

#pragma once

#include <stddef.h>
Expand Down
16 changes: 16 additions & 0 deletions kernel/include/kernel/acpi/acpi.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
/*
* acpi.h
* Copyright (C) 2026 Aditya Kumar
*
* This program is free software; you can redistribute it and/or modify it under the terms of the
* GNU General Public License as published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
* even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with this program; if
* not, see <https://www.gnu.org/licenses/>.
*/

#pragma once

#include <stdint.h>
Expand Down
16 changes: 16 additions & 0 deletions kernel/include/kernel/acpi/acpi_common.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
/*
* acpi_common.h
* Copyright (C) 2026 Aditya Kumar
*
* This program is free software; you can redistribute it and/or modify it under the terms of the
* GNU General Public License as published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
* even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with this program; if
* not, see <https://www.gnu.org/licenses/>.
*/

#pragma once

#include <stdint.h>
Expand Down
16 changes: 16 additions & 0 deletions kernel/include/kernel/acpi/fadt.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
/*
* fadt.h
* Copyright (C) 2026 Aditya Kumar
*
* This program is free software; you can redistribute it and/or modify it under the terms of the
* GNU General Public License as published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
* even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with this program; if
* not, see <https://www.gnu.org/licenses/>.
*/

#pragma once

#include <kernel/acpi/acpi_common.h>
Expand Down
16 changes: 16 additions & 0 deletions kernel/include/kernel/acpi/madt.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
/*
* madt.h
* Copyright (C) 2026 Aditya Kumar
*
* This program is free software; you can redistribute it and/or modify it under the terms of the
* GNU General Public License as published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
* even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with this program; if
* not, see <https://www.gnu.org/licenses/>.
*/

#pragma once

#include <kernel/acpi/acpi_common.h>
Expand Down
16 changes: 16 additions & 0 deletions kernel/include/kernel/acpi/rsdp.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
/*
* rsdp.h
* Copyright (C) 2026 Aditya Kumar
*
* This program is free software; you can redistribute it and/or modify it under the terms of the
* GNU General Public License as published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
* even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with this program; if
* not, see <https://www.gnu.org/licenses/>.
*/

#pragma once

#include <stdint.h>
Expand Down
16 changes: 16 additions & 0 deletions kernel/include/kernel/acpi/rsdt.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
/*
* rsdt.h
* Copyright (C) 2026 Aditya Kumar
*
* This program is free software; you can redistribute it and/or modify it under the terms of the
* GNU General Public License as published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
* even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with this program; if
* not, see <https://www.gnu.org/licenses/>.
*/

#pragma once

void init_rsdt (uint32_t rsdt_base_ptr);
16 changes: 16 additions & 0 deletions kernel/include/kernel/con/ansi.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
/*
* ansi.h
* Copyright (C) 2026 Aditya Kumar
*
* This program is free software; you can redistribute it and/or modify it under the terms of the
* GNU General Public License as published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
* even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with this program; if
* not, see <https://www.gnu.org/licenses/>.
*/

#pragma once

#include <kernel/con/con_ds.h>
Expand Down
16 changes: 16 additions & 0 deletions kernel/include/kernel/con/con.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
/*
* con.h
* Copyright (C) 2026 Aditya Kumar
*
* This program is free software; you can redistribute it and/or modify it under the terms of the
* GNU General Public License as published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
* even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with this program; if
* not, see <https://www.gnu.org/licenses/>.
*/

#pragma once

#include <kernel/fs/ioctl.h>
Expand Down
16 changes: 16 additions & 0 deletions kernel/include/kernel/con/con_ds.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
/*
* con_ds.h
* Copyright (C) 2026 Aditya Kumar
*
* This program is free software; you can redistribute it and/or modify it under the terms of the
* GNU General Public License as published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
* even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with this program; if
* not, see <https://www.gnu.org/licenses/>.
*/

#pragma once

#include <stddef.h>
Expand Down
16 changes: 16 additions & 0 deletions kernel/include/kernel/elf.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
/*
* elf.h
* Copyright (C) 2026 Aditya Kumar
*
* This program is free software; you can redistribute it and/or modify it under the terms of the
* GNU General Public License as published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
* even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with this program; if
* not, see <https://www.gnu.org/licenses/>.
*/

#pragma once

#include <kernel/process.h>
Expand Down
16 changes: 16 additions & 0 deletions kernel/include/kernel/error.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
/*
* error.h
* Copyright (C) 2026 Aditya Kumar
*
* This program is free software; you can redistribute it and/or modify it under the terms of the
* GNU General Public License as published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
* even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with this program; if
* not, see <https://www.gnu.org/licenses/>.
*/

#pragma once

#define EPERM 1 /* Not owner */
Expand Down
16 changes: 16 additions & 0 deletions kernel/include/kernel/exec.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
/*
* exec.h
* Copyright (C) 2026 Aditya Kumar
*
* This program is free software; you can redistribute it and/or modify it under the terms of the
* GNU General Public License as published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
* even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with this program; if
* not, see <https://www.gnu.org/licenses/>.
*/

#pragma once

#include <stdint.h>
Expand Down
16 changes: 16 additions & 0 deletions kernel/include/kernel/fs/chardev.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
/*
* chardev.h
* Copyright (C) 2026 Aditya Kumar
*
* This program is free software; you can redistribute it and/or modify it under the terms of the
* GNU General Public License as published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
* even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with this program; if
* not, see <https://www.gnu.org/licenses/>.
*/

#pragma once

#include <kernel/fs/vfs.h>
Expand Down
16 changes: 16 additions & 0 deletions kernel/include/kernel/fs/cpio.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
/*
* cpio.h
* Copyright (C) 2026 Aditya Kumar
*
* This program is free software; you can redistribute it and/or modify it under the terms of the
* GNU General Public License as published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
* even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with this program; if
* not, see <https://www.gnu.org/licenses/>.
*/

#pragma once

#include <kernel/fs/vfs.h>
Expand Down
16 changes: 16 additions & 0 deletions kernel/include/kernel/fs/fcntl.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
/*
* fcntl.h
* Copyright (C) 2026 Aditya Kumar
*
* This program is free software; you can redistribute it and/or modify it under the terms of the
* GNU General Public License as published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
* even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with this program; if
* not, see <https://www.gnu.org/licenses/>.
*/

#pragma once

// Flags for fctnl
Expand Down
16 changes: 16 additions & 0 deletions kernel/include/kernel/fs/ioctl.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
/*
* ioctl.h
* Copyright (C) 2026 Aditya Kumar
*
* This program is free software; you can redistribute it and/or modify it under the terms of the
* GNU General Public License as published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
* even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with this program; if
* not, see <https://www.gnu.org/licenses/>.
*/

#pragma once

#define TIOCGWINSZ 0x5413
Expand Down
Loading
Loading