All Projects → wangzq0807 → Smash

wangzq0807 / Smash

Licence: mit
A unix like kernel

Programming Languages

c
50402 projects - #5 most used programming language

Projects that are alternatives of or similar to Smash

Toaruos
A completely-from-scratch hobby operating system: bootloader, kernel, drivers, C library, and userspace including a composited graphical UI, dynamic linker, syntax-highlighting text editor, network stack, etc.
Stars: ✭ 4,687 (+11617.5%)
Mutual labels:  kernel, operating-system
Fiwix
A UNIX-like kernel for the i386 architecture
Stars: ✭ 38 (-5%)
Mutual labels:  kernel, operating-system
Rust Raspberrypi Os Tutorials
📚 Learn to write an embedded OS in Rust 🦀
Stars: ✭ 7,275 (+18087.5%)
Mutual labels:  kernel, operating-system
Lemonos
The Lemon Operating System https://lemonos.org
Stars: ✭ 260 (+550%)
Mutual labels:  kernel, operating-system
Powernex
An operating system written in D
Stars: ✭ 460 (+1050%)
Mutual labels:  kernel, operating-system
Harmonyos
A curated list of awesome things related to HarmonyOS. 华为鸿蒙操作系统。
Stars: ✭ 18,385 (+45862.5%)
Mutual labels:  kernel, operating-system
Qword
Operating system for x86_64 based around a "keep it simple and make it work" philosophy.
Stars: ✭ 367 (+817.5%)
Mutual labels:  kernel, operating-system
oneiric
A small kernel + OS based on how dreams work
Stars: ✭ 11 (-72.5%)
Mutual labels:  kernel, operating-system
Gramado
Gramado OS - 32bit operating system
Stars: ✭ 420 (+950%)
Mutual labels:  kernel, operating-system
Phantomuserland
Phantom: Persistent Operating System
Stars: ✭ 412 (+930%)
Mutual labels:  kernel, operating-system
Tock
A secure embedded operating system for microcontrollers
Stars: ✭ 3,258 (+8045%)
Mutual labels:  kernel, operating-system
Tantra
Hobby x86 unix-like kernel. Curiously under development to answer "How to write an OS".
Stars: ✭ 23 (-42.5%)
Mutual labels:  kernel, operating-system
fpos
Free Pascal Operating System (FPOS) is a operating system consists of a minimal kernel built on FreePascal. It contains a Scheme implementation of a hard drive (ATA) driver, keyboard (PS2), serial (8250 UART), FAT32 filesystem and a small real time clock manager. The project was built to experiment with developement of operating system using a h…
Stars: ✭ 36 (-10%)
Mutual labels:  kernel, operating-system
Rust Os Comparison
A comparison of operating systems written in Rust
Stars: ✭ 292 (+630%)
Mutual labels:  kernel, operating-system
LudOS
A toy monolithic kernel written in C++
Stars: ✭ 38 (-5%)
Mutual labels:  kernel, operating-system
Wingos
a little 64bit operating system written in c++ with smp support
Stars: ✭ 361 (+802.5%)
Mutual labels:  kernel, operating-system
phoenix-rtos-kernel
Phoenix-RTOS microkernel repository
Stars: ✭ 77 (+92.5%)
Mutual labels:  kernel, operating-system
meetup
Cat System Workshop is a regular meet-up focusing on “system software”. We would like to gather all developers to share their experience regarding system software and learn from each other, making system software more perfect and complete!
Stars: ✭ 52 (+30%)
Mutual labels:  kernel, operating-system
Aquila
AquilaOS: UNIX-like Operating System
Stars: ✭ 413 (+932.5%)
Mutual labels:  kernel, operating-system
Libhermit Rs
libhermit-rs: A Rust-based library operating system
Stars: ✭ 558 (+1295%)
Mutual labels:  kernel, operating-system

SMASH

简介

smash是一个类Unix的内核,实现了基于分段和分页的内存管理,单个进程最大4GB虚拟地址空间,支持minix-v2l文件系统,实现了写实复制(fork),管道等机制。

smash

开发环境

  • Ubuntu 18.04
  • gcc 7.4.0
  • bochs-x 2.6.5+
  • cmake 3.0+

编译内核

cd smash/_build
cmake ../
make

运行

在_build目录下执行

make run

系统调用一览

extern int exit(int code);
extern int fork(void);
extern int read(int fd, char *buf, int count);
extern int write(int fd, const char *buf, int count);
extern int open(const char *pathname, int flags, int mode);
extern int close(int fd);
extern int waitpid(int pid, int *status, int options);
extern int creat(const char *pathname, int mode);
extern int link(const char *oldpath, const char *newpath);
extern int unlink(const char *pathname);
extern int execve(const char *pathname, char *const argv[], char *const envp[]);
extern int chdir(const char *pathname);
extern int mkdir(const char *pathname, int mode);
extern int rmdir(const char *pathname);
extern int pause(void);
extern int getpid(void);
extern int pipe(int fd[2]);
extern int dup(int fd);

参考

License

  • MIT License

一些细节

目录结构

├── boot
│   ├── loader
│   └── mbr
├── _build
├── include
├── kernel
├── tools
└── usr

  • boot : 存放引导程序
  • kernel : 内核代码
  • include : unix标准头文件
  • usr : 应用程序

kernel设计

CMake

  • 使用config.h.in来生成配置选项

GCC

  • 不使用标准库的头文件(用自定义的): -nostdinc

Bochs

  • IO debugger : 在bochsrc中添加"port_e9_hack: enabled=1"
  • GUI Debug : 安装libgtk2.0-dev, 然后添加编译选项--enable-debugger --enable-disasm --enable-debugger-gui,编译bochs. 然后在bochsrc中添加"display_library: x, options="gui_debug""
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].