Compilar y ejecutar el módulo Joydev en DEBIX con código fuente del kernel

Guía completa para compilar e instalar los módulos joydev y xpad en DEBIX desde el kernel, activar la carga al inicio, verificar funcionamiento y resolver problemas, con información sobre Q2BSTUDIO.

19 ago 2025 • 4 min read • Q2BSTUDIO Team

Inteligencia-Artificial-

Introducción: Este artículo explica cómo compilar e instalar los módulos joydev y xpad en un dispositivo DEBIX usando el código fuente del kernel. También incluye recomendaciones para cargar los módulos de forma permanente y notas de verificación. Al final encontrarás información sobre Q2BSTUDIO, empresa especializada en aplicaciones a medida, software a medida, inteligencia artificial, ciberseguridad y servicios cloud aws y azure.

Comprobar versión DEBIX: ejecuta el comando DebixVersion para revisar la información del sistema y la versión del kernel

Ejemplo de salida del comando DebixVersion

================ Debix Information =================

***HW version : V2.0

***System version : Ubuntu 22.04.1 LTS (V3.3 20230620)

***Lan1 mac : 10:07:23:6d:e7:2a

***Lan2 mac : 10:07:23:6d:e7:29

***Wifi mac : ac:6a:a3:1f:44:89

***BT mac : AC:6A:A3:1F:44:8A

***Kernel : 5.15.71 #1 SMP PREEMPT Tue Jun 20 11:23:38 UTC 2023

***Memory : 2 GB

***CPU : 1.6 GHz

Descargar el código fuente del kernel desde el repositorio oficial

git clone --depth=1 https://github.com/debix-tech/linux cd linux

Generar el archivo de configuración y editar opciones

make imx_v8_defconfig make menuconfig

Dentro de menuconfig habilita las opciones relacionadas con gamepads y joydev. Navega hasta los siguientes apartados y actívalos

--> Device Driver --> Input device support --> Joystick interface

--> Device Driver --> Input device support --> Joysticks/Gamepads

--> Device Driver --> Input device support --> Joysticks/Gamepads --> X-Box gamepad support

--> Device Driver --> Input device support --> Joysticks/Gamepads --> X-Box gamepad support --> X-Box gamepad rumble support

--> Device Driver --> Input device support --> Joysticks/Gamepads --> X-Box gamepad support --> LED Support for Xbox360 controller BigX LED

Compilar el kernel y los módulos cruzando compilador para aarch64 si trabajas desde un host x86_64

export CROSS_COMPILE=~/gcc-arm-9.2-2019.12-x86_64-aarch64-none-linux-gnu/bin/aarch64-none-linux-gnu- export ARCH=arm64 make -j4 make modules_install INSTALL_MOD_PATH=out

Copiar los módulos compilados al dispositivo DEBIX

a) Transferir kernel.tar desde el host al equipo local o al propio DEBIX

scp root@192.168.1.218:/kernel.tar ./

b) Descomprimir kernel.tar

tar -xvf kernel.tar

c) Reemplazar o copiar los módulos extraídos al directorio del kernel en DEBIX. Ajusta la ruta del kernel si tu versión es distinta

cp -r kernel /lib/modules/5.15.71/

d) Cargar el módulo joydev

insmod /lib/modules/5.15.71/kernel/drivers/input/joydev.ko

e) Cargar el módulo xpad

insmod /lib/modules/5.15.71/kernel/drivers/input/joystick/xpad.ko

f) Verificar que xpad y joydev estén cargados correctamente

lsmod

Si prefieres cargar módulos usando modprobe y manejar dependencias

depmod -a modprobe xpad

Hacer la carga persistente al arranque

Añade los nombres de los módulos al archivo /etc/modules para que se carguen automáticamente en el arranque del sistema

echo xpad >> /etc/modules echo joydev >> /etc/modules

Prueba con un gamepad Xbox conectándolo por USB o Bluetooth y verifica la detección mediante herramientas como jstest o evtest según esté disponible en tu sistema

Solución de problemas básicos

