Commit Graph

1906 Commits

Author SHA1 Message Date
6546f490b6
Update README.md 2023-07-11 11:50:57 +02:00
f7e8fd9cb8
libc: Add octal specifiers to inttypes.h 2023-07-11 11:49:27 +02:00
0fed45d1c6
libc: Implement _exit()
Apparently, I implemented _Exit in stdlib.h but forgot to add _exit to unistd.h...
2023-07-11 11:49:10 +02:00
82411789e8
libos+apps: Add kill
All checks were successful
continuous-integration/drone/push Build is passing
2023-07-10 22:17:05 +02:00
86d14e0d0e
kernel+libc: Add the SA_NODEFER and SA_RESETHAND flags for sigaction()
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2023-07-10 21:54:04 +02:00
237184a8bf
libc+sh: Implement strsignal and use it in the shell
All checks were successful
continuous-integration/drone/pr Build is passing
2023-07-10 21:39:22 +02:00
e0b5acb2ab
libc: Make struct sigaction C-compatible
All checks were successful
continuous-integration/drone/pr Build is passing
2023-07-10 21:19:43 +02:00
66365e15a7
libc: Block and ignore appropriate signals in system()
All checks were successful
continuous-integration/drone/pr Build is passing
2023-07-10 21:17:56 +02:00
4a5947e10e
libc: Implement signal() 2023-07-10 21:17:25 +02:00
fe9827bbeb
kernel: Fix fallthrough in switch statement
All checks were successful
continuous-integration/drone/pr Build is passing
2023-07-10 21:09:12 +02:00
3df40beaf2
libc: Rewrite abort() using the new signals
Some checks failed
continuous-integration/drone/pr Build is failing
2023-07-10 21:08:23 +02:00
8066e8f1d8
kernel+libc: Implement sigprocmask() and friends
Some checks failed
continuous-integration/drone/pr Build is failing
2023-07-10 21:01:59 +02:00
015419b8f5
kernel: Generate signals when children exit / when faults occur
Userspace can now catch segfaults!
2023-07-10 20:49:22 +02:00
60d68b74e1
kernel: Define a good set of default signals
Most of these have POSIX-defined numbers.
2023-07-10 20:30:37 +02:00
cde467ee46
kernel: Support returning termination signals from waitpid
All checks were successful
continuous-integration/drone/pr Build is passing
2023-07-10 20:16:06 +02:00
fc3fdc2b87
kernel: Add default actions for signals 2023-07-10 19:59:01 +02:00
bdcb690a7a
kernel: Avoid processing unregistered signals for init 2023-07-10 19:48:46 +02:00
15d6aae701
kernel+libc: Implement basic signals 2023-07-10 19:46:57 +02:00
15199a2366
libluna+libc: Implement memchr() and strstr()
All checks were successful
continuous-integration/drone/push Build is passing
2023-07-10 15:30:05 +02:00
56f3d26969
kernel+libluna: Fix the CRC32 algorithm and use it to verify the GPT header
All checks were successful
continuous-integration/drone/push Build is passing
2023-07-10 14:54:55 +02:00
16b0531d42
kernel+apps+base+tools: Use Ext2 for the root partition file system
All checks were successful
continuous-integration/drone/push Build is passing
init is now split into two parts: preinit, which lives in the initrd and prepares the root file system for init,
and the actual /usr/bin/init, which lives in the root partition and starts services and reaps zombies.

The kernel now looks for /bin/preinit instead of /bin/init as the executable for the init process.

All configuration files in initrd/etc have been moved to base/etc. (The plan is to have only moon and preinit in the initrd.)

