GithubHelp home page GithubHelp logo

z4yx / petalinux-docker Goto Github PK

View Code? Open in Web Editor NEW
111.0 7.0 64.0 18 KB

Dockerfile to build docker images with Petalinux (Tested on version 2018.3~2021.1)

License: MIT License

Shell 25.04% Dockerfile 74.96%
docker petalinux xilinx

petalinux-docker's Introduction

petalinux-docker

Copy petalinux-v2020.2-final-installer.run file to this folder. Then run:

docker build --build-arg PETA_VERSION=2020.2 --build-arg PETA_RUN_FILE=petalinux-v2020.2-final-installer.run -t petalinux:2020.2 .

After installation, launch petalinux with:

docker run -ti --rm -e DISPLAY=$DISPLAY --net="host" -v /tmp/.X11-unix:/tmp/.X11-unix -v $HOME/.Xauthority:/home/vivado/.Xauthority -v $HOME/Projects:/home/vivado/project petalinux:2020.2 /bin/bash

petalinux-docker's People

Contributors

embedded-crypto avatar michaellmonaghan avatar nick-petrovsky avatar vmayoral avatar z4yx avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

petalinux-docker's Issues

Missing package for petalinux 2019.2?

I have tried to use your Dockerfile to generate a Petalinux 2019.2 (using ubuntu:18.04 as base).

It seems there is a couple of packages missing:
python
libncurses5

No tftp server found

Hi,

First of all, thank you so much for this work. I'm getting the below warning,
WARNING: No tftp server found - please refer to "PetaLinux SDK Installation Guide" for its impact and solution

This warning message indicates that we do not have a TFTP service
running on the workstation. Without a TFTP service, we cannot
download Linux system images to the target system using the U-Boot
network/TFTP capabilities. This warning can be ignored for other boot
modes.

I tried to set up tftp inside docker. But no luck. Can you please provide me some details about how we can this issue?

dpkg: warning: on executing installation.

First of all, thank you for your work.

I have warnings on executing install program in Dockerfile.

=================================================================
dpkg: warning: failed to open configuration file '/root/.dpkg.cfg' for reading: Permission denied
dpkg: warning: failed to open configuration file '/root/.dpkg.cfg' for reading: Permission denied
dpkg: warning: failed to open configuration file '/root/.dpkg.cfg' for reading: Permission denied

I think if you modify sudo command with -i option, you can solve it.

Issue installing petalinux

Hey, did you by any chance got a problem similar to this one when installing petalinux?

INFO: Installing PetaLinux SDK to "/opt/Xilinx/petalinux/."
tar: ./tools/linux-i386/microblazeel-xilinx-linux-gnu/microblazeel-xilinx-linux-gnu/sys-root/usr/lib: Directory renamed before its status could be extracted
tar: ./tools/linux-i386/microblazeel-xilinx-linux-gnu/microblazeel-xilinx-linux-gnu/sys-root/usr: Directory renamed before its status could be extracted
tar: ./tools/linux-i386/microblazeel-xilinx-linux-gnu/microblazeel-xilinx-linux-gnu/sys-root: Directory renamed before its status could be extracted
tar: ./tools/linux-i386/microblazeel-xilinx-linux-gnu/microblazeel-xilinx-linux-gnu: Directory renamed before its status could be extracted
tar: ./tools/linux-i386/microblazeel-xilinx-linux-gnu: Directory renamed before its status could be extracted
tar: ./tools/linux-i386/aarch64-linux-gnu/aarch64-linux-gnu/libc/usr/lib/plugin: Directory renamed before its status could be extracted
tar: ./tools/linux-i386/aarch64-linux-gnu/aarch64-linux-gnu/libc/usr/lib: Directory renamed before its status could be extracted
tar: ./tools/linux-i386/aarch64-linux-gnu/aarch64-linux-gnu/libc/usr: Directory renamed before its status could be extracted
tar: ./tools/linux-i386/aarch64-linux-gnu/aarch64-linux-gnu/libc: Directory renamed before its status could be extracted
tar: ./tools/linux-i386/aarch64-linux-gnu/aarch64-linux-gnu: Directory renamed before its status could be extracted
tar: ./tools/linux-i386/aarch64-linux-gnu: Directory renamed before its status could be extracted
tar: ./tools/linux-i386/gcc-arm-linux-gnueabi/arm-linux-gnueabihf/libc/usr/lib: Directory renamed before its status could be extracted
tar: ./tools/linux-i386/gcc-arm-linux-gnueabi/arm-linux-gnueabihf/libc/usr: Directory renamed before its status could be extracted
tar: ./tools/linux-i386/gcc-arm-linux-gnueabi/arm-linux-gnueabihf/libc: Directory renamed before its status could be extracted
tar: ./tools/linux-i386/gcc-arm-linux-gnueabi/arm-linux-gnueabihf: Directory renamed before its status could be extracted
tar: ./tools/linux-i386/gcc-arm-linux-gnueabi: Directory renamed before its status could be extracted
tar: ./tools/linux-i386: Directory renamed before its status could be extracted
tar: Exiting with failure status due to previous errors
*********************************************
ERROR: Failed to install PetaLinux SDK into "/opt/Xilinx/petalinux/."
*********************************************

