Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,742,347 Members 51,886 Now Online
XDA Developers Android and Mobile Development Forum

Building kernel SM-T525

Tip us?
 
vanyas
Old
(Last edited by vanyas; 10th April 2014 at 02:32 AM.)
#1  
Member - OP
Thanks Meter 8
Posts: 31
Join Date: Dec 2011
Location: Vladivostok
Default Building kernel SM-T525

Instruction to build a kernel from Samsung Sources:

1. Download and unpack source from http://opensource.samsung.com/recept...hValue=sm-t525

2. Download and upack android ndk from https://developer.android.com/tools/sdk/ndk/index.html

3. Set enviroment varibles (use gcc 4.6, not 4.8):
Quote:
export CROSS_COMPILE="~/android/android-ndk-r9d/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64/bin/arm-linux-androideabi-"
export ARCH="arm"
4. If you want to add loadable modules support, apply patch modules_support.patch from attach
Quote:
patch -p1 < modules_support.patch
5. Create kernel config
Quote:
make VARIANT_DEFCONFIG=msm8974_sec_picassoeur_defconfig msm8974_sec_defconfig SELINUX_DEFCONFIG=selinux_defconfig
6. Buld kernel
Quote:
make -j3
7. Buld device tree image
Quote:
./tools/dtbTool -o dt.img -s 2048 -p ./scripts/dtc/ ./arch/arm/boot/
8. Buld boot.img (default ramdisk image in attach)
Quote:
./tools/mkbootimg --kernel ./arch/arm/boot/zImage --ramdisk ramdisk.cpio.gz --cmdline 'console=null androidboot.hardware=qcom user_debug=31 msm_rtb.filter=0x37 ehci-hcd.park=3' --base 0x00000000 --pagesize 2048 --ramdisk_offset 0x02000000 --tags_offset 0x01E00000 --dt dt.img -o boot.img
9. Create .tar.md5 to flash with Odin
Quote:
tar -H ustar -c boot.img > boot.tar
md5sum -t boot.tar >> boot.tar
mv boot.tar boot.tar.md5
10. To fix Wi-Fi edit build.prop on your device, change ro.securestorage.support fron true to false
Quote:
ro.securestorage.support=false
GitHub: https://github.com/vanyasvl/android_...ung_picassoeur
The Following 3 Users Say Thank You to vanyas For This Useful Post: [ Click to Expand ]
 
thornev
Old
#2  
thornev's Avatar
Senior Member
Thanks Meter 83
Posts: 380
Join Date: Feb 2012
Location: Hudson Valley, NY
I'm not a builder, but when wifi doesn't work that usually means a mismatch between kernel and rom.

Sent from my SM-T320 using Tapatalk
Samsung Galaxy Note3 (16GB), Verizon build MJE, Safestrap 3.71, Nova Launcher.
 
crpalmer
Old
#3  
Senior Member
Thanks Meter 1997
Posts: 1,521
Join Date: Mar 2011

 
DONATE TO ME
Quote:
Hello. I'm trying to build stock Samsung kernel for Tab Pro 10.1 Sm-T525 and I have a problem:<br />
Wi-fi isn't working on builded kernel. All kernel configs are default from Samsung, bluetooth and Lte works ok.<br />
<br />
I need help with debug wifi problem.<br />
"ip a" command shows wlan0 network device, but wifi can't be enabled from configuration<br />
<br />
My steps to build kernel:<br />
Quote:
Download source from http://opensource.samsung.com/recept...hValue=sm-t525<br />
unpack it to ~/android/kernel<br />
<br />
cd ~/android/kernel<br />
export CROSS_COMPILE="/home/vanyas/android/android-ndk-r9d_x64/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64/bin/arm-linux-androideabi-"<br />
export ARCH="arm"<br />
<br />
make VARIANT_DEFCONFIG=msm8974_sec_picassoeur_defconfig msm8974_sec_defconfig SELINUX_DEFCONFIG=selinux_defconfig<br />
make -j3<br />
<br />
./tools/dtbTool -o dt.img -s 2048 -p ./scripts/dtc/ ./arch/arm/boot/<br />
<br />
unpack original boot.img with split_boot to boot folder<br />
<br />
./tools/mkbootimg --kernel ./arch/arm/boot/zImage --ramdisk boot/boot.img-ramdisk.cpio.gz --cmdline 'console=null androidboot.hardware=qcom user_debug=31 msm_rtb.filter=0x37 ehci-hcd.park=3' --base 0x00000000 --pagesize 2048 --ramdisk_offset 0x02000000 --tags_offset 0x01E00000 --dt dt.img -o boot.img<br />
<br />
tar -H ustar -c boot.img > boot.tar<br />
md5sum -t boot.tar >> boot.tar<br />
mv boot.tar boot.tar.md5
For the sm-t320, the kernel is built with version checks on the modules. This is what I did to allow the wlan module to load:

https://github.com/crpalmer/android_...787af9acd3394c

You'd obviously need to specify the right version string (it should be in the output of dmesg if this is why your wlan isn't working).

Also, if you plan on sharing the kernel, you should zip the .tar.md5 file as I had problems with it failing to flash after downloading when I released just a .tar.md5.
 
