Sorry, you need to enable JavaScript to visit this website.

Linux/Linux on both core Zynq

Unsolved
10 posts / 0 new
Saber's picture
Saber
Junior(0)
Linux/Linux on both core Zynq

Hello,

I can't find an example of an application Linux/Linux on the Zynq. Does any one know how to boot and run Linux on both core ?
Or maybe there is a sample example of this type od application ?

Thank you.

TroutChaser's picture
TroutChaser
Moderator(18)
Linux running on both cores by default

As described here under the 'SMP' heading http://www.wiki.xilinx.com/Zynq+Linux the Xilinx Zynq Linux is configured to use both cores in SMP mode by default.
 
-Gary

Saber's picture
Saber
Junior(0)
zImage on the SD card

Thank you for your answer. But i mean th zImage which is on the SD card of the Zedboard was configured to boot only on CPU0 and this was marled on the terminal when i started the Zedboard

zedhed's picture
zedhed
Moderator(25)
RE: zImage on the SD card

Hi Saber,

I think Gary is right on this one and it would be worth your time to read the Wiki page that he pointed out. If you are using the Digilent Out of Box design on your SD card, you are automatically running Linux in SMP mode.

If I boot my ZedBoard with the factory SD image and run the following command, I can see two processors listed here which indicates that SMP mode is running:

cat /proc/cpuinfo

Yes, I see a message at the beginning of the kernel log showing that Linux is booting on physical CPU 0...

However, further down in the kernel output log, there is another message which shows the following:

CPU1: Booted secondary processor
CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
Brought up 2 CPUs
SMP: Total of 2 processors activated (3188.32 BogoMIPS).

Please take a look at this Wiki page for some additional information on using the two CPUs:

http://www.wiki.xilinx.com/Zynq+Linux

Regards,

-Kevin

Saber's picture
Saber
Junior(0)
RE: zImage on the SD card

Thanks a lot. I agree with you.
But is it possible to choose which core contain a task ? For example i want to run one task in each core hwo to do that ?

TroutChaser's picture
TroutChaser
Moderator(18)
PLEASE READ THE WIKI PAGE

As described in the wiki page referenced in both posts above you can specify the CPU an application runs on:

Specifying A CPU
A user may cause an application to run on a specific CPU using the BusyBox utility taskset.
The following command will display the help information for the taskset command.

zynq> taskset --help
The mask field of the command specifies the CPU and is a value of 1 or 2.
The following command starts the application top running on the 2nd CPU.

zynq> taskset 2 top
-Gary

Saber's picture
Saber
Junior(0)
Hello Gary,

Hello Gary,

Thanks a lot.
Is it possible to see in which CPU each task is runnig ?

TroutChaser's picture
TroutChaser
Moderator(18)
use the "top" command

If you type "top" at the Linux prompt you will get a periodic display of all of the process that are running, along with the CPU the are running on, until you type "q" to terminate the command.
 
-Gary

Saber's picture
Saber
Junior(0)
gedit and gcc

Thanks Gary.

Do you know why "gedit" and "gcc" don't work under the provided Linux ?
How can i install it ?
Because i want to compile application under the Zynq

TroutChaser's picture
TroutChaser
Moderator(18)
Cross Compile is the typical use case

Hello Saber,
 
The typical use case for an embedded Linux like this is to cross compile your application on the Host PC and then execute/debug it on the Zynq as described in this Xilinx Wiki page: http://www.wiki.xilinx.com/Create+Linux+Application
 
I would use the Vivado version of the Zynq Concepts, Tools and Techniques tutorial rather than the older one referenced on the Wiki page. The Vivado version of the CTT can be found here: http://www.zedboard.org/design/1521/11
 
Based on your questions recently it would probably be worth your while to spend a little time reading on the Xilinx Linux Wiki pages:
http://www.wiki.xilinx.com/
 
The answers to most of your questions can be found there.
 
-Gary