Skip to content

Instantly share code, notes, and snippets.

View Justin0dev's full-sized avatar

Justin Sainson Justin0dev

View GitHub Profile
@Justin0dev
Justin0dev / gist:66d56e8ca0892c6d22369a6f54983fbb
Last active December 2, 2025 09:47
Recompile Linux Kernel To Enable HUGEPAGES On Raspberry Pi 5

HUGEPAGES is diabled by default in the Raspberry Pi Linux kernel. To enable HUGEPAGES the kernel must be recompiled.

Tested and works as expected on Raspberry Pi 4B, 400, CM4, and 5.

Install dependencies

sudo apt update sudo apt install -y git build-essential bc bison kmod cpio flex libncurses5-dev libelf-dev libssl-dev

Clone the Raspberry Pi Linux Kernel Repository