cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
ardealliang
Visitor
Visitor
2,452 Views
Registered: ‎10-17-2018

how to set env variable on ubuntu 16.04 for petalinux 2018.2

Jump to solution

Hi,

 

I have installed petalinux.

what are the variables should be set?

export ARCH=?

export CROSS_COMPILE=?

 

 

 

armgcc.PNG

 

0 Kudos
1 Solution

Accepted Solutions
shabbirk
Moderator
Moderator
2,384 Views
Registered: ‎12-04-2016

Hi @ardealliang

 

Yes you are right. To work with petalinux, you need only the PetaLinux 2018.2 Installer

 

 

Best Regards

Shabbir

View solution in original post

0 Kudos
24 Replies
hokim
Scholar
Scholar
2,445 Views
Registered: ‎10-21-2015

Hi

petalinux has the shell script file for environment setting

source /opt/petalinux/2018.2/settings.sh

 

0 Kudos
ardealliang
Visitor
Visitor
2,420 Views
Registered: ‎10-17-2018

Hi Hokim,

 

I have run the command:

source /opt/Xilinx/SDK/2018.2/settings64.sh

 

but no output could be seen on Ubuntu.

 

I also checked the env, and didn't find the variable set by the sh.

It seems that the sh file didn't run.

 

Best Regards,

Ardeal

0 Kudos
shabbirk
Moderator
Moderator
2,399 Views
Registered: ‎12-04-2016

Hi Ardeal

 

After running source /opt/Xilinx/SDK/2018.2/settings64.sh, are you able to launch xsdk in your ubuntu?

 

Also, for petalinux you dont need to set any environment variables to build the project. You will have to just install the petalinux and source the petalinux's settings.sh or settings.csh and then create and build the petalinux project

 

FYI, you can refer to this UG1144 (Installation requirements section)

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

 

 

Best Regards

Shabbir

0 Kudos
aravindb
Moderator
Moderator
2,398 Views
Registered: ‎02-07-2018

HI @ardealliang

 

You no need to export any environment variables(ARCH & CROSS_COMPILE) if you use the petalinux to build the SW.

You just need to run the below  settings script, this will export all the environment variables required for petalinux build.

source /proj/petalinux/petalinux-v2017.3_daily_latest/petalinux-v2017.3-final/settings.sh 

 

Thanks & regards

Aravind

 

----------------------------------------------------------------------------------------------
Kindly note- Please mark the Answer as "Accept as solution" if information provided is helpful.
Give Kudos to a post which you think is helpful and reply oriented.
----------------------------------------------------------------------------------------------

0 Kudos
ardealliang
Visitor
Visitor
2,390 Views
Registered: ‎10-17-2018

Hi @aravindb,

 

The following is my petalinux path:

 

root@ubuntu /opt/Xilinx/SDK/2018.2#ls
bin  data  doc  eclipse  gnu  lib  scripts  settings64.csh  settings64.sh  tps

 

 

when I run source /opt/Xilinx/SDK2018.2/setting64.sh, nothing happens.

no variables are set, nothing displayed on the monitor.

 

Best Regards,

Ardeal

 

 

 

 

0 Kudos
shabbirk
Moderator
Moderator
2,386 Views
Registered: ‎12-04-2016

Hi Ardeal

 

It is not petalinux installation settings, it is just SDK settings. Refer my previous post on setting petalinux path

 

 

 

0 Kudos
ardealliang
Visitor
Visitor
2,381 Views
Registered: ‎10-17-2018

Hi @shabbirk,

 

Thanks for your reply!

 

Could you tell me the command to set petalinux envrionment?

 

My petalinux locate at:

root@ubuntu /opt/Xilinx/SDK/2018.2#ls
bin  data  doc  eclipse  gnu  lib  scripts  settings64.csh  settings64.sh  t

 

 

Thanks and Best Regards,

Ardeal

0 Kudos
shabbirk
Moderator
Moderator
2,377 Views
Registered: ‎12-04-2016

Hi Ardeal

 

root@ubuntu /opt/Xilinx/SDK/2018.2#ls

 

This is not petalinux installation path.

 

First install the petalinux by downloading petalinux installer from xilinx website

https://www.xilinx.com/support/download/index.html/content/xilinx/en/downloadNav/embedded-design-tools.html

 

Also, make sure before installing petalinux, you will have to install set of packages and steps to install these are described in UG1144 

 

 

Best Regards

Shabbir

0 Kudos
ardealliang
Visitor
Visitor
2,376 Views
Registered: ‎10-17-2018

 

I read the pdf file in your link.

 

There is no settings.sh file in my petalinux folder.

 

 

 

peta_env.PNG

0 Kudos
ardealliang
Visitor
Visitor
2,399 Views
Registered: ‎10-17-2018

I search settings.sh, but cannot find the file.

 

It seems that my petalinux is different from yours.

 

I installed it with the following command:

mkdir -p /opt/pkg/petalinux
./petalinux-v2018.1-final-installer.run /opt/pkg/petalinux

 

search_settingsh.PNG

0 Kudos
shabbirk
Moderator
Moderator
2,396 Views
Registered: ‎12-04-2016

Hi

 

Can you go to this path and check?

/opt/pkg/petalinux

 

 

Best Regards

Shabbir

