{"id":28003086,"url":"https://github.com/mrinalxdev/bootloader","last_synced_at":"2025-05-09T01:49:30.582Z","repository":{"id":281877668,"uuid":"946716809","full_name":"mrinalxdev/bootloader","owner":"mrinalxdev","description":"Built a bootloader and a small kernel in C ","archived":false,"fork":false,"pushed_at":"2025-03-11T15:44:37.000Z","size":4,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-09T01:49:27.310Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/mrinalxdev.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":"2025-03-11T15:11:06.000Z","updated_at":"2025-03-29T11:23:08.000Z","dependencies_parsed_at":"2025-03-12T09:30:57.673Z","dependency_job_id":null,"html_url":"https://github.com/mrinalxdev/bootloader","commit_stats":null,"previous_names":["mrinalxdev/bootloader"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrinalxdev%2Fbootloader","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrinalxdev%2Fbootloader/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrinalxdev%2Fbootloader/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrinalxdev%2Fbootloader/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mrinalxdev","download_url":"https://codeload.github.com/mrinalxdev/bootloader/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253176438,"owners_count":21866142,"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":[],"created_at":"2025-05-09T01:49:30.120Z","updated_at":"2025-05-09T01:49:30.568Z","avatar_url":"https://github.com/mrinalxdev.png","language":"C","readme":"# Building Bootloader Simulation\n\n## Project Overview\n\n### Bootloader (`bootloader.c`)\n- **Disk Detection**: Added `detect_disk()` to verify disk presence.\n- **Write Sector**: Added `write_sector()` for potential future use.\n- **Memory Map**: Added `build_memory_map()` to detect memory regions using BIOS calls.\n- **Hex Printing**: Added `print_hex()` for better debugging output.\n- **Verbose Output**: More status messages for each step.\n\n### Kernel (`kernel.c`)\n- **Interrupt Setup**: Added `setup_idt()` to initialize a basic Interrupt Descriptor Table.\n- **Memory Initialization**: Added `init_memory()` to simulate memory management.\n- **Simple Shell**: Added `simple_shell()` and `handle_keyboard()` for basic user interaction (responds to A, B, C keys).\n- **Hex Printing**: Added `print_hex()` for consistency with bootloader.\n- **More Functionality**: Expanded startup sequence with delays and additional steps.\n\nLinux (Recommended)\n\nInstall dependencies:\nbashCopysudo apt-get update\nsudo apt-get install gcc binutils make qemu-system-i386\n\nCreate build script (build.sh):\nbashCopy#!/bin/bash\n\n# Compile bootloader and kernel\ngcc -m32 -ffreestanding -c -o bootloader.o bootloader.c\ngcc -m32 -ffreestanding -c -o kernel.o kernel.c\n\n# Link bootloader and kernel\nld -m elf_i386 -Ttext 0x7C00 -o bootloader.elf bootloader.o\nld -m elf_i386 -Ttext 0x10000 -o kernel.elf kernel.o\n\n# Extract binary files\nobjcopy -O binary bootloader.elf bootloader.bin\nobjcopy -O binary kernel.elf kernel.bin\n\n# Create floppy disk image\ndd if=/dev/zero of=floppy.img bs=512 count=2880\ndd if=bootloader.bin of=floppy.img conv=notrunc\ndd if=kernel.bin of=floppy.img seek=1 conv=notrunc\n\n# Run in QEMU\nqemu-system-i386 -fda floppy.img\n\nMake build script executable:\nbashCopychmod +x build.sh\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrinalxdev%2Fbootloader","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmrinalxdev%2Fbootloader","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrinalxdev%2Fbootloader/lists"}