Translate

Tuesday, 30 October 2018

How to install Ubuntu 16.04.03 on a Virtual Machine



Hi !


In the previous post we've set up our Virtual Machine.

In this post we will install Ubuntu on this VM.

As the final goal is to use Xilinx's developpement tool on this Ubuntu install, first let's check in the Xilinx's VIVADO 2018.2 release note which version of Ubuntu is recommanded for the 2018.2 version.

This information is available here : Relase Note




Ok, let's consider Ubuntu 16.04.03 LTS (64 bits) !

You'll see that installing Ubuntu is quite straightforward !




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






Step 1 : Get the installation file


Here there is only one file to get, it is an .iso file.


Stage 1


Now, as we've seen earlier we have to find the Ubuntu 16.04.03 LTS (64 bits version).

So after digging in the old version download section of the Ubuntu website you can download the .iso file using the following link:
ubuntu-16.04.3-desktop-amd64.iso

The file is 1.5Gbytes and I will store it in my repository :








Step 2 : Install Ubuntu



Stage 1


Ok, the installation file is available, let's use it in the Virtual Machine.

Select your VM and then launch the VM by clicking Start



Stage 2


As the VM starts from scratch, it will ask you to provide a boot disk, like any computer after BIOS boot.

So just point to the downloaded .iso file of the Ubuntu installation.




Then just click Start to start using the installation .iso file.



Stage 3


Ok, now the Ubuntu installation configuration process will start.

Just click Install Ubuntu.



Stage 4


Remember, we need this specific version of Ubuntu, so do not select updates.

Just click Continue.



Stage 5


For the next stage, we will format the destination installation disk and continue the installation configuration process.

Si just click Install Now.



Just confirm by clicking Continue



Stage 6


There, confirm your position for Time reference selection.

Just click Continue.



Stage 7


Now select your keyboard settings.

As I'm French, I'll keep my standard keyboard settings.

Click Continue.



Stage 8


Next, your login settings.

First choose your Login Name.

Then provide and confirm your password.

Click Continue to finalize the stage.



Stage 9


The installation process finally starts !

It is quite fast, it will only last a few minutes, maybe 5 !

Several information screens will be displayed.

And the final screen appears.




Just click Restart Now to finalize the installation process.


Stage 10


The reboot stage will stall until you press Enter.

This is because the Virtual Machine must not boot on the installation disk again as everything is set up on the VM's hard drive.







Post Conclusion

Now we have :

- Installed Ubuntu 16.04.3 LTS (64 bits) on our Virtual Machine
- Configured basic settings of Ubuntu Mtvl user account

Thursday, 25 October 2018

How to install an Oracle VM VirtualBox on a Windows Host



Hi,

In this post we are going to see how to set the first step of the developement environnement:
How to Install the Virtual Machine on the Windows Host.

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



Good to know :

What is a VirtualBox ?

As its name says, it is a virtualized environment running on a Host that can shelter a Virtual Machine. It is provided as a package to be installed in the Host Operating System as an application.

It will let the Virtual Machine access and reserve the hardware resources of the Host machine, like Processor memory, HDD size, peripherals, .... The Virtual Machine can run software on this virtual hardware, typically running a Guest OS will let you have another computer running in your Host computer !!!

In some cases, an Extension Package is available to add functionnalities to the VirtualBox.





Step 1 : Get the installation files


There are two files to get:

1 - The VirtualBox platform package
2 - The VirtuaBox Extension Pack. You MUST get the same version as the package version.

They are both reachable here :
https://www.virtualbox.org/wiki/Downloads

At this time version is 5.2.20.



So first click on Windows hosts, this will let you download the VirtualBox-5.2.20-125813-Win.exe file.

Next click on All supported platforms, this will let you download the Oracle_VM_VirtualBox_Extension_Pack-5.2.20.vbox-extpack file.

I stored both files in D:\Downloads\Windows.





Step 2 : Install the VirtualBox package


Stage 1


Launch the executable VirtualBox-5.2.20-125813-Win.exe to start the wizzard.
Click Next.



Stage 2


If needed, you can choose components and destination of the installation.
Otherwise click Next.



Stage 3


Make your choice for VirtualBox launch from Windows.
Then click Next.



Stage 4


Click Yes on network warnings.



Stage 5


Configuration is done, launch installation by clicking Install.



Stage 6


During installation, some sub installation confirmation requests may pop up.
Click Install.



Stage 7


Installation process will terminate with the following screen.
Click Terminate.







Step 3 : Install the Extension Pack


When you end the Package installation process, the VirtualBox Interface is launched.

The Extension pack will add functionnalities to the VirtualBox application. This will for example let you have access to the USB port of the Host from within the VirtualBox.