petalinux commands giving error

HI All
I have installed petalinux and able to do configure a project ,then I have created a new project in different directory when I build this project using petalinux It is throwing some error like-
user@3999--IOT--GGN:~/code/another_project/xilinx-zcu208-2021.1$ petalinux-build
[INFO] Sourcing buildtools
[INFO] Building project
ERROR: /home/user/petalinux_sdk/components/yocto/source/ is missing in petalinux-tools.
ERROR: Installed Petalinux tools are broken. Please reinstall
ERROR: Failed to build project. Check the /home/user/code/another_project/xilinx-zcu208-2021.1/build/build.log file for more details...

Note :When I follow the same steps for 1st project I am able to build
Please help !

Licensing

Hi, I find your project really cool as it is always difficult to get all the dependencies right for petalinux and often if you get it wrong if fails right in the middle with some cryptic error.

I would like to use this and I wanted to know if you could add this under the MIT license ?

Thanks,
Kevin

ownership of /opt/Xilinx folder

I extended the installation of Petalinux v2021.2 into: /opt/Xilinx/petalinux/v2021.2/
Dockerfile changed to recursively set chmod on above folder, starting at Xilinx/

[Dockerfile]
RUN chmod a+rx /${PETA_RUN_FILE} &&
chmod a+rx /accept-eula.sh &&
mkdir -p /opt/Xilinx/petalinux/${PETA_VERSION} &&
mkdir -p /opt/Xilinx/petalinux/bsps &&
chmod 777 /tmp &&
chmod -R 777 /opt/Xilinx &&
find / -maxdepth 1 -name *.bsp -exec mv {} /opt/Xilinx/petalinux/bsps ; &&
cd /tmp &&
sudo -u vivado -i /accept-eula.sh /${PETA_RUN_FILE} /opt/Xilinx/petalinux/${PETA_VERSION} &&
rm -f /${PETA_RUN_FILE} /accept-eula.sh
($PETA_VERSION = "v2021.2", note: also pulled in a .bsp file...)

The install fails though, some errors generated prior to an expect line failing:
[Docker Output]
(all fine up to here)
Step 11/20 : COPY accept-eula.sh ${PETA_RUN_FILE} *.bsp /
---> acf92fc1669f
Step 12/20 : RUN chmod a+rx /${PETA_RUN_FILE} && chmod a+rx /accept-eula.sh && mkdir -p /opt/Xilinx/petalinux/${PETA_VERSION} && mkdir -p /opt/Xilinx/petalinux/bsps && chmod 777 /tmp && chmod -R 777 /opt/Xilinx && find / -maxdepth 1 -name *.bsp -exec mv {} /opt/Xilinx/petalinux/bsps ; && cd /tmp && sudo -u vivado -i /accept-eula.sh /${PETA_RUN_FILE} /opt/Xilinx/petalinux/${PETA_VERSION} && rm -f /${PETA_RUN_FILE} /accept-eula.sh
---> Running in b407c32a0b72
spawn /petalinux-v2021.2-final-installer.run /opt/Xilinx/petalinux/v2021.2
ERROR: Invalid options: /opt/Xilinx/petalinux/v2021.2
spawn /petalinux-v2021.2-final-installer.run -d /opt/Xilinx/petalinux/v2021.2
INFO: Checking installation environment requirements...
WARNING: This is not a supported OS
INFO: Checking free disk space
INFO: Checking installed tools
INFO: Checking installed development libraries
INFO: Checking network and other services
WARNING: No tftp server found - please refer to "UG1144 PetaLinux Tools Documentation Reference Guide" for its impact and solution
INFO: Checking installer checksum...
INFO: Extracting PetaLinux installer...

LICENSE AGREEMENTS

PetaLinux SDK contains software from a number of sources. Please review
the following licenses and indicate your acceptance of each to continue.

You do not have to accept the licenses, however if you do not then you may
not use PetaLinux SDK.

Use PgUp/PgDn to navigate the license viewer, and press 'q' to close

