yashsingh1/xdaforums huggingface dataset:
[Miscellaneous Android Development] pottu221:
gives me this when doing the first command on terminal (downloads)

Reading package lists... Done

Building dependency tree

Reading state information... Done

Package lib32bz2-1.0 is not available, but is referred to by another package.

This may mean that the package is missing, has been obsoleted, or

is only available from another source

Package lib32bz2-dev is not available, but is referred to by another package.

This may mean that the package is missing, has been obsoleted, or

is only available from another source

Package lib32ncurses5 is not available, but is referred to by another package.

This may mean that the package is missing, has been obsoleted, or

is only available from another source

Package lib32ncurses5-dev is not available, but is referred to by another package.

This may mean that the package is missing, has been obsoleted, or

is only available from another source

Package lib32readline-gplv2-dev is not available, but is referred to by another package.

This may mean that the package is missing, has been obsoleted, or

is only available from another source

Package lib32readline5 is not available, but is referred to by another package.

This may mean that the package is missing, has been obsoleted, or

is only available from another source

Package lib32readline6 is not available, but is referred to by another package.

This may mean that the package is missing, has been obsoleted, or

is only available from another source

Package lib32z1 is not available, but is referred to by another package.

This may mean that the package is missing, has been obsoleted, or

is only available from another source

E: Package 'lib32ncurses5' has no installation candidate

E: Package 'lib32z1' has no installation candidate

E: Package 'lib32bz2-1.0' has no installation candidate

E: Package 'lib32ncurses5-dev' has no installation candidate

E: Unable to locate package lib32z-dev

E: Package 'lib32readline-gplv2-dev' has no installation candidate

E: Package 'lib32readline5' has no installation candidate

E: Package 'lib32readline6' has no installation candidate

E: Package 'lib32bz2-dev' has no installation candidate

E: Unable to locate package gcc-4.8

E: Couldn't find any package by regex 'gcc-4.8'

E: Unable to locate package g++-4.8

E: Couldn't find any package by regex 'g++-4.8'
[Miscellaneous Android Development] MasterAwesome:
Yeah some of these packages aren't needed at all. The packages on Google's website are enough. Search for "initializing build environment" on Google.
[Miscellaneous Android Development] pottu221:
aah i did everything on the config file when i wrote "make zImage" it just

gives lots of warnings and these are from the lines

make: arm-eabi-gcc: command not found

restart config...
[Miscellaneous Android Development] superdragonpt:
check your makefile, the message is very clear...

download the toolchain, and point to USER_your_toolchain_local_path

cheers
[Miscellaneous Android Development] pottu221:
didnt help :(
[Miscellaneous Android Development] MasterAwesome:
It's actually in step 1 of this guide, export PATH to your toolchain bin folder. As I said blind copying won't work, you've got to modify the commands to match your build env
[Miscellaneous Android Development] pottu221:
export TARGET_BUILD_VARIANT=oskari TARGET_PRODUCT=callass MTK_ROOT_CUSTOM=../mediatek/custom/ TARGET_KERNEL_VERSION=callass &&export PATH=/home/oskari/NDK/toolchains/arm-linux-androideabi-4.6/bin:$PATH&&export CROSS_COMPILE=arm-eabi-&&export ARCH=arm

this is what i did put in the line
[Miscellaneous Android Development] MasterAwesome:
You're exporting arm-linux-androideabi either change cross compile to that or point it to arm-eabi toolchain
[Miscellaneous Android Development] murtaza1326:
@MasterAwesome hello sir for me this guide worked compiled kernel succesfully but see before compiling kernel i am able to boot on stock flyiq4404 kernel after modifiying it (replaced touchdriver name in projectconfig.mk file) and compiled kernel bt i got white screen after boot logo

according to projectconfig.mk my touch driver is msg2133 and i used this source to compile https://github.com/rex-xxx/KK_kernel_iq4404_MT6572

it have msg2133 driver also bt didnt got worked can you please help me :confused:

can you pls have a look at my projectconfig.mk file i dont have source code so anyone can pls compare this source code and my stock rom kernel projectconfig.mk i dont have pc now so it would be great if anyone will compile kernel again for me its a request please someone help me masterAwsome or snapdragonpt anyhelp from your devs will be helpfull to me.I compared projectconfig.mk its mostly simillar :) here is my prjectconfig.mk renamed to .txt file have a look at it. :)
[Miscellaneous Android Development] xdedeone:
Build Variants

