Git Product home page Git Product logo

tinykernel's Introduction

TinyKernel Cover Art

Gitpod ready-to-code Lines of code Issues Closed License Tag

TinyKernel - 0.1.4

Tiny Kernel is a work in progress Operating System kernel.

By the end of the project, I hope to have a fully functional and working Kernel. Since System development is my prefered type of development, I thought it was time to finally create a project from the ground up, with its own x86 architecture and its own operating system to end up using the kernel.

Setup

Currently, there is too many files for people to just manually enter commands to run and build, therefor, you should really use the provided Makefile. just enter make into the commandline at the root of the project, & it will build the project for you. After, you can enter make run into the command line, & it will run the following project.

ISO

Debian/Ubuntu


Install Qemu:

  • sudo apt-get install qemu qemu-system-x86

After installing Qemu, you can then run the Iso file, the command is:

  • qemu-system-x86_64 -cdrom path/to/iso

Screenshots

Date: 7/25/2021

TinyKernel Cover Art


Date: 8/11/2021

TinyKernel Cover Art


Date: 8/17/2021

TinyKernel Cover Art

tinykernel's People

Contributors

bobrossrtx avatar ikb4l avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar

tinykernel's Issues

mcopy from grub-mkrescue fails

The latest updated solved the linking issue but mcopy from grub-mkrescue now fails.

CC src/sys/char.c -> build/obj/src/sys/char.c.o
CC src/sys/utils.c -> build/obj/src/sys/utils.c.o
CC src/drivers/keyboard/keyboard.c -> build/obj/src/drivers/keyboard/keyboard.c.o
CC src/drivers/vga/vga.c -> build/obj/src/drivers/vga/vga.c.o
AS src/bootloader/boot.s -> build/obj/src/bootloader/boot.s.o
CC src/kernel/stdio.c -> build/obj/src/kernel/stdio.c.o
src/kernel/stdio.c: In function ‘__kprintf’:
src/kernel/stdio.c:60:15: warning: comparison of unsigned expression in ‘< 0’ is always false [-Wtype-limits]
   60 |         if (i < 0)
      |               ^
CC src/kernel/cpu/ports.c -> build/obj/src/kernel/cpu/ports.c.o
CC src/kernel/kernel.c -> build/obj/src/kernel/kernel.c.o
CC src/kernel/errno.c -> build/obj/src/kernel/errno.c.o
\nLinking -> build/boot/TinyKernel.bin
mcopy: No directory slots
grub-mkrescue: error: `mcopy` invocation failed
.
make: *** [Makefile:52: iso] Error 1

Originally posted by @DevManu-de in #6 (comment)

About Project Layout

When I reviewed the project, I saw a few things that weren't right. I want to share these with you:

  • The inb(uint16) and outb(uint16, uint16) methods defined in the src/kernel/keyboard/keyboard.c file are not directly related to the keyboard. It's about CPU ports. Move these functions to a different location.
  • There is absolutely no need for next_line_index in src/sys/vga.c. Make the VGA driver better, update. The VGA driver needs to be improved as soon as possible!

Unable to build with makefile

Describe the bug
I cloned this repo with git clone https://github.com/TinyKern/TinyKernel.git and then tried to compile it by typing make as described in the README.md and then I got following linker error

CC src/sys/char.c -> build/obj/src/sys/char.c.o
CC src/sys/utils.c -> build/obj/src/sys/utils.c.o
CC src/drivers/keyboard/keyboard.c -> build/obj/src/drivers/keyboard/keyboard.c.o
CC src/drivers/vga/vga.c -> build/obj/src/drivers/vga/vga.c.o
AS src/bootloader/boot.s -> build/obj/src/bootloader/boot.s.o
CC src/kernel/stdio.c -> build/obj/src/kernel/stdio.c.o
src/kernel/stdio.c: In function ‘__kprintf’:
src/kernel/stdio.c:60:15: warning: comparison of unsigned expression in ‘< 0’ is always false [-Wtype-limits]
   60 |         if (i < 0)
      |               ^
CC src/kernel/cpu/ports.c -> build/obj/src/kernel/cpu/ports.c.o
CC src/kernel/kernel.c -> build/obj/src/kernel/kernel.c.o
CC src/kernel/errno.c -> build/obj/src/kernel/errno.c.o
\nLinking -> build/boot/TinyKernel.bin
ld: build/obj/src/kernel/stdio.c.o: in function `.L19':
stdio.c:(.text+0x304): undefined reference to `__stack_chk_fail_local'
ld: build/obj/src/kernel/errno.c.o: in function `kprint_error':
errno.c:(.text+0xe6): undefined reference to `__stack_chk_fail_local'
ld: build/obj/src/kernel/errno.c.o: in function `kpanic':
errno.c:(.text+0x176): undefined reference to `__stack_chk_fail_local'
ld: build/boot/TinyKernel.bin: hidden symbol `__stack_chk_fail_local' isn't defined
ld: final link failed: bad value
make: *** [Makefile:60: build/boot/TinyKernel.bin] Error 1

I am trying to build this on Arco Linux with Kernel: 5.12.15-zen1-1-zen and gcc: 11.1.0 and linker: 2.36.1

To Reproduce
Steps to reproduce the behavior:

  1. clone the repo
  2. type make
  3. See error

Expected behavior
Successfull compilation

Desktop (please complete the following information):

  • OS: Arco Linux, Kernel 5.12.15-zen1-1-zen

[BUG]

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

Keyboard input not registering.

Currently, the input from the keyboard is not registered after entering the kernel.
Also can't figure out how to convert key code to ASCII char, Problem.

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'path/to/project/'
  2. Enter make into the terminal.
  3. run qemu-system-x86_64 -cdrom build/iso/TinyKernel_Bobrossrtx-0.1.3.iso to run the Kernel
  4. See that no chars being printed from keyboard input.

Expected behavior

  • After calling the input() function, it should enter an input mode where the user can type any character on the keyboard and it should then write the character to the buffer.
  • The get_ascii_char() should return the value of the keycode converted to a char. Example: return KEY_A -> 'a'

Desktop:

  • OS: All (Tested on Debain/Kali
  • Version 0.1.3

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.