Press Enter to display the license agreements
WARNING: terminal is not fully functional
Do you accept Xilinx End User License Agreement? [y/N] > y
WARNING: terminal is not fully functional
Do you accept Third Party End User License Agreement? [y/N] > yment.txt (press RETURN)
INFO: Installing PetaLinux...
qqINFO: Checking PetaLinux installer integrity...
qqINFO: Installing PetaLinux SDK to "/opt/Xilinx/petalinux/v2021.2/."
qq*********************************************
ERROR: Failed to install PetaLinux SDK into "/opt/Xilinx/petalinux/v2021.2/."


Please refer to the PetaLinux Tools Installation Guide.

Check the troubleshooting guide at the end of that manual, and if you are
unable to resolve the issue please contact customer support with file:
/home/vivado/petalinux_installation_log

expect: spawn id exp6 not open
while executing
"expect "INFO: Checking PetaLinux installer integrity...""
(file "/accept-eula.sh" line 32)
The command '/bin/sh -c chmod a+rx /${PETA_RUN_FILE} && chmod a+rx /accept-eula.sh && mkdir -p /opt/Xilinx/petalinux/${PETA_VERSION} && mkdir -p /opt/Xilinx/petalinux/bsps && chmod 777 /tmp && chmod -R 777 /opt/Xilinx && find / -maxdepth 1 -name *.bsp -exec mv {} /opt/Xilinx/petalinux/bsps ; && cd /tmp && sudo -u vivado -i /accept-eula.sh /${PETA_RUN_FILE} /opt/Xilinx/petalinux/${PETA_VERSION} && rm -f /${PETA_RUN_FILE} /accept-eula.sh' returned a non-zero code: 1

I generated a temporary image from b407c32a0b72 and ran it interactively.
$ docker commit b407c32a0b72 temp-failed-peta-env
$ docker run -ti --rm temp-failed-peta-env /bin/bash

All directories exist, but the /opt/Xilinx/petalinux/v2021.2/ folder is still own by root (more on this later)

Changing to user: vivado ..
$ su vivado
vivado@aa83c66a7ccf:/$ cd ~

And looking at the Petalinux install log:
vivado@aa83c66a7ccf:/$ less petalinux_installation_log

[LOG]
INFO: Checking installation environment requirements...
WARNING: This is not a supported OS
INFO: Checking free disk space
INFO: Checking installed tools
INFO: Checking installed development libraries
INFO: Checking network and other services
WARNING: No tftp server found - please refer to "UG1144 PetaLinux Tools Documentation Reference Guide" for its impact and solution
INFO: Checking installer checksum...
INFO: Extracting PetaLinux installer...
INFO: Installing PetaLinux...
INFO: Checking PetaLinux installer integrity...
INFO: Installing PetaLinux SDK to "/opt/Xilinx/petalinux/v2021.2/."
...................................................tar: .: Cannot utime: Operation not permitted
tar: .: Cannot change mode to rwxr-xr-x: Operation not permitted
tar: Exiting with failure status due to previous errors


ERROR: Failed to install PetaLinux SDK into "/opt/Xilinx/petalinux/v2021.2/."


Please refer to the PetaLinux Tools Installation Guide.

Check the troubleshooting guide at the end of that manual, and if you are
unable to resolve the issue please contact customer support with file:
/home/vivado/petalinux_installation_log

Errors --------------------------------
(1) tar "Cannot utime: Operation not permitted"
tar wants to adjust timestamp but cannot because user vivado does not own /opt/Xilinx/petalinux/v2021.2/

So how was this working before? I would assume this is fixed by getting docker to change the ownership of the /opt/Xilinx/petalinux/v2021.2/ folder to user: vivado at either petalinux/ or v2021.2?

Or is there some other issue?

Thanks,

MacOS M1 Pro

Hey,

Will this docker image work on M1 Pro (arm) or do i need to make modifications to the docker file?

thanks

petalinux2017.4 issue for ubuntu18.04

I got this issue:

environment: line 314: ((: 10#15~1 > 10#3: syntax error in expression (error token is "~1 > 10#3")
environment: line 318: ((: 10#15~1 < 10#3: syntax error in expression (error token is "~1 < 10#3")

And it seems unbuntu 18.04 which doesnt support it, look ahead this thread in xilinx formus.

Failed to source bitbake

Hi,
I have noticed a problem, or maybe I missed something. I was able to build the docker file without any problems. When I then create the project and run the command:
petalinux-config --get-hw-description=./../

The I get the following feedback:
ERROR: Failed to source bitbake

Did someone had the same problem? How can I solve this.
Best regards
Manuel

Missing files for 2021.1

for 2021.1:

update to ubuntu 20.4
add xxd libtinfo5

still trying to get a successfull build, will report

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.