Since the current Ext2 implementation is read-only (and it's on a CDROM so it would be read-only anyways),
/home/selene is a tmpfs (as well as /tmp), to allow for a writable home directory.

The system is slower now, but that's to expect since the Ext2 code doesn't use caching and the ATA code still uses PIO.
2023-07-10 13:05:06 +02:00
40413eee18
kernel: Panic when PID 1 exits/crashes 2023-07-10 13:04:47 +02:00
e3552d9df0
kernel: Log hostname changes 2023-07-10 13:04:40 +02:00
a1b92fcc3f
kernel: Add the MOUNT_DEBUG flag 2023-07-10 13:04:34 +02:00
0b488c1232
kernel: Actually use config.cmake
Looks like file(EXISTS) needs a full path.
2023-07-10 13:04:26 +02:00
b920ffee42
kernel: Don't use an active directory for the idle thread
Just take the currently used directory.
2023-07-10 13:04:18 +02:00
503dc72686
kernel: Set kernel threads' initial active directories to avoid taking the first directory they use
This ends up being init's directory, which is fine when init's directory doesn't change...
but a little less fine when the init process calls exec()...
which is what it does in the new configuration I'm testing...
2023-07-10 13:04:00 +02:00
7908c5a63e
kernel/ATA: Do not discard the controller if at least one channel initialized properly
This was causing problems in VirtualBox.
2023-07-10 13:01:43 +02:00
ae0cd155c3
kernel: Fix AddressSpace's move assignment operator
All checks were successful
continuous-integration/drone/push Build is passing
2023-07-09 20:43:03 +02:00
c599251d2a
kernel: Rename UserVM to AddressSpace
All checks were successful
continuous-integration/drone/push Build is passing
This is a more appropriate name now that it does more stuff than allocate virtual memory.

To be fair, the name was a bit awkward anyway. Should have been UserVMAllocator I guess.
2023-07-09 20:38:04 +02:00
5e564e9ae3
kernel: Move Thread::self_directory to UserVM
Since this is only used by user threads, UserVM is a convenient/related place to store the PageDirectory in a RAII manner.
2023-07-09 20:32:42 +02:00
5c9503ac71
libos+cp: Add prompt functionality
All checks were successful
continuous-integration/drone/push Build is passing
2023-07-08 18:30:39 +02:00
6d9ba8deb4
libos+apps: Make the vector argument more flexible
All checks were successful
continuous-integration/drone/push Build is passing
2023-07-08 16:44:02 +02:00
af26dce038
kernel: Zero physical frames instead of virtual pages
All checks were successful
continuous-integration/drone/push Build is passing
The memset() happens a bit earlier, and we don't have to remap the
mapped virtual memory.
2023-07-04 00:49:26 +02:00
3b1219ecf2
kernel/ext2: Make the inner extended superblock struct packed as well
All checks were successful
continuous-integration/drone/push Build is passing
2023-07-02 19:50:27 +02:00
bd757d204e
kernel+libos+libluna: Avoid copying and reallocation when creating Strings
All checks were successful
continuous-integration/drone/push Build is passing
This is done by reusing the existing buffers in Vector and Buffer instances.
2023-07-02 19:30:25 +02:00
498e20561f
libluna: Add release_data() overloads to Buffer and Vector
This can be used to transfer the underlying data to a String object without copying.
2023-07-02 19:29:04 +02:00
d363d5e915
kernel/ext2: Make sure we don't crash when accessing the last inode
All checks were successful
continuous-integration/drone/push Build is passing
2023-07-02 17:30:14 +02:00
f0a7098470
apps: Add cp
All checks were successful
continuous-integration/drone/push Build is passing
2023-07-02 16:38:24 +02:00
6db0a2649c
libluna: Add a variant of PathParser::join() for relative paths 2023-07-02 16:38:12 +02:00
dd914b16d1
kernel: Stop showing memory stats at boot
All checks were successful
continuous-integration/drone/push Build is passing
No userspace interface yet, but this can be shown using Shift+Ctrl+M.
2023-07-02 16:02:38 +02:00
f8dc7c62e2
Update README.md
All checks were successful
continuous-integration/drone/push Build is passing
2023-07-01 17:40:44 +02:00
21d093b1fa
initrd: Rename test-ext2fs to mount-ext2fs
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2023-06-25 20:54:37 +02:00
e9e7b22323
kernel: Separate a thread's page directory into two
All checks were successful
continuous-integration/drone/pr Build is passing
The self directory, and the active directory. The active directory is the one the thread is currently using,
and the self directory is the one the thread owns.

This lets us keep track of both, which fixes ext2 executables crashing the system.
2023-06-25 20:35:40 +02:00
5f4103251a
kernel: Preserve the new page directory while exec() is running 2023-06-25 20:35:40 +02:00
491416ddaf
tools: Bump up the ext2 filesystem size 2023-06-25 20:35:39 +02:00
da689dd1a7
kernel/ext2: Allow reading up to 4 MB of data from files
This is done by scanning the singly indirect pointer of the inode.
2023-06-25 20:35:39 +02:00
41f578aa18
kernel/ext2: Add support for symbolic links 2023-06-25 20:35:38 +02:00
34e1ef36b1
kernel: Make pivot_root() reset the parent entry of the new root directory
Otherwise it would just be pointing to the old parent fs, and we don't want that.
2023-06-25 20:35:38 +02:00
a62265b504
kernel/ext2: Implement directory traversal 2023-06-25 20:35:37 +02:00