I'm working on building a kernel from source to add NTFS support for an i.MX515 tablet I purchesed, but I'm running into problems.
I'm able to get the tablet to boot if I only flash uImage (not u-boot or uramdisk), but there is no screen. I compared the .config files for my build vs the stock build and my build is missing a few options. Most notably:
Code:
> #
> # honmax tp manager support
> #
> CONFIG_HID_TP_PIXCIR=y
> CONFIG_GOODIX_TOUCHSCREEN=y
> CONFIG_TOUCHSCREEN_NAS_I2C=y
I tried adding these sections to the .config before building, but after the build they are removed (i assume since they mean nothing if the source isn't there). I've done some searching but I can't find any information or code that's any help.
This is my first time messing with a kernel so any help would be appreciated!
Thanks!
Related
As I'm sure many will know Telechips do not release their SDK or linux BSP to people without buying and expensive development board and commitment to buying vast amounts of chips.
I have a cx-01 and the device is crippled on kernel features and force loading of kernel modules is disabled by default.
cnxsoft had some information regarding the kernel source release, but without framework recompile it won't boot.
Android source will give me the envsetup.sh, but misses the telechips profile out.
I wondered if anyone has the telechips 8923 folder in WORKING_DIRECTORY/device -if so where did you get it and can I have a copy.
Failing that I have a decompiled system image for the cx-01 and a copy of telechips 8902 profile-I wondered if it is possible to create a working tcc8923 with these?
I notice back in January nobody had a working custom kernel for this processor- am I barking up the wrong tree?
To build Android from source for a new device, you need to set up a board config and its makefiles. This is generally a long and tedious process. Luckily, if you are only building recovery, it is a lot easier. From the root of your Android source directory (assuming you've run envsetup.sh), run the following (substituting names appropriately): ( I gues envsetup.sh means running: 1: . build/envsetup.sh
2: lunch 3: 1 (my choice) 4: make m805_892x my tablet type)
build/tools/device/mkvendor.sh device_manufacturer_name device_name /your/path/to/the/boot.img
For my Tom-Tec 7 excellent, the command will go as follows :
Code:
build/tools/device/mkvendor.sh YG m805_892x ~/boot.img
> ore: build/tools/device/mkvendor.sh YG m805_892x ~/recovery.img
the later needed kernel is in recovery.img it seems.
Please note that m805_892x is the device name..... Only use "~/boot.img" if you have the boot image in your home directory. Or else please specify the correct path.
You will receive the confirmation "Done!" if everything worked. The mkvendor.sh script will also have created the following directory in your Android source tree:
manufacturer_name/device_name
YG/m805_892x
Sow get youŕe recovery.img and use that to get WORKING_DIRECTORY/device/YG/m805_892x
Device name is in build.prop
Try this link to see what it makes from the board config and its makefiles http://builder.clockworkmod.com
Personally i´m still stuck making a cwm recovery thats works 100% on my tablet.
I build from CWM source.
some links:
>> Porting CWM to other devices Part 2 (OS X): http://www.acsyndicate.net/how-to-porting-cwm-to-other-devices-os-x-part2/
wiki: http://forum.xda-developers.com/wiki/ClockworkMod_Recovery
http://forum.xda-developers.com/showthread.php?t=1337786
http://www.twobitcoder.com/?p=158
tcc TCC8902/TCC8803 tablets http://forum.xda-developers.com/showthread.php?t=1101094
> http://forum.xda-developers.com/showthread.php?t=1866545
http://forum.xda-developers.com/showthread.php?t=1026853
make recovery: http://www.koushikdutta.com/2010/10/porting-clockwork-recovery-to-new.html
Hi,
I went completely through Cyanogenmod's "Build for hammerhead" tutorial written in their Wiki and ended up successfully with my own compiled CM11 nightly.
But now I want to add / enable a few modules in the kernel but I can't find any site / tutorial which describes how to build your own kernel config based on the one used as "standard config" in CM11 for your device (in my case, hammerhead ).
To sum up, I want to:
-"open" kernel config used for the last build
-enable a few modules
-save and recompile with the new config
If there's already any tutorial I haven't found, please give me the link.
Thanks in advance,
zwiebelchen89
zwiebelchen89 said:
Hi,
I went completely through Cyanogenmod's "Build for hammerhead" tutorial written in their Wiki and ended up successfully with my own compiled CM11 nightly.
But now I want to add / enable a few modules in the kernel but I can't find any site / tutorial which describes how to build your own kernel config based on the one used as "standard config" in CM11 for your device (in my case, hammerhead ).
To sum up, I want to:
-"open" kernel config used for the last build
-enable a few modules
-save and recompile with the new config
If there's already any tutorial I haven't found, please give me the link.
Thanks in advance,
zwiebelchen89
Click to expand...
Click to collapse
How about this?
http://wiki.cyanogenmod.org/w/Doc:_integrated_kernel_building
abaaaabbbb63 said:
How about this?
http://wiki.cyanogenmod.org/w/Doc:_integrated_kernel_building
Click to expand...
Click to collapse
I'm not completely satisfied with this instructions.
OK, my current kernel config is in the file "kernel/lge/hammerhead/arch/arm/configs/cyanogenmod_hammerhead_defconfig".
So, how to edit / create a new config based on this one ?
Everything should stay the same + a few new modules / options.
But I don't want to configure everything else what is currently already configured.
Or is this config the "default case" when starting "make menuconfig" without setting anything ?
Thanks !
zwiebelchen89 said:
I'm not completely satisfied with this instructions.
OK, my current kernel config is in the file "kernel/lge/hammerhead/arch/arm/configs/cyanogenmod_hammerhead_defconfig".
So, how to edit / create a new config based on this one ?
Everything should stay the same + a few new modules / options.
But I don't want to configure everything else what is currently already configured.
Or is this config the "default case" when starting "make menuconfig" without setting anything ?
Thanks !
Click to expand...
Click to collapse
I actually have no idea. Maybe @Chromium knows
OK, I played around a while and finally got it by myself:
Code:
#copy your existing config to your kernel directory
cp android/system/kernel/lge/hammerhead/arch/arm/configs/cyanogenmod_hammerhead_defconfig android/system/kernel/lge/hammerhead/.config
#go into kernel directory
cd android/system/kernel/lge/hammerhead/
#call make menuconfig to perform your changes
make menuconfig ARCH=arm
#copy your new config to old place
cp .config ~/android/system/kernel/lge/hammerhead/arch/arm/configs/cyanogenmod_hammerhead_defconfig
#clean up
make mrproper
Now you can continue with "brunch hammerhead" from your crott directory (normally ~/android/system).
-time brunch hammerhead
hello , i have a samsung tablet GT-P1000 "A3LGTP1000",found that its not original,it is a korean copy,anyway I have already downloaded "android-4.1.2_r2.1" and i had a successfuly build for samsung crespo just for testing the build.
Now i have downloaded the kernel of the tablet from "opensource samsung site" and had successfuly build it,now i have a "zimage" file at "GT-P1000/GT-P1000_Kernel/Kernel/arch/arm/boot/".
The question is i need to build the android source for this device.
how to add it to the lunch menu and build it?
Thank you in advance,this is my first post on Xda,hope i can get help from you all,best regards.
joek85 said:
hello , i have a samsung tablet GT-P1000 "A3LGTP1000",found that its not original,it is a korean copy,anyway I have already downloaded "android-4.1.2_r2.1" and i had a successfuly build for samsung crespo just for testing the build.
Now i have downloaded the kernel of the tablet from "opensource samsung site" and had successfuly build it,now i have a "zimage" file at "GT-P1000/GT-P1000_Kernel/Kernel/arch/arm/boot/".
The question is i need to build the android source for this device.
how to add it to the lunch menu and build it?
Thank you in advance,this is my first post on Xda,hope i can get help from you all,best regards.
Click to expand...
Click to collapse
Anybody?
now i have the binaries "lib,framworks,vendor,build.prop......."
now what?
help please.
joek85 said:
hello , i have a samsung tablet GT-P1000 "A3LGTP1000",found that its not original,it is a korean copy,anyway I have already downloaded "android-4.1.2_r2.1" and i had a successfuly build for samsung crespo just for testing the build.
Now i have downloaded the kernel of the tablet from "opensource samsung site" and had successfuly build it,now i have a "zimage" file at "GT-P1000/GT-P1000_Kernel/Kernel/arch/arm/boot/".
The question is i need to build the android source for this device.
how to add it to the lunch menu and build it?
Thank you in advance,this is my first post on Xda,hope i can get help from you all,best regards.
Click to expand...
Click to collapse
Hi and thank you for using XDA Assist
Try to head over here
It contains all the necessary things you should need to know.
Good luck!
nilac said:
Hi and thank you for using XDA Assist
Try to head over here
It contains all the necessary things you should need to know.
Good luck!
Click to expand...
Click to collapse
Thank you sir.Great guide really and very helpful,but this guide is for CM,i am downloading cm-12.1 nut you know it takes long time since my connection is pretty slow.In the meanwhile i am trying to build my existing AOSP wish i've already downloaded.
let's forget about this tablet.
I also downloaded the GT-I9300 files from opensource samsung site "GT-I9300_JB_Opensource.zip" and here is what it includes :
2 folders : Kernel , Platform.
2 files : README_Kernel.txt , README_Platform.txt.
The Platform folder contains :build,external,framework,vendor and build.sh.
Inside README_Kernel there is :
1. How to Build
- get Toolchain
From android git server , codesourcery and etc ..
- arm-eabi-4.4.3
- edit Makefile
edit "CROSS_COMPILE" to right toolchain path(You downloaded).
EX) CROSS_COMPILE= $(android platform directory you download)/android/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-
Ex) CROSS_COMPILE=/usr/local/toolchain/arm-eabi-4.4.3/bin/arm-eabi- // check the location of toolchain
$ make arch=arm m0_00_defconfig
$ make
2. Output files
- Kernel : arch/arm/boot/zImage
- module : drivers/*/*.ko
3. How to Clean
$ make clean
################################################################################
Inside README_Platform :
How to build Mobule for Platform
- It is only for modules are needed to using Android build system.
- Please check its own install information under its folder for other module.
[Step to build]
1. Get android open source.
: version info - Android 4.3
( Download site : http://source.android.com )
2. Copy module that you want to build - to original android open source
If same module exist in android open source, you should replace it. (no overwrite)
# It is possible to build all modules at once.
3. You should add module name to 'PRODUCT_PACKAGES' in 'build\target\product\core.mk' as following case.
case 1) e2fsprog : should add 'e2fsck' to PRODUCT_PACKAGES
case 2) libexifa : should add 'libexifa' to PRODUCT_PACKAGES
case 3) libjpega : should add 'libjpega' to PRODUCT_PACKAGES
case 4) KeyUtils : should add 'libkeyutils' to PRODUCT_PACKAGES
ex.) [build\target\product\core.mk] - add all module name for case 1 ~ 4 at once
PRODUCT_PACKAGES += \
e2fsck \
libexifa \
libjpega \
libkeyutils
4. excute build command
./build.sh user
Inside build.sh :
#!/bin/bash
################################################################################
#
# Build Script
#
# Copyright Samsung Electronics(C), 2010
#
################################################################################
################################################################################
# Useage
# : ./build.sh [mod]
#
# Example
# : ./build.sh eng
################################################################################
if [ "" = "$1" ]
then
echo --------------------------------------------------------------------------------
echo - Useage
echo - : ./build.sh [mod]
echo -
echo - Example
echo - : ./build.sh eng
echo --------------------------------------------------------------------------------
exit
fi
export CPU_NUMBER=16
export TARGET_BUILD_VARIANT=$1
################################################################################
# Common Path
################################################################################
TOP_DIR=$PWD
# set root path
export PLATFORMPATH="$TOP_DIR"
cd $PLATFORMPATH
make update-api
make -j$CPU_NUMBER PRODUCT-generic-$TARGET_BUILD_VARIANT
So i ignored build.sh and cd my jellybean source and did make -j8 PRODUCT-generic-eng.
it built sucessfully , now i have inside out/target/product/generic/ system.img and ramdisk.img and userdata.img.
But here is the question : Why Samsung does build it this way?why does not do it the normal way like CM does?
As i know that the generic build is for emulator right? so why samsung build a generic build?
Now after i have those imgs and the kernel Zimage , am i ready to go?am i on the right track?
If so ,how to flash the device?
I am sorry for bothering , thank you for your help.
Specifications:
Phone: ASUS ROG 1
Model Number: ASUS_Z01QD
Android version : 8.1.0
Firmware: WW-15.1630.1907.98
Kernel Version: 4.9.65-perf
I have an ASUS ROG 1 Phone. It came with Android 8.1 and firware version WW-15.1630.1907.98. I took the kernel source code from ASUS site. Source code version: <new user on XDA hence unable to post the src code link.>
Was able to build successfully and flash to the phone. Rooted the phone following to that. The problem is that the wifi wasnt working after flashing the new kernel .
1. I checked the modules loaded lsod, from adb and it didnt show the wil6210.ko loaded.
2. I tried insmod /modprobe wil6210.ko and was constantly getting the following errors:
a. disagrees about version of symbol module_layout android kernel
b. required key not available .
c. No such file or directory.
3. I tried building the kernel with the SIG flags disabled in the .config file and flashed to the phone. Yet ended up getting errors like no such file or directory and required key not available.
Any help will be really appreciated.
@nathanchance
You need to rebuild the Wi-Fi module against the source that you compiled then flash it. Alternatively, you can try building the Wi-Fi source into the kernel image but that is usually broken or you can force the module to load by whitelisting it in kernel/module.c (there are commits floating around that allow this) but it can open up a security vulnerability.
nathanchance said:
You need to rebuild the Wi-Fi module against the source that you compiled then flash it. Alternatively, you can try building the Wi-Fi source into the kernel image but that is usually broken or you can force the module to load by whitelisting it in kernel/module.c (there are commits floating around that allow this) but it can open up a security vulnerability.
Click to expand...
Click to collapse
Thanks for your reply.
The source code I downloaded from the ASUS website, the wifi module code was a part of it. So whille building the kernel the module <wil6210.ko> also got built along with it.
So the wifi module did get built against the same source.
I have:
Downloaded the exact kernel version running on my device from an AOSP mirror (4.9.170) (https://github.com/aosp-mirror/kernel_common.git)
Downloaded the exact compiler used to compile the kernel from my device:
Ran `cat /proc/version`, which returns "Linaro GCC 5.3-2016.05", which I downloaded from https://releases.linaro.org/components/toolchain/binaries/5.3-2016.05/aarch64-linux-gnu/
Took the kernel configuration from `/proc/config.gz`, copied it to the kernel source directory `kernel_common` as `.config`
Ran `make ARCH=arm64 CROSS_COMPILE=xxx oldconfig`
What I'm seeing:
First, the downloaded kernel source for 4.9.170 seems to think that my `config` is incomplete, since it will prompt me to answer ~15 extra configuration questions.
Second, this old Linaro compiled doesn't appear to support `-fstack-protector-strong` despite it being explicitly enabled in the `/proc/config.gz` file. So I end up disabling it with `./scripts/config --disable CONFIG_CC_STACKPROTECTOR_STRONG`
Finally, after successfully compiling, I take `net/ipv4/tcp_westwood.ko`, just as a test module, and try to load it on my Android device, and it fails:
`insmod: failed to load tcp_westwood_5.ko: Exec format error`
And in dmesg output: `tcp_westwood: disagrees about version of symbol module_layout`
My questions:
Can I assume that the `/proc/config.gz` file is not the actual file used to compile the running kernel, considering it doesn't completely configure the 4.9.170 kernel?
Am I on the right path to getting a kernel module that my kernel will load?
Background information:
I'm hoping this isn't very relevant, but just to head off some questions
This is a T95 Android TV device running what appears to be, to this newbie's eyes, a very Frankenstein'd Android 10 install (See https://www.cnx-software.com/2020/0...-comes-with-mali-g31-gpu-supports-android-10/)
I can't find any official - or unofficial - source for this device, which is why I'm going to all the trouble above.
I really appreciate any help, thank you!