Home / Case Studies / Adapting U-Boot to Run a Custom Operating System on Rock Pi 4B+
Integra Sources home button.

GET IN TOUCH

Adapting U-Boot to Run a Custom Operating System on Rock Pi 4B+

Background

For manufacturers of industrial and specialized equipment, it is critical to maintain control over both hardware and software aspects of their products. The ability to manage manufacturing, design documentation, and software in-house helps companies reduce their reliance on third-party vendors and respond more quickly to changing market demands.

By securing access to original design files and source code, a company can develop its product in-house, modify the underlying hardware and software and support them throughout their lifecycle.

Industrial control cabinet with a process control system

Request

Integra Sources was approached by a developer and manufacturer of hardware solutions for industrial automation. As part of this project, the company intended to localize the manufacturing of single-board computers (SBC) for use in specialized industrial modules.

Project goals:

  • Audit the design documentation for the single-board computers (Rock Pi 4B+) and evaluate whether it was sufficient for in-house manufacturing.
  • Adapt the U-Boot bootloader to run the client’s custom Linux-based operating system on the target platform.
  • Provide the client with the infrastructure required to modify and build U-Boot independently.

Solution

Design Documentation Audit

The client purchased design documentation and licenses required for in-house manufacturing of Rockchip RK3399-based single-board computers. The original hardware developer provided the files necessary for production and support. At this stage, the client engaged the Integra team to audit the documentation.

As part of this task, we verified:

  • whether the provided files were complete;
  • whether the project could be successfully opened and modified in Altium Designer;
  • whether the design contained any errors;
  • whether manufacturing files could be generated correctly from the Altium project;
  • whether the provided documentation matched the actual hardware sample.

The team revealed several issues. In particular, some files were missing from the project, and the Bill of Materials contained incomplete information about the components used in the design. Additionally, there were compatibility problems between the project files and the latest version of Altium Designer.

Adapting U-Boot for a Custom Linux OS

At this stage, the team had to adapt U-Boot to boot the client’s custom operating system on the target SBC.

U-Boot is an open-source bootloader that runs during the early stages of system startup. It prepares the hardware platform so the operating system can boot. Depending on the platform, the boot process may involve several stages:

  • initializing the hardware required for the boot process;
  • initializing RAM and other components;
  • locating and loading the operating system kernel;
  • transferring control to the operating system kernel.

The bootloader is not universally compatible with every hardware platform: to work correctly with a specific platform, it requires information about the hardware and the appropriate drivers. In order to boot the custom OS on the SBC, we needed to adapt the U-Boot configuration to the target hardware platform.

We decided to divide the work into two steps.

1. Testing the SBC and a Custom U-Boot with Ubuntu

First, we acquired an Ubuntu image designed specifically for the Rock Pi 4B+, booted it on the single-board computer, and verified that the device was operational to rule out any hardware-related issues.

The team then built a custom U-Boot from the source files and replaced the default bootloader in the Ubuntu image with it. The OS successfully booted. Ubuntu served as a convenient test environment. If the operating system booted successfully after replacing the default bootloader with our custom version, we knew that the bootloader had been built and configured correctly for the target platform.

2. Building U-Boot for the Custom Linux Image

After successfully testing our custom U-Boot on Ubuntu, we moved on to the target operating system. To enable support for the Rock Pi 4B+, we modified the bootloader configuration:

  • modified the original DTS files describing the hardware configuration and compiled the corresponding DTB files;
  • configured the build settings.

The result was two output files: u-boot.itb and idbloader.img. The team then replaced the default bootloader in the custom OS image with these files and successfully booted the system on the SBC.

Preparing the Infrastructure for Independent U-Boot Builds

The client’s goal was not just to receive the new bootloader binaries. They also wanted to be able to modify U-Boot and rebuild it for their single-board computers in-house.

To enable this, our team prepared and delivered the necessary infrastructure to the client: a Docker image with an environment for building U-Boot, along with instructions explaining how to generate the required files. We also provided a GitLab CI/CD pipeline to automate the bootloader build process.

Scope of Work

  • Auditing the design documentation to verify its compliance with manufacturing requirements.
  • Creating a custom U-Boot build that enables the client’s OS to boot on the Rock Pi 4B+.
  • Preparing and delivering the infrastructure required to build bootloader binaries independently from the source files.

Technologies

  • Altium Designer was used to audit the design documentation.
  • VS Code was used to modify the U-Boot source files.

Result

The client received a U-Boot build adapted to the target hardware platform, allowing the client's custom Linux-based operating system to boot on the target hardware.

As a result of Integra’s involvement in the project, the client:

  • was able to identify and mitigate risks associated with localizing hardware production;
  • can now modify and rebuild U-Boot for their single-board computers in-house;
  • now has greater control over their product roadmap, which enhances supply chain resilience and establishes a solid foundation for long-term product development.

We use cookies to improve your experience on our website. Our Cookies Policy explains what cookies are, how we use cookies and how third parties we may partner with may use cookies. Please find more information here

Accept