{"id":24581298,"url":"https://github.com/gasna/kfs-1","last_synced_at":"2026-04-16T01:33:32.273Z","repository":{"id":271624364,"uuid":"903542462","full_name":"GAsNA/KFS-1","owner":"GAsNA","description":"This first (out of 10) project is a very basic kernel with some basic features.","archived":false,"fork":false,"pushed_at":"2025-01-23T18:19:44.000Z","size":348,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-23T19:24:59.414Z","etag":null,"topics":["42","42-school","42born2code","42paris","42school","assembly","assembly-language","assembly-language-programming","assembly-x86","basic-kernel","c","c-language","c-language-programming","kernel","kernel-development"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/GAsNA.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-12-14T21:40:39.000Z","updated_at":"2025-01-22T23:26:01.000Z","dependencies_parsed_at":"2025-01-23T19:23:36.843Z","dependency_job_id":"769ae267-e55f-4b70-ad31-74566ae7ebf7","html_url":"https://github.com/GAsNA/KFS-1","commit_stats":null,"previous_names":["gasna/kfs-1"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GAsNA%2FKFS-1","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GAsNA%2FKFS-1/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GAsNA%2FKFS-1/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GAsNA%2FKFS-1/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GAsNA","download_url":"https://codeload.github.com/GAsNA/KFS-1/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244060974,"owners_count":20391631,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["42","42-school","42born2code","42paris","42school","assembly","assembly-language","assembly-language-programming","assembly-x86","basic-kernel","c","c-language","c-language-programming","kernel","kernel-development"],"created_at":"2025-01-24T02:41:38.517Z","updated_at":"2026-04-16T01:33:32.253Z","avatar_url":"https://github.com/GAsNA.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# KFS-1\n\nDiscover the world of \"Kernel Programming\" and learn how to create your very own Kernel from scratch.\n\nThis project is the first in a serie of 10 projects, introducing into the Kernel world. This first project is a very basic kernel with some features.\n\nIs based on a i386 (x86) architecture.\n\n![](images/preview_kfs-1_rleseur.gif)\n\n**Options**:\n- Color support\n- Keyboard handler\n- Helper 'printk'\n- Scroll and cursor support\n- Different screens helper and keyboard shortcut\n- Create Iso image from kernel binary\n\n**Shortcuts**:\n- **F1**: go to previous screen\n- **F2**: go to next screen\n\n*NB: you can use the dependencies.txt to install all necessaries packages. ``sudo apt/dnf install $(cat dependencies.txt)``*\n\n## KERNEL\n\n### Compilation\n\n#### Simple way\n\n```\nmake\n```\n\n#### Hard way\n\n```\n$ nasm -f elf32 boot.asm -o boot.o\n$ gcc -m32 -c kernel.c -o kernel.o\n$ ld -m elf_i386 -T link.ld -o [your kernel name] boot.o kernel.o\n```\n\n\u003ci\u003eIt is recommended to name your kernel with the formal\u003c/i\u003e: ``kernel-\u003cversion\u003e``. \u003ci\u003eI named mine \"kernel-kfs.1.rleseur\".\u003c/i\u003e\n\n### Run on QEMU\n\n#### Simple way\n\n```\nmake run-kernel\n```\n\n#### Hard way\n\n```\nqemu-system-i386 -kernel [your compiled kernel]\n```\n\n### Installation\n\n- Take the last Debian ISO and make a VM in virtualbox.\n\n- Clone the repo in it.\n\n- Copy the compiled kernel in ``/boot`` directory.\n\n- Modify the ``/boot/grub/grub.cfg`` and add an entry:\n\n```\nmenuentry 'My Kernel' {\n\tset root='hd0,msdos1'\n\tmultiboot /boot/[your compiled kernel] ro\n}\n```\n\n- Reboot and select ``My Kernel`` entry.\n\n## ISO\n\n### Compilation\n\n#### Simple way\n\n```\nmake iso\n```\n\n#### Hard way\n\n```\n$ mkdir -p /iso/boot/grub\n$ cp [your compiled kernel] /iso/boot\n$ cp grub.cfg /iso/boot/grub\n$ grub-mkrescue -o [your iso name] iso\n```\n\n### Run on QEMU\n\n#### Simple way\n\n```\nmake run-iso\n```\n\n#### Hard way\n\n```\nqemu-system-i386 -cdrom [your iso]\n```\n\n## Resources\n\n- The BIBLE, for basic kernel: https://arjunsreedharan.org/post/82710718100/kernels-101-lets-write-a-kernel\n\n- The BIBLE 2, for keyboard: https://arjunsreedharan.org/post/99370248137/kernels-201-lets-write-a-kernel-with-keyboard\n\n- For keyboard scancodes: https://aeb.win.tue.nl/linux/kbd/scancodes-1.html\n\n- For another system of keyboard, color and build iso image: https://theogill.medium.com/creating-a-kernel-from-scratch-1a1aa569780f\n\n- To move the cursor: https://hasinisama.medium.com/building-your-own-operating-system-drivers-8adfc889398b\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgasna%2Fkfs-1","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgasna%2Fkfs-1","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgasna%2Fkfs-1/lists"}