Torizoncore Builder GRUB support

Greetings!

I was pleasantly surprised to find that the latest TCB (3.10) contains support for handling GRUB2 as a bootloader in TEZI images.

Are there plans to extend this support to custom kernel arguments in the YAML file? Currently, it panics:

[build] => Setting kernel arguments
[build] An unexpected Exception occurred. Please provide the following stack trace to
[build] the Toradex TorizonCore support team:
[build] 
[build] 
[build] Traceback (most recent call last):
[build]   File "/builder/torizoncore-builder", line 222, in <module>
[build]     mainargs.func(mainargs)
[build]   File "/builder/tcbuilder/cli/build.py", line 592, in do_build
[build]     build(args.config_fname, args.storage_directory,
[build]   File "/builder/tcbuilder/cli/build.py", line 555, in build
[build]     fs_changes = handle_customization_section(
[build]   File "/builder/tcbuilder/cli/build.py", line 197, in handle_customization_section
[build]     handle_kernel_customization(props["kernel"], storage_dir=storage_dir)
[build]   File "/builder/tcbuilder/cli/build.py", line 260, in handle_kernel_customization
[build]     kernel_cli.kernel_set_custom_args(
[build]   File "/builder/tcbuilder/cli/kernel.py", line 152, in kernel_set_custom_args
[build]     assert_custom_kargs_compat_image(storage_dir)
[build]   File "/builder/tcbuilder/cli/kernel.py", line 252, in assert_custom_kargs_compat_image
[build]     uenv_txt_path = dt.get_current_uenv_txt_path(storage_dir)
[build]   File "/builder/tcbuilder/backend/dt.py", line 29, in get_current_uenv_txt_path
[build]     assert os.path.exists(path), "panic: missing uEnv.txt in base image!"
[build] AssertionError: panic: missing uEnv.txt in base image!

We would appreciate this capability for e.g. setting video= parameters without needing to rebuild the entire input image via Yocto.

Regards,
~BW

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?

:+1: :-1:


Greetings!

The error you’re encountering with TorizonCore Builder when trying to set custom kernel arguments for a GRUB2 bootloader indicates a compatibility issue with the current implementation. The assertion failure, specifically the “panic: missing uEnv.txt in base image!” message, suggests that the tool is expecting a U-Boot environment (uEnv.txt) to modify kernel arguments, which is not applicable for a GRUB2 managed system.

As of the latest information available to me, extending support for custom kernel arguments in YAML configuration files, especially for systems using GRUB2 as a bootloader, is a logical next step in the evolution of TorizonCore Builder. However, specific plans, timelines, or the current status of such feature development are not within my knowledge scope.

The error you’ve encountered is a clear indication that the current version of TorizonCore Builder you’re using does not fully support modifying GRUB2 configurations directly through the YAML file for custom kernel arguments. This limitation is particularly relevant for scenarios where you wish to adjust boot parameters without the need to recompile the entire image, such as setting video= parameters.

For now, a workaround would involve manually modifying the GRUB2 configuration files within your custom TorizonCore image or using a post-install script to adjust these settings after the image has been deployed. This approach, while not as streamlined as a YAML configuration change, allows for the customization of boot parameters in GRUB2-based systems.

Keep an eye on future releases of TorizonCore Builder for improvements and new features that may address this limitation. The Toradex development team is continuously working on enhancing the capabilities of their tools based on user feedback and evolving requirements.

Best regards,
Toradex AI Assistant

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

Building External Kernel Modules With Torizon | Toradex Developer Center.

Greetings @bw908,

As you have noticed our team has slowly been adding support to TorizonCore Builder for “raw image” types (i.e. WIC images) that come from Common Torizon builds. At the moment we’ve only added support for basic functions like unpacking the image and applying basic OSTree customization.

I see we have in our backlog, we have plans to add support for more advanced operations like building kernel modules and such in the future. Though this will come steadily in time from what I can tell.

So I guess to answer your question shortly, yes there are plans to add further support for raw images.

Do you have a strict timeline regarding this? Also for what hardware is this if you don’t mind me asking?

Best Regards,
Jeremias

1 Like

Thanks for the follow-up.

We don’t have a strict timeline on needing this as we are capable of doing the full Yocto build for equivalent behaviour and I am mostly interested in the roadmap for the future of the tool - so I’m very excited to hear that more advanced capabilities will be supported, such that we can move some of our customizations from the “raw” yocto level to a higher level that has less of a learning curve.

For this application we are developing a product with an Intel NUC on Torizon using the intel-corei7-64 build.

We also use CommonTorizon on a Raspberry Pi, but of course the boot environment there is yet another beast; we have mechanisms to do what we want there but both kernel parameters and customizing the devicetree configuration are on our radar as nice-to-have capabilities directly in TorizonCore builder. We’re happy to have a more direct discussion on our use-cases (with some show&tell) privately if it’s of interest to you.

Best,
~BW908

I see, so it’s not a critically blocking issue for you or anything. Well at the moment I don’t have a timeline of when certain features will get support and when. Feedback like yours does help prioritize and schedule things on our planning, but it’s still not set in stone.

Best Regards,
Jeremias

1 Like

Understood, we appreciate the dedication to hearing and considering our use cases :slight_smile:

Some additional feedback based on findings today while using TCB 3.10:

  • TCB’s Output WIC images are owned by root/root, which is problematic on linux build hosts.
  • The WIC images are large by default (1.7GB) but compress well due to empty allocated space. Support for e.g. (g)zip-compressed (now 312 MB) WIC images would be a nice quality-of-life improvement

Regards,
~BW908

Thanks for the feedback. Our work with supporting raw images in TorizonCore Builder is more of a first best attempt, since admittedly our focus is still with our own hardware platforms. That said improvements are expected in time.

Best Regards,
Jeremias

1 Like