{"id":13787370,"url":"https://github.com/youben11/youbix","last_synced_at":"2026-02-28T15:01:35.215Z","repository":{"id":100988672,"uuid":"128524630","full_name":"youben11/youbix","owner":"youben11","description":"Yet another simple kernel","archived":false,"fork":false,"pushed_at":"2018-06-12T00:09:15.000Z","size":47,"stargazers_count":12,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-16T02:44:36.097Z","etag":null,"topics":["assembly-x86","c","i386","kernel"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/youben11.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2018-04-07T12:05:02.000Z","updated_at":"2023-11-04T11:26:12.000Z","dependencies_parsed_at":"2024-01-07T02:57:37.764Z","dependency_job_id":"ee7b199e-eec1-44f5-bfb0-8853c285e60e","html_url":"https://github.com/youben11/youbix","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/youben11/youbix","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/youben11%2Fyoubix","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/youben11%2Fyoubix/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/youben11%2Fyoubix/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/youben11%2Fyoubix/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/youben11","download_url":"https://codeload.github.com/youben11/youbix/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/youben11%2Fyoubix/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29938970,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-28T13:49:17.081Z","status":"ssl_error","status_checked_at":"2026-02-28T13:48:50.396Z","response_time":90,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["assembly-x86","c","i386","kernel"],"created_at":"2024-08-03T20:00:33.310Z","updated_at":"2026-02-28T15:01:35.182Z","avatar_url":"https://github.com/youben11.png","language":"C","funding_links":[],"categories":["Extracurricular Projects"],"sub_categories":[],"readme":"# Youbix\n\n\nYoubix is a simple kernel developed (and still in dev) for learning purposes. If you are new to kernel development then you may find it useful as the code is well documented.\n\n### Why Youbix ?\nSince all powerful kernels end this way ;) youbix was a good choice.\n\n### Architecture\n\nThe Youbix kernel support the x86 architecture but depend mostly on the [8259 PIC](https://en.wikipedia.org/wiki/Intel_8259). It should run without problem on an i386 machine.\n\nBecause of the PIC dependency, we have introduced a version which deal with the hardware not via interrupt but via polling. It should run properly on modern machines that use [APIC](https://wiki.osdev.org/APIC) and don't emulate the 8259 PIC. This version was tested on an x86_64 machine.\n\n### Building the Youbix kernel\n#### Requirements\nThe majority of the tools needed are part of any basic Linux distribution and are under a GPL License (except for nasm : BSD).\n- gcc\n- ld\n- nasm\n- make\n\n#### Build\nThe building process is automated using a makefile. It start by compiling and assembling then linking the object files.\n\nThis is an example of building the kernel on an x86-64 machine.\n\n```bash\n$ cd youbix\n$ make\nnasm -f elf32 kernel.asm -o kerasm.o\ngcc -m32 -fno-stack-protector -c kernel.c -o kerc.o\nnasm -f elf32 interrupt.asm -o interrupt.o\nnasm -f elf32 io.asm -o io.o\ngcc -m32 -fno-stack-protector -c keyboard.c -o keyboard.o\ngcc -m32 -fno-stack-protector -c idt.c -o idt.o\ngcc -m32 -fno-stack-protector -c pic.c -o pic.o\nld -m elf_i386 -T link-script.ld -o kernel kerasm.o kerc.o interrupt.o io.o keyboard.o idt.o pic.o\n$ file kernel\nkernel: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), statically linked, not stripped\n$ file kernel_polling\nkernel_polling: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), statically linked, not stripped\n```\nAs you should see, there is two kernels. The first one deal with the hardware via interrupt and should work fine on an i386 machines. The second one deal with the hardware via polling and should work on all x86 machine.\n\nWe will be using the word kernel in the next sections to refer to the two versions.\n\n### Installation\nYoubix kernel is [multiboot compliant](https://www.gnu.org/software/grub/manual/multiboot/multiboot.html) and can be added as an entry in the GRUB to boot from it. It can also be emulated using [Qemu](https://www.qemu.org/).\n\n#### GRUB\nKeep in mind that Youbix is intended to be run on a specific hardware. See the Architecture section for more information.\n\nYou can still emulate it if you don't have the adequate hardware. See the section below.\n\nI will assume that you are running a Linux distro and have GRUB installed.\n\nAfter building the kernel move it to the /boot directory under the name kernel-\u003cversion\u003e (kernel-1)\n```bash\n$ mv kernel /boot/kernel-1\n```\nor\n```bash\n$ mv kernel_polling /boot/kernel-1\n```\nthen open the /etc/grub.d/40_custom file and add the following its end\n```vi\nmenuentry \"youbix\" {\n  set root=(hd0, 3)\n  multiboot /boot/kernel-1 ro\n}\n```\nyou should replace hd0 by the name of your drive and 3 by the partition number that hold the file.\n\nlast step, run the following command in your terminal\n```bash\n$ sudo update-grub\n```\n\nYou can now reboot your computer and try Youbix :D\n\n\n#### Qemu\nIf you don't have the adequate hardware or don't want to reboot your computer, you can still emulate it in userspace using Qemu.\n\nI will assume that you are running a Linux distro and have Qemu installed.\n\nOpen a terminal and go to the youbix directory then run the following command\n```bash\n$ cd youbix\n$ qemu-system-i386 -kernel kernel\n```\na window should appear with Youbix booting on it.\n\n\n### Debugging\nWe will use Qemu and [gdb-peda](https://github.com/longld/peda) to debug our kernel.\n\nThe first step is to run Qemu with debugging options:\n```bash\n$ qemu-system-i386 -S -gdb tcp::1234 -kernel kernel\n```\nThe -S option freeze CPU at startup. -gdb tcp::1234 tell Qemu to listen on port 1234/tcp.\n\nThen in another terminal, we will run our debugger:\n```bash\n$ gdb\ngdb-peda$ set architecture i386\n#The target architecture is assumed to be i386\ngdb-peda$ target remote localhost:1234\n#Remote debugging using localhost:1234\n#warning: No executable has been specified and target #does not support\n#determining executable automatically.  Try using the \"file\" command.\n#Warning: not running or target is remote\n#0x0000fff0 in ?? ()\ngdb-peda$\n```\nOutput lines are commented. You can now run gdb commands as usual. Enjoy!\n\n### More\n\n#### Protected mode\nIf you are running Youbix from GRUB then keep in mind that you are in the protected mode and the GDT is set up with full access to 4GB of memory-space (0x00000000-0xffffffff). You can read more about protected mode [here](https://wiki.osdev.org/Protected_Mode).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyouben11%2Fyoubix","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyouben11%2Fyoubix","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyouben11%2Fyoubix/lists"}