=====Contents===== * [[https://www.linuxfoundation.org/#Introduction|1 Introduction]] * [[https://www.linuxfoundation.org/#Toolchain_Guidelines|2 Toolchain Guidelines]] * [[https://www.linuxfoundation.org/#TOO.1_Cross_Compilation|2.1 TOO.1 Cross Compilation]] * [[https://www.linuxfoundation.org/#TOO.2_C_Toolchain|2.2 TOO.2 C Toolchain]] * [[https://www.linuxfoundation.org/#Application_Binary_Interface_Guidelines|3 Application Binary Interface Guidelines]] * [[https://www.linuxfoundation.org/#ABI.1_Executable_and_Linking_Format_.28ELF.29|3.1 ABI.1 Executable and Linking Format (ELF)]] * [[https://www.linuxfoundation.org/#Library_Guidelines|4 Library Guidelines]] * [[https://www.linuxfoundation.org/#LIB.1_C_Library_Implementations|4.1 LIB.1 C Library Implementations]] * [[https://www.linuxfoundation.org/#LIB.2_Interfaces_of_the_C_Library|4.2 LIB.2 Interfaces of the C Library]] * [[https://www.linuxfoundation.org/#LIB.3_C_Library_Configurability|4.3 LIB.3 C Library Configurability]] * [[https://www.linuxfoundation.org/#LIB.4_Threading|4.4 LIB.4 Threading]] * [[https://www.linuxfoundation.org/#Debugging_Guidelines|5 Debugging Guidelines]] * [[https://www.linuxfoundation.org/#DBG.1_Host.2FTarget_Debugging_Architecture|5.1 DBG.1 Host/Target Debugging Architecture]] * [[https://www.linuxfoundation.org/#DBG.2_Debugging_Format|5.2 DBG.2 Debugging Format]] * [[https://www.linuxfoundation.org/#DBG.3_User_Mode_Debugging|5.3 DBG.3 User Mode Debugging]] * [[https://www.linuxfoundation.org/#DBG.4_Kernel_Mode_Debugging|5.4 DBG.4 Kernel Mode Debugging]] * [[https://www.linuxfoundation.org/#DBG.5_Kernel_Mode_Debugging_Channels|5.5 DBG.5 Kernel Mode Debugging Channels]] * [[https://www.linuxfoundation.org/#Contributors|6 Contributors]] * [[https://www.linuxfoundation.org/#Appendix_A:_References|7 Appendix A: References]] ====== Introduction ====== The Mobile Linux Platform Tools Guidelines section contains guidelines essential to developing software for mobile phones running Linux. This document contains four categories of guidelines: * **Toolchain** - guidelines pertaining to the inclusion of compilers to create software. * **Application binary interface** - guidelines for the executables created by development tools. * **Libraries guidelines** - guidelines for the libraries on the target mobile device needed for debugging * **Debugger guidelines** - guidelines for debugging tools and instrumentation of the runtime required for successful debugging. These guidelines do not specify that the software support specific CPUs. However, for certain guidelines, CPU-specific guidelines must be met.====== Toolchain Guidelines ====== ===== TOO.1 Cross Compilation ===== **Description:** Linux Foundation MLI specifies that a toolchain must be provided that allows for cross compilation and linking for the specified target CPU. Linux Foundation MLI does not specify the architecture or operating system of the development host. ===== TOO.2 C Toolchain ===== **Description:** Linux Foundation MLI specifies that a toolchain must be provided that allows for cross compilation and linking for the specified target CPU. Linux Foundation MLI does not specify the architecture or operating system of the development host. ====== Application Binary Interface Guidelines ====== ===== ABI.1 Executable and Linking Format (ELF)===== **Description:** Linux Foundation MLI specifies that both applications and system libraries support the Executable and Linking Format (ELF). For the ARM architecture, the required ELF interface can be found in: * ELF for the ARM Architecture * C Library ABI for the ARM Architecture * Procedure Call Standard for the ARM Architecture For IA32 and PPC32, the ELF format as described in Linux Standard Base Core Specification 3.1 in the following sections is required: * 11.1 Object Files * 11.2 Sections * 11.3 Special Sections * 11.4 Symbol Mapping For the IA32 architecture, this is Chapters 8, 9 and 10 of the Linux Standard Base Core Specification for IA32 version 3.1. For the PPC32 architecture, this is Chapter 8 of the Linux Standard Base Core Specification for PPC 32 version 3.1. ====== Library Guidelines ====== ===== LIB.1 C Library Implementations ===== **Description:** Linux Foundation MLI specifies that a C library exist that is functionally compatible with glibc version 3.2.4. ===== LIB.2 Interfaces of the C Library ===== **Description:** Linux Foundation MLI specifies that the API conform to the Linux Standard Base Core Specification 3.1, Chapter 13 Base Libraries. This makes reference to POSIX(2003). The following sections of this specification are not required: * 13.3.5. Localization Functions * 13.3.16. Large File Support ===== LIB.3 C Library Configurability ===== **Description:** Linux Foundation MLI specifies that the C library must be configurable so that it can be scaled in size. The only configurable feature of a C library required is that translations be optionally enabled. ===== LIB.4 Threading ===== **Description:** Linux Foundation MLI specifies that the C library and Linux kernel must implement a threading implementation. ====== Debugging Guidelines ====== ===== DBG.1 Host/Target Debugging Architecture ===== **Description:** Linux Foundation MLI specifies that the debugging environment be capable of debugging in a host/target environment. The development host will run appropriate debuggers and have access to debugging symbols found only on the development host. The target should not have to store the debugging symbols for the objects under development. ===== DBG.2 Debugging Format ===== **Description:** Linux Foundation MLI specifies that compilers be able to generate and debuggers be able to read symbol information using the DWARF format. For ARM, the DWARF specification is described in DWARF for the ARM Architecture. For IA32 and PPC, Section 11.5 of the Linux Standard Base Core Specification 3 describes the required DWARF. ===== DBG.3 User Mode Debugging ===== **Description:** Linux Foundation MLI specifies that an agent must be provided for the target to enable remote debugging of userspace applications. Support must exist to allow for symbol information to reside only on the developer host, not on the target. This agent will implement the GNU Debugger Message Interface (GDB/mi) protocol as described in the GDB/MI chapter in Debugging with GDB (Ninth edition for GDB Version 6.0). ===== DBG.4 Kernel Mode Debugging ===== **Description:** Linux Foundation MLI specifies that the kernel should implement kernel mode debugging so that a target's kernel can be remotely debugged from a development host. The communication mechanism that is spoken between the debugger and the target is the same GDB/MI protocol as described in the User Mode Debugging guideline. ===== DBG.5 Kernel Mode Debugging Channels ===== **Description:** Linux Foundation MLI specifies that the target's kernel will enable kernel mode debugging over at least one of the following communication methods: * Serial * Ethernet These communication methods will provide a polling mechanism that will allow the developer to debug interrupt service routines. ====== Contributors ====== * Alex deVries - Wind River Systems //(editor)// * Sven-Thorsten Dietrich - MontaVista Software * Rob Rhoads - Intel * David Schlesinger - Access Company Ltd. ====== Appendix A: References ====== **ISO/IEC 9899:TC2 C Standard**\\ [[http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1124.pdf|http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1124.pdf]]\\ **ISO/IEC 14882 C++ Standard**\\ [[http://www.open-std.org/jtc1/sc22/open/n2356/|http://www.open-std.org/jtc1/sc22/open/n2356/]]\\ **ELF for the ARM Architecture**\\ [[http://www.arm.com/miscPDFs/8030.pdf|http://www.arm.com/miscPDFs/8030.pdf]]\\ **C Library ABI for the ARM Architecture**\\ [[http://www.arm.com/miscPDFs/8032.pdf|http://www.arm.com/miscPDFs/8032.pdf]]\\ **Procedure Call Standard for the ARM Architecture**\\ [[http://www.arm.com/miscPDFs/8031.pdf|http://www.arm.com/miscPDFs/8031.pdf]]\\ **Linux Standard Base Core Specification 3.1**\\ [[http://refspecs.linuxfoundation.org/LSB_3.1.0/LSB-Core-generic/LSB-Core-generic/book1.html|http://refspecs.linuxfoundation.org/LSB_3.1.0/LSB-Core-generic/LSB-Core-generic/book1.html]]\\ **Linux Standard Base Core Specification for IA32 version 3.1**\\ [[http://refspecs.linuxfoundation.org/LSB_3.1.0/LSB-Core-IA32/LSB-Core-IA32/book1.html|http://refspecs.linuxfoundation.org/LSB_3.1.0/LSB-Core-IA32/LSB-Core-IA32/book1.html]]\\ **Linux Standard Base Core Specification for PPC32 version 3.1**\\ [[http://refspecs.linuxfoundation.org/LSB_3.1.0/LSB-Core-PPC32/LSB-Core-PPC32/book1.html|http://refspecs.linuxfoundation.org/LSB_3.1.0/LSB-Core-PPC32/LSB-Core-PPC32/book1.html]]\\ **DWARF for the ARM Architecture**\\ [[http://www.arm.com/miscPDFs/8029.pdf|http://www.arm.com/miscPDFs/8029.pdf]]\\ **Debugging with GDB (Ninth Edition)**\\ by Richard M. Stallman, Roland Pesch, Stan Shebs, et al., January 2002, [[https://www.linuxfoundation.org/en/Special:BookSources/1882114884|ISBN 1-882114-88-4]]\\ [[http://www.gnu.org/software/gdb/documentation/|http://www.gnu.org/software/gdb/documentation/]]