eng

This is the default flavor. A plain make is the same as make eng.

user

This is the flavor intended to be the final release bits.

userdebug

The same as user, except:
[Miscellaneous Android Development] xdedeone:
Get error in all make command

I geting error using make command

i try use other defconfig "not in mediatek directory"
[Miscellaneous Android Development] murtaza1326:
anyone help me

compiling kitkat kernel

for my mtk device getting this error

make(1):**** kernel(error)1

make:***remake(error2)

help me
[Miscellaneous Android Development] xdedeone:
setup first the defconfig to ur device.
[Miscellaneous Android Development] murtaza1326:
thanks bro

sorry but i am beginner this step is not mentioned in this guide can you explain me how to do it

and anyone please help me to port lcm drivers too lcm after first boot shows white screen help me to fix it ?
[Miscellaneous Android Development] xdedeone:
If u not have specific defconfig to ur device use

cp mediatek/config/devicename/autoconfig/kconfig/platform .config

"devicename" is the name of ur device. example "mt6582" "mt6572" etc

or go to

/home/user/KERNELSOURCE/kernel/arch/arm/configs/

and search an archive to ur device. for example nameofurdevice_defconfig

if u found a defconfig go to terminal and change to "kernel" directory

and type

make nameofurdevice_defconfig
[Miscellaneous Android Development] murtaza1326:
thnxs i tried it and that above error solved but........

now facing this

Make command is not working

use this make command

./makeMtk spark n k

I get 'no rule to make target zImage.

Same for menuconfig

While downloading them, some get error

ERROR -These packages have unmet dependencies

help me to solve this ?

---------- Post added at 12:10 PM ---------- Previous post was at 12:08 PM ----------

used this source

https://github.com/rex-xxx/KK_kernel_iq4404_MT6572
[Miscellaneous Android Development] murtaza1326:
Hello I really appricate your work

but it will be more awsome if you make a guide "How To build/port kernel source if you dont have your own device source/tree provided by your device vendor" i am from those who dont get kernel sources from there device vendor i think most of mtk dont relsease sources

i will fix touch bug by appropriate kernel driver but what to do that i dont have source so how do i fix LCM (white screen bug) help will be surely appriciated ?
[Miscellaneous Android Development] xdedeone:
u first need setup ur defconfig, then execute the menu config

make nameofurdevice_defconfig

then execute menuconfig

make menuconfig

change all u need and close window. then create a zImage

make zImage
[Miscellaneous Android Development] murtaza1326:
thanks fixed it ? compiling
[Miscellaneous Android Development] murtaza1326:
My pc crushed so i reinstalled ubuntu again downloaded required packages given from master awsome link

now this is happening

"These packages have unmet dependencies"

help me plsssssss
[Miscellaneous Android Development] murtaza1326:
Yeah thnxs all atlast compiled thank you very much compiled first kernel ? thnxs for awsome guide [MENTION=1321663]MasterAwsome [/MENTION]@xdedeone you too bro ?and others too

this is for testing purpose i will edit it and make it for my device compitible (replacing touch driver,lcm,imagesensors etc) wish me luck of i get error i will surely ask you guys thnxs alot ?
[Miscellaneous Android Development] murtaza1326:
edited project config.mk file

errors in bunch
[Miscellaneous Android Development] murtaza1326:
anyone here help me to find these imagesensors drivers

i googled it lot but got nothing so someone pls help me

