Getting Started Guide for DM8148 EVM: Difference between revisions

From RidgeRun Developer Wiki
mNo edit summary
 
(34 intermediate revisions by 6 users not shown)
Line 1: Line 1:
<seo title="DM8148 EVM Guide | Use the RidgeRun SDK on Your DM8148" titlemode="replace" keywords="GStreamer, Linux SDK, Linux BSP,  Embedded Linux, Device Drivers, Nvidia, Xilinx, TI, NXP, Freescale, Embedded Linux driver development, Linux Software development, Embedded Linux SDK, Embedded Linux Application development, GStreamer Multimedia Framework."  description="Find all the necessary information you will need to get started with the RidgeRun SDK on a DM8148 evaluation module. Read this RidgeRun DM8148 guide."></seo>
= Introduction =
= Introduction =
On this page you are going to find all the necessary information to start from scratch to use the RidgeRun SDK on your DM8148 evaluation module (EVM). In the following sections we assume that you have already downloaded the [http://software-dl.ti.com/dsps/dsps_public_sw/ezsdk/5_02_02_60/index_FDS.html EZSDK] version 5.02.02.60 and that you have installed the [https://www.ridgerun.com/developer/wiki/index.php/Code_Sourcery_ARM_toolchain_2009q1-203  toolchain 2009q1-203] from [http://www.codesourcery.com/sgpp/lite/arm/portal/package4573/public/arm-none-linux-gnueabi/arm-2009q1-203-arm-none-linux-gnueabi.bin codesourcery] as well as your DM8148 SDK following the steps on [[RidgeRun 2011Q2 SDK User Guide#Installation | The RidgeRun installation guide]].
On this page you are going to find all the necessary information to start from scratch to use the RidgeRun SDK on your DM8148 evaluation module (EVM). In the following sections we assume that you have already downloaded the [http://software-dl.ti.com/dsps/dsps_public_sw/ezsdk/5_05_02_00/index_FDS.html EZSDK] version 5.05.02.00 and that you have installed the [https://developer.ridgerun.com/wiki/index.php/Code_Sourcery_ARM_toolchain_2009q1-203  toolchain 2009q1-203] from [http://www.codesourcery.com/sgpp/lite/arm/portal/package4573/public/arm-none-linux-gnueabi/arm-2009q1-203-arm-none-linux-gnueabi.bin codesourcery] as well as your DM8148 SDK following the steps on [[RidgeRun 2011Q2 SDK User Guide#Installation | The RidgeRun installation guide]].


The first section of this guide shows you how to install the EZSDK for DM8148 on your computer and how to configure a TFTP and NFS server. Subsequently, the second section contains instructions about how to configure the RidgeRun's SDK to create a SD card with all software components (uboot, kernel and filesystem) needed to boot to Linux Shell in your EVM. Using this SD card in the third and fourth section of this guide, you will be able to install on NAND images created by the SDK for kernel, uboot as well as your filesystem (JFFS2, UBI, NFS are available). Using the SD card created on the second section to flash the SDK in your EVM is just an option because you could try to use the installer of the RidgeRun's SDK with the uboot version that is running by default in a new EVM, however, we cannot guaranty that it will work as we expect, hence, we recommend to use the SD card instead. Finally, how to run opemax demos to encode and decode 1080p/h264 videos and some pipelines using gstreamer + openMax are shown.
The first section of this guide shows you how to install the EZSDK for DM8148 on your computer and how to configure a TFTP and NFS server. Subsequently, the second section contains instructions about how to configure the RidgeRun's SDK to create a SD card with all software components (uboot, kernel and filesystem) needed to boot to Linux Shell in your EVM. Using this SD card in the third and fourth section of this guide, you will be able to install on NAND images created by the SDK for kernel, uboot as well as your filesystem (JFFS2, UBI, NFS are available). Using the SD card created on the second section to flash the SDK in your EVM is just an option because you could try to use the installer of the RidgeRun's SDK with the uboot version that is running by default in a new EVM, however, we cannot guaranty that it will work as we expect, hence, we recommend to use the SD card instead. Furthermore we describe how to enable the Graphics SDK support on the Professional SDK. Finally, how to run opemax demos to encode and decode 1080p/h264 videos and some pipelines using gstreamer + openMax are shown.


On the rest of this document, we refer as $(DEVDIR) to the path where the RidgeRun SDK for DM8148 is installed
On the rest of this document, we refer as $(DEVDIR) to the path where the RidgeRun SDK for DM8148 is installed


= Basic preliminary work =
= Basic preliminary work =
== Installing the EZSDK ==
 
== Installing the EZSDK ==
 
1. Set the ezsdk binary as executable and set correct permissions  
1. Set the ezsdk binary as executable and set correct permissions  
<pre style="background:#d6e4f1">
<pre style="background: none repeat scroll 0% 0% rgb(214, 228, 241);"> sudo chmod 777 ezsdk_dm814x-evm_5_05_02_00_setuplinux
sudo chmod 777 ezsdk_dm814x-evm_5_02_02_60_setuplinux
</pre>  
</pre>
2. Install EZSDK. For ubuntu versions different than Ubuntu 10.04 LTS 32-bit you will need to add the --forcehost argument to install it:  
2. Install EZSDK. For ubuntu versions different than Ubuntu 10.04 LTS 32-bit you will need to add the --force-host argument to install it:
<pre style="background: none repeat scroll 0% 0% rgb(214, 228, 241);"> ./ezsdk_dm814x-evm_5_05_02_00_setuplinux --forcehost
<pre style="background:#d6e4f1">
</pre>  
./ezsdk_dm814x-evm_5_02_02_60_setuplinux --force-host
</pre>
'''note:''' During the EZSDK installation process you will be asked for the toolchain's path, assuming that you installed it on /opt, the path that you need to provide is /opt/codesourcery/arm-2009q1/bin/
'''note:''' During the EZSDK installation process you will be asked for the toolchain's path, assuming that you installed it on /opt, the path that you need to provide is /opt/codesourcery/arm-2009q1/bin/


==Setting up serial access to the Linux console==
== OPTIONAL: Installing AAC encoder and MP3 Decoder  ==
You use the serial port to control u-boot and Linux.  The picocom terminal emulator work well for this purpose.
::[[Setting up Picocom - Ubuntu]]


==Setting up a TFTP server==
The DM81xx platforms have the ability to encode AAC-LC and decode MP3 on the DSP using openMax+gstreamer, however, these codecs are not in the EZSDK by default. The Ridgerun SDK for the DM8148/DM8168 has internal logic to integrate these codecs and generate a new DSP firmware if these codecs are installed properly in your host computer. This new DSP firmware will be automatically loaded by into the DSP during boot time.  
If you are planning to use the SDK's installer to install images generated by the SDK in NAND, installing a TFTP server you will speed up downloads to the target hardware by using TFTP.
::[[Setting Up A Tftp Service]]


==Setting up an NFS server==
1. Download the AAC-LC encoder from TI Web page, this is called [http://software-dl.ti.com/dsps/dsps_public_sw/codecs/C674X_Audio_Codecs/01_00_001/index_FDS.html AAC LC Encoder, Version 01.00.01.00]  
For application development, it is convenient to use root NFS mount file system for the target hardware. This allows you to rebuild your application on the host and immediately run the application on the target hardware with no interveining steps. You host PC needs to be configured as a NFS server for this in order to work properly.  
::[[Setting Up A NFS Service]]


= Booting from a SD card =
2. Download the MP3 decoder from TI Web page, this is called [http://software-dl.ti.com/dsps/dsps_public_sw/codecs/C674X_Audio_Codecs/01_00_001/index_FDS.html MP3 Decoder, Version 1.41.00.00]
== Setting up your EVM to boot from SD card ==
In order to boot from a SD card you need to set the MMC as the first boot device to try in the DM8148 boot sequence, this can be done configuring a correct BTMODE through the switch SW1 called BOOT MODE SEL in your EVM (see Fig. 1)
[[Image:DM8168SW3.JPG|400px|thumb|center|Figure 1. Dip switch to control boot mode (SD card)‎]]  


<div style="text-align: center; ">'''Figure 1'''. Dip switch to control boot mode (SD card)</div>
3. Install the AAC-LC encoder inside of your EZSDK directory, i.e, your destination directory must be something like /home/<user>/ti-ezsdk_dm814x-evm_5_05_02_00/component-sources/c674x_aaclcenc_01_00_01_00_elf
== Configuring SDK to deploy firmware to a SD card==
<pre style="background: none repeat scroll 0% 0% rgb(214, 228, 241);"> sudo chmod 777 c674x_aaclcenc_01_00_01_00_elf.bin
This section describes how to configure the DM8148's SDK to deploy all basic firmware components (kernel, uboot and MLO) into a bootable SD card. The RidgeRun SDK support several filesystem types (JFFS2, NFS, etc) however in this case we are going to use it on the SD card as well.
./c674x_aaclcenc_01_00_01_00_elf.bin
</pre>  


1. Set your environment variables
4. Install the MP3 decoder inside of your EZSDK directory, i.e, your destination directory must be something like /home/<user>/ti-ezsdk_dm814x-evm_5_05_02_00/component-sources/c674x_mp3dec_01_41_00_00_elf
<pre style="background:#d6e4f1">
<pre style="background: none repeat scroll 0% 0% rgb(214, 228, 241);"> sudo chmod 777 c674x_mp3dec_01_41_00_00_elf.bin
  cd $(DEVDIR)
./c674x_mp3dec_01_41_00_00_elf.bin
`make env`
</pre>
</pre>


2. Open a make config menu
5. Open a make config menu and select the '''Support external AAC and MP3 audio codecs option''' over the '''Proprietary software category.'''
<pre style="background:#d6e4f1">
<pre style="background: none repeat scroll 0% 0% rgb(214, 228, 241);"> cd $DEVDIR
make config
`make env`
make config
</pre>
</pre>


running make config your SDK is going to download all basic packages needed by the SDK build system.
[[Image:DM81xxAudio.png|thumb|center|400px]]
<div style="text-align: center;">Optional selection of external AAC and MP3 audio codecs support </div>


3. Go to Installer Configuration submenu and configure your installer as is shown in Fig.2
''note'': If you built your SDK before to enable the audio support you need to remove the EZSDK tarball that were generated by the SDK in /opt/ridgerun/downloads thus the SDK will generate a new one including the audio codecs.
[[Image:InstallerMenuDM8168.png|400px|thumb|center|Figure 2. Installer configuration to deploy firmware to an SD card‎]]


<div style="text-align: center; ">'''Figure 2'''. Installer configuration to deploy firmware to an SD card</div>
== Setting up serial access to the Linux console  ==


Using the ''Firmware deployment mode'' submenu you can set how to deploy your kernel, uboot and filesystem image into your target board. There are three options in this submenu: ''Attached board on communication port'', ''Deploy all the firmware to an SD card'' and ''Create an SD card installer for flash memory''.
You use the serial port to control u-boot and Linux. The picocom terminal emulator work well for this purpose.  
*'''Attached board on communication port''' will allow you to send images to your target board using a serial port or a TFTP server, more details about this option are explained in the next section.
*'''Deploy all the firmware to an SD card''' tells to the installer that it must create the needed partitions on a SD card located in ''SD device on Linux host'' (please be sure that the option called '' Flash SD card image into loopback file instead of real SD'' is not selected) and that it have to install there the software's images generated by the SDK.  
*'''Create an SD card installer for flash memory''' is going to create and SD card with all the logic and software's images needed to flash the EVM's NAND from the SD card.


::[[Setting up Picocom - Ubuntu]]


4. Go to File System Configuration submenu and configure your filesystem as is shown in Fig.3
== Setting up a TFTP server  ==
[[Image:FSC.png|400px|thumb|center|Figure 3. File system configuration to use it on the SD‎]]


<div style="text-align: center; ">'''Figure 3'''. File system configuration to use it on the SD‎</div>
If you are planning to use the SDK's installer to install images generated by the SDK in NAND, installing a TFTP server you will speed up downloads to the target hardware by using TFTP.


5. Compile your SDK
::[[Setting Up A Tftp Service]]
<pre style="background:#d6e4f1">
 
  make
== Setting up an NFS server ==
</pre>


== Installing SDK's firmware to a SD card ==
For application development, it is convenient to use root NFS mount file system for the target hardware. This allows you to rebuild your application on the host and immediately run the application on the target hardware with no interveining steps. You host PC needs to be configured as a NFS server for this in order to work properly.  
Once you have built your SDK, you need to install it on the SD card running make install, but before to issue this command you need to unmount your SD card, otherwise the SDK won't let you install it (in order to avoid to erase information in some of your hard disks). Let's suppose that the environment variable called $(SDNAME) contains your mount point's name.


<pre style="background:#d6e4f1">
::[[Setting Up A NFS Service]]
umount /media/$(SDNAME)
cd $(DEVDIR)
make install
</pre>


you will be asked to confirm the device that you are going to partition and format, please enter ''yes'' if it is correct. After this, the SDK will start to create a bootable SD card
= Booting from a SD card =


Now you are ready to test your SDK booting from a SD card. Two partitions were created by the SDK: ''boot partition'' which contains the kernel, uboot and MLO image and the ''rootfs partition'' with your file system. It's important to notice that the environment of uboot is located in a *.txt file in the partition called ''boot'', which allows you to modify it easily.
== Setting up your EVM to boot from SD card ==


= Booting from NAND =
In order to boot from a SD card you need to set the MMC as the first boot device to try in the DM8148 boot sequence, this can be done configuring a correct BTMODE through the switch SW1 called BOOT MODE SEL in your EVM (see Fig. 1) [[Image:DM8148SD.JPG|thumb|center|400px]]
This section describes how to configure the DM8148's SDK to install the SDK's firmware in NAND as well as how to set up your EVM to boot from NAND. First, we are going to start flashing uboot in NAND using the SD card created in the above section, once uboot is running properly from NAND, we can start installing the kernel and finally your filesystem.
<div style="text-align: center;">'''Figure 1'''. Dip switch to control boot mode (SD card)</div>
== Configuring SDK to deploy firmware to a SD card ==


== Configuring SDK to install firmware in NAND ==
This section describes how to configure the DM8148's SDK to deploy all basic firmware components (kernel, uboot and MLO) into a bootable SD card. The RidgeRun SDK support several filesystem types (JFFS2, NFS, etc) however in this case we are going to use it on the SD card as well.


1. Set your environment variables
1. Set your environment variables  
<pre style="background:#d6e4f1">
<pre style="background: none repeat scroll 0% 0% rgb(214, 228, 241);">  cd $(DEVDIR)
  cd $(DEVDIR)
  `make env`
  `make env`
</pre>
</pre>  
2. Open a make config menu
<pre style="background: none repeat scroll 0% 0% rgb(214, 228, 241);"> make config
</pre>
running make config your SDK is going to download all basic packages needed by the SDK build system.
 
3. Go to Installer Configuration submenu and configure your installer as is shown in Fig.2 [[Image:InstallerMenuDM8168.png|thumb|center|400px]]
<div style="text-align: center;">'''Figure 2'''. Installer configuration to deploy firmware to an SD card</div>
Using the ''Firmware deployment mode'' submenu you can set how to deploy your kernel, uboot and filesystem image into your target board. There are three options in this submenu: ''Attached board on communication port'', ''Deploy all the firmware to an SD card'' and ''Create an SD card installer for flash memory''.
 
*'''Attached board on communication port''' will allow you to send images to your target board using a serial port or a TFTP server, more details about this option are explained in the next section.
*'''Deploy all the firmware to an SD card''' tells to the installer that it must create the needed partitions on a SD card located in ''SD device on Linux host'' (please be sure that the option called ''Flash SD card image into loopback file instead of real SD'' is not selected) and that it have to install there the software's images generated by the SDK.
*'''Create an SD card installer for flash memory''' is going to create and SD card with all the logic and software's images needed to flash the EVM's NAND from the SD card.


2. Open a make config menu
<br> 4. Go to File System Configuration submenu and configure your filesystem as is shown in Fig.3 [[Image:FSC.png|thumb|center|400px]]
<pre style="background:#d6e4f1">
<div style="text-align: center;">'''Figure 3'''. File system configuration to use it on the SD‎</div>
make config
5. Compile your SDK
</pre>
<pre style="background: none repeat scroll 0% 0% rgb(214, 228, 241);"> make
</pre>  
== Installing SDK's firmware to a SD card  ==


3. Go to Installer Configuration submenu and configure your installer as is shown in Fig.4
Once you have built your SDK, you need to install it on the SD card running make install, but before to issue this command you need to unmount your SD card, otherwise the SDK won't let you install it (in order to avoid to erase information in some of your hard disks). Let's suppose that the environment variable called $SDNAME contains your mount point's name (Normally if you press tab after umount /media/ it will complete it with you SD card name, if you have problems to find the name you can use commands like "df" or "mount" to verify it)
[[Image:InstallerMenuAttachedMethod.png|400px|thumb|center|Figure 4. Installer configuration to deploy firmware in NAND‎]]
<pre style="background: none repeat scroll 0% 0% rgb(214, 228, 241);"> umount /media/$(SDNAME)
cd $(DEVDIR)
make install
</pre>
you will be asked to confirm the device that you are going to partition and format, please enter ''yes'' if it is correct. After this, the SDK will start to create a bootable SD card


<div style="text-align: center; ">'''Figure 4'''. Installer configuration to deploy firmware in NAND</div>
Now you are ready to test your SDK booting from a SD card. Two partitions were created by the SDK: ''boot partition'' which contains the kernel, uboot and MLO image and the ''rootfs partition'' with your file system. It's important to notice that the environment of uboot is located in a *.txt file in the partition called ''boot'', which allows you to modify it easily.


= Booting from NAND  =


In this case, you must use the ''Attached board on communication port'' method, this will allow you to install all your firmware directly in nand by means of a serial port or by ethernet using a TFTP server. Here we are going to use a TFTP server and telnet as our communication method with the target board.  
This section describes how to configure the DM8148's SDK to install the SDK's firmware in NAND as well as how to set up your EVM to boot from NAND. First, we are going to start flashing uboot in NAND using the SD card created in the above section, once uboot is running properly from NAND, we can start installing the kernel and finally your filesystem.  


== Configuring SDK to install firmware in NAND  ==


3.1 Go to the ''Communication method with the target board'' and select ''Telnet-serial adaptor''
1. Set your environment variables
<pre style="background: none repeat scroll 0% 0% rgb(214, 228, 241);"> cd $(DEVDIR)
`make env`
</pre>
2. Open a make config menu
<pre style="background: none repeat scroll 0% 0% rgb(214, 228, 241);"> make config
</pre>
3. Go to Installer Configuration submenu and configure your installer as is shown in Fig.4 [[Image:InstallerMenuAttachedMethod.png|thumb|center|400px]]
<div style="text-align: center;">'''Figure 4'''. Installer configuration to deploy firmware in NAND</div>
<br> In this case, you must use the ''Attached board on communication port'' method, this will allow you to install all your firmware directly in nand by means of a serial port or by ethernet using a TFTP server. Here we are going to use a TFTP server and telnet as our communication method with the target board.


3.2 Configure the protocol to transfer images as TFTP
3.1 Go to the ''Communication method with the target board'' and select ''Telnet-serial adaptor''.


3.3 Set the IP address of your host machine in ''IP address of telnet-serial adaptor''
3.1.1 Configure the protocol to transfer images as TFTP


3.4 Set the port number that you assigned in the telnet configuration file to the serial port where your EVM is connected in ''Network port of telnet-serial adaptor''
3.1.2 Set the IP address of your host machine in ''IP address of telnet-serial adaptor''  


4. Close the make config menu and save your changes.
3.1.3 Set the port number that you assigned in the telnet configuration file to the serial port where your EVM is connected in ''Network port of telnet-serial adaptor''


== Configuring your Filesystem type ==
3.2 (Alternative to point 3.1 - using ''Telnet-serial adaptor'') Go to ''Communication method with the target board'' and select ''Serial''


The RidgeRun SDK for DM8148 EVM supports different filesystem types: UBI, JFFS, NFS and also as we mentioned before you can use it in your SD card as well. In this tutorial we are going to use UBI as our default filesystem.
3.2.1 Set the ''Serial port for target communication''


1. Set your environment variables
4. Close the make config menu and save your changes.
<pre style="background:#d6e4f1">
cd $(DEVDIR)
`make env`
</pre>


2. Open a make config menu
== Configuring your Filesystem type ==
<pre style="background:#d6e4f1">
  make config
</pre>


3. Go to the ''File System Configuration->File system image target'' and choose UBIFS volume. Please be sure that UBIFS sub-page size is set to 512.
The RidgeRun SDK for DM8148 EVM supports different filesystem types: UBI, JFFS, NFS and also as we mentioned before you can use it in your SD card as well. In this tutorial we are going to use UBI as our default filesystem.  


4. Save your changes and compile your SDK
1. Set your environment variables
<pre style="background:#d6e4f1">
<pre style="background: none repeat scroll 0% 0% rgb(214, 228, 241);"> cd $(DEVDIR)
  make
  `make env`
</pre>
</pre>
2. Open a make config menu
<pre style="background: none repeat scroll 0% 0% rgb(214, 228, 241);"> make config
</pre>  
3. Go to the ''File System Configuration-&gt;File system image target'' and choose UBIFS volume. Please be sure that UBIFS sub-page size is set to 512.


==Flashing uboot, kernel and filesystem in NAND==
4. Save your changes and compile your SDK
<pre style="background: none repeat scroll 0% 0% rgb(214, 228, 241);"> make
</pre>
== Flashing uboot, kernel and filesystem in NAND ==


1.Boot the RidgeRun SDK using the SD card created in the [https://www.ridgerun.com/developer/wiki/index.php/Getting_Started_Guide_for_DM8148#Booting_from_a_SD_card first section] of this guide and stop the uboot countdown. Close your Picocom, minicom or telnet session.
1.Boot the RidgeRun SDK using the SD card created in the [https://www.ridgerun.com/developer/wiki/index.php/Getting_Started_Guide_for_DM8148_EVM#Booting_from_a_SD_card first section] of this guide and stop the uboot countdown. Close your Picocom, minicom or telnet session.  
<pre style="background:#FFFFC0">
<pre style="background: none repeat scroll 0% 0% rgb(255, 255, 192);">U-Boot 2010.06 (Sep 29 2011 - 12:23:57)
U-Boot 2010.06 (Sep 29 2011 - 12:23:57)


TI8148-GP rev 2.1
TI8148-GP rev 2.1
Line 183: Line 196:
                 ,A@@@hi;;;r5;;;;r;rrSG@@@A,           
                 ,A@@@hi;;;r5;;;;r;rrSG@@@A,           
               r@@#i;:;s222hG;rrsrrrrrr;ri#@@r         
               r@@#i;:;s222hG;rrsrrrrrr;ri#@@r         
            :@@hr:r;SG3ssrr2r;rrsrsrsrsrr;rh@@:       
            &nbsp;:@@hr:r;SG3ssrr2r;rrsrsrsrsrr;rh@@:       
             B@H;;rr;3Hs;rrr;sr;;rrsrsrsrsrsr;;H@B     
             B@H;;rr;3Hs;rrr;sr;;rrsrsrsrsrsr;;H@B     
           @@s:rrs;5#;;rrrr;r#@H:;;rrsrsrsrsrr:s@@     
           @@s:rrs;5#;;rrrr;r#@H:;;rrsrsrsrsrr:s@@     
           @@;;srs&X#9;r;r;;,2@@@rrr:;;rrsrsrsrr;;@@   
           @@;;srs&amp;X#9;r;r;;,2@@@rrr:;;rrsrsrsrr;;@@   
         @@;;rrsrrs@MB#@@@@@###@@@@@@#rsrsrsrsrr;;@@   
         @@;;rrsrrs@MB#@@@@@###@@@@@@#rsrsrsrsrr;;@@   
         G@r;rrsrsr;#X;SX25Ss#@@#M@#9H9rrsrsrsrsrs;r@G  
         G@r;rrsrsr;#X;SX25Ss#@@#M@#9H9rrsrsrsrsrs;r@G  
         @9:srsrsrs;2@;:;;:.X@@@@@H::;rrsrsrsrsrsrr:3@  
         @9:srsrsrs;2@;:;;:.X@@@@@H::;rrsrsrsrsrsrr:3@  
       X@;rrsrsrsrr;XAi;;:&@@#@Bs:rrsrsrsrsrsrsrsrr;@X
       X@;rrsrsrsrr;XAi;;:&amp;@@#@Bs:rrsrsrsrsrsrsrsrr;@X
       @#;rsrsrsrsrr;r2ir@@@###::rrsrsrsrsrsrsrsrsr:@@
       @#;rsrsrsrsrr;r2ir@@@###::rrsrsrsrsrsrsrsrsr:@@
       @A:rrsrsrsrr;:2@29@@M@@@;:;rrrrsrsrsrsrsrsrs;H@
       @A:rrsrsrsrr;:2@29@@M@@@;:;rrrrsrsrsrsrsrsrs;H@
       @&;rsrsrsrr;A@@@@@@###@@@s::;:;;rrsrsrsrsrsr;G@
       @&amp;;rsrsrsrr;A@@@@@@###@@@s::;:;;rrsrsrsrsrsr;G@
       @#:rrsrsrsr;G@5Hr25@@@#@@@#9XG9s:rrrrsrsrsrs:#@
       @#:rrsrsrsr;G@5Hr25@@@#@@@#9XG9s:rrrrsrsrsrs:#@
       M@;rsrsrsrs;r@&#;::S@@@@@@@M@@@@Grr:;rsrsrsr;@#
       M@;rsrsrsrs;r@&amp;#;::S@@@@@@@M@@@@Grr:;rsrsrsr;@#
      :@s;rsrsrsrr:M#Msrr;;&#@@@@@@@@@@H@@5;rsrsr;s@,
      &nbsp;:@s;rsrsrsrr:M#Msrr;;&amp;#@@@@@@@@@@H@@5;rsrsr;s@,
         @@:rrsrsrsr;S@rrrsr;:;r3MH@@#@M5,S@@irrsrr:@@  
         @@:rrsrsrsr;S@rrrsr;:;r3MH@@#@M5,S@@irrsrr:@@  
         @A:rrsrsrsrrrrrsrsrrr;::;@##@r:;rH@h;srr:H@   
         @A:rrsrsrsrrrrrsrsrrr;::;@##@r:;rH@h;srr:H@   
        ;@9:rrsrsrsrrrsrsrsrsr;,S@Hi@i:;s;MX;rr:h@;   
        &nbsp;;@9:rrsrsrsrrrsrsrsrsr;,S@Hi@i:;s;MX;rr:h@;   
           r@B:rrrrsrsrsrsrsrr;;sA@#i,i@h;r;S5;r:H@r   
           r@B:rrrrsrsrsrsrsrr;;sA@#i,i@h;r;S5;r:H@r   
           ,@@r;rrrsrsrsrsrr;2BM3r:;r:G@:rrr;;r@@,     
           ,@@r;rrrsrsrsrsrr;2BM3r:;r:G@:rrr;;r@@,     
Line 205: Line 218:
               .@@@i;;rrrrsrs2i;rrrrr;r@M:;i@@@.       
               .@@@i;;rrrrsrs2i;rrrrr;r@M:;i@@@.       
                 .A@@#5r;;;r;;;rrr;r:r#AsM@@H.         
                 .A@@#5r;;;r;;;rrr;r:r#AsM@@H.         
                  ;&@@@@MhXS5i5SX9B@@@@G;             
                  &nbsp;;&amp;@@@@MhXS5i5SX9B@@@@G;             
                      :ihM#@@@@@##hs,                 
                      &nbsp;:ihM#@@@@@##hs,                 


Net:  <ethaddr> not set. Reading from E-fuse
Net:  &lt;ethaddr&gt; not set. Reading from E-fuse
Detected MACID:90:d7:eb:c4:3f:b3
Detected MACID:90:d7:eb:c4:3f:b3
cpsw
cpsw
Line 214: Line 227:
TI8148_EVM#
TI8148_EVM#


</pre>
2.Run make installbootloader to install uboot in NAND
<pre style="background: none repeat scroll 0% 0% rgb(214, 228, 241);"> make installbootloader
</pre>
3.Turn off your EVM and configure it to boot from NAND (please see [https://www.ridgerun.com/developer/wiki/index.php/Getting_Started_Guide_for_DM8148_EVM#Setting_up_your_EVM_to_boot_from_NAND Setting up your EVM to boot from NAND]). Turn on your EVM and repeat step 1.
4. Now, to install your kernel and filesytem run make install
<pre style="background: none repeat scroll 0% 0% rgb(214, 228, 241);"> make install
</pre>
Now you have installed all the SDK components in your DM8148 EVM and you should be able to boot to Linux shell and see the logo of RigeRun on the HDMI output. The RidgeRun SDK for DM8148 EVM loads automatically all the firmware and kernel modules needed to use the video processor subsystem.
== Setting up your DM8148 EVM to boot from NAND  ==
In order to boot from a NAND you need to set it as the first boot device to try in the DM8148 boot sequence, this can be done configuring a correct BTMODE through the switch SW1 called BOOT MODE SEL in your EVM (see Fig. 5) [[Image:DM8148NAND.JPG|thumb|center|400px]]
<div style="text-align: center;">'''Figure 5'''. Dip switch to control boot mode (NAND)</div>
= Graphics SDK - OpenGL - Qt =
The Professional Ridgerun SDK includes Graphics SDK 4.04.00.02 completely integrated, supporting the SGX530 3D Graphics Engine through the PowerVR driver. It also includes support to use Qt to render through the PowerVR kernel module.
1. In order to enable the Graphics SDK in your SDK, please download and install in your home directory the [http://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/gfxsdk/4_04_00_02/index_FDS.html Graphics SDK 4.04.00.02] from the TI web page
<pre style="background:#d6e4f1">
sudo chmod 777 Graphics_SDK_setuplinux_4_04_00_02.bin
./Graphics_SDK_setuplinux_4_04_00_02.bin
</pre>
</pre>
2.Run make installbootloader to install uboot in NAND
 
2.Then open a make config menu
 
<pre style="background:#d6e4f1">
cd $DEVDIR
make config
</pre>
 
3. Go to the Proprietary software and enable the graphics SDK.
[[Image:GraphicsSDKMenu.png|400px|thumb|center|Figure 7. SDK boot log after enable the Graphics SDK‎]]
 
<div style="text-align: center; ">'''Figure 6'''. SDK boot log after enable the Graphics SDK</div>
 
4. Go to File System Configuration ->  Select target's file system software -> qt-4.7.2 and select Support openGL and its demo. Finally disable the option called Make QT as compact as possible.
 
5. Close the menu, save your configuration and build your SDK.
<pre style="background:#d6e4f1">
<pre style="background:#d6e4f1">
make installbootloader
cd $DEVDIR
make  
</pre>
</pre>
3.Turn off your EVM and configure it to boot from NAND (please see [https://www.ridgerun.com/developer/wiki/index.php/Getting_Started_Guide_for_DM8148#Setting_up_your_EVM_to_boot_from_NAND Setting up your EVM to boot from NAND]). Turn on your EVM and repeat step 1.


4. Now, to install your kernel and filesytem run make install
6. Install your SDK in your board
<pre style="background:#d6e4f1">
<pre style="background:#d6e4f1">
make install
make install
</pre>
 
7. Boot your board, you will see the following message
<pre style="background:#FFFFC0">
Starting System
done.
Welcome to
__________ .__    .___              __________               
\______  \|__|  __| _/  ____    ____ \______  \ __ __  ____ 
|      _/|  | / __ |  / ___\ _/ __ \ |      _/|  |  \ /    \
|    |  \|  |/ /_/ | / /_/  >\  ___/ |    |  \|  |  /|  |  \
|____|_  /|__|\____ | \___  /  \___  >|____|_  /|____/ |___|  /
        \/          \//_____/      \/        \/            \/
         
    Embedded Linux Solutions
For further information see:
http://www.ridgerun.com
Build host: dsoto-Latitude-E5430-non-vPro
Built by: dsoto
Build date: Fri, 17 May 2013 17:13:21 -0600
Build tag: dm8148-tievm
Configuring network interfaces
SGX revision:  0x10205
Build type:  release6.x
Loaded PowerVR consumer services.
 
Please press Enter to activate this console.
</pre>
</pre>


Now you have installed all the SDK components in your DM8148 EVM and you should be able to boot to Linux shell and see the logo of RigeRun on the HDMI output. The RidgeRun SDK for DM8148 EVM loads automatically all the firmware and kernel modules needed to use the video processor subsystem.
8. Finally run one of the openGL demos or one of the qt + openGL demos


== Setting up your EVM to boot from NAND ==
<pre style="background:#FFFFC0">
In order to boot from a NAND you need to set it as the first boot device to try in the DM8148 boot sequence, this can be done configuring a correct BTMODE through the switch SW1 called BOOT MODE SEL in your EVM (see Fig. 5)
export LD_LIBRARY_PATH=/lib:/usr/lib:/usr/local/lib;
[[Image:SW3DM8168NAND.JPG|400px|thumb|center|Figure 5. Dip switch to control boot mode (NAND)‎]]
export QWS_DISPLAY="powervr";
export QT_PLUGIN_PATH=/usr/plugins;
export QT_QWS_FONTDIR=/usr/lib/fonts


<div style="text-align: center; ">'''Figure 5'''. Dip switch to control boot mode (NAND)</div>
cd /opt/gxzsdkdemos/ogles2/
/opt/gfxsdkdemos/ogles2 # ./OGLES2Skybox2
PVRShell: EGL 1.4 initialized


= OpenMax Demos =


To run the openMax's demos that are located by default in your filesystem in a directory called ''omx'' you need to run first the following commands in your EVM
cd /examples/opengl/hellogl_es2
=== Video initialization ===
./hellogl_es2
<pre style="background:#FFFFC0">
 
echo 0 > /sys/devices/platform/vpss/graphics0/enabled
echo 0 > /sys/devices/platform/vpss/graphics1/enabled
echo 0 > /sys/devices/platform/vpss/graphics2/enabled
</pre>
</pre>


'''Note''': Displaying openGL graphics on the LCD included on the EVM is not supported and the SDK by default will display them through HDMI
= OpenMax Demos  =
To run the openMax's demos that are located by default in your filesystem in a directory called ''omx'' you need to run first the following commands in your EVM
=== Video initialization  ===
<pre style="background: none repeat scroll 0% 0% rgb(255, 255, 192);">echo 0 &gt; /sys/devices/platform/vpss/graphics0/enabled
echo 0 &gt; /sys/devices/platform/vpss/graphics1/enabled
echo 0 &gt; /sys/devices/platform/vpss/graphics2/enabled
</pre>
'''note''': To run the decode display/encode demo with a 1080p video we recommend to use your filesystem by NFS due to the size of the input and output file.  
'''note''': To run the decode display/encode demo with a 1080p video we recommend to use your filesystem by NFS due to the size of the input and output file.  


==Decode display demo==
== Decode display demo ==
This demo is the decode-display demo included in the EZSDK. It takes an input file encoded in H264, decodes the stream and sends the output to the HDMI output
 
<pre style="background:#FFFFC0">
This demo is the decode-display demo included in the EZSDK. It takes an input file encoded in H264, decodes the stream and sends the output to the HDMI output  
./omx/decode_display_a8host_debug.xv5T -i inputFile.h264 -w 1920 -h 1080 -f 60 -g 0
<pre style="background: none repeat scroll 0% 0% rgb(255, 255, 192);">./omx/decode_display_a8host_debug.xv5T -i inputFile.h264 -w 1920 -h 1080 -f 60 -g 0
</pre>
</pre>  
== Capture encode demo  ==


==Capture encode demo==
This demo is the capture-encode demo included in the EZSDK. It takes an input video streaming from the component input (case 720p) of the daughter card and encodes it in H264, the output is displayed through the HDMI output.  
This demo is the capture-encode demo included in the EZSDK. It takes an input video streaming from the component input (case 720p) of the daughter card and encodes it in H264, the output is displayed through the HDMI output.
<pre style="background: none repeat scroll 0% 0% rgb(255, 255, 192);">echo 720p-60 &gt;/sys/devices/platform/vpss/display0/mode
<pre style="background:#FFFFC0">
echo 720p-60 >/sys/devices/platform/vpss/display0/mode
./omx/capture_encode_a8host_debug.xv5T -o sample.h264 -m 720p -f 60 -b 1000000 -n 1000
./omx/capture_encode_a8host_debug.xv5T -o sample.h264 -m 720p -f 60 -b 1000000 -n 1000
</pre>
</pre>
Line 261: Line 352:
= Using Gstreamer =
= Using Gstreamer =


Some examples of use of GStreamer to implement basic multimedia pipelines can be found at [[DM81xx GStreamer Pipelines - SDK 2011Q2]]. Please be aware that in order to display video you need to do the [https://www.ridgerun.com/developer/wiki/index.php/Getting_Started_Guide_for_DM8148#Video_initialization Video initialization]
Some examples of use of GStreamer to implement basic multimedia pipelines can be found at [[Gstreamer pipelines for DM816x and DM814x]]. Please be aware that in order to display video you need to do the [https://www.ridgerun.com/developer/wiki/index.php/Getting_Started_Guide_for_DM8168#Video_initialization Video initialization]
 
'''note:''' If you are not using the Ridgerun SDK and you are trying to use the TAG 00_06_00_00 provided by TI you will need to apply the following patch to make V4L2src and omxbufferalloc work.
 
<pre>
Index: gst-openmax-dm81xx/src/omx/gstomxbufferalloc.c
===================================================================
--- gst-openmax-dm81xx.orig/src/omx/gstomxbufferalloc.c 2012-11-14 16:15:41.392143697 -0600
+++ gst-openmax-dm81xx/src/omx/gstomxbufferalloc.c 2012-11-14 16:17:40.760145714 -0600
@@ -190,6 +190,7 @@
  gst_element_add_pad (GST_ELEMENT (filter), filter->sinkpad);
  gst_element_add_pad (GST_ELEMENT (filter), filter->srcpad);
+  filter->out_port.portptr = gst_omxportptr_new(&filter->out_port);
  filter->silent = FALSE;
  filter->out_port.num_buffers = 10;
  filter->out_port.always_copy = FALSE;
</pre>
 
= Linux Performance =
 
There are performance issues that can be fixed tuning the Linux kernel. Here some interesting pages are listed with tuning solutions and tricks specially for memory lateness problems.
 
* [[Linux Performance and Tuning Tricks | Linux Performance and Tuning Tricks]]
* [[High performance SD card tuning using the EXT4 file system | High performance SD card tuning using the EXT4 file system]]


= Articles related to this board =
= Articles related to this board =
:[https://www.ridgerun.com/developer/wiki/index.php/RidgeRun_2011Q2_SDK_User_Guide RidgeRun 2011Q2 SDK User Guide]
:[http://developer.ridgerun.com/wiki/index.php?title=RidgeRun_Irazu_SDK_User_Guide RidgeRun Irazu SDK User Guide]
:[http://processors.wiki.ti.com/index.php/EZSDK_Memory_Map EZSDK Memory Map]
:[http://processors.wiki.ti.com/index.php/EZSDK_Memory_Map EZSDK Memory Map]  
:[http://processors.wiki.ti.com/index.php/OMX_EZSDK_Examples OMX EZSDK Examples]
:[http://processors.wiki.ti.com/index.php/OMX_EZSDK_Examples OMX EZSDK Examples]  
:[http://www.ti.com/lit/ds/symlink/tms320dm8148.pdf TMS320DM814x DaVinci Digital Media Processor]
:[http://www.ti.com/lit/ds/symlink/tms320dm8148.pdf TMS320DM814x DaVinci Digital Media Processor]  
:[http://www.ti.com/lit/ug/sprugz8/sprugz8.pdf Technical Reference Manual]


[[Category:DM8148]] [[Category:GSG]]
[[Category:DM8148]] [[Category:GSG]]

Latest revision as of 11:16, 8 March 2023


Introduction

On this page you are going to find all the necessary information to start from scratch to use the RidgeRun SDK on your DM8148 evaluation module (EVM). In the following sections we assume that you have already downloaded the EZSDK version 5.05.02.00 and that you have installed the toolchain 2009q1-203 from codesourcery as well as your DM8148 SDK following the steps on The RidgeRun installation guide.

The first section of this guide shows you how to install the EZSDK for DM8148 on your computer and how to configure a TFTP and NFS server. Subsequently, the second section contains instructions about how to configure the RidgeRun's SDK to create a SD card with all software components (uboot, kernel and filesystem) needed to boot to Linux Shell in your EVM. Using this SD card in the third and fourth section of this guide, you will be able to install on NAND images created by the SDK for kernel, uboot as well as your filesystem (JFFS2, UBI, NFS are available). Using the SD card created on the second section to flash the SDK in your EVM is just an option because you could try to use the installer of the RidgeRun's SDK with the uboot version that is running by default in a new EVM, however, we cannot guaranty that it will work as we expect, hence, we recommend to use the SD card instead. Furthermore we describe how to enable the Graphics SDK support on the Professional SDK. Finally, how to run opemax demos to encode and decode 1080p/h264 videos and some pipelines using gstreamer + openMax are shown.

On the rest of this document, we refer as $(DEVDIR) to the path where the RidgeRun SDK for DM8148 is installed

Basic preliminary work

Installing the EZSDK

1. Set the ezsdk binary as executable and set correct permissions

 sudo chmod 777 ezsdk_dm814x-evm_5_05_02_00_setuplinux

2. Install EZSDK. For ubuntu versions different than Ubuntu 10.04 LTS 32-bit you will need to add the --forcehost argument to install it:

 ./ezsdk_dm814x-evm_5_05_02_00_setuplinux --forcehost

note: During the EZSDK installation process you will be asked for the toolchain's path, assuming that you installed it on /opt, the path that you need to provide is /opt/codesourcery/arm-2009q1/bin/

OPTIONAL: Installing AAC encoder and MP3 Decoder

The DM81xx platforms have the ability to encode AAC-LC and decode MP3 on the DSP using openMax+gstreamer, however, these codecs are not in the EZSDK by default. The Ridgerun SDK for the DM8148/DM8168 has internal logic to integrate these codecs and generate a new DSP firmware if these codecs are installed properly in your host computer. This new DSP firmware will be automatically loaded by into the DSP during boot time.

1. Download the AAC-LC encoder from TI Web page, this is called AAC LC Encoder, Version 01.00.01.00

2. Download the MP3 decoder from TI Web page, this is called MP3 Decoder, Version 1.41.00.00

3. Install the AAC-LC encoder inside of your EZSDK directory, i.e, your destination directory must be something like /home/<user>/ti-ezsdk_dm814x-evm_5_05_02_00/component-sources/c674x_aaclcenc_01_00_01_00_elf

 sudo chmod 777 c674x_aaclcenc_01_00_01_00_elf.bin
./c674x_aaclcenc_01_00_01_00_elf.bin

4. Install the MP3 decoder inside of your EZSDK directory, i.e, your destination directory must be something like /home/<user>/ti-ezsdk_dm814x-evm_5_05_02_00/component-sources/c674x_mp3dec_01_41_00_00_elf

 sudo chmod 777 c674x_mp3dec_01_41_00_00_elf.bin
./c674x_mp3dec_01_41_00_00_elf.bin

5. Open a make config menu and select the Support external AAC and MP3 audio codecs option over the Proprietary software category.

 cd $DEVDIR
`make env`
make config
Optional selection of external AAC and MP3 audio codecs support

note: If you built your SDK before to enable the audio support you need to remove the EZSDK tarball that were generated by the SDK in /opt/ridgerun/downloads thus the SDK will generate a new one including the audio codecs.

Setting up serial access to the Linux console

You use the serial port to control u-boot and Linux. The picocom terminal emulator work well for this purpose.

Setting up Picocom - Ubuntu

Setting up a TFTP server

If you are planning to use the SDK's installer to install images generated by the SDK in NAND, installing a TFTP server you will speed up downloads to the target hardware by using TFTP.

Setting Up A Tftp Service

Setting up an NFS server

For application development, it is convenient to use root NFS mount file system for the target hardware. This allows you to rebuild your application on the host and immediately run the application on the target hardware with no interveining steps. You host PC needs to be configured as a NFS server for this in order to work properly.

Setting Up A NFS Service

Booting from a SD card

Setting up your EVM to boot from SD card

In order to boot from a SD card you need to set the MMC as the first boot device to try in the DM8148 boot sequence, this can be done configuring a correct BTMODE through the switch SW1 called BOOT MODE SEL in your EVM (see Fig. 1)

Figure 1. Dip switch to control boot mode (SD card)

Configuring SDK to deploy firmware to a SD card

This section describes how to configure the DM8148's SDK to deploy all basic firmware components (kernel, uboot and MLO) into a bootable SD card. The RidgeRun SDK support several filesystem types (JFFS2, NFS, etc) however in this case we are going to use it on the SD card as well.

1. Set your environment variables

  cd $(DEVDIR)
 `make env`

2. Open a make config menu

 make config

running make config your SDK is going to download all basic packages needed by the SDK build system.

3. Go to Installer Configuration submenu and configure your installer as is shown in Fig.2

Figure 2. Installer configuration to deploy firmware to an SD card

Using the Firmware deployment mode submenu you can set how to deploy your kernel, uboot and filesystem image into your target board. There are three options in this submenu: Attached board on communication port, Deploy all the firmware to an SD card and Create an SD card installer for flash memory.

  • Attached board on communication port will allow you to send images to your target board using a serial port or a TFTP server, more details about this option are explained in the next section.
  • Deploy all the firmware to an SD card tells to the installer that it must create the needed partitions on a SD card located in SD device on Linux host (please be sure that the option called Flash SD card image into loopback file instead of real SD is not selected) and that it have to install there the software's images generated by the SDK.
  • Create an SD card installer for flash memory is going to create and SD card with all the logic and software's images needed to flash the EVM's NAND from the SD card.


4. Go to File System Configuration submenu and configure your filesystem as is shown in Fig.3

Figure 3. File system configuration to use it on the SD‎

5. Compile your SDK

 make

Installing SDK's firmware to a SD card

Once you have built your SDK, you need to install it on the SD card running make install, but before to issue this command you need to unmount your SD card, otherwise the SDK won't let you install it (in order to avoid to erase information in some of your hard disks). Let's suppose that the environment variable called $SDNAME contains your mount point's name (Normally if you press tab after umount /media/ it will complete it with you SD card name, if you have problems to find the name you can use commands like "df" or "mount" to verify it)

 umount /media/$(SDNAME)
 cd $(DEVDIR)
 make install

you will be asked to confirm the device that you are going to partition and format, please enter yes if it is correct. After this, the SDK will start to create a bootable SD card

Now you are ready to test your SDK booting from a SD card. Two partitions were created by the SDK: boot partition which contains the kernel, uboot and MLO image and the rootfs partition with your file system. It's important to notice that the environment of uboot is located in a *.txt file in the partition called boot, which allows you to modify it easily.

Booting from NAND

This section describes how to configure the DM8148's SDK to install the SDK's firmware in NAND as well as how to set up your EVM to boot from NAND. First, we are going to start flashing uboot in NAND using the SD card created in the above section, once uboot is running properly from NAND, we can start installing the kernel and finally your filesystem.

Configuring SDK to install firmware in NAND

1. Set your environment variables

 cd $(DEVDIR)
 `make env`

2. Open a make config menu

 make config

3. Go to Installer Configuration submenu and configure your installer as is shown in Fig.4

Figure 4. Installer configuration to deploy firmware in NAND


In this case, you must use the Attached board on communication port method, this will allow you to install all your firmware directly in nand by means of a serial port or by ethernet using a TFTP server. Here we are going to use a TFTP server and telnet as our communication method with the target board.

3.1 Go to the Communication method with the target board and select Telnet-serial adaptor.

3.1.1 Configure the protocol to transfer images as TFTP

3.1.2 Set the IP address of your host machine in IP address of telnet-serial adaptor

3.1.3 Set the port number that you assigned in the telnet configuration file to the serial port where your EVM is connected in Network port of telnet-serial adaptor

3.2 (Alternative to point 3.1 - using Telnet-serial adaptor) Go to Communication method with the target board and select Serial

3.2.1 Set the Serial port for target communication

4. Close the make config menu and save your changes.

Configuring your Filesystem type

The RidgeRun SDK for DM8148 EVM supports different filesystem types: UBI, JFFS, NFS and also as we mentioned before you can use it in your SD card as well. In this tutorial we are going to use UBI as our default filesystem.

1. Set your environment variables

 cd $(DEVDIR)
 `make env`

2. Open a make config menu

 make config

3. Go to the File System Configuration->File system image target and choose UBIFS volume. Please be sure that UBIFS sub-page size is set to 512.

4. Save your changes and compile your SDK

 make

Flashing uboot, kernel and filesystem in NAND

1.Boot the RidgeRun SDK using the SD card created in the first section of this guide and stop the uboot countdown. Close your Picocom, minicom or telnet session.

U-Boot 2010.06 (Sep 29 2011 - 12:23:57)

TI8148-GP rev 2.1

ARM clk: 600MHz
DDR clk: 400MHz

DRAM:  2 GiB
Using default environment

The 2nd stage U-Boot will now be auto-loaded
Please do not interrupt the countdown till TI8148_EVM prompt if 2nd stage is already flashed
Hit any key to stop autoboot:  0 
mmc1 is available
reading u-boot.bin

185536 bytes read
## Starting application at 0x80800000 ...


U-Boot 2010.06 (Sep 30 2011 - 10:37:36)

TI8148-GP rev 2.1

ARM clk: 600MHz
DDR clk: 400MHz

I2C:   ready
DRAM:  2 GiB
NAND:  256 MiB
*** Warning - booting from SD, using default environment

                          .:;rrr;;.                   
                    ,5#@@@@#####@@@@@@#2,             
                 ,A@@@hi;;;r5;;;;r;rrSG@@@A,          
               r@@#i;:;s222hG;rrsrrrrrr;ri#@@r        
             :@@hr:r;SG3ssrr2r;rrsrsrsrsrr;rh@@:      
            B@H;;rr;3Hs;rrr;sr;;rrsrsrsrsrsr;;H@B     
           @@s:rrs;5#;;rrrr;r#@H:;;rrsrsrsrsrr:s@@    
          @@;;srs&X#9;r;r;;,2@@@rrr:;;rrsrsrsrr;;@@   
         @@;;rrsrrs@MB#@@@@@###@@@@@@#rsrsrsrsrr;;@@  
        G@r;rrsrsr;#X;SX25Ss#@@#M@#9H9rrsrsrsrsrs;r@G 
        @9:srsrsrs;2@;:;;:.X@@@@@H::;rrsrsrsrsrsrr:3@ 
       X@;rrsrsrsrr;XAi;;:&@@#@Bs:rrsrsrsrsrsrsrsrr;@X
       @#;rsrsrsrsrr;r2ir@@@###::rrsrsrsrsrsrsrsrsr:@@
       @A:rrsrsrsrr;:2@29@@M@@@;:;rrrrsrsrsrsrsrsrs;H@
       @&;rsrsrsrr;A@@@@@@###@@@s::;:;;rrsrsrsrsrsr;G@
       @#:rrsrsrsr;G@5Hr25@@@#@@@#9XG9s:rrrrsrsrsrs:#@
       M@;rsrsrsrs;r@&#;::S@@@@@@@M@@@@Grr:;rsrsrsr;@#
       :@s;rsrsrsrr:M#Msrr;;&#@@@@@@@@@@H@@5;rsrsr;s@,
        @@:rrsrsrsr;S@rrrsr;:;r3MH@@#@M5,S@@irrsrr:@@ 
         @A:rrsrsrsrrrrrsrsrrr;::;@##@r:;rH@h;srr:H@  
         ;@9:rrsrsrsrrrsrsrsrsr;,S@Hi@i:;s;MX;rr:h@;  
          r@B:rrrrsrsrsrsrsrr;;sA@#i,i@h;r;S5;r:H@r   
           ,@@r;rrrsrsrsrsrr;2BM3r:;r:G@:rrr;;r@@,    
             B@Mr;rrrrsrsrsr@@S;;;rrr:5M;rr;rM@H      
              .@@@i;;rrrrsrs2i;rrrrr;r@M:;i@@@.       
                .A@@#5r;;;r;;;rrr;r:r#AsM@@H.         
                   ;&@@@@MhXS5i5SX9B@@@@G;            
                       :ihM#@@@@@##hs,                

Net:   <ethaddr> not set. Reading from E-fuse
Detected MACID:90:d7:eb:c4:3f:b3
cpsw
Hit any key to stop autoboot:  0 
TI8148_EVM#

2.Run make installbootloader to install uboot in NAND

 make installbootloader

3.Turn off your EVM and configure it to boot from NAND (please see Setting up your EVM to boot from NAND). Turn on your EVM and repeat step 1.

4. Now, to install your kernel and filesytem run make install

 make install

Now you have installed all the SDK components in your DM8148 EVM and you should be able to boot to Linux shell and see the logo of RigeRun on the HDMI output. The RidgeRun SDK for DM8148 EVM loads automatically all the firmware and kernel modules needed to use the video processor subsystem.

Setting up your DM8148 EVM to boot from NAND

In order to boot from a NAND you need to set it as the first boot device to try in the DM8148 boot sequence, this can be done configuring a correct BTMODE through the switch SW1 called BOOT MODE SEL in your EVM (see Fig. 5)

Figure 5. Dip switch to control boot mode (NAND)

Graphics SDK - OpenGL - Qt

The Professional Ridgerun SDK includes Graphics SDK 4.04.00.02 completely integrated, supporting the SGX530 3D Graphics Engine through the PowerVR driver. It also includes support to use Qt to render through the PowerVR kernel module.

1. In order to enable the Graphics SDK in your SDK, please download and install in your home directory the Graphics SDK 4.04.00.02 from the TI web page

sudo chmod 777 Graphics_SDK_setuplinux_4_04_00_02.bin
./Graphics_SDK_setuplinux_4_04_00_02.bin 

2.Then open a make config menu

cd $DEVDIR
make config

3. Go to the Proprietary software and enable the graphics SDK.

Figure 7. SDK boot log after enable the Graphics SDK‎
Figure 6. SDK boot log after enable the Graphics SDK

4. Go to File System Configuration -> Select target's file system software -> qt-4.7.2 and select Support openGL and its demo. Finally disable the option called Make QT as compact as possible.

5. Close the menu, save your configuration and build your SDK.

cd $DEVDIR
make 

6. Install your SDK in your board

make install

7. Boot your board, you will see the following message

Starting System
done.
Welcome to
__________ .__     .___               __________                
\______   \|__|  __| _/  ____    ____ \______   \ __ __   ____  
 |       _/|  | / __ |  / ___\ _/ __ \ |       _/|  |  \ /    \ 
 |    |   \|  |/ /_/ | / /_/  >\  ___/ |    |   \|  |  /|   |  \
 |____|_  /|__|\____ | \___  /  \___  >|____|_  /|____/ |___|  /
        \/          \//_____/       \/        \/             \/ 
           
    Embedded Linux Solutions
 
For further information see:
http://www.ridgerun.com
Build host: dsoto-Latitude-E5430-non-vPro
Built by: dsoto
Build date: Fri, 17 May 2013 17:13:21 -0600
Build tag: dm8148-tievm
Configuring network interfaces
SGX revision:  0x10205
Build type:  release6.x
Loaded PowerVR consumer services.

Please press Enter to activate this console.

8. Finally run one of the openGL demos or one of the qt + openGL demos

export LD_LIBRARY_PATH=/lib:/usr/lib:/usr/local/lib;
export QWS_DISPLAY="powervr"; 
export QT_PLUGIN_PATH=/usr/plugins; 
export QT_QWS_FONTDIR=/usr/lib/fonts

cd /opt/gxzsdkdemos/ogles2/
/opt/gfxsdkdemos/ogles2 # ./OGLES2Skybox2 
PVRShell: EGL 1.4 initialized


cd /examples/opengl/hellogl_es2
./hellogl_es2

Note: Displaying openGL graphics on the LCD included on the EVM is not supported and the SDK by default will display them through HDMI

OpenMax Demos

To run the openMax's demos that are located by default in your filesystem in a directory called omx you need to run first the following commands in your EVM

Video initialization

echo 0 > /sys/devices/platform/vpss/graphics0/enabled 
echo 0 > /sys/devices/platform/vpss/graphics1/enabled
echo 0 > /sys/devices/platform/vpss/graphics2/enabled

note: To run the decode display/encode demo with a 1080p video we recommend to use your filesystem by NFS due to the size of the input and output file.

Decode display demo

This demo is the decode-display demo included in the EZSDK. It takes an input file encoded in H264, decodes the stream and sends the output to the HDMI output

./omx/decode_display_a8host_debug.xv5T -i inputFile.h264 -w 1920 -h 1080 -f 60 -g 0

Capture encode demo

This demo is the capture-encode demo included in the EZSDK. It takes an input video streaming from the component input (case 720p) of the daughter card and encodes it in H264, the output is displayed through the HDMI output.

echo 720p-60 >/sys/devices/platform/vpss/display0/mode
./omx/capture_encode_a8host_debug.xv5T -o sample.h264 -m 720p -f 60 -b 1000000 -n 1000

Using Gstreamer

Some examples of use of GStreamer to implement basic multimedia pipelines can be found at Gstreamer pipelines for DM816x and DM814x. Please be aware that in order to display video you need to do the Video initialization

note: If you are not using the Ridgerun SDK and you are trying to use the TAG 00_06_00_00 provided by TI you will need to apply the following patch to make V4L2src and omxbufferalloc work.

Index: gst-openmax-dm81xx/src/omx/gstomxbufferalloc.c
===================================================================
--- gst-openmax-dm81xx.orig/src/omx/gstomxbufferalloc.c	2012-11-14 16:15:41.392143697 -0600
+++ gst-openmax-dm81xx/src/omx/gstomxbufferalloc.c	2012-11-14 16:17:40.760145714 -0600
@@ -190,6 +190,7 @@
 
   gst_element_add_pad (GST_ELEMENT (filter), filter->sinkpad);
   gst_element_add_pad (GST_ELEMENT (filter), filter->srcpad);
+  filter->out_port.portptr = gst_omxportptr_new(&filter->out_port);
   filter->silent = FALSE;
   filter->out_port.num_buffers = 10;
   filter->out_port.always_copy = FALSE;

Linux Performance

There are performance issues that can be fixed tuning the Linux kernel. Here some interesting pages are listed with tuning solutions and tricks specially for memory lateness problems.

Articles related to this board

RidgeRun Irazu SDK User Guide
EZSDK Memory Map
OMX EZSDK Examples
TMS320DM814x DaVinci Digital Media Processor