• Stars
    star
    650
  • Rank 69,267 (Top 2 %)
  • Language
    C
  • License
    GNU General Publi...
  • Created about 10 years ago
  • Updated about 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A kernel that can read from keyboard and print on-screen

mkeykernel

This is a kernel that can read the characters a-z and 0-9 from the keyboard and print them on screen.

See the repo mkernel which is a minimal kernel that prints a string on the screen. mkeykernel just extends this to include keyboard support.

Blog post

Kernel 201 - Let’s write a Kernel with keyboard and screen support

Build commands

nasm -f elf32 kernel.asm -o kasm.o
gcc -m32 -c kernel.c -o kc.o
ld -m elf_i386 -T link.ld -o kernel kasm.o kc.o

If you get the following error message:

kc.o: In function `idt_init':
kernel.c:(.text+0x129): undefined reference to `__stack_chk_fail'

compile with the -fno-stack-protector option:

gcc -fno-stack-protector -m32 -c kernel.c -o bin/kc.o

Test on emulator

qemu-system-i386 -kernel kernel

Get to boot

GRUB requires your kernel executable to be of the pattern kernel-<version>.

So, rename the kernel:

mv kernel kernel-701

Copy it to your boot partition (assuming you are superuser):

cp kernel-701 /boot/kernel-701

Configure your grub/grub2 similar to what is given in _grub_grub2_config folder of mkernel repo.

Reboot.

Voila!

kernel screenshot

More Repositories

1

mkernel

A minimalist kernel
C
1,308
star
2

memalloc

A simple memory allocator - Memory allocation 101
C
214
star
3

socketfun

collection of well commented socket programming code
C
99
star
4

facebook-friends-ranking-score

Find your Facebook Friends Ranking Score http://arjunsreedharan.org/post/65979958297/find-your-facebook-friends-ranking-score
JavaScript
84
star
5

systemd-example-startup

example file to tell systemd to start a shell script at boot
Shell
51
star
6

turn-off-screen

Turn off your screen display
Python
46
star
7

hide-data-in-ptr

how to hide data inside pointers
C
32
star
8

actions-dashboard

Github Actions dashboard
Shell
30
star
9

get-a-random-proxy-address

returns a random working proxy address
Python
17
star
10

tiny-elf

Tiniest ELF (Executable and Linkable Format) executable
Assembly
11
star
11

linux-0.01

Historic linux kernel from ftp://ftp.kernel.org/pub/linux/kernel/Historic/
C
11
star
12

wikicoding

the code that powers Wikicoding, the wikipedia of code.
Python
11
star
13

pystorage

A simple python file-storage solution using dropbox and google app engine
Python
11
star
14

whats

a tool to quickly lookup something from the command line, written in Go
Go
10
star
15

findrep

A tool to easily find and replace from files
C
10
star
16

golang-101

some trivial examples in golang
Go
8
star
17

strbuf

standalone version of git's strbuf api
C
6
star
18

actions-dashboard-paketo

Shell
4
star
19

imagetweet

tweet longer messages using Images. Code that powers imagetweet.com
PHP
4
star
20

oauthRequest

a simple php wrapper for making OAuth Requests
PHP
4
star
21

arjun024.github.io

user page
JavaScript
1
star
22

ruby-nginx-multi-app

HTML
1
star
23

arjunsreedharan.org

backup code for template of http://arjunsreedharan.org
HTML
1
star
24

nitcbot

the code that powers @nitcbot
PHP
1
star
25

extract-mp3-from-playlist

Extract mp3 files from a Windows Media Player playlist (.wpl) to a folder
Python
1
star
26

heuristic-based-bgp-hjack-analysis

Measuring the propagation of BGP Hijacks
Python
1
star