150 likes | 300 Vues
Get started on IBM Linux on Power SDK. November 2013. Topics. Setting up IBM LoP SDK Import sample Code to SDK Build, analyze code and execute. Using Migration Advisory tool . Familiarizing with SDK plugins. Setting up IBM LoP SDK.
E N D
Get started on IBM Linux on Power SDK November 2013
Topics • Setting up IBM LoPSDK • Import sample Code to SDK • Build, analyze code and execute. • Using Migration Advisory tool. • Familiarizing with SDK plugins
Setting up IBM LoP SDK • Installation documents and Binaries are available at • https://www-304.ibm.com/webapp/set2/sas/f/lopdiags/sdklop.html • Using the software repository package, installation is just 3 step process. • Install the IBM PowerLinux Repository initialization RPM package. • This will define repository in the system. • Run update on the repository. • Install IBM SDK Package using commands like Yum or Zypper • Will automatically download the all the necessary packages • from internet and completes the installation
Setting up LoP on a standalone/Isolated System • Download ISO image of IBM SDK from IBM site. • Download the Advance Tool chain - ftp://ftp.unicamp.br/pub/linuxpatch/toolchain/at/ • Define Repository of for packages downloaded • (using package managers such as zypper , yum etc) • Install the SDK tools using Package manager
Launching IBM LoP SDK • Needs a Graphics User interface • such as X windows or VNC • Default Installation path is /opt/ibm/ibm-sdk-lop • Execute ibm-sdk-lop to launch the SDK • Select the path for your unique Workspace. • Select the path for your unique Workspace. • SDK can be run as a user • Concurrent multiple users are possible. • Some advance plug-ins need root privileges • SDK can be run as a user • Concurrent multiple users are possible. • Some advance plug-ins need root privileges
Create a simple C Project • Create an empty Project • Specify a name for the project & select Advance toolchains • Import a C Code
Build project and analyze views • Building the Project • Most menu options in SDK can be accessed directly by right clicking on the project in the Project explorer view • Check out the views on the bottom half of the SDK. • Note the Console and Problem Window • Console window shows similar output as one would see in Shell window • Problems window lists out all issues found during build. • If views are not visible or are accidentally closed, they can be opened from the Window Menu • Double clicking on issues in the Problems view, will show the line of code of concern. Hovering the mouse over it provides more details on the issue and in some cases an autofix option
Running the project • Running the imported C code. • gdb/server option is used if the binaries need to be run remotely on a ppc system. Cleints can reside on x86 linux system • Output is shown in Console window view
Behind the scene – Files and Layout • Check out how files are laid out in the filesystem Note : Makefile is generated automatically for the sample C code imported. • Here is a sample of Makefile generated
Migration Advisor & import a makefile project • Importing an existing Makefile project and a new project. • Choose a name for the project and Select the path of the source. • Run Migration Advisor • Plug-ins are installed on the system, • but may need enabling if you get this message:
Migration Advisor(Cont.d) • Enabling the Migration advisor Plugin • This maybe required the first time when the tool is run. • Enable Linux/x86 to PowerLinux application Migration. • Run Migration Advisor tool after enabling features. • In some cases Autofix solutions are offered for issues .. • Note the inserted code fixes do preserve exisiting platform specific codes
Reference IBM SDK team members have posted several useful resources online. • Introduction to the IBM Software Development Toolkit for PowerLinux http://www.ibm.com/developerworks/offers/lp/demos/summary/l-sdklinuxpower.html • IBM SDK for PowerLinux - Demonstration Videos (The PowerLinux Community) https://ibm.biz/BdRHTC Acknowledgements • Thanks to the SDK Development team for training, support and materials for workshop. • Rafael Peria De Sene • Roberto Guimaraes Dutra De Oliveira • Wainer Dos Santos Moschetta
Miscellaneous / Backup Charts • Project Properties / Settings • Hardware specific builds options • Build Variables • Logging • Debugging Levels
Valgrind • Memory Allocation,, Deallocation issue.