- Si insmod devuelve error de versión o símbolos no encontrados verifica que los módulos fueron compilados para la misma versión del kernel que corre en DEBIX

- Usa dmesg para revisar mensajes del kernel tras intentar cargar los módulos

dmesg | tail

- Asegúrate de ejecutar depmod -a después de copiar módulos nuevos

Notas finales y buenas prácticas

- Mantén respaldos del árbol de módulos original antes de reemplazar carpetas en /lib/modules

- Si trabajas con varios kernels numera y organiza las carpetas para evitar conflictos

- Prueba primero en un entorno de desarrollo o con acceso físico al dispositivo para evitar dejar el equipo inservible

Sobre Q2BSTUDIO: Q2BSTUDIO es una empresa de desarrollo de software y aplicaciones a medida que ofrece soluciones integrales incluyendo software a medida, inteligencia artificial e ia para empresas, ciberseguridad, servicios cloud aws y azure, servicios inteligencia de negocio y consultoría en agentes IA y power bi. Nuestro equipo especializado crea aplicaciones a medida orientadas a resultado, integra modelos de inteligencia artificial para automatización y análisis avanzado, y asegura la infraestructura con buenas prácticas de ciberseguridad. Ofrecemos también servicios gestionados en la nube y soluciones de inteligencia de negocio para mejorar la toma de decisiones y el rendimiento de su negocio.

Palabras clave para posicionamiento: aplicaciones a medida, software a medida, inteligencia artificial, ciberseguridad, servicios cloud aws y azure, servicios inteligencia de negocio, ia para empresas, agentes IA, power bi.

Si necesitas asistencia para compilar módulos personalizados, integrar controladores con soluciones IoT o adaptar una solución de software a medida que implemente análisis mediante inteligencia artificial y visualización con power bi, ponte en contacto con Q2BSTUDIO para una evaluación técnica y propuesta de servicios.

A BREAK?

Play for a moment before you go

OUR SERVICES

How we can help you

Artificial intelligence

AI agents, chatbots, and intelligent assistants that automate tasks and serve your customers 24/7 to improve the efficiency of your business.

More info

Software Development

Web, mobile, and desktop applications, intranets, e-commerce, SaaS, and management platforms designed for your company's specific needs.

More info

Cloud services

Migration, infrastructure, managed hosting, high availability, and security on Microsoft Azure and Amazon Web Services to help your business scale without limits.

More info

Cybersecurity and pentesting

Security audits, penetration testing and protection of applications, data and infrastructure on-premise and cloud, with ethical hacking and regulatory compliance.

More info

Business Intelligence

Dashboards and data analysis with Power BI: we integrate your sources, design dashboards and KPIs and turn your data into decisions.

More info

Process automation

We automate repetitive tasks and connect your applications with n8n, Power Automate, Make, and RPA, eliminating manual work and increasing productivity.

More info

Training for Companies

We train your teams in technology with criteria: web development, databases, Git, best practices and security, automation with n8n, artificial intelligence for companies and creation of AI solutions with Azure AI Foundry.

More info

Code Auditing

We audit the code that you, your team or an AI create: we tell you what is good and what to improve, we secure it and make it ready for production, web or app.

More info

AI Image Generation

We create for you the images that your business needs with artificial intelligence: product, networks, advertising, illustration and avatars. You tell us what you want and we deliver it ready to use.

More info

AI Video Generation

We create videos with artificial intelligence for you: promotional, networking, virtual presenters, dubbing and animations. You tell us the idea and we will deliver it assembled and ready to publish.

More info

AI Conversational Avatars

We create conversational avatars with AI – digital humans with a face and voice – that serve your customers and teams with the knowledge of your company, on your website, interactive monitors, WhatsApp or Teams.

More info

Online Marketing and AI

Google Ads, Meta Ads, LinkedIn Ads and AI Engine Positioning (GEO/AEO): we attract customers and make your brand appear where they search for you, also on ChatGPT, Gemini and Perplexity.

More info

Do you have a project in mind?

Tell us your vision and we'll turn it into a software solution. Whatever the scope, we make your idea real.

Live Chat