Giter Site home page Giter Site logo

toradex / vscode-torizon-templates Goto Github PK

View Code? Open in Web Editor NEW
11.0 7.0 17.0 11.71 MB

VS Code Torizon Integrated Development Environment Templates

License: MIT License

Dockerfile 21.00% C# 14.35% HTML 2.84% JavaScript 1.04% CSS 1.68% TypeScript 0.03% Shell 9.75% PowerShell 34.20% Makefile 0.85% C++ 0.32% QML 0.66% QMake 0.39% Java 1.13% Rust 0.13% Python 9.85% CMake 0.81% GDB 0.06% C 0.03% Zig 0.88%

vscode-torizon-templates's Introduction

VS Code Torizon Templates

This repository maintains the templates used in conjunction with the VS Code Torizon Integrated Development Environment Extension. Focusing in the VS Code for automation between the development environment for remote debug, remote deploy of containerized applications for Toradex TorizonCore easy-to-use Industrial Linux Software Platform.

Toradex Supported Templates

ℹ️ Toradex Supported Templates are templates with development stacks commonly used by customers of the Torizon platform and are maintained by the Torizon team at Toradex.

⚠️ Support for x86-64 and riscv64 architectures are experimental.

TEMPLATE DESCRIPTION RUNTIME LANGUAGE HW ARCH FOLDER
C++ Makefile Console Application libc C++     cppConsole
C++ CMake Console Application libc C++    cmakeConsole
C++ Qt 6 QML Application Qt 6 C++ / QML     cppQML
.NET 8 C# Console Application .NET 8.0 C#     dotnetConsole
.NET 6 C# Uno Platform Skia.GTK .NET 6.0 C#     dotnetUno
ASP.NET 8 Blazor Application ASP.NET 8.0 C#     aspnetBlazor
Python 3 Console Application Python 3 Python 3   python3Console
Generic Template (Without Language) None None     genericTemplate

Partner Templates

Partner templates are contributions that come from Toradex partner network associates:

TEMPLATE DESCRIPTION RUNTIME LANGUAGE HW ARCH FOLDER
C++ Slint Application Slint 1.0 C++   cppSlint
Rust Slint Application Slint 1.0 Rust   rustSlint

Contributing

We encourage you to also contribute templates. The community supported templates can also be used in the VS Code Torizon Integrated Development Environment Extension:

Community Supported Templates

⚠️ Community Supported Templates are templates with emerging development stacks or unstable technology stacks and are maintained by the Torizon community.

TEMPLATE DESCRIPTION RUNTIME LANGUAGE HW ARCH FOLDER CONTRIBUTOR
Rust Console Application libc Rust   rustConsole  @skkywalker
Java Swing JFrame Application JRE Java   javaForms  @microhobby
Node.js TypeScript Application Node.js TypeScript   nodeJSTypeScript  @microhobby
Node.js JavaScript Electron Application Electron JavaScript   nodeElectron  @microhobby
Mono 4.7 C# Windows Forms Application .NET 4.7 C#   monoCsharpForms  @microhobby
.NET 6 C# Uno Platform Frame Buffer .NET 6.0 C#   dotnetUnoFrameBuffer  @microhobby
.NET 6 C# Avalonia Frame Buffer DRM .NET 6.0 C#   dotnetAvaloniaFrameBuffer  @microhobby
.NET 6 C# Avalonia GTK MVVM .NET 6.0 C#   dotnetAvalonia  @microhobby
Gambas3 Form Project Gambas3 Visual Basic   gambasForms  @microhobby
Python 3 Pyside 2(Qt5) QML Pyside 2 Python 3   python3Pyside2QML  @andreriesco
C Makefile Console Application libc C     cConsole  @hiagofranco
Zig Console Application no-libc Zig   zigConsole  @kassane
Java Swing JFrame Application .NET 8.0 C# dotnetUno5  @microhobby
Node.js TypeScript Application .NET 8.0 C# dotnetUno5FrameBuffer  @microhobby

vscode-torizon-templates's People

Contributors

andreriesco avatar embdur avatar escherstair avatar grilohbg avatar hiagofranco avatar kassane avatar leograba avatar leonheldattoradex avatar lucas-akira avatar lucas-tdx avatar microhobby avatar skkywalker avatar tronical avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

vscode-torizon-templates's Issues

Missing the step that performs the apply torizon packages on the Dockerfiles of the Rust templates

The following apply torizon packages step are missing on the Dockerfiles of the Rust templates:

# your regular RUN statements here
# Install required packages
RUN apt-get -q -y update && \
    apt-get -q -y install \
# DO NOT REMOVE THIS LABEL: this is used for VS Code automation
    # __torizon_packages_prod_start__
    # __torizon_packages_prod_end__
