Petra Store Online
  • Home
    • Home – Layout 1
    • Home – Layout 2
    • Home – Layout 3
No Result
View All Result
  • Home
    • Home – Layout 1
    • Home – Layout 2
    • Home – Layout 3
No Result
View All Result
Petra Store Online
No Result
View All Result
Home Electronics

A Practical Guide to Compiling 64-Bit Kernel Modules on the 32-bit Raspberry Pi OS

Karen by Karen
08/12/2025
in Electronics
0
A Practical Guide to Compiling 64-Bit Kernel Modules on the 32-bit Raspberry Pi OS
0
SHARES
1
VIEWS
Share on FacebookShare on Twitter

With the increasing popularity of the Raspberry Pi 64-bit kernel, many developers are concerned about how to successfully compile 64-bit kernel modules on the Raspberry Pi OS, which still runs a 32-bit user space. This article summarizes Zak Kemble’s practical experience and workflow on this topic, detailing compilation environment preparation, compilation steps, and solutions to common problems, helping readers grasp the key points and details of the process.

1. Background and Need Origin

Zak Kemble initially encountered hardware incompatibility issues caused by carrier network switching when developing a cellular-based email reminder device. To simplify hardware and optimize battery life, he turned to a solution based on WiFi communication. He also needed to compile and load modules for the 64-bit kernel on a Raspberry Pi system running a 32-bit OS but a 64-bit kernel.

This scenario is common in real-world projects and various embedded system development scenarios, so a thorough understanding of this process is valuable.

2. System Environment and Preparation

  • Operating System: Raspberry Pi OS 10 (Buster) Lite 32-bit (May 7, 2021)
  • Kernel Version: 5.10.17-v8+ (64-bit Kernel)
  • Driver Module: r8168 v8.049.01 (Realtek Network Driver)

To ensure a smooth compilation process, you need to prepare the following tools and resources:

  • Obtain the r8168 driver source code from the Realtek official website;
  • Install and configure the cross-compilation environment to support the aarch64 architecture;
  • Ensure that the kernel source code and related header files match the 64-bit kernel version used;
  • Prepare necessary build dependencies, such as make, gcc, and bc.

3. Core Compilation Process Analysis

  1. Setting Up the Development Environment and Dependencies

Prepare an Ubuntu ARM64 base system in the build directory for setting up the cross-compilation environment. Download the kernel source code and switch to a branch compatible with the device kernel version.

  1. Compilation Preparation

Run the make modules_prepare command to initialize the compilation environment for external modules and resolve missing module files and link errors.

  1. Cross-Compile Modules

In the driver source code directory, execute the following command:

make -j4 -C /path/to/kernel/source M=$(pwd)/src modules

Specify the correct kernel source code path and cross-compiler to complete 64-bit module compilation.

  1. Module Deployment and Loading

Copy the generated .ko module file to the corresponding kernel module directory:

sudo cp r8168.ko /lib/modules/$(uname -r)/kernel/drivers/net/ethernet/realtek/

sudo depmod $(uname -r)

sudo modprobe r8168

Verify that the module has been successfully loaded and the network interface is active using lsmod and ip link show.

4. Common Problems and Solutions

  • Exec format error: This error is often caused by a mismatch between the module and kernel architecture or missing module preparation steps. Running make modules_prepare and ensuring the cross-compilation environment is correctly configured can effectively avoid it.
  • Missing dependency warning: Missing symbol warnings are often displayed during compilation. In most cases, this will not affect module loading and can be ignored.
  • Kernel Version Mismatch: Configure and use source code and header files consistent with the target kernel version to prevent version conflicts.

5. Technical Highlights and Practical Suggestions

  • Utilizing a cross-compilation environment significantly improves compilation efficiency and flexibility;
  • Precisely control the correspondence between kernel source code and module versions to ensure compatibility;
  • Simplify complex dependency issues through a systematic module preparation process;
  • This process is applicable to module development needs for various 64-bit kernels on 32-bit userspace systems and has broad application value.

Zak Kemble, through detailed steps and practical verification, demonstrates the key to successfully compiling 64-bit kernel modules in common yet complex environments. This article systematically presents his core technical solution, which is suitable for developers to implement as a reference and provides a clear path for a deeper understanding of Raspberry Pi kernel module compilation. We hope this article will help you gain a deeper understanding of cross-architecture module development techniques and promote technological innovation in embedded systems.

Karen

Karen

Related Posts

Restoring a Samsung HT-C460 Home Theater System: A Test of Patience and Detail
Electronics

Restoring a Samsung HT-C460 Home Theater System: A Test of Patience and Detail

08/12/2025
Mail Notifier WiFi Edition: A Smart Mail Reminder Solution with a Minimalist Design
Electronics