Now here is the procedure to Install the Extension Pack.


Stage 1


In the VirtualBox interface select File > Preferences.



Stage 2


In the extension section, click on the Add Symbol.



Stage 3


Then select the Extension Pack file you downloaded previously.
Click Open.



Stage 4


Confirm that you know what you're doing !!
Click Install.



Stage 5


Click Accept License.



Stage 6


Finalize the installation process.
Click Ok.







Step 4 : Create the Virtual Machine


Good to know :

A virtual machine is the virtual definition of the elements that define a physical computer:
- How much Processor memory (reserved from the Host's memory)
- How much hard drive space (reserved from the Host's HDD)
- What OS is running on the machine

A file is created on the Host's HDD which contains the same content that would be stored on the HDD of the equivallent physical machine (partitions, repositories, OS installation, installed applications, user data files, ......)



Stage 1


Start the Oracle VirtualBox Manager and click on New to create a VM.

Then is the VM creation pop up, provide the name of your VM.

Here I chose Ubuntu 16.04.03 for the version of Ubuntu used and PetaLinux 2018.2 for the PetaLinux used.




Stage 2


Set the amount of memory.
Click Next.
We've seen on the Xilinx's memory recommandations that for small Zynq devices less than 1.5GBytes is preferred. So I configured 4GBytes to have some convinient margin.



Stage 3


Now create the virtual HDD.
Select Create a Virtual HDD now.
Click Create.



Stage 4


The HDD will be created on the Host's HDD as a file.
Select the extension VDI (Virtual Disk Image).
Click Next.



Stage 5


This stage defines how the .vdi file size will be handled by the Host.

I chose Fixed Size as it has better performances event it requires more space on the Host's HDD, but on my dedicated machine I have a confortable margin.




Stage 6


First select the destination repository that will store the .vdi file.

Secondly set the size of the .vdi file.

Read This !

A file is created on the Host's HDD which contains the same content that would be stored on the HDD of the equivallent physical machine (partitions, repositories, OS installation, installed applications, user data files, ......).

In our environment we will install Ubuntu, several big Xilinx applications and store all the projects we will create !!!

Believe me that makes a final hugh size !!

I made several tries and for now 100GB are convinient.

=> Make the good choice now, because changing this size afterward is not easy !!!


Third, click Create.

Then you can have a break ! Creating a file of 100GB is not that fast......




Stage 7


Ok, welcome back !!

That's it, now you have your Virtual Machine ready in the VirtualBox environment.







Post Conclusion

Now we have :

- The VirtualBox environment running on the Host
- Our Virtual Machine is set and ready to be used !

Wednesday, 10 October 2018

Setup the design environnement



Hi !


Ok, now it's time to start this project.

In this post we will start by the begining and take a closer look to what we need !

As this a Xilinx FPGA development we will focus on the associated tools.


Here is the list :

Let's see in more details each point.


1 - The developement board : AVNET MiniZed


There are many development boards available and most of them cost a larg amount of money.

However, there are several low cost boards with limited functionnalities but enougth to get started !

One of the most interesting provider for low cost boards is AVNET, everybody in the FPGA industry knows their famous ZEDBOARD !!

You can have a look there :
http://zedboard.org/

I had the opportunity to buy a Minized board, so this is the one I will use:
http://zedboard.org/product/minized




This specific post will give a presentation of the MiniZed board:
TBD

For now the important point is that the FPGA device on that board has the following items:

- Xilinx Device
- Zynq SoC Family
- Device ref : XC7Z007S-1CLG225C version

This Zynq device provides us :

- For the CPU side (PL) : a full ARM Cortex A9 cores with the associated peripherals.
- For the FPGA side (PS) : a FPGA matrix based on Xilinx's Artix7 family

The S extension tells that the device embeds only one Cortex A9 APU (Application Processor Unit).

For a global overview of the caracteristics of this device, have a look at :
Zynq Data sheet Overview


2 - The Xilinx VIVADO FPGA design flow tool


VIVADO is the tool that will let us :

- Edit constraint files (IOs, Timings, ...),
- Create customs IPs,
- Edit Block Design for graphical design assembly with customisable IP blocks,
- Synthesis the design,
- Place and route the design,
- Generate the bitstream,
- Run Simulations using the integrated HDL Simulator XSIM,
- Configure, debug the FPGA design using integrated Hardware JTAG Debugger,
- Many others tasks.....

We will use the current version available which is the 2018.2 version.

A most important we will use the free Vivado WebPACK edition.

Have a look there:
VIVADO Design Suite Overview

Refer to this post for a VIVADO installation tutorial:
1.5 - How to install Xilinx Vivado and SDK


3 - The Xilinx SDK Software tool


SDK is the tool that will let us:

- Generate BSP,
- Generate FSBL,
- Generate Flash programming files,
- Generate Applications for Bare Metal and Linux,
- Debug executables using JTAG/Ethernet Debugger,
- Use integrated consoles,
- Many others tasks.....

We will use the SDK version provided with the VIVADO version used.

The SDK installation is part of the SDK installation process, so refer to the VIVADO's installation tutorial.

Refer to this post for a VIVADO installation tutorial:
1.5 - How to install Xilinx Vivado and SDK


4 - A text editor


The Xilinx Tools provide integrated text editors, still, I'm used to my NotePad++ editor !

Take a look over there:
https://notepad-plus-plus.org/

The column edition mode is very usefull for VHDL edition, as you can apply the same modifications simultaneously to several lines !!


5 - Tools for Linux development


The SDK tool provided by Xilinx will let you develop software for Linux platforms.

Just report to the SDK section of this post.

The PetaLinux tool provided by Xilinx will let you have a total control to handle a project for Linux application developpement.

Refer to these posts for a PetaLinux installation tutorial:
1.6 - How to install PetaLinux


6 - Secondary tools


One of my favorite tool is WINMERGE. It allows you to compare 2 files or repositories, to easily identify differences and to merge sections of files.

Have a look here:
http://winmerge.org


7 - A computer


Let see here what parameters can constraint the choice of the computer.
Each version of the VIVADO tools provides a Release Notes document UG973 (v2018.2) which provides important informations:

- Which Operating Systems are compatible with the version tool (Page 11)
- Which devices are available in which release (Page 12)
- Downloading and installation procedures
- Many other things....

Xilinx also provides Memory Usage with VIVADO for a target device:
Computer Memory Recommandations

And the final constraint is that we will develop for Linux platforms, so tools should be used under a Linux Operating system. Moreover, tools like PetaLinux or QEMU only run on Linux platforms !

BUT !

As I use my conputer for other task I have it running under Windows, so to have the Linux available I will use a virtual machine.





Post Conclusion

So as conclusion here is a summary of my development environment:

- Operating System : Ubuntu Linux 16.04.3 running on a virtual machine (Windows Host)
- Xilinx VIVADO tool chain is 2018.2 WebPACK edition
- Processor Intel Core i7-4790K at 4.00Ghz
- 8Go of RAM
- HDD 250GB, SATA, 5400 rpm
- Motherboard ASUS ZB7-A

I have a brand new HDD with two partitions:
- C: 100Go for Windows and programs installation, I called it PROG_W10.
- D: 150Go for all the Linux developement stuffs, I called it DEV_LINUX.

Tuesday, 9 October 2018

Why this blog !



Hi !

I'm a French FPGA/SOC designer, I've had the opportunity to develop many FPGA designs (Mostly on Xilinx devices) in various application domains for 20 years now !

I've done tons of VHDL design, but these last years I made several projects based on SOCs (Microblaze, ZYNQ, NIOS), and I thought to myself, it is sooooo powerful !!!

The conclusion was clear :

That's what I want to do now !!



So, after some practice on several projects I'm now able to design SOCs, create librairies of custom IPs, bare metal drivers and simple bare metal application writing. That's a good start !

But my goal would be to be able to design a full embedded Linux system, from FPGA design to software application writing, all based on a evaluation board.

Ok, fine, but the main problem to achieve this is to get the associated knowledge !

I'm working in a company and for customers doing electronics, but none of them will give me the opportunity to learn how to design a Linux embedded design.......

Well, no problem, the remaining solution is:

I will learn all this by myself !



So, I started to get overall information about Linux , device driver writing, Xilinx Tools like PetaLinux and after a while, it appeared that it was going to be a huuugh amount of complex work !!

Especially when you consider that I'm new to Linux and blogger !

So, to get things done step by step, the best solution would be to write it down in small dedicated sections. It would let me find specific information quickly, in an ordered way, easy to complement, and shared. Well, a blog is indeed made for that !!

To give life to this I needed a concrete application to work on.

Well, I started thinking. Ok, I've got an AVNET MiniZed board, I always thought video stuffs are pretty cool and I've done a lot of them. Moreover, some time ago I started a video IP library for Zynq that  I wanted very lite, but I didn't finish it..... So, that's it, I will dedicate this blog to achieve a video design running on my MiniZed board that I will call:

My Tiny Video Lib for FPGA ! 



Ok, Let's start this !




I wanted to do this blog in English to enable more people to have access to it.
As it is not my native language I'll do my best, but if I make English mistakes feel free to correct me !