This repository contains the source code and documentation for an Embedded Linux project, developed as part of the SETI - Embedded Linux course. The project focuses on Linux kernel compilation, device driver development, user-kernel communication, and I2C-based peripheral interaction, all within an ARM-based emulation environment.
A key aspect of this project is the simulation of an ARM Cortex-A9 processor using QEMU, allowing the deployment and testing of low-level Linux systems and custom kernel drivers on an embedded ARM architecture.
-
ARM Cortex-A9 Emulation & Linux Kernel Compilation
- Compiled a Linux 5.15.6 kernel for an ARMv7-A architecture.
- Simulated an ARM CoreTile Express A9x4 Cortex-A9-based expansion board using QEMU.
- Used a custom QEMU version with an integrated ADXL345 accelerometer emulation.
-
Custom I2C Device Driver (pilote_i2c)
- Developed a Linux kernel driver for the ADXL345 accelerometer.
- Implemented probe and remove functions using the Linux I2C driver model.
- Modified the Device Tree for proper driver discovery.
-
User-Kernel Communication via Misc Framework
- Exposed device data to user space using a character device interface.
- Implemented read and ioctl functions for efficient user-kernel interaction.
-
Interrupt Handling & FIFO Buffering
- Configured hardware interrupts to efficiently collect accelerometer data.
- Managed a FIFO buffer to store sensor readings asynchronously.
-
Concurrency & Multi-Threading Support
- Implemented thread synchronization mechanisms for multi-process access.
- Used spinlocks to ensure safe concurrent access to shared resources.
embedded-linux-project/
├── 📁 initramfs_busybox/ # Initramfs with BusyBox (minimal Linux root filesystem)
├── 📁 initramfs_simple/ # Basic initramfs setup for QEMU booting
├── 📁 pilote_i2c/ # ADXL345 I2C device driver source code
├── 📁 qemu-system-arm/ # QEMU binaries and configuration files
├── 📄 .gitignore # Git exclusion rules
└── 📄 README.md # Project documentation (you are here)
- QEMU (ARM Cortex-A9 emulation)
- Linux Kernel 5.15.6
- ARM Cross-Compiler (
arm-linux-gnueabi-gcc
) - BusyBox (for minimal root filesystem)
- Build Essentials (
make
,gcc
,binutils
)
- Clone the Repository
git clone https://github.com/coiti4/embedded-linux-project.git cd embedded-linux-project
- Compile the Linux Kernel for ARM
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- zImage dtbs modules
- Start QEMU with ARM Cortex-A9 Emulation
./qemu-system-arm -M vexpress-a9 -kernel zImage -dtb vexpress-v2p-ca9.dtb -nographic
- Build and Load the I2C Device Driver
cd pilote_i2c make insmod adxl345.ko
- Test with the User-Space Application
./user_app/main
- Successfully compiled and booted Linux on an ARM Cortex-A9 platform.
- Developed a functional I2C device driver for the ADXL345 accelerometer.
- Implemented interrupt-driven data collection with an efficient FIFO buffer.
- Integrated concurrent access control mechanisms for multi-threaded execution.
- Enhance the driver with additional configuration options for power management.
- Implement DMA support for optimized data transfer.
- Expand user-space utilities to provide a more comprehensive interface.
- Agustín Coitinho
- Arthur Ruback
- Irene Asensio
This project is licensed under the MIT License. See LICENSE for details.