soc5140_mipi_yuv

ov5645_mipi_yuv

gc0329_yuv

hi704_yuv [MENTION=4520184]hyperN[/MENTION]eon70 pls help me
[Miscellaneous Android Development] Avinash kodidasu:
help

i am facing this error while using "make menu config"

make: *** No rule to make target `menuconfig'. Stop.

so can anybody help me on this

@[MENTION=5321417]MasterAwesome [/MENTION]
[Miscellaneous Android Development] Avinash kodidasu:
avinash@avinash-HP-15-Notebook-PC ~/android/kernel $ make mediatek-configs
make: *** No rule to make target `../out/target/product/s9320/obj/CUSTGEN/config/autoconfig/kconfig', needed by `mediatek-configs'. Stop.

facing these errors while using this method
[Miscellaneous Android Development] ~cyandrew:
Help

I am stuck at make menuconfig. It says "make: No rule to make target 'menuconfig'. Stop". Please help me
[Miscellaneous Android Development] Avinash kodidasu:
You should be in kernel directory whilr using this command
[Miscellaneous Android Development] ~cyandrew:
I am on the kernel directory sir. But it keeps saying no such command
[Miscellaneous Android Development] Avinash kodidasu:
No need to say sir..are u already used the cp /blah blah blah command

And which kernel source u r using paste the link here
[Miscellaneous Android Development] ~cyandrew:
I am using this kernel source from my device manufacturer, http://support.lenovo.com/ph/en/products/phones/a-series/a536-smartphone/downloads/ds100817
[Miscellaneous Android Development] Uchiha_Dev:
can we decompile zimage ? I am sure we can't but doesn't hurt to ask
[Miscellaneous Android Development] sritesh:
A110q kernel

Can u please make cm12 compatible kernel for device a110q mt6589m chipset ! A humble request
[Miscellaneous Android Development] zunaid321:
Are u a mtk6589 dev? If u are join me on fb :) I will add u to the mtk6589 group chat :) www.facebook.com/zunaidamin
[Miscellaneous Android Development] kirito9:
SOLVED
[Miscellaneous Android Development] persano:
zImage isnt working for me

My make file doesnt include it.

I saw in a custom kernel from a device with the same SOC (6753) that makefile doesnt include zImage.

I dont know what to do. I already added Governors, I/o Schedulers and Tweaks.
[Miscellaneous Android Development] murtaza1326:
u first need setup ur defconfig, then execute the menu config<br />

<br />

<br />

<br />

then execute menuconfig<br />

<br />

<br />

<br />

change all u need and close window. then create a zImage<br />

<br />

[/QUOTE]<br />

<br />
[Miscellaneous Android Development] pchatzop:
Hello guys, thank you for your awesome work. I need a kernel to make a friend's phone work correctly with kitkat , the thl w200s. I found some kitkat kernel sources(all credits go to snowcatPDA from 4pda forums) here: https://yadi.sk/d/nQBTPzucjFkSm . Would someone be so kind to compile them, since i have no idea on android development and would probably mess it up? Thanks.
[Miscellaneous Android Development] ~cyandrew:
<br />

<br />

Bro this way doesn't work on my source. It's in ALPS form.
[Miscellaneous Android Development] persano:
No one can help me with zImage dont working?
[Miscellaneous Android Development] Goayandi:
Thank you very much :) Your Guide helped me a lot. But i do not quite understand how to upstream the kernel-source to the latest linux-patch.

I tried to download all patches from 3.4.67 (my stock kernel-version) to latest 3.4.111 from kernel.org. As i learned from a guide on Xda, i have to move these patches to kernel-folder (does that mean, i have to use the "kernel"-folder in root-directory or the mediatek-folder?).

There i used this command:

$ patch -p1 < patch-3.4.68

Is that right? Or how to apply these patches?

SOLVED.

