Xilinx
Xilinx
Review
DVB-T Mod
RAM
RS232_PC
RS232_ST
FLASH SPI
TS_OUT
TS_IN
GPIO
Uart_PC TS switch
Uart_ST uBlaze
Uart_Mod
Interrupt Timer
Clock Watchdog
1.3. SW platform
Application SW
uClinux
Bootloader
Bitstream
FPGA
• After power on the board the FPGA starts downloading the bitstream from the
BPI memory (selected by the M0, M1 and M2 switches)
• The bitstream contains both the Microblaze configuration and the first
application that starts automatically (the application is compiled in BRAMs bits
inside the FPGA structure). The bootloader points to uClinux image in Flash
BPI memory and copies all the kernel and ROM filesystem into the RAM.
• After they are copied into the RAM, the bootloader starts executing the lernel
from RAM.
• The kernel mounts the ROMFS into RAM and it is configured with a start SW
application.
• After kernel starts executes automatically the SW application.
1.4. Devlopment flow
2. Required HW
2.1. PC requirements
2.2. Tools
3. Required SW
4. SW installation
4.1. TBD
4.2. TBD
5. XPS setup
5.1. TBD
5.2. TBD
6. Project creation
• Set the STDIN and STDOUT (PC terminal) to RS232, and the boot memory to
ilmb_cntlr.
• Set the start memory test application generated by XPS at the following:
• Click on “Generate”
• And click on “Finish”
• Click on “start using Platform Studio”
6.2. Configuring HW design
• XPS Timer
• Uart_Mod
• Uart_PC
• Uart_ST
• Clock generator
• Proc_sys_reset
• Vector_logic
• The port configuration must be as following:
• The address map is as follows:
6.3. Generating BSP files
And set the “Project Peripheral Repository” in “Device and Repository” tag to
“../edk_user_repository”
And the platform will generate the needed file for generating embedded linux. File
generated is <Project folder>\microblaze_0\libsrc\petalinux_v1_00_b\Kconfig.auto
7. VMware
7.1. asdasd
7.2. dasda
8. Virtual Machine setup
Download Ubuntu 9.04 desktop edition from http://www.ubuntu.com/ and save the ISO
image into the host PC
Install desktop with standard options. Set the user “xilinx” and give administrative
rights to it.
• Setting up the network
/home/xilinx/petalinux-v0.40-rc3
192.168.20.1/24(rw,no_root_squash,sync,no_subtree_check)
# exportfs –a
NOTE: Since the “petalinux-v0.40-rc3 folder still don’t exists, it won’t work until we
install the petalinux. See next step
8.3. Downloading and installing Petalinux
8.3.1. Downloading
8.3.2. Installing
9.1. Environment
Open a bash shell from user’s home folder. There must be a folder named “petalinux-
v0.40-rc3”. Type “cd petalinux-v0.40-rc3” and “source settings.sh” to set the
environment variables. All shells opened to perform any instruction with petalinux must
be started with the environment variables
After saving the configuration, type “make all” in the bash shell. It must compile all the
the kernel with the selected options and it will generate both ROM filesystem and
Kernel Image.
The following folders are generated with the following information (all included in
~/petalinux-v0.40-rc3/software/petalinux-dist):
• Folder bin/
o image.bin Æ kernel + filesystem to be downloaded to target
(recommended)
o image.elf Æ kernel + filesystem in elf format
o linux.bin Æ kernel binary (can be alternate loaded with romfs image
instead image.bin)
o romfs.img Æ romfs image (can be alternate loaded with kernel binary
instead image.bin)
• Folder romfs/
This folder contains all original filesystem (compressed into romfs.img and inage.bin).
It has the usual System V structure
o bin/ Æ binary files
o dev/ Æ devices nodes
o etc/ Æ configuration and init files
o and so on.....
The “make all” instruction executed previously generates the kernel according the
configuration options, generates also the romfs and the images.
If any configuration from rom filesystem file must be modified manually, after doing it
so it’s needed generating again the image file. So from “~/petalinux-v0.40-
rc3/software/petalinux-dist” folder type “make image”. From current romfs folder it will
generate all the images.
If needed generating again the romfs without compiling again the kernel, the user could
perform “make romfs” from “~/petalinux-v0.40-rc3/software/petalinux-dist”. After this
romfs generation, it must be generated again the image with “make image”
10. Running Linux from RAM
10.1. Conection
• RS232
The “c:\work\EDK\xxxx” project folder must contain at least the updated XPS project,
updated SW and bitstream (“c:\work\EDK\xxxx\implementation\download.bit”)
The batch will start first downloading the microblaze “download.bit” from the current
project:
After downloading the microblaze (needed to load the debugger module) the batch
downloads the kernel image and the rom filesystem (linux.bin)
After the download, the batch will exit and the linux is started on target. We can see it
through the RS232 hyperterminal session:
10.4. Executing
Now the linux is loaded ito SRAM. Through the Hyperterminal we can work normally
with the target. First we must enter the user (root) and password (root)
11. Booting and running Linux from Flash BPI
11.1. Requirements
In the project folder there must be the following files and folders:
• BPI_bootloader folder:
• FLASH_BURN folder
With the current application (without any bootlooader) download the microblaze core to
the board
In the XPS Project, select the Applications tab and double-click on Add software
Application
Enter BPI_Bootloader in the Project name
To do so, go to the “image.bin” file, click on properties and check the size
In this case, the size is 3481780, so 0x3520B4
Now all bitstream with bootloader and image are ready to be flashed.
11.5. Flashing the bitstream and the bootloader
First step is translating the “download.bit” file into a binary file. The
“..\FLASH_BURN\make_bpi_up.bat” is a batch designed for this application.
In a DOS window, run the application. It will generate the “..\pllinux_images\
bootloader_petalinux.bin” file
Select the “bootloader_petalinux.bin” file from project implementation folder. Select
the “Flash_BPI” instance name and set the Program offset to 0x00000000
Now the bitstream and the bootloader application are located in 0x00000000 address in
the Flash BPI memory.
11.6. Flashing the linux image
Select the “image.bin” file from project folder. Select the “Flash_BPI” instance name
and set the Programm offset to 0x00100000
Now the image application are located in 0x00100000 address in the Flash BPI
memory.
11.7. Booting from Flash
Turn of the board. Set the “M0 & M2” on. Turn on the board and it boots from Flash
BPI memory