Example: How to build Samsung Galaxy S III kernel module

Post Reply
Site Admin
Posts: 4138
Joined: Wed Mar 23, 2011 4:12 pm

Example: How to build Samsung Galaxy S III kernel module

Post by admin » Sun Dec 16, 2012 6:23 pm

To help you (and to help me remember next time) I created a short tutorial how to build the ppp_async.ko kernel module for the Samsung Galaxy S III.

First you need a 64bit Linux installation e.g. in a virtual machine. The easiest way to setup the build toolchain is to follow the instructions on http://source.android.com/source/initializing.html to initialize the build environment and download the Android source. You can stop after these two steps. This may be far more than necessary, but it's well documented and works for sure.

Get the Linux sources from http://opensource.samsung.com/. For Samsung phones it is not easy to find out which sources belong to which published kernel. I used the GT-I9300_JB_Opensource_Update6.zip. Inside this file is a Kernel.tar.gz. Expand this to some directory. Open a shell in this directory and enter

Code: Select all

make arch=arm m0_00_defconfig
This is specific for the Galaxy S III. Other phones may have other initialization commands or you pull the configuration from the device. Check the accompanying documentation for details.

Now you have to change the configuration to include the PPP async kernel module. Run

Code: Select all

make menuconfig
to open the following menu
menuconfig.png (41.99 KiB) Viewed 2733 times
Choose "Device Drivers"/"Network device support" and press "M" at "PPP support for async serial ports". Then exit by pressing right arrow and enter repeatedly. Finally save the new configuration.

If "PPP support for async serial ports" was already active your kernel may already contain the module or you used the wrong default configuration.

To finally build the module first set the environment variable and start make

Code: Select all

export CCOMPILER=$(android dir)/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-
Replace $(android dir) with the base directory of the Android source. Other phones may require an EXTRAVERSION parameter to fully match the buildnumber.

If there were no errors your freshly generated kernel module is in drivers/net/ppp_async.ko. Cross your fingers and check if it works ;)

Post Reply

Return to “DUN Modem Plugin”