I found this guide http://www.pro-linux.de/artikel/2/1572/3,aktualisieren.html .
[Miscellaneous Android Development] 4javier:
[MENTION=5321417]MasterAwesome[/MENTION]

I see that you didn't ever use tools like makeMtk. It's because the guide is out of date and it wasn't necessary at the time, or is there any other explanation?
[Miscellaneous Android Development] ~cyandrew:
Bro, my source is also ALPS (Lenovo A536). Can you teach me how'd you set up the build enviroment?
[Miscellaneous Android Development] kenkitt:
First you need a 64bit linux distro, download the kernel from the vendor and the targets toolchain.

then follow this guide http://xdaforums.com/showthread.php?t=2754513

Instructions are compatible for any devices.
[Miscellaneous Android Development] goldchang:
[MENTION=7526472]abiolakunle[/MENTION]

You're getting error because

You're dividing somthing by zero
[Miscellaneous Android Development] hacknmtk:
Check line 44 in your Makefile.build file. It looks like you may have added an extra "/" between "platform" and "kernel". That may be why it can't find the directory with your makefile in it.
[Miscellaneous Android Development] prateetsingh:
Me too facing the same and tried this too but no luck.. please help
[Miscellaneous Android Development] ranchu-panchu:
Hello,

Is this thread for NO.1 D6 ?

Thank you,

Ranchu
[Miscellaneous Android Development] kirito9:
Nope, not for the D6.
[Miscellaneous Android Development] ranchu-panchu:
Hi,

Is there a way I can find the kernel for D6 ?

Thanks,

Ran
[Miscellaneous Android Development] kirito9:
You can google search "kernel source for the NO.1 D6".
[Miscellaneous Android Development] ranchu-panchu:
Hi,

Except for finding this thread and myself asking this question :) , I did not find and meaningful link.

Is there a chance that No.1 will link me to the kernel ?

Thanks,

Ranchu
[Miscellaneous Android Development] kirito9:
All I found were these links

http://en.001phone.cn/download-50.html

https://github.com/corvusmod/device_no1_D6

https://github.com/corvusmod/vendor_no1_D6

You can probably try asking the company on the site for the kernel source.
[Miscellaneous Android Development] ranchu-panchu:
Hi,

I see that NO.1 D6 is using android 5.1 with mtk6577,

so isn't it just a matter of building mediatek kernel source for mtk6580 ?

I found mtk git for 5,1 here:

https://android.googlesource.com/kernel/mediatek/+/refs/tags/android-5.1.0_r0.2

So isn't it just a matter of building these source for mtk6580 , or do I miss something in my understand ?

NO.1 comany are not giving their kernel sources, although I've tried.

Thank you for the assistance,

Ranchu
[Miscellaneous Android Development] kirito9:
It is using android 5.1? I thought it was 6.0 and I thought the chipset was mt6580.

If no kernel sources, then you would have to use prebuilt kernel.
[Miscellaneous Android Development] ranchu-panchu:
Yes, I think you're right and I have mistaken.

It is mtk6580, android 5.1

I am trying now to check with NO.1 if they can provide the source code.

Aren't they obliged to provide kernel source code (GPL) ?
[Miscellaneous Android Development] kirito9:
Yeah, they're supposed to but welcome to Mediatek devices, where source code for devices is few and sometimes incomplete.

Ahh 5.1, yes I remember now. CM 13 is an upgrade to the OS.
[Miscellaneous Android Development] ranchu-panchu:
D5 mt6572

Hi,

I didn't manage to get kernel source from company( NO.1),

but I found several github with kernel for mt6572 (which is used with D5 NO.1):

https://github.com/starvfox/MT6572-KERNEL-4.4.2

Do you think this git kernel source might work with this device ?

Don't I also need devicetree build (I can't see it being mention in guide) ?

Thanks,

Ranchu
[Miscellaneous Android Development] Mysteryagr:
Can this guide be used on 3.18 kernel mt6580 chipset?

I can't find:

