MSM

Overview

The MSM target tests building the Qualcomm MSM Linux kernel from Code Aurora Forum with LLVM.

Prerequisites

  • Installed ARM cross compiler in $PATH (/opt/arm-2011.03 assumed)

Using the LLVMLinux project

If you have not already done so, clone the LLVMLinux project:

git clone http://git.linuxfoundation.org/llvmlinux.git

Now make the versatile target

cd llvmlinux/targets/msm
make

The Makefile will build all the prerequisites (LLVM, Clang), download the kernel, apply the patch for LLVM compatibility, copy a tested config file and build the kernel.

The msm board will fail to apply several of the upstream patches, so these are filtered out, and has additional board specific patches. The common patches in llvmlinux/common and llvmlinux/common/arm are be applied as well as the patches in llvmlinux/targets/msm. The config file for the msm platform is in llvmlinux/targets/msm. The upstream patches that could not be applied are listed in llvmlinux/targets/msm/kernel-filter.

Known Issues

  • The atomic.h assembly code is not currently supported by upstream Clang. See http://hardwarebug.org/2010/07/06/arm-inline-asm-secrets/.
    •  %H, %Q and %R are not supported
      • H The highest-numbered register of a pair
      • Q The least significant register of a pair
      • R The most significant register of a pair

There are two patches applied to Clang to add the required support for the above.

Testing the built kernel

TBD

Project Hosting

The Linux Foundation is a non-profit consortium dedicated to the growth of Linux.

More about the foundation...