cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
shairva
Explorer
Explorer
545 Views
Registered: ‎09-19-2018

Help on adding python3-pip to Petalinux

Jump to solution

Hi,

I need to add python3-pip to my Petalinux.

1- First thing I did was to open ./project-spec/meta-user/recipes-core/images/petalinux-image-full.bbappend and append:

 

IMAGE_INSTALL_append = " python3-pip"

 

 2- Second thing I did: I looked for the recipe: https://layers.openembedded.org/layerindex/recipe/53469/

python3-pip is available on the layer: openembedded-core (morty branch)

3- Now I think I need to add that layer to: ./build/conf/bblayers.conf But I don't exactly how to do that.

This is my current ./build/conf/bblayers.conf : 

# WARNING: this configuration has been automatically generated and in
# most cases should not be edited. If you need more flexibility than
# this configuration provides, it is strongly suggested that you set
# up a proper instance of the full build system and use that instead.

LCONF_VERSION = "7"

BBPATH = "${TOPDIR}"
SDKBASEMETAPATH = "/home/salva/petalinux_2019.1/components/yocto/source/aarch64"
BBLAYERS := " \
  ${SDKBASEMETAPATH}/layers/core/meta \
  ${SDKBASEMETAPATH}/layers/core/meta-poky \
  ${SDKBASEMETAPATH}/layers/meta-openembedded/meta-perl \
  ${SDKBASEMETAPATH}/layers/meta-openembedded/meta-python \
  ${SDKBASEMETAPATH}/layers/meta-openembedded/meta-filesystems \
  ${SDKBASEMETAPATH}/layers/meta-openembedded/meta-gnome \
  ${SDKBASEMETAPATH}/layers/meta-openembedded/meta-multimedia \
  ${SDKBASEMETAPATH}/layers/meta-openembedded/meta-networking \
  ${SDKBASEMETAPATH}/layers/meta-openembedded/meta-webserver \
  ${SDKBASEMETAPATH}/layers/meta-openembedded/meta-xfce \
  ${SDKBASEMETAPATH}/layers/meta-openembedded/meta-initramfs \
  ${SDKBASEMETAPATH}/layers/meta-openembedded/meta-oe \
  ${SDKBASEMETAPATH}/layers/meta-browser \
  ${SDKBASEMETAPATH}/layers/meta-qt5 \
  ${SDKBASEMETAPATH}/layers/meta-xilinx/meta-xilinx-bsp \
  ${SDKBASEMETAPATH}/layers/meta-xilinx/meta-xilinx-contrib \
  ${SDKBASEMETAPATH}/layers/meta-xilinx-tools \
  ${SDKBASEMETAPATH}/layers/meta-petalinux \
  ${SDKBASEMETAPATH}/layers/meta-virtualization \
  ${SDKBASEMETAPATH}/layers/meta-openamp \
  ${SDKBASEMETAPATH}/workspace \
  /home/salva/petalinux_2019.1/dpu_without_bsp/project-spec/meta-plnx-generated \
  /home/salva/petalinux_2019.1/dpu_without_bsp/project-spec/meta-user \
  "

 

Can I have some help on this please?

Thanks in advance

0 Kudos
1 Solution

Accepted Solutions
stephenm
Moderator
Moderator
423 Views
Registered: ‎09-12-2007

The openembedded layer are already added with Petalinux/Yocto:

https://xilinx-wiki.atlassian.net/wiki/spaces/A/pages/18841883/Yocto

In this case, just look for the recipe you want to add:

https://layers.openembedded.org/layerindex/recipe/37578/

 

Then just add this to the rootfs

Pre 2020.1:

<plnxproj-root>/project-spec/meta-user/recipes-core/images/petalinux-imagefull.bbappend file. For example:

IMAGE_INSTALL_APPEND = " python3-pip"

Post 2020.1:

<plnx-proj-root>/project-spec/meta-user/conf/user_rootfsconfig

CONFIG_python3-pip

Reference:

https://www.xilinx.com/support/documentation/sw_manuals/xilinx2020_1/ug1144-petalinux-tools-reference-guide.pdf

 

View solution in original post

6 Replies
stephenm
Moderator
Moderator
482 Views
Registered: ‎09-12-2007
0 Kudos
shairva
Explorer
Explorer
467 Views
Registered: ‎09-19-2018

Hi @stephenm ,

I read that post before creating this one, but it is not clear to me how to add the layer and the recipe.

Can you please help me with that?

Thanks in advance.

0 Kudos
shairva
Explorer
Explorer
447 Views
Registered: ‎09-19-2018

1 - I did: git clone https://git.openembedded.org/openembedded-core (inside folder project-spec)

2- $ petalinux-config
Yocto Settings ->
user layers ->
user layer 0 ->
path_to_my_layer

3- Save and exit.

Result:

ERROR: Failed to add user layer: /home/user/petalinux_2019.1/my_project/project-spec/openembedded-core/ 
ERROR: Failed to config project.

 

0 Kudos
stephenm
Moderator
Moderator
424 Views
Registered: ‎09-12-2007

The openembedded layer are already added with Petalinux/Yocto:

https://xilinx-wiki.atlassian.net/wiki/spaces/A/pages/18841883/Yocto

In this case, just look for the recipe you want to add:

https://layers.openembedded.org/layerindex/recipe/37578/

 

Then just add this to the rootfs

Pre 2020.1:

<plnxproj-root>/project-spec/meta-user/recipes-core/images/petalinux-imagefull.bbappend file. For example:

IMAGE_INSTALL_APPEND = " python3-pip"

Post 2020.1:

<plnx-proj-root>/project-spec/meta-user/conf/user_rootfsconfig

CONFIG_python3-pip

Reference:

https://www.xilinx.com/support/documentation/sw_manuals/xilinx2020_1/ug1144-petalinux-tools-reference-guide.pdf

 

View solution in original post

stephenm
Moderator
Moderator
414 Views
Registered: ‎09-12-2007

I tried this on my end, and it works:

pip.PNG

0 Kudos
shairva
Explorer
Explorer
397 Views
Registered: ‎09-19-2018

ohhhh I thought the command to invoke was python3-pip, facepalm

I typed pip3 as you did and, yes, I got it:

 

root@design_one:~# pip3 --version
pip 20.0.2 from /usr/lib/python3.5/site-packages/pip (python 3.5)
root@design_one:~# 

 

So, @stephenm, I thought openembedded-core and meta-openembedded were different layers, that's why I though that layer was not included with Petalinux

Thanks!

 

0 Kudos