cp mediatek/config/devicename/autoconfig/kconfig/platform .config

in the kernel source.
[MENTION=5321417]MasterAwesome[/MENTION] [MENTION=5193140]Nonta72[/MENTION]
[Miscellaneous Android Development] Nonta72:
You do not need to cp the defconfig.

If everything is properly set up (export the toolchain and the arch especially).

You just move to kernel directory and do

make device-codename_defconfig

That will generate the .config file in the root of the kernel directory.
[Miscellaneous Android Development] Mysteryagr:
Thanks for the info.
[Miscellaneous Android Development] ranchu-panchu:
Hi,

Do we need to build the device tree too ?

If not - how does the build knows the biard settings, in other words does mtk 6572 kernel source should work with any device which uses mtk6572 ?

How should I determine what to put in TARGET_PRODUCT ?

Thanks,

Ran
[Miscellaneous Android Development] ranchu-panchu:
I've made many trials, but it always fails in something else.

I wander if anyone can please give good example with some mediatek kernel source , which we can try and see if it works. That's really frustrating, if anyone had success with it (with mediatek!) ,then a good tutorial will help so much.
[Miscellaneous Android Development] RX1901:
Hi all,

how "generic" is the kernel? E.g. when building it for a mt6753, will it boot all phones with that chipset? Or are individual settings for each phone necessary?

Thanks.

Best regards,

RX1901
[Miscellaneous Android Development] kirito9:
Each kernel for each device is different and there is no "generic" kernel.

---------- Post added at 05:13 PM ---------- Previous post was at 05:02 PM ----------

No you do not need the device tree when building the kernel. One mt6572 source will not work for another device, that's not how kernels work. The TARGET_PRODUCT is what the codename of your device is. It's usually in the readme of the source or in the "config" folder.
[Miscellaneous Android Development] RX1901:
That's clear. But when compiling it for a specific chipset (e.g. mt6753) it should boot every phone with that chipset, right?

I haven't found any kernel-config-hints on my phone (no config.gz or similar) that I could use. So I'm bound to the generic (chipset-specific) approach. That's all I know...
[Miscellaneous Android Development] kirito9:
Still saying it should boot every phone with that chipset is wrong. Open your build.prop and search for this line "from/out/target/product/mt6753/obj/CUSTGEN". Look for the string of text after product. That's the name of your defconfig that you use to compile the kernel. Mt6753 is just an example.
[Miscellaneous Android Development] RX1901:
There is no similar line in build.prop. But there are some lines that point to two devices:

ro.board.platform=mt6753

ro.wtk.board.platform=mt6753

mediatek.wlan.module.postfix=_consys_mt6735

Any ideas why one is set to 6753 and the other to 6735?

Thanks.
[Miscellaneous Android Development] kirito9:
Hmmm, send me your build.prop and I'll check it.
[Miscellaneous Android Development] kirito9:
That isn't the correct place to download mediatek kernel sources as I said, each device has it's own source. You need to google search your device name+kernel source.

I got this from your build.prop....

# from device/maisui/x5613_dg_a35_5365u/system.prop

So that means your defconfig is x5613_dg_a35_536u.
[Miscellaneous Android Development] mahmoud_10th:
hi i need some help here please https://xdaforums.com/lenovo-a6000/development/lenovo-s860-t3545032
[Miscellaneous Android Development] EigentlichPeng:
anybody time to compille a kernel for me ? i stuck since month i this part ,low internet connection and other tiny problems ... need this part to finisch my job
[Miscellaneous Android Development] naman1208:
i am getting error while using make menu config.

1. I have mt6589 kernel sources for my canvas A117.

2. i have my kernel sources in kernel folder and toolchain in home, so i used this command to link my toolchain to kernel sources

export CROSS_COMPILE=/home/arm-eabi-4.6/bin/arm-eabi-

3. then i used-

cp mediatek/config/mt6589/autoconfig/kconfig/platform .config