0 Kudos
ardealliang
Visitor
Visitor
2,385 Views
Registered: ‎10-17-2018

 

 

it is empty

 

when I run the command

./Xilinx_SDK_2018.2_0614_1954_Lin64.bin /opt/pkg/petalinux

 

the default installation folder is /opt/Xilinx but not /opt/pkg/petalinux

 

 

0 Kudos
shabbirk
Moderator
Moderator
2,381 Views
Registered: ‎12-04-2016

Hi Aredeal

 

Now, try to install again here

 

./petalinux-v2018.1-final-installer.run /opt/pkg/petalinux

0 Kudos
ardealliang
Visitor
Visitor
2,379 Views
Registered: ‎10-17-2018

Hi @shabbirk,

 

Do you mean I should re-download the file petalinux-v2018.1-final-installer.run or re-run my existing file Xilinx_SDK_2018.2_0614_1954_Lin64.bin?

 

Best Regards,

Ardeal

0 Kudos
shabbirk
Moderator
Moderator
2,360 Views
Registered: ‎12-04-2016

Hi @Ardeal

 

Just copy the petalinux-v2018.1-final-installer.run in this path /opt/pkg/petalinux and run ./petalinux-v2018.1-final-installer.run .

 

No need to re-download

0 Kudos
ardealliang
Visitor
Visitor
2,359 Views
Registered: ‎10-17-2018

Hi @shabbirk,

 

From Xilinx web page:

https://www.xilinx.com/support/download/index.html/content/xilinx/en/downloadNav/embedded-design-tools.html

 

I could download SDK 2018.2 Web Install for Linux 64 (BIN - 99.29 MB)

 

should I download this BIN and run?

 

Best Regards,

Ardeal

0 Kudos
ardealliang
Visitor
Visitor
2,356 Views
Registered: ‎10-17-2018

 

Hi @shabbirk,

 

When I re-run the command:

./Xilinx_SDK_2018.2_0614_1954_Lin64.bin .

 

I choose  XSDK when there are 3 choice: XSDK , XSCT and BootGen

 

I got the final result as follows:

 

 

 

 

re_install.PNG

0 Kudos
shabbirk
Moderator
Moderator
2,342 Views
Registered: ‎12-04-2016

Hi @ardealliang

 

Can you please confirm, what is that you are looking for?

 

To install SDK or to install petalinux?

 

 

Best Regards

Shabbir

0 Kudos
ardealliang
Visitor
Visitor
2,335 Views
Registered: ‎10-17-2018

Hi Shabbirk,

 

I would like to install petalinux to compile Linux or C code for ARM on Zynq of zedboard.

 

I downloaded the petalinux tool from here:

https://www.xilinx.com/products/design-tools/embedded-software/petalinux-sdk.html

 

 

Best Regards,

Ardeal

0 Kudos
shabbirk
Moderator
Moderator
2,331 Views
Registered: ‎12-04-2016

Hi Ardeal

 

If petalinux is your requirement, dont focus on SDK or ./Xilinx_SDK_2018.2_0614_1954_Lin64.bin installer

 

Instead, focus only on petalinux installer. 

 

If you dont find settings.sh in this path /opt/pkg/petalinux/petalinux-v2018.2-final/  follow the below steps

 

Before installing or running petalinux installer, install the packages as described in page 9, 10 and 11 of the below user guide

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

 

And, Follow these steps for petalinux installation:

1. mkdir -p /opt/pkg/petalinux

2. Provide user permissions to /opt/pkg/petalinux

3. ./petalinux-v2018.1-final-installer.run /opt/pkg/petalinux

4. ls /opt/pkg/petalinux/petalinux-v2018.2-final/ and check for settings.sh

5. Then source /opt/pkg/petalinux/petalinux-v2018.2-final/settings.sh

 

 

0 Kudos
ardealliang
Visitor
Visitor
2,325 Views
Registered: ‎10-17-2018

Hi Shabbirk,

 

I eventually got it:

 

To install PetaLinux,

I should download PetaLinux 2018.2 Installer (TAR/GZIP - 6.15 GB) , but not SDK 2018.2 Web Install for Linux 64 (BIN - 99.29 MB)

 

Thanks!

 

Best Regards,

 

Ardeal

0 Kudos
shabbirk
Moderator
Moderator
2,385 Views
Registered: ‎12-04-2016

Hi @ardealliang

 

Yes you are right. To work with petalinux, you need only the PetaLinux 2018.2 Installer

 

 

Best Regards

Shabbir

View solution in original post

0 Kudos
ardealliang
Visitor
Visitor
2,320 Views
Registered: ‎10-17-2018

Hi Shabbirk,

 

Thanks for your reply!

 

 

Do you have any idea about the question:

https://forums.xilinx.com/t5/Embedded-Linux/Reproduce-the-Matlab-example-in-C-code-Receive-Tone-Signal-Using/td-p/904206

 

 

Best Regards,

Ardeal

0 Kudos
shabbirk
Moderator
Moderator
2,317 Views
Registered: ‎12-04-2016

Hi @ardealliang

 

I dont have any idea on this thread. I will ask any of my colleagues to respond on this thread if they know

 

Also, please mark this thread as an accepted solution to close the further discussion on this thread

 

 

Best Regards

Shabbir

0 Kudos