I would like to create a U-Boot image

Hello,

I would like to create a U-Boot image that includes modified environment variables and ideally has access to an mSATA SSD installed on an Apalis Ixora motherboard.

Are there any guides for this?

Is it possible that newer U-Boot versions allow SATA access?

Is there a configuration that best meets my requirements, and if so, which one?

My current setup is that I created a U-Boot image from the source code, copied it into an EasyInstaller image, edited the image.json file, and was actually able to install this exact U-Boot image using EasyInstaller without crashing the system.

In my version, the memory addresses were incorrect, which can be fixed later, but that’s not the point.

Best
Gerald

Dear @gerko,

Thank you for reaching out with your questions regarding U-Boot customization and SATA access on the Apalis Ixora platform. May I ask what specific Apalis module you are using?

You’re on the right track with building U-Boot from source and integrating it into an Easy Installer image. For a step-by-step guide, please refer to our official documentation:
Building U-Boot from Source Code

This guide covers fetching the source, applying customizations (including environment variables), and building the image.

You can modify default environment variables by editing the include/configs/<board>.env file in the U-Boot source tree. After building, these changes will be embedded in your U-Boot binary. Alternatively, you can fw_setenv tool to set variables post-installation. This would then set the variables, but this is not really a viable production solution.

Regarding the access of SATA on newer U-Boot versions, this would have to be checked. I have some questions regarding this:

  • newer than what version are you looking for? It might be that some downstream versions might have it, or potentially some newer upstream ones do.
  • Are you using Torizon? In that case you could run a script in the Torizon core builder to aid you.

Best regards,
Collin

Hi @collin.tx ,

I would like to implement this for an Apalis iMX8QM module on a slightly modified circuit board derived from the Ixora Carrier Board.

OK … I have already used this. I was able to create a new u-boot image, however I couldn’t get the SATA functionality to work.

As of now, I am using the following u-boot version like the one that comes with these images:
apalis-imx8-Tezi_6.8.4.

The most important question: Is it even possible? (access the sata ssd from u-boot)

And if so, is it perhaps already implemented in some u-boot config, so that I can use this configuration directly or only need to modify it slightly?

Yes, I use the Torizon IDE to develop C# and C applications.

I also use the Torizon CoreBuilder commands to customize the images.
Is it possible to edit the u-boot (image | enviroment vars) with this?

Best regards
Gerald

SATA Support in U-Boot

Unfortunately, SATA access from U-Boot on the Apalis iMX8 modules is not currently supported(1). According to the community discussions, mainline U-Boot doesn’t support video displays on i.MX8-based modules, and similar limitations exist for SATA functionality(1).

The Apalis iMX8QM does include SATA-III connectivity(2), but this is primarily accessible from the Linux kernel, not from U-Boot. The SATA interface is available once Linux boots, as documented in our SATA support guide(3).

U-Boot Environment Variable Customization

For modifying U-Boot environment variables, you have several approaches:

1. Build-Time Customization

You can modify environment variables at compilation time by editing the board-specific configuration files(4). The default environment variables are set during compilation and built into the U-Boot binary(4).

2. Runtime Modification

You can modify variables using U-Boot commands(5):

> setenv myvar myvalue
> saveenv

(5)

3. TorizonCore Builder Integration

Since you’re using Torizon, you can potentially use TorizonCore Builder to customize the U-Boot environment. However, this would still be subject to the same hardware limitations regarding SATA access.

Important Considerations

When working with U-Boot environment variables, be aware that:

  • Using setenv only changes values in RAM(4)
  • You must use saveenv to make changes permanent(4)
  • When the environment is saved, it can have unexpected consequences as the entire environment is saved, not just the changed variable(4)

Alternative Approach

Since SATA access from U-Boot isn’t available, consider:

  1. Early Linux Boot: Configure your system to access the SATA SSD immediately after Linux kernel initialization
  2. Custom Boot Script: Create a boot script that handles your requirements once Linux has loaded and SATA is available
  3. Network Boot: If you need early access to external storage, consider network-based solutions

The SATA functionality works well once Linux is running, with good performance characteristics on the Apalis iMX8 platform(3).

Best regards,
Toradex AI Assistant.


Did you like my answer? :+1: :-1:

If I answered your question, please tick the “Solution” checkbox.

For follow-up questions to me, please use @ToradexAI in your post.

How can I customize the U-Boot enviroment over TorizonCoreBuilder?
Setting EnviromentVars? That would be nice.

Hello @gerko,

Unfortunately, this is not directly supported.
However, you could automate this by editing the u-boot-initial-env-sd file that is part of the TorizonCore Builder output.

Best Regards,
Bruno