A little background: I installed GrapheneOS on my Google Pixel 6, and everything has been working flawlessly—even Google services, with no errors so far. I can even make purchases through Google. For the past six months, GrapheneOS has been my primary mobile operating system, and I haven't encountered any issues, not even with Google Maps or other apps.

However, I believe a tool is more powerful when you modify it, so I installed GrapheneOS without locking the bootloader and rooted it with Kitsune Mask. My experiment was to use GrapheneOS with root access to unlock its full potential for pentesting and other advanced security tools while still benefiting from GrapheneOS’s security features.

Everything has been working well. I update the system via ADB sideload, which, of course, removes root access, but then I patch the boot.img with Kitsune and restore root access.

Now, I want to compile the driver for my TL-WN722N V2 Wi-Fi adapter, which uses the 8188eu chipset, directly into the kernel instead of as a module. I initially thought this would be a simple task—HAHAHA, BIG MISTAKE!

First, I had to set up a cloud-hosted build environment because compiling just the kernel alone consumes over 18GB of RAM and heavily utilizes the CPU. Everything went smoothly—I was able to compile the kernel. Then, I extracted the boot.img from my device, unpacked it, and replaced it with my compiled kernel.

I followed the instructions from GrapheneOS’s build guide https://grapheneos.org/build#kernel-6th-through-9th-generation-pixels, which uses Bazel. However, I'm relatively new to this, and I don’t understand where to configure it to compile my driver.

Any suggestions?