vanyas
Old
(Last edited by vanyas; 9th April 2014 at 12:53 AM.)
#4  
Member - OP
Thanks Meter 8
Posts: 31
Join Date: Dec 2011
Location: Vladivostok
Quote:
Originally Posted by crpalmer View Post
For the sm-t320, the kernel is built with version checks on the modules. This is what I did to allow the wlan module to load:

https://github.com/crpalmer/android_...787af9acd3394c

You'd obviously need to specify the right version string (it should be in the output of dmesg if this is why your wlan isn't working).

Also, if you plan on sharing the kernel, you should zip the .tar.md5 file as I had problems with it failing to flash after downloading when I released just a .tar.md5.
Thanks, but it is not a module load problem. SM-T525 kernel builds without modules support and wifi driver (bcm4339) compilled into the kernel.
 
crpalmer
Old
#5  
Senior Member
Thanks Meter 1997
Posts: 1,521
Join Date: Mar 2011

 
DONATE TO ME
Quote:
Originally Posted by vanyas View Post
Thanks, but it is not a module load problem. SM-T525 kernel builds without modules support and wifi driver (bcm4339) compilled into the kernel.
That's interesting. The sm-t320 is a prima chipset which is built as a module.

Do you see anything in the logcat or the dmesg related to the wlan, bcm4339, wifi, etc?
 
vanyas
Old
(Last edited by vanyas; 9th April 2014 at 11:08 AM.)
#6  
Member - OP
Thanks Meter 8
Posts: 31
Join Date: Dec 2011
Location: Vladivostok
There are patches for SM-T525 kernel source that resolve problem with "modules support" compilation
Quote:
--- kernel_orig/arch/arm/mm/proc-syms.c 2014-04-09 12:10:04.846114000 +1100
+++ kernel/arch/arm/mm/proc-syms.c 2014-04-09 11:54:33.894114000 +1100
@@ -18,7 +18,6 @@
#ifndef MULTI_CPU
EXPORT_SYMBOL(cpu_dcache_clean_area);
EXPORT_SYMBOL(cpu_set_pte_ext);
-EXPORT_SYMBOL(cpu_tima_set_pte_ext);
#else
EXPORT_SYMBOL(processor);
#endif
--- kernel_orig/arch/arm/mach-msm/sec-switch.c 2014-01-23 15:34:20.000000000 +1100
+++ kernel/arch/arm/mach-msm/sec-switch.c 2014-04-09 11:29:26.322114000 +1100
@@ -2565,7 +2565,7 @@
pr_info("%s: Ignore Cable setting, Not LPM mode\n", __func__);
}
}
-EXPORT_SYMBOL(fsa9485_set_mhl_cable)
+EXPORT_SYMBOL(fsa9485_set_mhl_cable);

boon fsa9485_muic_is_mhl_attached(void)
{
--- kernel_orig/Makefile 2014-01-23 15:34:19.000000000 +1100
+++ kernel/Makefile 2014-04-09 20:55:48.278114000 +1100
@@ -351,7 +351,7 @@

CHECKFLAGS := -D__linux__ -Dlinux -D__STDC__ -Dunix -D__unix__ \
-Wbitwise -Wno-return-void $(CF)
-CFLAGS_MODULE =
+CFLAGS_MODULE = -fno-pic
AFLAGS_MODULE =
LDFLAGS_MODULE =
CFLAGS_KERNEL =
The Following User Says Thank You to vanyas For This Useful Post: [ Click to Expand ]
 
vanyas
Old
#7  
Member - OP
Thanks Meter 8
Posts: 31
Join Date: Dec 2011
Location: Vladivostok
Yes! I did it!
To fix wifi: ro.securestorage.support=false in build.prop
The Following User Says Thank You to vanyas For This Useful Post: [ Click to Expand ]
 
scrosler
Old
#8  
scrosler's Avatar
Recognized Developer
Thanks Meter 50424
Posts: 23,074
Join Date: Feb 2007
Location: Fargo

 
DONATE TO ME
Quote:
Originally Posted by thornev View Post
I'm not a builder, but when wifi doesn't work that usually means a mismatch between kernel and rom.

Sent from my SM-T320 using Tapatalk
I am a builder and what he said is correct.

Samsung did some crazy stuff with Knox.
The Following User Says Thank You to scrosler For This Useful Post: [ Click to Expand ]
 
Silkmeister1
Old
#9  
Silkmeister1's Avatar
Senior Member
Thanks Meter 54
Posts: 109
Join Date: Jun 2013
Location: New York City
Quote:
Originally Posted by scrosler View Post
I am a builder and what he said is correct.

Samsung did some crazy stuff with Knox.
can you make a thread showing us some the difficulties you encountered working around Knox?
Silkmeister
{--Your R00t are belong to us--}
DEVICES:
Tablet SAMSUNG Galaxy Tab Pro 8.4 Wifi
Rom:Crpalmer's Official CM11, CFauto-rooted TWRP 2.7.1.0mondrianwifixx
Phone:Droid 3 {unlocked by Verizon}
Rom:Chevycam's Steel Droid V5.6 WORKING camera + GSM data*test device*
Phone:Samsung Wave S8500
Rom: Dual Boot, Volk204 CM10.2.1 + Bada 2.0 *Daily Driver*
Phone: OG Droid 1
Rom: Liquid Smooth V3.2 with Latest Chevycam Kernel (overclocked 1000mhz) *Current Alarm clock, test device*
hit the thanks?

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes