UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Visitor pquevedo
Visitor
2,269 Views
Registered: ‎06-22-2017

Petalinux 2017.4 docker container

Im trying to setup petalinux in a docker container based on Ubuntu 16.04. 

Im getting errors when running petalinux-env-check though. 

 

developer@7a217c2e945b:~$ ./petalinux-env-check
INFO: Checking free disk space
INFO: Checking installed tools
./petalinux-env-check: line 252: [: =: unary operator expected
./petalinux-env-check: line 335: [: ==: unary operator expected
./petalinux-env-check: line 337: [: ==: unary operator expected
./petalinux-env-check: line 339: [: ==: unary operator expected
./petalinux-env-check: line 341: [: ==: unary operator expected
./petalinux-env-check: line 343: [: ==: unary operator expected
./petalinux-env-check: line 252: [: =: unary operator expected
./petalinux-env-check: line 252: [: =: unary operator expected
./petalinux-env-check: line 252: [: =: unary operator expected
./petalinux-env-check: line 252: [: =: unary operator expected
./petalinux-env-check: line 252: [: =: unary operator expected
./petalinux-env-check: line 252: [: =: unary operator expected
./petalinux-env-check: line 284: [: =: unary operator expected
./petalinux-env-check: line 252: [: =: unary operator expected
./petalinux-env-check: line 252: [: =: unary operator expected
./petalinux-env-check: line 252: [: =: unary operator expected
./petalinux-env-check: line 252: [: =: unary operator expected
./petalinux-env-check: line 252: [: =: unary operator expected
./petalinux-env-check: line 252: [: =: unary operator expected
./petalinux-env-check: line 252: [: =: unary operator expected
./petalinux-env-check: line 252: [: =: unary operator expected
./petalinux-env-check: line 252: [: =: unary operator expected
./petalinux-env-check: line 284: [: =: unary operator expected
./petalinux-env-check: line 252: [: =: unary operator expected
./petalinux-env-check: line 284: [: =: unary operator expected
./petalinux-env-check: line 252: [: =: unary operator expected
INFO: Checking installed development libraries
./petalinux-env-check: line 425: [: ==: unary operator expected
INFO: Checking network and other services

 

I've installed all the dependencies listed in UG1144 and changed my shell to bash via dpkg-reconfigure. 

The container is based on:

 

developer@7a217c2e945b:~$ uname -a
Linux 7a217c2e945b 4.10.0-42-generic #46~16.04.1-Ubuntu SMP Mon Dec 4 15:57:59 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

 

petalinux-env-check runs fine on my Ubuntu VM. It is a binary though and I don't know where the source for this is so I don't know what the script is doing.

 

Any thoughts? Thanks!

0 Kudos
4 Replies
Visitor sschneid
Visitor
2,155 Views
Registered: ‎02-14-2018

Re: Petalinux 2017.4 docker container

I get the same issue when executing settings.sh on my Gentoo workstation:

 

PetaLinux environment set to '/home/user/Xilinx/PetaLinux/2017.4'

INFO: Checking free disk space

INFO: Checking installed tools

environment: Zeile 252: [: =: Einstelliger (unärer) Operator erwartet.

environment: Zeile 335: [: ==: Einstelliger (unärer) Operator erwartet.

environment: Zeile 337: [: ==: Einstelliger (unärer) Operator erwartet.

environment: Zeile 339: [: ==: Einstelliger (unärer) Operator erwartet.

environment: Zeile 341: [: ==: Einstelliger (unärer) Operator erwartet.

environment: Zeile 343: [: ==: Einstelliger (unärer) Operator erwartet.

environment: Zeile 252: [: =: Einstelliger (unärer) Operator erwartet.

environment: Zeile 252: [: =: Einstelliger (unärer) Operator erwartet.

environment: Zeile 252: [: =: Einstelliger (unärer) Operator erwartet.

environment: Zeile 252: [: =: Einstelliger (unärer) Operator erwartet.

environment: Zeile 252: [: =: Einstelliger (unärer) Operator erwartet.

environment: Zeile 252: [: =: Einstelliger (unärer) Operator erwartet.

environment: Zeile 284: [: =: Einstelliger (unärer) Operator erwartet.

environment: Zeile 252: [: =: Einstelliger (unärer) Operator erwartet.

environment: Zeile 252: [: =: Einstelliger (unärer) Operator erwartet.

environment: Zeile 252: [: =: Einstelliger (unärer) Operator erwartet.

environment: Zeile 252: [: =: Einstelliger (unärer) Operator erwartet.

environment: Zeile 252: [: =: Einstelliger (unärer) Operator erwartet.

environment: Zeile 252: [: =: Einstelliger (unärer) Operator erwartet.

environment: Zeile 252: [: =: Einstelliger (unärer) Operator erwartet.

environment: Zeile 252: [: =: Einstelliger (unärer) Operator erwartet.

environment: Zeile 252: [: =: Einstelliger (unärer) Operator erwartet.

environment: Zeile 284: [: =: Einstelliger (unärer) Operator erwartet.

environment: Zeile 252: [: =: Einstelliger (unärer) Operator erwartet.

environment: Zeile 284: [: =: Einstelliger (unärer) Operator erwartet.

environment: Zeile 252: [: =: Einstelliger (unärer) Operator erwartet.

INFO: Checking installed development libraries

 

I tried to read the strace output of the ./petalinux-env-check but could not find the reason why these messages occur.

 

open("/usr/share/locale/locale.alias", O_RDONLY|O_CLOEXEC) = 3

fstat(3, {st_mode=S_IFREG|0644, st_size=2997, ...}) = 0

read(3, "# Locale name alias data base.\n#"..., 4096) = 2997

read(3, "", 4096) = 0

close(3) = 0

open("/usr/share/locale/de_DE.UTF-8/LC_MESSAGES/bash.mo", O_RDONLY) = -1 ENOENT (No such file or directory)

open("/usr/share/locale/de_DE.utf8/LC_MESSAGES/bash.mo", O_RDONLY) = -1 ENOENT (No such file or directory)

open("/usr/share/locale/de_DE/LC_MESSAGES/bash.mo", O_RDONLY) = -1 ENOENT (No such file or directory)

open("/usr/share/locale/de.UTF-8/LC_MESSAGES/bash.mo", O_RDONLY) = -1 ENOENT (No such file or directory)

open("/usr/share/locale/de.utf8/LC_MESSAGES/bash.mo", O_RDONLY) = -1 ENOENT (No such file or directory)

open("/usr/share/locale/de/LC_MESSAGES/bash.mo", O_RDONLY) = 3

fstat(3, {st_mode=S_IFREG|0644, st_size=94101, ...}) = 0

mmap(NULL, 94101, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7fb4b69d8000

close(3) = 0

fstat(2, {st_mode=S_IFREG|0644, st_size=47716, ...}) = 0

write(2, "environment: Zeile 252: [: =: Ei"..., 72environment: Zeile 252: [: =: Einstelliger (unärer) Operator erwartet. ) = 72

stat(".", {st_mode=S_IFDIR|0711, st_size=4096, ...}) = 0

 

This is the first occurrence of the messages.

0 Kudos
Visitor movsb
Visitor
2,146 Views
Registered: ‎02-14-2018

Re: Petalinux 2017.4 docker container

Copying petalinux-env-check out of the container and running strace -f ./petalinux-env-check shows this line:

execve("/usr/bin/lsb_release", ["lsb_release", "-i"], [/* 52 vars */]) = 0

 

Finding the package that install that binary:

$ dpkg-query -S /usr/bin/lsb_release
lsb-release: /usr/bin/lsb_release

 

Adding the installation of the package lsb-release to my Dockerfile fixed the problem for me.

Visitor sschneid
Visitor
2,137 Views
Registered: ‎02-14-2018

Re: Petalinux 2017.4 docker container

Hi,

 

installing the lsb-release fixed my problems also under Gentoo:

 

[I] sys-apps/lsb-release
     Verfügbare Versionen:   1.4 ~1.4-r1 ~1.4-r2 ~1.4-r3
     Installierte Versionen: 1.4(10:31:30 15.02.2018)
     Startseite:             https://wiki.linuxfoundation.org/lsb/
     Beschreibung:           LSB version query program

 

Thank you...

0 Kudos
Highlighted
Newbie loweja01
Newbie
2,026 Views
Registered: ‎03-09-2018

Re: Petalinux 2017.4 docker container

Where you ever able to successfully put Petalinux 2017.4 in a container?  I was able to get Petalinux 2017.1 into a container after some difficulty and I think my setup should work for Petalinux 2017.4 as well with some minor changes.

 

Here's my repo: https://github.com/JamesAnthonyLow/docker-xilinx-petalinux-desktop

 

I forked from queeno/docker-ubuntu-desktop in order to get a VNC server environment going so I could install the XSDK tools inside the container for Petalinux. 

Tags (2)