Overview
The requirement was to add support for a custom display on the i.MX6 platform device with Scratchgap BSP, including the migration of changes made to U-Boot and the kernel side in the customer’s dunfell BSP (Board Support Package).
Challenges VoidStarIndia Faced
- Understanding i.MX6 and custom display functionality through datasheets and schematics.
- Modifying U-Boot, the kernel, and the device tree.
- Checking the display functionality by inspecting pinouts using a multimeter and making minor fixes.
- Performing a Yocto build for Torizon OS 7 on the i.MX6 platform device.
VoidStarMedia’s Skillsets/ Knowledge Base Leveraged
- Yocto build system expertise.
- Knowledge of the i.MX6 platform.
- Experience in developing kernel modules, device drivers, and device tree configurations.
VoidStarMedia’s Solution
Since we needed to migrate the old Scratchgap BSP changes for specific GPIOs and display support, and also add Docker support, we proposed using Toradex’s Torizon OS due to its following features:
- Minimal Linux with Docker support.
- Modifications can be made by editing Yocto recipes or modifying the existing image with the help of TorizonCoreBuilder.
The project was divided into the following milestones:
-
Environment Setup
We reviewed the Apalis i.MX6 platform device and Tianma LCD display board specifications, then set up the device accordingly. We analyzed the old Dunfell BSP implementation and its hardware meter switch and navigator switches operations. We also examined the kernel modules, device drivers, and device tree changes made for display support and GPIO handling.
-
Torizon OS 7 build and deployment
We built Torizon OS 7 for the Apalis i.MX6 platform using Toradex documentation, then deployed it on the i.MX6 platform device. We validated it through the UART interface.
-
Enable Display and its operations
We identified the display power interface and touch interface by referring to its datasheet. We enabled the display by configuring the LCD display and backlight in the i.MX6’s device tree. We also enabled the touch driver by adding support for the Ilitek ILI2117 driver in the device tree.
-
Custom GPIO Support
- Migrated the custom GPIO configurations from the customer’s Dunfell BSP to the new Torizon OS 7 Scratchgap BSP
-
TEZI (Torizon Eazy installer) Support via USB boot
We added support for TEZI boot through USB instead of OTG. We modified the U-Boot boot parameters to allow booting through USB on a GPIO-specific event.
-
Fix the Power Off Operation
Previously, the device entered sleep mode instead of shutting down completely. We enabled the regulator power-off functionality by setting REGULATOR POWEROFF in the kernel.
-
Customer drone simulation application through docker
We added support for the customer’s drone simulation application through a Docker container. We prepared a Docker Compose setup with Weston, Avahi, and Chromium support, including the customer’s application. We ensured that the Ethernet and device nodes were visible to the Docker container.
-
Testing And Validation
- We Validate GPIO operation by monitoring the events on /dev/gpios
- Validate Display touch operation by weston calibration testing application
- Did check display brightness by explicitly push events on display’s backlight nodes
- Validate Customer’s application docker container operations.
Outcome
Successfully enabled a custom display on the Apalis i.MX6 platform with full display functionality, including brightness control and touch input. Also ensured the customer’s drone simulation application operated seamlessly in a Docker container on Torizon OS 7.
Technical Know-Hows and Understandings
- Torizon OS customization using Yocto and torizoncore-builder
- Integration of custom hardware (LCD, touch, GPIOs) on i.MX6
- Kernel, U-Boot, and device tree development
- Docker containerization for embedded applications
- Efficient testing and validation processes for embedded systems