{"id":15294091,"url":"https://github.com/bobuhiro11/understanding-the-linux-kernel","last_synced_at":"2025-06-29T15:02:57.294Z","repository":{"id":43937932,"uuid":"373749799","full_name":"bobuhiro11/understanding-the-linux-kernel","owner":"bobuhiro11","description":"A set of scripts useful for building, running, and debugging custom Linux kernels","archived":false,"fork":false,"pushed_at":"2024-08-13T14:20:49.000Z","size":61,"stargazers_count":7,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-07T03:45:07.823Z","etag":null,"topics":["kernel","linux","linux-kernel","qemu"],"latest_commit_sha":null,"homepage":"","language":"Shell","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/bobuhiro11.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":"2021-06-04T06:55:54.000Z","updated_at":"2024-08-13T14:20:51.000Z","dependencies_parsed_at":"2024-10-14T22:40:52.128Z","dependency_job_id":null,"html_url":"https://github.com/bobuhiro11/understanding-the-linux-kernel","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/bobuhiro11/understanding-the-linux-kernel","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bobuhiro11%2Funderstanding-the-linux-kernel","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bobuhiro11%2Funderstanding-the-linux-kernel/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bobuhiro11%2Funderstanding-the-linux-kernel/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bobuhiro11%2Funderstanding-the-linux-kernel/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bobuhiro11","download_url":"https://codeload.github.com/bobuhiro11/understanding-the-linux-kernel/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bobuhiro11%2Funderstanding-the-linux-kernel/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262614456,"owners_count":23337276,"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":["kernel","linux","linux-kernel","qemu"],"created_at":"2024-09-30T16:57:28.489Z","updated_at":"2025-06-29T15:02:57.242Z","avatar_url":"https://github.com/bobuhiro11.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# understanding-the-linux-kernel ![](https://github.com/bobuhiro11/understanding-the-linux-kernel/workflows/action/badge.svg)\n\nThis repository contains a set of scripts that are useful for analyzing the Linux kernel. For example, the following versions of the kernel can be built and debugged very concisely on docker without having to worry about dependent packages.\n\n- upstream (kernel v2.6.39)\n- centos6 (kernel v2.6.32-754.35.1.el6)\n- centos7 (kernel v3.10.0-1160.13.1.el7)\n- centos8 (kernel v4.18.0-348.7.1.el8_5)\n- rocky9 (kernel v5.14.0-162.6.1.el9_1)\n- ubuntu20.04 (kernel v5.4.0-65.73)\n- ubuntu22.04 (kernel v5.15.0-43.46)\n\nThese are the distributions that I am familiar with, so they are supported by default, but other versions can be applied as well.\nWhile using this tool, I am reading the book \"Understanding the Linux Kernel, 3rd Edition\".\n\n## Requirements\n\n- linux on x86/64\n- docker\n\n## Usage\n\n```bash\n# Prepare the .config file and build the docker image as the kernel build environment.\n# Also, the kernel code is downloaded here.\nmake prepare\n\n# Generate a userland based on busybox. A simple shell environment and SSH server are included.\nmake busybox/initrd\n\n# Change the build settings of the kernel. If you don't need it, you can skip this step.\nmake menuconfig\n\n# Build the kernel in docker container\nmake bzImage\n\n# Boot the kernel on a qemu virtual machine.\nmake qemu\n\n# Connect to the virtual machine via SSH.\nmake ssh\n```\n\nIf you want to use `gdb` to debug the kernel, replace `make qemu` with the following:\n\n```bash\n# Boot the kernel and wait for the debugger to connect\nmake qemu_freeze\n\n# Connect the debugger to the virtual machine\nmake gdb\n```\n\nThe kernel version can be specified as follows:\n\n```bash\n# centos6 (kernel v2.6.32-754.35.1.el6)\nmake LINUX_VERSION=2_6_32_754_35_1_el6 ...\n\n# centos7 (kernel v3.10.0-1160.13.1.el7)\nmake LINUX_VERSION=3_10_0_1160_31_1_el7 ...\n\n# centos8 (kernel v4.18.0-348.7.1.el8_5)\nmake LINUX_VERSION=4_18_0_348_7_1_el8_5 ...\n\n# rocky9 (kernel v5.14.0-162.6.1.el9_1)\nmake LINUX_VERSION=5_14_0_162_6_1_el9_1 ...\n\n# ubuntu20.04 (kernel v5.4.0-65.73)\nmake LINUX_VERSION=5_4_0_65_73 ...\n\n# ubuntu22.04 (kernel v5.15.0-43.46)\nmake LINUX_VERSION=5_15_0_43_46 ...\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbobuhiro11%2Funderstanding-the-linux-kernel","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbobuhiro11%2Funderstanding-the-linux-kernel","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbobuhiro11%2Funderstanding-the-linux-kernel/lists"}