{"id":18387957,"url":"https://github.com/dorydev/linuxfromscratch","last_synced_at":"2026-02-15T01:03:02.439Z","repository":{"id":217192611,"uuid":"743229105","full_name":"dorydev/LinuxFromScratch","owner":"dorydev","description":"Simple kernel (will be upgraded later)","archived":false,"fork":false,"pushed_at":"2025-03-06T08:43:27.000Z","size":4393,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-17T03:43:45.196Z","etag":null,"topics":["c","grub","kernel"],"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/dorydev.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,"zenodo":null}},"created_at":"2024-01-14T18:01:59.000Z","updated_at":"2025-03-06T08:43:30.000Z","dependencies_parsed_at":"2024-02-01T10:49:45.673Z","dependency_job_id":"939c074a-144d-427c-a6c7-21e63be8d410","html_url":"https://github.com/dorydev/LinuxFromScratch","commit_stats":null,"previous_names":["dorydev/linuxfromscratch"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/dorydev/LinuxFromScratch","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dorydev%2FLinuxFromScratch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dorydev%2FLinuxFromScratch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dorydev%2FLinuxFromScratch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dorydev%2FLinuxFromScratch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dorydev","download_url":"https://codeload.github.com/dorydev/LinuxFromScratch/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dorydev%2FLinuxFromScratch/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29463538,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-15T01:01:38.065Z","status":"ssl_error","status_checked_at":"2026-02-15T01:01:23.809Z","response_time":53,"last_error":"SSL_read: 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":["c","grub","kernel"],"created_at":"2024-11-06T01:29:42.516Z","updated_at":"2026-02-15T01:03:02.390Z","avatar_url":"https://github.com/dorydev.png","language":"C","readme":"# 🐧 Linux From Scratch\r\n\r\nA simple Linux-based kernel written in C and x86_64 assembly.\r\n\r\n## 📋 Table of Contents\r\n\r\n- [📖 Project Overview](#project-overview)\r\n- [🔧 Prerequisites](#prerequisites)\r\n- [⚙️ How to Compile](#how-to-compile)\r\n  - [📝 Compile Assembly and C Files](#compile-assembly-and-c-files)\r\n  - [🔗 Link Object Files](#link-object-files)\r\n  - [💿 Create ISO File with GRUB](#create-iso-file-with-grub)\r\n  - [🚀 Launch in QEMU](#launch-in-qemu)\r\n- [💡 Usage](#usage)\r\n\r\n## 📖 Project Overview\r\n\r\nThis project aims to create a minimal Linux-based operating system from scratch. It involves writing a kernel in C and assembly, setting up a bootloader, and creating an ISO image that can be run in a virtual machine.\r\n\r\n## 🔧 Prerequisites\r\n\r\nEnsure you have the following tools installed:\r\n- grub\r\n- nasm\r\n- gcc\r\n- xorriso\r\n- qemu\r\n\r\nAlternatively, you can use the `build.sh` script to install the dependencies:\r\n\r\n```sh\r\n./build.sh\r\n```\r\n\r\n## ⚙️ How to Compile\r\n\r\n### 📝 Compile Assembly and C Files\r\n\r\nCompile the assembly and C files into object files using nasm and gcc:\r\n\r\n```sh\r\nnasm -f elf32 boot.s -o boot.o\r\ngcc -m32 -ffreestanding -nostdlib -c kernel.c -o kernel.o\r\n```\r\n\r\n### 🔗 Link Object Files\r\n\r\nLink the object files to create the kernel binary:\r\n\r\n```sh\r\nld -m elf_i386 -T linker.ld -o kernel.bin boot.o kernel.o\r\n```\r\n\r\n### 💿 Create ISO File with GRUB\r\n\r\nCreate an ISO file using grub:\r\n\r\n```sh\r\ngrub-mkrescue -o LinuxFromScratch.iso LinuxFromScratch/*\r\n```\r\n\r\n### 🚀 Launch in QEMU\r\n\r\nOpen the project folder in your terminal and type:\r\n\r\n```sh\r\ncd LinuxFromScratch\r\nqemu-system-i386 -cdrom LinuxFromScratch.iso\r\n```\r\n\r\nAlternatively, you can use the Makefile for compilation:\r\n\r\n- To build the kernel binary:\r\n\r\n```sh\r\nmake\r\n```\r\n\r\n- To create a bootable ISO image:\r\n\r\n```sh\r\nmake iso\r\n```\r\n\r\n- To clean up the build files:\r\n\r\n```sh\r\nmake clean\r\n```\r\n\r\n- To rebuild the project:\r\n\r\n```sh\r\nmake re\r\n```\r\n\r\n- To run the kernel directly:\r\n\r\n```sh\r\nmake run\r\n```\r\n\r\n- To run the kernel with GRUB:\r\n\r\n```sh\r\nmake rungrub\r\n```\r\n\r\n## 💡 Usage\r\n\r\nOnce the ISO is created and launched in QEMU, the kernel will display \"HELLO WORLD\" on the screen. This demonstrates the basic functionality of the kernel and its ability to interact with the VGA buffer.\r\n\r\n**Congratulations, it works!**","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdorydev%2Flinuxfromscratch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdorydev%2Flinuxfromscratch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdorydev%2Flinuxfromscratch/lists"}