Adding New Hardware Project
TracNav menu
-
User Guide
- Copyright Information
- Acknowledgements
- Terminology
- Introduction
-
PetaLinux Overview...
-
Working with PetaLinux - The Basics...
-
Customising PetaLinux
- Overview
- Adding New Hardware Project
- Adding New Platforms
- Adding New Applications
- System Settings Configuration Menu
-
Advanced Topics...
-
Debugging...
-
PetaLinux Bootloader Solutions...
-
Supported Reference Designs...
- PetaLinux Tools Reference
- Getting Help
PetaLinux is designed to complement the Xilinx EDK design process. This allows hardware platform created using Xilinx EDK tools to be integrated into the PetaLinux source tree.
This is to allow a single environment to support building of both the hardware and software components of the target platform. Existing hardware platform can be added to the PetaLinux source tree easily. However, some manual configurations are required to fully integrate the project into PetaLinux. This section provides the steps to do this.
Adding Hardware Project Directory
PetaLinux includes the '$PETALINUX/hardware/user-platforms' directory to house user-created hardware projects. New projects can be added into this directory.
The 'hardware' Directory
Copy your hardware platform project into the $PETALINUX/hardware/user-platforms directory.
$ cp -rf my_hardware_project $PETALINUX/hardware/user-platforms
The above command will copy recursively the my_hardware_project directory into the hardware/user-platforms directory in PetaLinux. The $PETALINX environment variable will be resolved to the PetaLinux installation directory. The 'my_hardware_project' refers to the directory containing the hardware project to be added.
PetaLinux BSP
After the hardware platform has been defined it is required to generate a collection of software parameters based on the hardware platform. These parameters are used to initialised and communicate with the hardware. This is referred to as the Board Support Package (BSP). PetaLinux includes a custom BSP to be used exclusively with the PetaLinux distribution. This BSP is required to enable the U-Boot bootloader and Linux operating system to operate and is also used to support the AutoConfig framework.
When importing a new hardware project, it is required to update the project to use the PetaLinux BSP.
The following section outline the steps required to change the hardware project to use the PetaLinux BSP.
Updating 'system.mss' File
Update the OS_NAME and OS_VER parameters in the OS section of the "system.mss" file to use 'petalinux' and version '1.00.b'. Refer to the example below.
BEGIN OS PARAMETER OS_NAME = petalinux PARAMETER OS_VER = 1.00.b
Create 'edk_user_repository' Link
The files required to generate the PetaLinux BSP is in the $PETALINUX/hardware/edk_user_repository directory. In order for Xilinx EDK tools to be able to access these files, a symbolic link must be created in the new hardware project directory.
$ cd $PETALINUX/hardware/user-platforms/my_hardware_project $ ln -s ../../edk_user_repository edk_user_repository
The above commands will create a symbolic link in the my_hardware_project directory to point to the directory that contains the PetaLinux BSP files. Where 'my_hardware_project` refers to the directory containing the newly added hardware project directory.
Updating 'system.xmp' File
The last step is to include the ModuleSearchPath variable in the system.xmp file. This will tell the Xilinx EDK tools where to locate the PetaLinux BSP files.
Update the "system.xmp" file to include the "ModuleSearchPath: edk_user_repository/" string. Refer to the example below.
XmpVersion: 9.1.01 IntStyle: default ModuleSearchPath: edk_user_repository/ MHS File: system.mhs MSS File: system.mss NPL File: projnav/system.ise Architecture: virtex4