Mail Notifier WiFi Edition: A Smart Mail Reminder Solution with a Minimalist Design

08/12/2025
“Unlock the Cosmos: Gskyer AZ Astronomical Refracting Telescope – Your Portal to the Stars”
Electronics

“Unlock the Cosmos: Gskyer AZ Astronomical Refracting Telescope – Your Portal to the Stars”

09/10/2023
Next Post
Anne Hathaway’s 2025 Classic Return: A Fashion Statement in “The Devil Wears Prada 2”

Anne Hathaway's 2025 Classic Return: A Fashion Statement in "The Devil Wears Prada 2"

2025 Celebrity Dog-Walking Outfits: A Relaxed Dance of Fashion and Lifestyle

2025 Celebrity Dog-Walking Outfits: A Relaxed Dance of Fashion and Lifestyle

2025 Summer Gray Jeans Outfits: A Blend of Understated Texture and Versatile Styles

2025 Summer Gray Jeans Outfits: A Blend of Understated Texture and Versatile Styles

Follow Us

Recommended

Unleash Your Inner Athlete with DACORM Percussion Massager

Unleash Your Inner Athlete with DACORM Percussion Massager

2 years ago
Restoring a Samsung HT-C460 Home Theater System: A Test of Patience and Detail

Restoring a Samsung HT-C460 Home Theater System: A Test of Patience and Detail

3 weeks ago
“PETLIBRO Automatic Pet Feeder: The Ultimate Solution for Happy, Healthy Pets!”

“PETLIBRO Automatic Pet Feeder: The Ultimate Solution for Happy, Healthy Pets!”

2 years ago
Elevate Your Culinary Game with the Home Hero Kitchen Utensil Set

Elevate Your Culinary Game with the Home Hero Kitchen Utensil Set

2 years ago

Instagram

    Please install/update and activate JNews Instagram plugin.

Categories

  • Clothing
  • Electronics
  • Home & Kitchen
  • Kids Toys
No Result
View All Result

Highlights

2025 Celebrity Dog-Walking Outfits: A Relaxed Dance of Fashion and Lifestyle

Anne Hathaway’s 2025 Classic Return: A Fashion Statement in “The Devil Wears Prada 2”

A Practical Guide to Compiling 64-Bit Kernel Modules on the 32-bit Raspberry Pi OS

Mail Notifier WiFi Edition: A Smart Mail Reminder Solution with a Minimalist Design

Bella Hadid’s Affordable Summer Dress: The Perfect Balance of Elegance and Practicality

The ’80s Colorful Sneaker Trend Resurrects: A Clash of Retro Spirit and Modern Aesthetics

Trending

Restoring a Samsung HT-C460 Home Theater System: A Test of Patience and Detail
Electronics

Restoring a Samsung HT-C460 Home Theater System: A Test of Patience and Detail

by Karen
08/12/2025
0

For many home theater enthusiasts, the malfunction of a long-standing piece of equipment is often a source...

Copenhagen Fashion Week 2025 Street Style: A Nordic Fashion Manifesto

Copenhagen Fashion Week 2025 Street Style: A Nordic Fashion Manifesto

08/12/2025
2025 Summer Gray Jeans Outfits: A Blend of Understated Texture and Versatile Styles

2025 Summer Gray Jeans Outfits: A Blend of Understated Texture and Versatile Styles

08/12/2025
2025 Celebrity Dog-Walking Outfits: A Relaxed Dance of Fashion and Lifestyle

2025 Celebrity Dog-Walking Outfits: A Relaxed Dance of Fashion and Lifestyle

08/12/2025
Anne Hathaway’s 2025 Classic Return: A Fashion Statement in “The Devil Wears Prada 2”

Anne Hathaway’s 2025 Classic Return: A Fashion Statement in “The Devil Wears Prada 2”

08/12/2025
Petra Store Online

We bring you the best Premium WordPress Themes that perfect for news, magazine, personal blog, etc. Visit our landing page to see all features & demos.
LEARN MORE »

Recent News

  • Restoring a Samsung HT-C460 Home Theater System: A Test of Patience and Detail 08/10/2025
  • Copenhagen Fashion Week 2025 Street Style: A Nordic Fashion Manifesto 08/09/2025
  • 2025 Summer Gray Jeans Outfits: A Blend of Understated Texture and Versatile Styles 08/08/2025

Categories

  • Clothing
  • Electronics
  • Home & Kitchen
  • Kids Toys

[mc4wp_form]

© 2018 JNews - City News Magazine WordPress theme. All rights belong to their respective owners.
JNews is a top selling 2018 WordPress News, Blog, Newspaper & Magazine Theme.

No Result
View All Result
  • Home

© 2025 JNews - Premium WordPress news & magazine theme by Jegtheme.