# DO NOT REMOVE THIS LABEL: this is used for VS Code automation
    && apt-get clean && apt-get autoremove && \
    rm -rf /var/lib/apt/lists/*
    ```

Sharing a containerized application

Hi,

I'm trying to share a production prototype with my client but I'm having trouble due to the application being containerized and having very little experience with docker.

For context, the application is based on the AvaloniaFrameBuffer template.

My idea was to save a docker image and send it alongside with the docker-compose.yml and built dotnet project. Possibly create a custom deploy script for them.

  1. Copy over the docker-compose.yml and docker-image.tar to board
  2. Load the image via 'docker load'
  3. Run 'docker compose up' to start the container
  4. And finally copy over the built application into the container.
    This happens all well but nothing happens afterwards. The container just sits blank. It's most likely waiting for a command to run the image but I can't figure out how to do it.

Thanks in advance

Avoid random position of parameters when creating docker-compose.prod.yml

Every time I run the task create-production-image, the docker-compose.prod.yml is overwritten by a new file with fields in a different order.

Since I want to keep the file under Git, this makes it hard to review what are real changes and what are random property line changes. It would be nice to only modify the things that were changed in the original docker-compose.yml.

Add hadolint (or another Dockerfile linter) to the extensions.json

This is a feature request.

I am guiding a new intern that don't know much about Docker (much like several people coming from traditional non-container Linux, or Windows). I noticed he doing some things that are not best practices on the Dockerfile.

I just saw that hadolint has an extension (https://marketplace.visualstudio.com/items?itemName=exiasr.hadolint) and though that it would be nice if new projects created with our extension recommended to install this extension here.

I'm not sure if this must be done at template level, or extension level, sorry if this is not the right place.

`try-update-template` and `try-update-template-accepting-all` do not work

Hi all!

As requested, creating a new issue from the discussion on #163.

Here is my tasks.json.

You can see that is indeed using docker-compose instead of docker compose. I tried to overcome it by triggering both try-update-template and try-update-template-accepting-all, but tasks.json was not modified/updated. In fact, I could not find out what changed... 🤔

After try-update-template-accepting-all, I see on the DEBUG CONSOLE:

You are about to accept all incoming changes from the updated template
If the project is not versioned there is no way back
Accept all changes? [y/n]: y
⚠️  project updater updated, running it again                                 
You are about to accept all incoming changes from the updated template
If the project is not versioned there is no way back
Accept all changes? [y/n]: y
✅ always accept new                                                         
Applying common tasks ...
Renaming file contents ...                                                   
/path/to/project/testqt/.conf/tmp/__change__.pro
/path/to/project/testqt/.conf/tmp/.gitignore
/path/to/project/testqt/.conf/tmp/.gitlab-ci.yml
/path/to/project/testqt/.conf/tmp/build-application.yaml
/path/to/project/testqt/.conf/tmp/c_cpp_properties.json
/path/to/project/testqt/.conf/tmp/docker-compose.yml
/path/to/project/testqt/.conf/tmp/Dockerfile
/path/to/project/testqt/.conf/tmp/Dockerfile.debug
/path/to/project/testqt/.conf/tmp/launch.json
/path/to/project/testqt/.conf/tmp/README.md
/path/to/project/testqt/.conf/tmp/tasks-next.json
/path/to/project/testqt/.conf/tmp/c_cpp_properties.json
/path/to/project/testqt/.conf/tmp/launch.json
/path/to/project/testqt/.conf/tmp/tasks-next.json
✅ common                                                                    
✅ specific
✅ Update done

But tasks.json remains the same (it still uses docker-compose) and the tmp folder inside .conf directory of my project doesn't exist.

If I trigger try-update-template-accepting-all while running watch -n.1 "ls -la ./testqt/.conf/tmp && ls -la ./testqt/.conf/tmp > xablau" on a terminal, at the end, I can see the contents of xablau:

 $ cat xablau
total 152
drwxrwxr-x 2 grilo grilo  4096 jan 27 00:03 .
drwxrwxr-x 4 grilo grilo  4096 jan 27 00:03 ..
-rw-rw-r-- 1 grilo grilo  2261 jan 27 00:03 build-application.yaml
-rw-rw-r-- 1 grilo grilo   411 jan 27 00:03 c_cpp_properties.json
-rw-rw-r-- 1 grilo grilo  1306 jan 27 00:03 __change__.pro
-rw-rw-r-- 1 grilo grilo  1959 jan 27 00:03 docker-compose.yml
-rw-rw-r-- 1 grilo grilo  4632 jan 27 00:03 Dockerfile
-rw-rw-r-- 1 grilo grilo  3632 jan 27 00:03 Dockerfile.debug
-rw-rw-r-- 1 grilo grilo   324 jan 27 00:03 .gitignore
-rw-rw-r-- 1 grilo grilo  2390 jan 27 00:03 .gitlab-ci.yml
-rw-rw-r-- 1 grilo grilo  6825 jan 27 00:03 launch.json
-rw-rw-r-- 1 grilo grilo  4557 jan 27 00:03 README.md
-rw-rw-r-- 1 grilo grilo 91546 jan 27 00:03 tasks-next.json

So seems like something is failing to actually perform the update of the template files.

I am currently using Torizon IDE version 2.4.0 and VSCode 1.8.5 on Ubuntu 22.04.3 LTS.

Missing debug console log in Mono template

On our Mono template application, there is this piece of code in Form1.cs file:

private void button1_Click(object sender, EventArgs e)
        {
            Console.WriteLine("Hello Torizon!");
            label1.Text = "YEAHHHH!";
        }

I was expecting to see "Hello Torizon" on the debug console window when I press the button. But that did not happen. This question was raised by a customer during a meeting. If it is not in the debug console, then where exactly is this printed?

Error with task try-update-template and try-update-template-accepting-all

I get this error when I try the try-update-template task and also try-update-template-accepting-all task:
Get-Content: /home/rudhi/Toradex/IDE_projects/TestMonoProject/.conf/projectUpdater.ps1:69:17
Line |
69 | $templateName = Get-Content $projectFolder/.conf/.template
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| Cannot find path '/home/rudhi/Toradex/IDE_projects/TestMonoProject/.conf/.template' because it does not exist.

  • The terminal process "pwsh '-nop', '/home/rudhi/Toradex/IDE_projects/TestMonoProject/.conf/projectUpdater.ps1', '/home/rudhi/Toradex/IDE_projects/TestMonoProject', 'TestMonoProject', '0'" terminated with exit code: 1.
  • Terminal will be reused by tasks, press any key to close it.
    Apparently, a customer runs into the same issue as well: https://community.toradex.com/t/svg-icons-are-not-shown-in-display-pyside2/21606

I have VSCode version 1.85.2 and Torizon IDE version 2.4.0.

Make sure to use `wait-a-bit` for any `sleep` need

We need to check if we are using sleep command instead of the task wait-a-bit. Use directly the sleep is not recommended because we will not have the controll to make it variable with the use of the settings.json

Add Slint Template Specific Documentations

Hello @tronical,
Recently, we added template specific documentation on each template at the .doc/README.md of the templates.
Here is an idea of what this should document.
The cppQML and cppCMake ones are probably good examples to take inspiration from.
When you have time, can you also add one for the cppSlint template and one for the rustSlint template, please? There is already a .doc/README.md there, but with just the title.

python3Pyside2QML: build-release-arm64 error: /bin/sh: 1: rsync: not found

The task build-release-arm64 of the python3Pyside2QML template fails with the following error:

=> ERROR [qt-hw-accel deploy  6/11] RUN rsync -a /usr2/lib/aarch64-linux-gnu /usr/lib/aarch64-linux-gnu &&     rm -rf /usr2                                               0.4s
------
 > [qt-hw-accel deploy  6/11] RUN rsync -a /usr2/lib/aarch64-linux-gnu /usr/lib/aarch64-linux-gnu &&     rm -rf /usr2:
0.383 /bin/sh: 1: rsync: not found
------
failed to solve: process "/bin/sh -c rsync -a /usr2/lib/aarch64-linux-gnu /usr/lib/aarch64-linux-gnu &&     rm -rf /usr2" did not complete successfully: exit code: 127

The line https://github.com/toradex/vscode-torizon-templates/blob/bookworm/python3Pyside2QML/Dockerfile#L95 seems to be the culprit, and it seems to be because rsync is not installed in the release container. Manually installing it before this line solves the error.

console-rust template doesn't build with production Dockerfile

The copy instruction to deploy the target binary in rust-console's Dockerfile makes two incorrect assumptions:

COPY --from=Build /app/debug /app

  1. That the production build is a debug build.
  2. That the build was a "native" build based on the default target platform.

However the earlier build instructions run cargo build --target XXX and consequently the binaries end up in target/XXX/debug.

I think the production build should do a release build, and some trickery is needed to copy it out of the target/XXX/release/ directory.

(I need that trickery anyway in the Slint template, so if I find a good solution I'll post it here)

cmakeConsole template: update.json wants Makefile

When running task try-update-template, it fails with:

Applying common tasks ...
Copy-Item: /home/USER/git/PROJ/.conf/projectUpdater.ps1:219:5
Line |
219 | Copy-Item "$Env:HOME/.apollox/$templateName/$_source" .
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| Cannot find path '/home/USER/.apollox/cmakeConsole/Makefile' because it does not exist.

Line 219 tries to copy files mentioned in
https://github.com/toradex/vscode-torizon-templates/blob/bookworm/cmakeConsole/.conf/update.json

This file still references Makefile, even though a Makefile is not needed nor present.

Avalonia release image not working

When trying to use the Avalonia template, with the release image (using the Dockerfile) I get the following error:

torizon-testavalonia-1  | Authorization required, but no authorization protocol specified
torizon-testavalonia-1  | 
torizon-testavalonia-1  | Unhandled exception. System.Exception: XOpenDisplay failed
torizon-testavalonia-1  |    at Avalonia.X11.AvaloniaX11Platform.Initialize(X11PlatformOptions options)
torizon-testavalonia-1  |    at Avalonia.AvaloniaX11PlatformExtensions.<>c.<UseX11>b__0_0()
torizon-testavalonia-1  |    at Avalonia.AppBuilder.SetupUnsafe()
torizon-testavalonia-1  |    at Avalonia.AppBuilder.Setup()
torizon-testavalonia-1  |    at Avalonia.AppBuilder.SetupWithLifetime(IApplicationLifetime lifetime)
torizon-testavalonia-1  |    at Avalonia.ClassicDesktopStyleApplicationLifetimeExtensions.StartWithClassicDesktopLifetime(AppBuilder builder, String[] args, ShutdownMode shutdownMode)
torizon-testavalonia-1  |    at testAvalonia.Program.Main(String[] args) in /build/Program.cs:line 15
torizon-testavalonia-1 exited with code 133

javaForms template not working on ARM 32 devices

When trying to use the javaForms template not working on ARM 32 devices, the following error is shown on the build of the Dockerfile.debug:

Executing task: DOCKER_HOST= docker compose build --pull --build-arg SSHUSERNAME=torizon --build-arg APP_ROOT=/home/torizon/app --build-arg IMAGE_ARCH=arm --build-arg SSH_DEBUG_PORT=2234 --build-arg GPU= testjavaforms-debug 

WARN[0000] The "DOCKER_LOGIN" variable is not set. Defaulting to a blank string. 
[+] Building 14.1s (10/17)                                                                                                docker:default
 => [testjavaforms-debug internal] load build definition from Dockerfile.debug                                                      0.0s
 => => transferring dockerfile: 3.90kB                                                                                              0.0s
 => [testjavaforms-debug internal] load metadata for docker.io/torizon/wayland-base:4-rc                                            1.3s
 => [testjavaforms-debug auth] torizon/wayland-base:pull token for registry-1.docker.io                                             0.0s
 => [testjavaforms-debug internal] load .dockerignore                                                                               0.0s
 => => transferring context: 56B                                                                                                    0.0s
 => [testjavaforms-debug  1/12] FROM docker.io/torizon/wayland-base:4-rc@sha256:d793656c981c67215939c2590a3ec67521674d8d13472a8ae6  0.0s
 => [testjavaforms-debug internal] load build context                                                                               0.0s
 => => transferring context: 274B                                                                                                   0.0s
 => CACHED [testjavaforms-debug  2/12] RUN sed -i 's/sid/bookworm/g' /etc/apt/sources.list.d/debian.sources                         0.0s
 => CACHED [testjavaforms-debug  3/12] RUN apt-get -q -y update &&         if [ "" = "-vivante" ] || [ "" = "-imx8" ]; then         0.0s
 => CACHED [testjavaforms-debug  4/12] RUN apt-get -q -y update &&     apt-get install wget lsb-release -y &&     wget https://pac  0.0s
 => ERROR [testjavaforms-debug  5/12] RUN apt-get -q -y update &&     apt-get -q -y install     openssl     openssh-server     rs  12.8s
------                                                                                                                                   
 > [testjavaforms-debug  5/12] RUN apt-get -q -y update &&     apt-get -q -y install     openssl     openssh-server     rsync     tzdata     locales     fontconfig     libxrender1     libxtst6     libxi6     msopenjdk-21     file &&     apt-get clean && apt-get autoremove &&     rm -rf /var/lib/apt/lists/*:                                                                                                       
0.654 Get:1 http://deb.debian.org/debian bookworm InRelease [151 kB]                                                                     
0.742 Get:2 http://deb.debian.org/debian bookworm-updates InRelease [52.1 kB]                                                            
0.742 Get:3 http://deb.debian.org/debian-security bookworm-security InRelease [48.0 kB]
1.222 Get:4 https://packages.microsoft.com/debian/10/prod buster InRelease [6537 B]
1.762 Get:5 http://deb.debian.org/debian bookworm/main armhf Packages [8497 kB]
2.764 Get:6 http://deb.debian.org/debian bookworm-updates/main armhf Packages [12.1 kB]
3.751 Get:7 http://deb.debian.org/debian-security bookworm-security/main armhf Packages [129 kB]
5.902 Get:8 https://packages.microsoft.com/debian/10/prod buster/main amd64 Packages [202 kB]
6.285 Get:9 https://packages.microsoft.com/debian/10/prod buster/main all Packages [2393 B]
6.287 Get:10 https://packages.microsoft.com/debian/10/prod buster/main arm64 Packages [26.3 kB]
6.288 Get:11 https://packages.microsoft.com/debian/10/prod buster/main armhf Packages [22.1 kB]
6.381 Fetched 9149 kB in 6s (1560 kB/s)
6.381 Reading package lists...
9.361 Reading package lists...
12.08 Building dependency tree...
12.58 Reading state information...
12.61 E: Unable to locate package msopenjdk-21

Quotes automatically removed from docker-compose.prod.yml file, causing port issue

This was reported at https://community.toradex.com/t/quotes-automatically-removed-from-docker-compose-prod-yml-file-causing-port-issue/21677

I am using the .🔨-create-production-image script to build my application container and generate the docker-compose.prod.yml file. However, it seems to me that the quotes (or double-quotes) surrounding the values are removed and do not appear in the generated docker-compose.prod.yml.

This is especially annoying for the “ports” definition. Here is a quote from the compose file reference page:

When mapping ports in the HOST:CONTAINER format, you may experience erroneous results when using a container port lower than 60, because YAML parses numbers in the format xx:yy as a base-60 value. For this reason, we recommend always explicitly specifying your port mappings as strings.

So here is an example. I have a container which needs the port 21 to be exposed:

ftp_server:
    image: zhabba/pure-ftpd-arm64
    container_name: ftp_admin
    ports:
      - "21:21"
      - "30000-30009:30000-30009"

Once the .🔨-create-production-image script has been executed, the docker-compose.prod.yml file looks like this:

ftp_server:
    image: zhabba/pure-ftpd-arm64
    container_name: ftp_admin
    ports:
      - 21:21
      - 30000-30009:30000-30009

Finally, when running this on my board, I cannot access the FTP server.

`tcb-platform-publish` work on the CI pipeline but does not run correctly locally

This was reported on the Toradex community:
https://community.toradex.com/t/ota-issues-from-torizon-platform-and-github-actions/20077/31

We need to check if the set of environment variables can be used in the same task that is using it. We are defining the env and using it on the same env task, maybe this is not supported. The way that the CLI interprets it works, because it sets in the same context.

"VSCODE_CMD": "--verbose platform push --credentials credentials.zip --package-name __change__ --package-version ${command:tcb.getNextPackageVersion} --login ${env:DOCKER_LOGIN} ${env:DOCKER_PSSWD} --canonicalize docker-compose.prod.yml"

Running the resulting container from template Avalonia DRM from the extension causes Verdin iMX8MP to reboot

After creating the project from Avalonia DRM and pressing F5, the Verdin iMX8MP suddenly reboots if using its native HDMI port.

Information about my setup:

  • Verdin iMX8MP Q 4GB WB IT V1.0B
    • I should have tested on the newer V1.1, but I do not possess one
  • TorizonCore 6.3.0-build.4
  • Verdin Development Board V1.1A
  • HDMI cable connected to X37 (the secondary HDMI (native) port) → problem happens
  • HDMI cable connected to X48 (via DSI-HDMI adapter port) → problem doesn’t happen
  • Torizon IDE 2 v2.1.2 (release version)
  • VS Code 1.81.1

VS Code and the module itself (seemingly) don’t give any information about what might be wrong.

Even after enabling the debug messages of DRM, dmesg on the module outputs no useful information.

After setting the DRM’s debug messages and starting dmesg --follow-new, I pressed F5 on VS Code in order to deploy the Avalonia DRM template. After some time, the container is deployed and started. After that, the module simply reboots, as we can see below:

torizon@verdin-imx8mp-06849036:~$ sudo cat /sys/module/drm/parameters/debug
0
torizon@verdin-imx8mp-06849036:~$ echo 0xf | sudo tee /sys/module/drm/parameters/debug
torizon@verdin-imx8mp-06849036:~$ sudo cat /sys/module/drm/parameters/debug
15
torizon@verdin-imx8mp-06849036:~$ dmesg --follow-new
[  179.940262] kauditd_printk_skb: 7 callbacks suppressed
[  179.940275] audit: type=1006 audit(1693933950.848:100): pid=1746 uid=0 old-auid=4294967295 auid=1000 tty=(none) old-ses=4294967295 ses=2 res=1
[  179.940291] audit: type=1300 audit(1693933950.848:100): arch=c00000b7 syscall=64 success=yes exit=4 a0=7 a1=ffffd3d47fc0 a2=4 a3=ffff9fa2a920 )
[  179.940303] audit: type=1327 audit(1693933950.848:100): proctitle=737368643A20746F72697A6F6E205B707269765D
[  180.610706] audit: type=1006 audit(1693933951.518:101): pid=1752 uid=0 old-auid=4294967295 auid=1000 tty=(none) old-ses=4294967295 ses=3 res=1
[  180.610730] audit: type=1300 audit(1693933951.518:101): arch=c00000b7 syscall=64 success=yes exit=4 a0=7 a1=ffffcf874630 a2=4 a3=ffff88c06920 )
[  180.610741] audit: type=1327 audit(1693933951.518:101): proctitle=737368643A20746F72697A6F6E205B707269765D
[  186.264158] audit: type=1006 audit(1693933957.168:102): pid=1781 uid=0 old-auid=4294967295 auid=1000 tty=(none) old-ses=4294967295 ses=4 res=1
[  186.264182] audit: type=1300 audit(1693933957.168:102): arch=c00000b7 syscall=64 success=yes exit=4 a0=7 a1=ffffe998f970 a2=4 a3=ffffacb5c920 )
[  186.264194] audit: type=1327 audit(1693933957.168:102): proctitle=737368643A20746F72697A6F6E205B707269765D
[  187.245064] audit: type=1006 audit(1693933958.148:103): pid=1820 uid=0 old-auid=4294967295 auid=1000 tty=(none) old-ses=4294967295 ses=5 res=1
[  187.245088] audit: type=1300 audit(1693933958.148:103): arch=c00000b7 syscall=64 success=yes exit=4 a0=7 a1=ffffeed73c00 a2=4 a3=ffffb5029920 )
[  187.245099] audit: type=1327 audit(1693933958.148:103): proctitle=737368643A20746F72697A6F6E205B707269765D
[  188.511477] audit: type=1101 audit(1693933959.418:104): pid=1897 uid=0 auid=4294967295 ses=4294967295 msg='op=PAM:accounting grantors=pam_perm'
[  188.526230] audit: type=1103 audit(1693933959.428:105): pid=1897 uid=0 auid=4294967295 ses=4294967295 msg='op=PAM:setcred grantors=pam_permit '
[  188.526260] audit: type=1006 audit(1693933959.428:106): pid=1897 uid=0 old-auid=4294967295 auid=1000 tty=(none) old-ses=4294967295 ses=6 res=1
[  188.526273] audit: type=1300 audit(1693933959.428:106): arch=c00000b7 syscall=64 success=yes exit=4 a0=3 a1=ffffe34159a0 a2=4 a3=1 items=0 ppi)
[  193.680337] kauditd_printk_skb: 12 callbacks suppressed
[  193.680349] audit: type=1106 audit(1693933964.588:116): pid=1906 uid=0 auid=1000 ses=7 msg='op=PAM:session_close grantors=pam_selinux,pam_logi'
[  193.680370] audit: type=1104 audit(1693933964.588:117): pid=1906 uid=0 auid=1000 ses=7 msg='op=PAM:setcred grantors=pam_permit acct="torizon" '
[  194.948500] audit: type=1101 audit(1693933965.858:118): pid=1915 uid=0 auid=4294967295 ses=4294967295 msg='op=PAM:accounting grantors=pam_perm'
[  194.953999] audit: type=1103 audit(1693933965.858:119): pid=1915 uid=0 auid=4294967295 ses=4294967295 msg='op=PAM:setcred grantors=pam_permit '
[  194.954305] audit: type=1006 audit(1693933965.858:120): pid=1915 uid=0 old-auid=4294967295 auid=1000 tty=(none) old-ses=4294967295 ses=8 res=1
[  194.954321] audit: type=1300 audit(1693933965.858:120): arch=c00000b7 syscall=64 success=yes exit=4 a0=3 a1=ffffdb3d8e50 a2=4 a3=1 items=0 ppi)
[  194.954336] audit: type=1327 audit(1693933965.858:120): proctitle=737368643A20746F72697A6F6E205B707269765D
[  194.970855] audit: type=1105 audit(1693933965.878:121): pid=1915 uid=0 auid=1000 ses=8 msg='op=PAM:session_open grantors=pam_selinux,pam_login'
[  194.974033] audit: type=1103 audit(1693933965.878:122): pid=1921 uid=0 auid=1000 ses=8 msg='op=PAM:setcred grantors=pam_permit acct="torizon" '

U-Boot SPL 2022.04-6.3.0+git.c71ae7141f30 (Jan 01 1970 - 00:00:00 +0000)
DDRINFO: start DRAM init
DDRINFO: DRAM rate 4000MTS
Training FAILED
DDRINFO: start DRAM init
DDRINFO: DRAM rate 4000MTS
DDRINFO:ddrphy calibration done
DDRINFO: ddrmix config done
DDR configured as single rank
SEC0:  RNG instantiated
Normal Boot

If booting with HDMI cable connected to DSI-HDMI and then changing to the native HDMI, the module doesn’t reboot after launching Avalonia DRM template.

Related thread in Community: Make Dahlia onboard HDMI primary output

cppQML: build-release-arm64: error failed to solve: torizon/wayland-base:3.0.8-bookworm: docker.io/torizon/wayland-base:3.0.8-bookworm: not found

After creating a project for Qt 6 C++ from template, and trying to run the task build-release-arm64, I get the following error:

Executing task: DOCKER_HOST= docker compose build --build-arg IMAGE_ARCH=arm64 qt-gui-optimization 

WARN[0000] The "GPU" variable is not set. Defaulting to a blank string. 
WARN[0000] The "LOCAL_REGISTRY" variable is not set. Defaulting to a blank string. 
[+] Building 1.9s (5/5) FINISHED                                                                                                                                                
 => [qt-gui-optimization internal] load .dockerignore                                                                                                                      0.0s
 => => transferring context: 56B                                                                                                                                           0.0s
 => [qt-gui-optimization internal] load build definition from Dockerfile                                                                                                   0.0s
 => => transferring dockerfile: 3.27kB                                                                                                                                     0.0s
 => CANCELED [qt-gui-optimization internal] load metadata for docker.io/torizon/wayland-base:3.0.8                                                                         1.8s
 => ERROR [qt-gui-optimization internal] load metadata for docker.io/torizon/wayland-base:3.0.8-bookworm                                                                   1.8s
 => [qt-gui-optimization auth] torizon/wayland-base:pull token for registry-1.docker.io                                                                                    0.0s
------
 > [qt-gui-optimization internal] load metadata for docker.io/torizon/wayland-base:3.0.8-bookworm:
------
failed to solve: torizon/wayland-base:3.0.8-bookworm: docker.io/torizon/wayland-base:3.0.8-bookworm: not found

 *  The terminal process "/usr/bin/bash '-c', 'DOCKER_HOST= docker compose build --build-arg IMAGE_ARCH=arm64 qt-gui-optimization'" terminated with exit code: 17. 
 *  Terminal will be reused by tasks, press any key to close it.

By inspecting the above logs, it seems that it uses the wrong tag 3.0.8-bookworm, whereas it should be 3.0.8.

By looking at the Dockerfile, maybe there are two reasons:

Add Zig Console Template Specific Documentation

Hello @kassane,
Recently, we added template specific documentation on each template at the .doc/README.md of the templates.
Here is an idea of what this should document.
The cppQML and cppCMake ones are probably good examples to take inspiration from.
When you have time, can you also add one for the zigConsole template, please?

What is the maintenance and deprecation policy for the community templates?

I've read https://github.com/toradex/vscode-torizon-templates/blob/main/CONTRIBUTING.md and didn't find a note on the maintenance policy for the templates.

With time, they may break so community contributors should be aware they are expected to update the templates, otherwise, we will end up with many non-working ones.

Also, we should have a deprecation policy for when a community template becomes unmaintained for any reason, for example, the original maintainer doesn't want to keep it anymore or ourselves.

It might be good to think of a badge to add on each template on https://github.com/toradex/vscode-torizon-templates#community-supported-templates, maybe with the "last updated" date, or something that can indicate to users the health of the community templates. Most users will not come to this GitHub repo, so this info should also be displayed in VS Code when creating a new project from a template.

Stick the Docker images `BASE_VERSION` with major, minor and patch

Today, we are using only the major and the Debian version code name to stick our BASE_VERSION to build the template containers. This is wrong because the Toradex Debian packages and containers can publish new versions, with the same major, that may crash the flow.

`device_cgroup_rules` is not supported on `docker-compose.yml` version3

Hi all!

After trying to use the cppQML template, I found out that the device_cgroup_rules is not supported on docker-compose.yml using version 3. It is supported on version 2, though.

I got this error:

ERROR: The Compose file './docker-compose.yml' is invalid because:
Unsupported config option for services.testqt: 'device_cgroup_rules'
Unsupported config option for services.testqt-debug: 'device_cgroup_rules'
Unsupported config option for services.weston: 'device_cgroup_rules'

As a workaround, I modified the version to 2.4.

References:

.NET Slint release image build not working

When trying to build the .NET Slint template, with the release image (using the Dockerfile) I get the following error:

Executing task: DOCKER_HOST= docker compose build --pull --build-arg SSHUSERNAME=torizon --build-arg APP_ROOT=/home/torizon --build-arg IMAGE_ARCH=arm64 --build-arg GPU=-imx8 testdotnetslint 

WARN[0000] The "LOCAL_REGISTRY" variable is not set. Defaulting to a blank string. 
[+] Building 15.6s (11/14)                                                                                                                                                                                                                                                                                 docker:default
 => [testdotnetslint internal] load .dockerignore                                                                                                                                                                                                                                                                    0.0s
 => => transferring context: 56B                                                                                                                                                                                                                                                                                     0.0s
 => [testdotnetslint internal] load build definition from Dockerfile                                                                                                                                                                                                                                                 0.0s
 => => transferring dockerfile: 2.50kB                                                                                                                                                                                                                                                                               0.0s
 => [testdotnetslint internal] load metadata for docker.io/commontorizon/slint-base-arm64-imx8:4-bookworm-rc-1.2.2                                                                                                                                                                                                   0.7s
 => [testdotnetslint internal] load metadata for mcr.microsoft.com/dotnet/sdk:8.0                                                                                                                                                                                                                                    0.2s
 => [testdotnetslint internal] load build context                                                                                                                                                                                                                                                                    0.0s
 => => transferring context: 56.39kB                                                                                                                                                                                                                                                                                 0.0s
 => CACHED [testdotnetslint deploy 1/5] FROM docker.io/commontorizon/slint-base-arm64-imx8:4-bookworm-rc-1.2.2@sha256:446ba04585bedde60ff12914bca717964d05300dd7f45c5505c122a3198494bb                                                                                                                               0.0s
 => [testdotnetslint build 1/4] FROM mcr.microsoft.com/dotnet/sdk:8.0@sha256:7ef41132b2ebe6166bde36b7ba2f0d302e10307c3e0523a4539643a77233f56d                                                                                                                                                                        0.0s
 => CANCELED [testdotnetslint deploy 2/5] RUN apt-get -q -y update &&         if [ "-imx8" = "-vivante" ] || [ "-imx8" = "-imx8" ]; then             apt-get -q -y install             imx-gpu-viv-wayland-dev         ; else             apt-get -q -y install             libgl1         ; fi     &&     apt-get  14.8s
 => CACHED [testdotnetslint build 2/4] COPY . /build                                                                                                                                                                                                                                                                 0.0s
 => CACHED [testdotnetslint build 3/4] WORKDIR /build                                                                                                                                                                                                                                                                0.0s
 => ERROR [testdotnetslint build 4/4] RUN dotnet restore && dotnet publish -c Release -r linux-arm64                                                                                                                                                                                                                14.7s
------                                                                                                                                                                                                                                                                                                                    
 > [testdotnetslint build 4/4] RUN dotnet restore && dotnet publish -c Release -r linux-arm64:                                                                                                                                                                                                                            
1.142   Determining projects to restore...                                                                                                                                                                                                                                                                                
6.954   Restored /build/testDotnetSlint.csproj (in 5.3 sec).                                                                                                                                                                                                                                                              
7.206 MSBuild version 17.8.3+195e7f5a3 for .NET                                                                                                                                                                                                                                                                           
7.858   Determining projects to restore...                                                                                                                                                                                                                                                                                
12.10   Restored /build/testDotnetSlint.csproj (in 3.77 sec).                                                                                                                                                                                                                                                             
14.27 CSC : warning CS8785: Generator 'Generator' failed to generate source. It will not contribute to the output and compilation errors may occur as a result. Exception was of type 'DllNotFoundException' with message 'Unable to load shared library './libslint_dotnet.so' or one of its dependencies. In order to help diagnose loading problems, consider using a tool like strace. If you're using glibc, consider setting the LD_DEBUG environment variable: [/build/testDotnetSlint.csproj]
14.28 /build/Program.cs(2,7): error CS0246: The type or namespace name 'AppWindow' could not be found (are you missing a using directive or an assembly reference?) [/build/testDotnetSlint.csproj]
------
failed to solve: process "/bin/sh -c dotnet restore && dotnet publish -c Release -r linux-${IMAGE_ARCH}" did not complete successfully: exit code: 1

Wrong host_ip leading to connection problems

When creating a new C# project from scratch, the host_ip setting in settings.json is incorrectly set to an IP from the wrong adapter:

settings.json

{
  "torizon_psswd": "xyz",
  "torizon_login": "torizon",
  "torizon_ip": "192.168.1.202",
  "host_ip": "169.254.145.175",
  "torizon_workspace": "${workspaceFolder}",
...
}

The correct host IP should be 192.168.1.226. The 169.x is an autoconfig IP from another ethernet adapter (not on the same network).

ipconfig output:

Ethernet adapter Ethernet:

   Connection-specific DNS Suffix  . : xxxx
   Link-local IPv6 Address . . . . . : fe80::dfca:959f:d9a7:38d0%7
   IPv4 Address. . . . . . . . . . . : 192.168.1.226
   Subnet Mask . . . . . . . . . . . : 255.255.255.0
   Default Gateway . . . . . . . . . : 192.168.1.1

Ethernet adapter Ethernet 2:

   Connection-specific DNS Suffix  . :
   Autoconfiguration IPv4 Address. . : 169.254.145.175
   Subnet Mask . . . . . . . . . . . : 255.255.0.0
   Default Gateway . . . . . . . . . :

I can manually change it to the right one (192.168.1.226), however this leads to another error when the module tries to pull the docker image from the host:


Warning: Permanently added '192.168.1.202' (ED25519) to the list of known hosts.
The DOCKER_LOGIN variable is not set. Defaulting to a blank string.
Pulling torizontest2-debug ... 
Pulling torizontest2-debug ... error

ERROR: for torizontest2-debug  Get "https://192.168.1.226:5002/v2/": http: server gave HTTP response to HTTPS client
Get "https://192.168.1.226:5002/v2/": http: server gave HTTP response to HTTPS client

Google pointed me to add "insecure-registries" : ["192.168.1.226:5002"] to my Docker Desktop instance, but I realised this error came from the module and not my host. I manually edited /etc/docker/daemon.json and it now work.

Is there a way to avoid this problem? When is the wrong IP fetched in the process?

C# project: port sharing task fails silently

I installed WSL2 and Ubuntu 22.04.1 to evaluate our new module using your new VSCode extension. I followed the docs (https://github.com/toradex/torizon-experimental-torizon-ide-v2-docs) but did not see the UAC prompt that should follow the run-share-wsl-ports task.

Since there is an accumulation of terminals we don't see it right away that something failed, however a terminal shows:

/usr/bin/bash: line 1: ifconfig: command not found

Found out that ifconfig is not installed in this Ubuntu version. I had to sudo apt install net-tools and then re-run the task manually.

Non Graphical Templates

Hi there ;)

So for non-graphical templates the GPU prefix is not passed.

As I learned there has to be the

ARG GPU=

to make this work.

If you need more info let me know.

Cheers

Limited Support for graphical acceleration on downstream-based modules

There are templates that use the container wayland-base as a base for their application containers, regardless of SoC/SoM.
This results in limited hardware acceleration support for downstream-based modules (i.MX 8/i.MX 8M/i.MX 8X).

The downstream-based modules should use the container wayland-base-vivante instead, to allow hardware acceleration within the container.
As it is right now, the templates have hardware accelerated compositing, in the separate weston-vivante container, but the OpenGL provider in the application container itself is LLVMpipe, a software implementation.

The affected templates are:

The fix can be as simple as using a build arg for the GPU or may require further changes to these templates.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.