Water Environment Protection at Hydroelectric Installations

Bootloader (MLO) modification for safety-critical system in water environment protection

Water Environment Protection at Hydroelectric Installations

Project Details

  • Task : MLO and U-Boot modification
  • Completion : July 2016

Client

Polish company specializing in environmental protection device manufacturing

Challenge

The client developed an advanced fish deterrent system for hydroelectric plants, using an electric field (controlled electrodes) to guide fauna to fish passages. During testing of custom hardware based on the Sitara AM335 processor, a critical risk was identified: after an uncontrolled restart (e.g., power loss), GPIO lines controlling the electrodes entered an undefined state. This could lead to unintended electrode activation and fish electrocution long before the main control application started.

Solution

The problem occurred at the earliest stage of system startup – before the Linux kernel and user-space applications had a chance to take control. The solution required intervention at the lowest possible software level.

My role involved deep modification of MLO (Memory Loader), the first stage of the Sitara AM335 processor bootloader. I introduced custom initialization code that was executed immediately after the processor ROM code. This code:

Identified the specific version of the client’s hardware.

Force-set all critical GPIO lines (controlling electrodes) to a safe, inactive state.

Transferred control to the next bootloader stage (U-Boot) only after ensuring full hardware layer safety.

Result

The MLO modification 100% eliminated the risk of accidental electrode activation. The system achieved deterministic and fully safe behavior during every startup cycle, which was a key requirement for device approval to operate in the natural environment.

Technologies Used

Processor: TI Sitara AM335 (ARM Cortex-A8 Architecture)

Language: C, Assembly (for low-level initialization)

System: MLO (First-Stage Bootloader), U-Boot

Tools: TI Code Composer Studio, JTAG Debugger, ARM Toolchain

Concepts: Boot sequence, Low-level hardware initialization, GPIO pin multiplexing, System safety