and then when i use menuconfig it gives me this error-

make: *** No rule to make target 'menuconfig'. Stop.

i am in my kernel source directory while running these commands then what is going wrong please help.:crying:
[Miscellaneous Android Development] kirito9:
Check your toolchain path that you're sending you the terminal.
[Miscellaneous Android Development] llxxVENOMxxll:
Any help regarding how to generate a defconfig file for my device. All drivers are ready!
[Miscellaneous Android Development] llxxVENOMxxll:
Help me generate a defconfig file for my device.

Is there any command for it?
[Miscellaneous Android Development] bigrammy:
Look at the /system/data/misc/ProjectConfig.mk or maybe /system/vendor/data/misc/ProjectConfig.mk of the Stock ROM. It's the closest thing to a defconfig. You should be able to workout what you need to set.
[Miscellaneous Android Development] I.nfraR.ed:
Unfortunately make mediatek-configs didn't make a difference and the issue with A820 kernel is still there :/

I'm still a total noob and can't figure it out.
[Miscellaneous Android Development] MasterAwesome:
Look, [MENTION=5439876]Dr-Shadow[/MENTION] :/. I'll try to debug it once I get home... Send me a logcat

Sent from my Moto G
[Miscellaneous Android Development] SatrioDwiPrabowo:
Nice guide thanks bro :good: btw where i get kernel source ?
[Miscellaneous Android Development] MasterAwesome:
Thank you :) what device do you have?

Sent from my Moto G
[Miscellaneous Android Development] mastersanta:
This is because Lenovo is a good source of trash :D I think first we have to clean, sort out, etc. I see a lot of duplicate files and even after several times the same thing. It gives me cancer...

Maybe Dr-Shadow would give any clues to where what is where in the typical source? ;)

MasterAwesome - maby you add a couple of links to download the toolchains? "https git clone ..." and the other for eabi, linux-androideabi... Make it easier for others to work with the "first" source :)
[Miscellaneous Android Development] MasterAwesome:
Will do..

Thank you

MasterAwesome

Sent from my Moto G
[Miscellaneous Android Development] superdragonpt:
Yeah Lenovo and their sources...

Toolchains: check my github , on my zte v970 repo, you have there 2 working tool chains ;)

Regards
[Miscellaneous Android Development] shutt1e:
when kernel sources are unavailable, maybe because is not possible to know who is the original manufactor of the phone, is there a possibility to grab from the running kernel the .config originally used? the /proc/config.gz is not used on mtk it seem.

i managed to build a kernel but of course it don't boot, due i have used another device config folder, with just some changes.
[Miscellaneous Android Development] MasterAwesome:
Build your own .config following a device with similar specs.. Usually all mtk kernel source have similar kernel sources with a little custom mods depending on the manufacturer like lcd, WiFi etc. Building kernel with some other source will obviously not boot. Also, if you're building for 4.2 or lesser make sure you disable selinux and make sure you push the modules into the /system/lib/modules or it won't start.

Regards

MasterAwesome
[Miscellaneous Android Development] shutt1e:
actually i'm trying to build only a recovery kernel, i've compiled kitkat cwm recovery so i don't need modules right?

i'm having troubles to understand the format of this file EMMC_partition_sizes.mk,

ifeq ($(MTK_EMMC_SUPPORT),yes)
BOARD_PROTECT_FIMAGE_PARTITION_SIZE:=10M
BOARD_PROTECT_SIMAGE_PARTITION_SIZE:=10M
BOARD_SECROIMAGE_PARTITION_SIZE:=6M
BOARD_SYSTEMIMAGE_PARTITION_SIZE:=650M
BOARD_CACHEIMAGE_PARTITION_SIZE:=126M
BOARD_USERDATAIMAGE_PARTITION_SIZE:=1023M
BOARD_FATIMAGE_PARTITION_SIZE:=0M
endif

do i need to write here the real sizes of partitions of my phone or it is just a dummy file?