Giter Site home page Giter Site logo

xing1357 / simpleos Goto Github PK

View Code? Open in Web Editor NEW
128.0 128.0 17.0 11.24 MB

Operating System Coded in Assembly and C

Home Page: https://discord.gg/YXcXs5FNwu

License: MIT License

Assembly 8.41% C 85.84% Shell 2.10% Makefile 3.61% Batchfile 0.04%
assembly c filesystem fs kernel operating-system operating-system-kernel os os-kernel shell simple-kernel simple-operating-system simple-os vfs

simpleos's Introduction

Hi there ๐Ÿ‘‹

My Stats

xing1357's Github Stats

Top Langs

simpleos's People

Contributors

ashp0 avatar xing1357 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

simpleos's Issues

SSE invalid opcode

Build the script on my computer with the following version

  1. GNU ld (GNU Binutils) 2.38
  2. gcc (GCC) 12.1.1

My version of gcc creates the kernel with sse instructions, its a minor bug and i already solved by implementing a fucntion "init_sse()" in kernel.c which modifies the cr0 and cr4 registers.

Makefile

Makefile contains the building of file
hd.c ( currently it does not exists in the repo as far as i know)

Also, have some problems with the linker

/usr/bin/ld -m elf_i386 -T ./config/linker.ld -nostdlib --allow-multiple-definition -o out/SimpleOS.bin obj/asm/entry.o obj/asm/load_gdt.o obj/asm/load_idt.o obj/asm/exception.o obj/asm/irq.o obj/asm/load_tss.o obj/io_ports.o obj/vga.o obj/string.o obj/console.o obj/gdt.o obj/idt.o obj/isr.o obj/8259_pic.o obj/keyboard.o obj/mouse.o obj/kernel.o obj/gui.o obj/ext2.o obj/ide.o obj/tss.o obj/kheap.o obj/pmm.o
/usr/bin/ld: obj/string.o: in function `malloc':
string.c:(.text+0x4f4): undefined reference to `__stack_chk_fail_local'
/usr/bin/ld: obj/console.o: in function `printf':
console.c:(.text+0xa1d): undefined reference to `__stack_chk_fail_local'
/usr/bin/ld: obj/mouse.o: in function `mouse_handler':
mouse.c:(.text+0x3ed): undefined reference to `__stack_chk_fail_local'
/usr/bin/ld: obj/ext2.o: in function `read_inode':
ext2.c:(.text+0xd14): undefined reference to `__stack_chk_fail_local'
/usr/bin/ld: obj/ext2.o: in function `ext2_read_dir':
ext2.c:(.text+0xede): undefined reference to `__stack_chk_fail_local'
/usr/bin/ld: obj/ide.o:ide.c:(.text+0x8f9): more undefined references to `__stack_chk_fail_local' follow
/usr/bin/ld: out/SimpleOS.bin: hidden symbol `__stack_chk_fail_local' isn't defined
/usr/bin/ld: final link failed: bad value
make: *** [Makefile:59: all] Error 1

It is solved with adding the -fno-stack-protector in the CC_FLAGS but i dont think its safe.
My linker is

  1. GNU ld (GNU Binutils) 2.38

I dont know if its appropriate to include this in here as its probably a bug with my linker, you can close it if nobody else has this problem

TSS

Doesn't let me Init IDT

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.