Translate

Thursday, 22 November 2018

How to customize Ubuntu for Xilinx PetaLinux



Hi !


If you want to run Xilinx PetaLinux on Ubuntu then you need to add resources to Ubuntu.

That's what we will do in this post !



Here are the main sections of this post for a quick jump :







Step 1 : Install Additionnal System Tools and Library Dependencies


These installations are madatory in order to run the Xilinx PetaLinux tool on Ubuntu.

Otherwise you will get this type of error if you launch the PetaLinux installation :




To proceed with the installation, use the following command line :

Read This !

Beware to copy this command in a single line !

sudo apt-get --yes install tofrodos iproute gawk gcc git-core make net-tools libncurses5-dev tftpd zlib1g-dev flex bison lib32z1 lib32ncurses5 lib32ncursesw5 lib32gomp1 xvfb chrpath socat autoconf libtool texinfo gcc-multilib libsdl1.2-dev libglib2.0-dev zlib1g:i386 libssl-dev


And there it goes :



Just wait for this installation run to finish.






Step 2 : Add the TFTP tool


TFTP (Trivial File Transfert Protocol) is a light protocol for files transfer over an ethernet link.

In our case it will let us transfer files between Ubuntu running on my computer to the PetaLinux running on the MiniZed Board.

This will be very convenient for Linux files, files stored in embedded flash memories or FPGA's bitstream update.


Stage 1


First we need to install the TFTP tool in Ubuntu.

Use the following command :

sudo apt-get install xinetd tftpd tftp


You should get the following log after you provide your sudo password.




Stage 2


The next step is to create the TFTP entry for the xinetd service.

First let's create the empty file with the following command:

sudo touch /etc/xinetd.d/tftp


As we don't have permission in the /etc/xinetd.d/ folder and we need to modify the tftp file we have to give the permission to the file with the following command :

sudo chmod ugo+rw /etc/xinetd.d/tftp





Then open the file with your text editor, paste the following text in the file and save the file.

service tftp
{
protocol = udp
port = 69
socket_type = dgram
wait = yes
user = nobody
server = /usr/sbin/in.tftpd
server_args = /tftpboot
disable = no
}




Stage 3


Then we need to create the folder mentionned in the server_args of the /etc/xinetd.d/tftp file.

So at the root folder of your system create the tftpboot folder with the following command :

sudo mkdir /tftpboot


And then give permission to that folder with the following command :

sudo chmod ugo+rw /tftpboot/





Stage 4


To finalize the installation just restart the xinetd service with the following command :

sudo service xinetd restart


And that's it !

The Ubuntu's TFTP server should be up and running !





Step 3 : Add the Putty tool



Stage 1


First we need to install the Putty tool in Ubuntu.

Use the following command :

sudo apt-get install putty


You should get the following log.



Second, you need to give the rights to your profile to access the driver.

Use the following command :

sudo usermod -a -G dialout mtvl




Stage 2


Then in the Search Your Computer tool find the putty icon, drag and drop it on the desktop to have it accessible anytime.




Stage 3


Then you can configure connexion settings and save it in a configuration file. It will be very convenient when you launch a putty connexion very often, and even more if you switch from tasks to tasks !
















Post Conclusion

Now we have :

- Completed the Ubuntu's installation with neccessary resources for Xilinx PetaLinux tool.
- Install the TFTP tool for files transfer to the MiniZed board.
- Install the Putty tool for viewing Linux consoles from the MiniZed board.

No comments:

Post a Comment