New u-boot and kernel generation

We are trying to manage GPIOs from u-boot, so first we have to compile, u-boot and kernel. Everything compiles ok, but when we deploy the image to the module, this image appears,

image

Please, could you give some idea why it is happening?

Best Regards,

Our hardware is:
Apalis iMX6D 1GB IT
Custom board base in Apalis Eval Board v1.1
Linux apalis-imx6-10806407 6.1.22-6.2.0 (Reference image Apalis-iMX6 tdx-reference-minimal-image)

Hi, I’m the Toradex AI Assistant. The Toradex Support team will follow up with you shortly!

Did you like my answer?

:+1: :-1:


To manage GPIOs from U-Boot and ensure that your custom U-Boot and kernel images are correctly deployed, you need to follow a few steps carefully. Here are some potential reasons and solutions for the issue you are encountering:

  1. Check U-Boot Configuration:

    • Ensure that the GPIOs are correctly configured in the U-Boot device tree. For example, you need to set the pinmux configuration in the U-Boot device tree source code.
    • Example for setting a GPIO on SODIMM 45 as output:
      &iomuxc {
          pinctrl_gpio: pinctrl_gpio {
              fsl,pins = <
                  MX6QDL_PAD_GPIO_9__GPIO1_IO09 0x1b0b0
              >;
          };
      };
      
      &gpio1 {
          pinctrl-names = "default";
          pinctrl-0 = <&pinctrl_gpio>;
          status = "okay";
      };
      
  2. Recompile U-Boot:

    • After making changes to the device tree, recompile U-Boot and deploy it to the module.
    • Ensure that the U-Boot environment variables are correctly set to use the new device tree.
  3. Kernel Configuration:

    • Ensure that the kernel configuration includes support for the GPIOs you intend to use.
    • For i.MX6 based modules, ensure that CONFIG_POWER_RESET_GPIO is set in the kernel configuration if you are using GPIOs for power management.
  4. Deploying the Image:

    • Make sure you are deploying the correct U-Boot and kernel images to the module.
    • Use the saveenv command in U-Boot to save any changes to the environment variables.
  5. Debugging:

    • Use the U-Boot console to check the state of the GPIOs. You can use commands like gpio status to check the current configuration of the GPIOs.
    • Example commands:
      gpio status -a
      gpio set <pin>
      gpio clear <pin>
      gpio toggle <pin>
      gpio input <pin>
      gpio output <pin>
      
  6. Check for Errors:

    • Look for any error messages during the boot process that might indicate issues with the GPIO configuration or other related settings.

If you follow these steps and still encounter issues, please provide more specific details about the error messages or behavior you are seeing during the boot process. This will help in diagnosing the problem more accurately.

Please, also check if these links can help you solve your problem:

GPIO handling in uboot.

Hi @aarribas

The problem is that your U-boot binary is too big to fit into the eMMC’s boot partition.

Can you describe what you are trying to achieve at the end?

Hi allan.tx
Thanks for the answer. What we are trying to do is just compile the u-boot and then manage GPIOs to be sure that they are set from the beginning of the start-up process.
We have compiled the u-boot, it seems that we were using the wrong file for the u-boot image.
Now we are going to test severeal approaches, because there are no messages from the u-boot once it is loaded.
I will update the progress.
BR