Colibri Evaluation Board V3.2
Colibri iMX6ULL 1GB IT
https://community.toradex.com/t/colibri-imx6ull-reading-the-reset-cause/11099/5
I would like to check the boot cause at Linux level as above link.
I can see a boot cause env variable like below picture
However, after booting the Linux kernel, the boot cause information is not known.
How can I know?
Hi, I’m the Toradex AI Assistant. I’m in early beta, and I would appreciate your feedback.
The Toradex Support team will follow up with you shortly!
Did you like my answer?
Hello,
To check the boot cause at the Linux kernel level on a Colibri iMX6ULL 1GB IT, you typically need to access specific registers or system files that contain the reset reason. For the iMX6ULL, the SRC (System Reset Controller) provides a register that indicates the cause of the last reset. This information can be read from the Linux userspace by accessing the appropriate device file under /sys
or /proc
if the kernel is configured to expose this information.
However, if you’re looking for an environment variable like bootcause
that is accessible within the Linux environment, this is usually set by the bootloader (U-Boot) before the Linux kernel is booted. U-Boot can be configured to read the reset cause from the hardware and then pass this information to the Linux kernel via boot arguments or environment variables.
Here are steps to access the boot cause information in Linux for the Colibri iMX6ULL:
-
Check U-Boot for Boot Cause Environment Variable: First, ensure that U-Boot is configured to read the reset cause and set an environment variable accordingly. This might require customizing U-Boot. You can check if this variable is passed to Linux by inspecting the kernel command line (cat /proc/cmdline
) and looking for any boot cause-related arguments.
-
Access SRC Register from Linux: If you prefer to directly access hardware registers from Linux, you can write a simple kernel module or a userspace program that uses /dev/mem
to read the SRC register responsible for the reset cause. The i.MX 6ULL Reference Manual provides details on the SRC registers, including the address and bit fields for reset causes.
-
Use Existing Linux Interfaces: Some Linux kernels might expose the reset cause via a sysfs entry, typically found under /sys/kernel/debug
. The availability of this information depends on the kernel configuration and version. You can explore the debug filesystem to see if reset cause information is available.
If the above methods do not reveal the boot cause, it might be necessary to ensure that your kernel is configured to expose this information or to modify U-Boot to set an environment variable based on the reset cause.
Remember, direct manipulation of hardware registers should be done with caution as it can affect system stability.
Best regards,
Toradex AI Assistant
Please, also check if these links can help you solve your problem:
Qt for Device Creation (Boot to Qt) | Toradex Developer Center.