Difference between revisions of "IoTGateway/BSP/Linux/AM335x/AM335x LBV2 User Guide"

From ESS-WIKI
Jump to: navigation, search
 
(9 intermediate revisions by one other user not shown)
Line 1: Line 1:
 +
{{DISPLAYTITLE:Linux BSP User Guide for AM335x series}} __TOC__
 +
 
= Start Guide =
 
= Start Guide =
  
Please refer to [[IoTGateway/BSP/Linux/AM335x/AM335x_LBV6_User_Guide#Start_Guide|<span class="mw-headline" id="Configure_your_Linux_Host"><span style="color:#0070c0">Start Guide</span></span>]] to start your linux development.
+
Generally,to do Linux development, you’ll need a host PC running Linux. In the development with the advantech SDK, it would be strongly recommend to use Ubuntu 12.04 LTS 64 bit/ Ubuntu 14.04 LTS 64 bit as developing environment. Because we have successfully tested our BSP on these OS version. Please install the Ubuntu 12.04 LTS 64 bit / Ubuntu 14.04 LTS 64 bit at your PC/NB in advance.
 +
 
 +
== <span style="color:#0070c0">Configure your Linux Host</span> ==
 +
 
 +
Please refer to [[IoTGateway/BSP/Linux/AM335x/AM335x_LBV6_User_Guide#Configure_your_Linux_Host|<span class="mw-headline" id="Configure_your_Linux_Host"><span style="color:#0070c0">Configure your Linux Host</span></span>]] to configure&nbsp; your linux host.
 +
 
 +
== <span style="color:#0070c0">Install Advantech SDK</span> ==
 +
 
 +
Please refer to [[IoTGateway/BSP/Linux/AM335x/AM335x_LBV6_User_Guide#Install_Advantech_SDK|<span class="mw-headline" id="Configure_your_Linux_Host"><span style="color:#0070c0">Install Advantech SDK</span></span>]] to install&nbsp; advantech sdk.
 +
 
 +
== <span style="color:#0070c0">BSP Building Guide</span> ==
 +
 
 +
In the following building demo, we always assume building is for RSB4220 platform. others(such as ROM3310,RSB4221) are same。 $(BSP) is your BSP root directory. In order to simplify the description, we use "$(BSP)" to represent actual BSP root path. you need to replace the string to actual path。
 +
 
 +
'''1. Setup uboot and kernel build environment'''
 +
 
 +
*$ sudo su (Change to “root” authority)
 +
*Input user password
 +
*#cd $(BSP)/scripts/
 +
*#source setenv.sh (To configure the developing environment automatically)
 +
 
 +
Then you can start to code the source code, build uboot and kernel images.
 +
 
 +
The '''setenv.sh''' script is used to configure the developing environment quickly. It will configure the folder paths for system.
 +
 
 +
<font color="#FF0000">Note! You have to run “#source setenv.sh” every time once you open a new "Terminal" utility. It is suggested to change to “root” authority to use the source code. And the “$(BSP)” is the root directory of BSP source code. </font><br/>'''2. Build u-boot Image'''<br/>Advantech has a script to build the u-boot quickly. You can build u-boot image by follow below steps:
 +
 
 +
*Open "Terminal" on Ubuntu host PC.
 +
*$sudo su (Change to “root” authority)
 +
*Input user password.
 +
*#cd $(BSP)/scripts/
 +
*#source setenv.sh (To configure the developing environment automatically)
 +
*#./cfg_uboot.sh am335x_rsb4220_defconfig (To set the u-boot configuration automatically)
 +
*#./mk_uboot.sh (Start to build the u-boot)
 +
 
 +
'''Then you can see u-boot.img is being built and located in ../image. '''<br/><br/>'''3. Build Linux Kernel Image'''<br/>Advantech offer you a script to build the “uImage” quickly. You can build uImage by follow below steps:
 +
 
 +
*Open "Terminal" on Ubuntu host PC.
 +
*$sudo su (Change to “root” authority)
 +
*Input user password.
 +
*#cd $(BSP)/scripts/
 +
*#source setenv.sh (To configure the developing environment automatically)
 +
*#./cfg_kernel.sh tisdk_am335x-rsb4220_defconfig (To set the uImage configuration automatically)
 +
*#./mk_kernel.sh (Start to build the uImage)
 +
 
 +
'''Then you can see uImage is being built and located in ../image.'''
 +
 
 +
== <span style="color:#0070c0">Update Linux OS</span> ==
 +
 
 +
Please refer to [[IoTGateway/BSP/Linux/AM335x/AM335x_LBV6_User_Guide#Update_Linux_OS|<span class="mw-headline" id="Configure_your_Linux_Host"><span style="color:#0070c0">Update Linux OS</span></span>]] to update your linux os.
  
 
= <span class="mw-headline" id="Developement_Guide">Developement Guide</span> =
 
= <span class="mw-headline" id="Developement_Guide">Developement Guide</span> =
Line 7: Line 58:
 
== <span class="mw-headline" id="HW_module_Configuration_.26_driver"><span style="color:#0070c0">HW module Configuration & driver</span></span> ==
 
== <span class="mw-headline" id="HW_module_Configuration_.26_driver"><span style="color:#0070c0">HW module Configuration & driver</span></span> ==
  
*[http://ess-wiki.advantech.com.tw/view/IoTGateway/BSP/Linux/AM335x/Add_a_Driver_to_Kernel_by_menuconfig Add a Driver to Kernel by menuconfig]
+
*[http://ess-wiki.advantech.com.tw/view/IoTGateway/BSP/Linux/AM335x/V2/Hardware_module Hardware module]
*[http://ess-wiki.advantech.com.tw/view/IoTGateway/BSP/Linux/AM335x/Hardware_module Hardware module]
 
  
 
== <span class="mw-headline" id="C.2FC.2B.2B_.26_Qt_Application_Development"><span style="color:#0070c0">C/C++ & Qt Application Development</span></span> ==
 
== <span class="mw-headline" id="C.2FC.2B.2B_.26_Qt_Application_Development"><span style="color:#0070c0">C/C++ & Qt Application Development</span></span> ==
Line 17: Line 67:
 
== <span class="mw-headline" id="System_Service_.26_Usage"><span style="color:#0070c0">System Service & Usage</span></span> ==
 
== <span class="mw-headline" id="System_Service_.26_Usage"><span style="color:#0070c0">System Service & Usage</span></span> ==
  
*[http://ess-wiki.advantech.com.tw/view/IoTGateway/BSP/Linux/AM335x/System_Service_and_Usage System Service & Usage]
+
*[http://ess-wiki.advantech.com.tw/view/IoTGateway/BSP/Linux/AM335x/V2/System_Service_and_Usage System Service & Usage]

Latest revision as of 03:08, 6 February 2018

Start Guide

Generally,to do Linux development, you’ll need a host PC running Linux. In the development with the advantech SDK, it would be strongly recommend to use Ubuntu 12.04 LTS 64 bit/ Ubuntu 14.04 LTS 64 bit as developing environment. Because we have successfully tested our BSP on these OS version. Please install the Ubuntu 12.04 LTS 64 bit / Ubuntu 14.04 LTS 64 bit at your PC/NB in advance.

Configure your Linux Host

Please refer to Configure your Linux Host to configure  your linux host.

Install Advantech SDK

Please refer to Install Advantech SDK to install  advantech sdk.

BSP Building Guide

In the following building demo, we always assume building is for RSB4220 platform. others(such as ROM3310,RSB4221) are same。 $(BSP) is your BSP root directory. In order to simplify the description, we use "$(BSP)" to represent actual BSP root path. you need to replace the string to actual path。

1. Setup uboot and kernel build environment

  • $ sudo su (Change to “root” authority)
  • Input user password
    1. cd $(BSP)/scripts/
    2. source setenv.sh (To configure the developing environment automatically)

Then you can start to code the source code, build uboot and kernel images.

The setenv.sh script is used to configure the developing environment quickly. It will configure the folder paths for system.

Note! You have to run “#source setenv.sh” every time once you open a new "Terminal" utility. It is suggested to change to “root” authority to use the source code. And the “$(BSP)” is the root directory of BSP source code.
2. Build u-boot Image
Advantech has a script to build the u-boot quickly. You can build u-boot image by follow below steps:

  • Open "Terminal" on Ubuntu host PC.
  • $sudo su (Change to “root” authority)
  • Input user password.
    1. cd $(BSP)/scripts/
    2. source setenv.sh (To configure the developing environment automatically)
    3. ./cfg_uboot.sh am335x_rsb4220_defconfig (To set the u-boot configuration automatically)
    4. ./mk_uboot.sh (Start to build the u-boot)

Then you can see u-boot.img is being built and located in ../image.

3. Build Linux Kernel Image
Advantech offer you a script to build the “uImage” quickly. You can build uImage by follow below steps:

  • Open "Terminal" on Ubuntu host PC.
  • $sudo su (Change to “root” authority)
  • Input user password.
    1. cd $(BSP)/scripts/
    2. source setenv.sh (To configure the developing environment automatically)
    3. ./cfg_kernel.sh tisdk_am335x-rsb4220_defconfig (To set the uImage configuration automatically)
    4. ./mk_kernel.sh (Start to build the uImage)

Then you can see uImage is being built and located in ../image.

Update Linux OS

Please refer to Update Linux OS to update your linux os.

Developement Guide

HW module Configuration & driver

C/C++ & Qt Application Development

System Service & Usage