Skip the Power off / Reboot/ Return to menu dialogue after running the Toradex Easy Installer

Hi Toradex,

Here is my Environment:
Carry Board: Verdin-Development-Board
SoM: Verdin-iMX8MP
Tezi : “version”: “6.7.0-devel-202405+build.23.modified”

I’ am runing the Toradex Easy Installer from an offline installation (using a USB device) , after I have entered to the Recovery Mode and run the recovery-windows.bat .

I have set the autoinstall to true in the image.json file in the Tezi folder.
So the Torizon OS will be installed automaticlly without the need to:

  • Select the Torizon OS
  • Click on Install
  • Accept the terms

My qusetion is how to skip also the Power off / Reboot/ Return to menu dialogue,

is there any option to fix this issue ?

Best regards
Ahmed49

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

Did you like my answer?

:+1: :-1:


Hello Ahmed49,

To skip the “Power off / Reboot / Return to menu” dialogue after running the Toradex Easy Installer, you can modify the image.json file to include the post-install script that will automatically reboot the system after the installation is complete. Here is how you can do it:

  1. Edit the image.json file:
    Add a post-install script entry to the image.json file. This script will be executed after the installation process is complete.

    {
      "config_format": 1,
      "autoinstall": true,
      "post-install": [
        {
          "type": "shell",
          "script": "reboot"
        }
      ]
    }
    

    This configuration will ensure that the system reboots automatically after the installation without showing the “Power off / Reboot / Return to menu” dialogue.

  2. Ensure the script is executable:
    Make sure that the script specified in the post-install section is executable. In this case, the reboot command is a standard Linux command and should work out of the box.

  3. Test the configuration:
    After making these changes, test the installation process to ensure that it behaves as expected and skips the dialogue.

By adding the post-install script to the image.json file, you can automate the reboot process and avoid manual intervention after the installation is complete.

Best regards,
[Your Name]

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

Toradex Easy installer Wrapup.sh -> Shutdown instead reboot -f.

Hi @Ahmed49

You can set the auto install, accept-licence and auto reboot flags on the tcbuild.yaml file when using torizon core builder.

  easy-installer:
    # >> Output directory of the customized image (REQUIRED):
    local: output_directory
    # >> Information used by Toradex Easy Installer:
    # name: "My customized image"
    # description: "My customized image (description)"
    # licence: files/custom-licence.html
    # release-notes: files/custom-release-notes.html
    # accept-licence: true
    # autoinstall: true
    # autoreboot: true

Check this page for more information on how to configure the toradex easy installer.

Hi @Ahmed49

Did the solution worked for you? We didn’t get any feedback from you.

Hi @allan.tx ,

what if I want to do a power off instead off a reboot (like selecting the power off in the final pop-up menu but automatically)?

Best regards,

Loris

Hi @loris.teq

We still don’t have an auto power-off tag in Torizon Core Builder.
You can, however, use a wrapup_script to power off the device.

Inside the image folder created by Torizon Core Builder, there’s a script called wrapup.sh.
This script is run after a successful installation and can be configured to power off the device.

You just need to add the power off command at the end of the script.

poweroff -f
exit 0

Hi @allan.tx,
I understood. In the meanwhile I tried different commands in the wrapup.sh, but the only one that works is the following:

printf "s" > /proc/sysrq-trigger
printf "o" > /proc/sysrq-trigger

Best regards,
Loris

Hi @loris.teq

Which version of hardware and OS are you using?
You can run this command on to get device information on BSP 6.

tdx-info

Hi @allan.tx ,
I’m using the same carrier board and SoM as @Ahmed49, with a customized distro of the kirkstone-6.x.y Toradex BSP (VERSION_ID=6.4.0-devel).
Regards,
Loris

Hi, @loris.teq!

Does this mean that the command poweroff -f doesn’t work?

If yes, could you please specify how it doesn’t work? What happens when you use it? If, on Toradex Easy Installer’s terminal, you execute the command poweroff -f, what happens?

Best regards,

Hi @henrique.tx,
yes for me the command poweroff -f does not work. At the end of the flashing the usual pop-up appears prompting the three options: Power off / Reboot / Return to menu.
Best regards,
Loris

Hi @loris.teq !

I just tested on a Verdin iMX8MP with Toradex Easy Installer 6.8.0 and 6.4.0 and it worked on both.

/ # poweroff -f
[    6.516432] imx2-wdt 30280000.watchdog: Device shutdown: Expect reboot!
[    6.523652] reboot: Power down

Could you share with a detailed step by step on how you are testing it on your side?

Please be aware that you method using /proc/sysrq-trigger might be source of some issues.

Best regards,

Hi @henrique.tx,
the version of my Easy Installer is 5.4.0. This could be the problem. I will try as soon as I will have a moment.
I just edited the wrapup.sh script as follow:

#!/bin/sh
poweroff -f
exit 0

Then:

  1. put the board in boot mode.
  2. run the easy installer.
  3. easy installer install itself onto the SoM.
  4. insert the pen-drive with the image (auto-installation is enable by “autoinstall”: true in image.json).
  5. monitoring of the procedure by vnc connection to the SoM (I see the installation bar moving forward).
  6. at the end of the installation a pop-up comes out asking the following: Power off / Reboot / Return to menu.

Best regards,
Loris

Hi @loris.teq !

Thanks for the details.

In order to better understand what you are trying to accomplish, could you please share why you would need to specifically shutdown the device after the flash?

Is this related to a production programming on your end?

Best regards,

Hi @henrique.tx,
I just want to flash some SoM with auto-tart of the procedure and power off at the end of it. In this way I know that the flashing is ended and I can move to the next one without the need of a vnc terminal.
It would be better if the poweroff -f command works, but for my goal I’m fine as well with the commands that I found.
Best regards,
Loris

Hi @loris.teq !

Thanks for answering :slight_smile:

Indeed for Toradex Easy Installer 5 there are no poweroff, halt, shutdown.

Since you are fine with your approach, ok then :slight_smile:

Have a great day!

Hi allan.tx,

I was besy the last days.

Thank you for your reply, yes it works fine, i have tried also with the combine command and it works also fine.

Best regards,
Ahmed49