Building ME301t stock kernel - Android Q&A, Help & Troubleshooting

Hi,
I'm trying to build the stock Memo Pad smart(ME301t) stock kernel 10.6.1.29 downloaded directly from asus.
I used 4.3.3 to 4.7 toolchains with similar results(give or take some deprecated compiler arguments).
What I really want to know is why I'm getting a lot of warnings(NOT ERRORS), some of them are minor errors like "unused function" and some of them are major warnings breaking function functionality. Some of the builds don't even boot.
What toolchain should I use with this kernel?
Why a stock kernel(from asus) should produce warnings at the first place?
I'm on linux BTW.

Related

[Q] How come that specific userlands do require a certain kernel to work?

I'm very new to Android as an OS with the Linux kernel at its heart, but fairily proficient with GNU/Linux and a plethora of its distributions for what has been more than a decade by now. So, what I (amongst other things) find a bit bewildering is that very many of custom firmware images seem to require a very specific kernel version or build for handsets to actually work. For my Xperia Mini (Smultron), there are ROM images based on CyanogenMod that won't work with the "vanilla" CM7 kernel, for instance.
With a proper GNU/Linux system, you don't have that kind close coupling of userspace and kernel versions at all. Barring some minor incompatibilities between certain (old) releases of udev and modern releases of the Linux kernel (and vice versa), there's very little (if anything) that stops you from supplanting your three years old distro's kernel with something that Linus released a few days ago.
However, whenever I've come across a guide how to install/set up this and that ROM for some kind of phone, and someone (more or less prominently) states that that image will require a specific kernel build, I've _never_ been so lucky to have been offered a technicial explanation as to why exactly this is the case. Can anyone reading this thread tell me, or point me to where I can find out more about the underlying reasons for these subtle incompatibilities?
I refuse to believe noone can answer that question...
Some features are not available in stock kernel, that are needed for custom ROM.
I am personally not fully familiar with kernels.

[Kernel] Starship Kernel 06/29/2015 (Stock/AOSP_5.1.1|CM-12.1|)

Starship Kernel is being developed in conjunction with the not yet posted Starship Rom. Like I had done with the KK incarnation of the Starship Rom I am also posting the Kernel separately for anyone who may not like the Rom's Theme. Though unlikely as that may sound because I have spent much time and effort with the Kernel am posting the Kernel separately so it can be used with other Roms and not just Starship.
If you are looking for new features to play with this will not be the Kernel for you. It is designed to improve the overall experience as if it was not there. At this point and probably never you wont find over clocking or voltage controls to play with but rather just a more efficient overall experience.
Each Kernel Download section contains a link to the commit list for both the purpose of following rules about posting links to Kernel Sources as well as serving as a change log. You will find in the main branch all Linux Kernel Increment Updates are grouped into one commit. This is to easily distinguish what commits have been made as part of the Linux Kernel Increment Updates from other additions/optimizations that are not part of the Linux Version Updates. You can find descriptions of each change made as part of the Increment Updates in the staging branch. In other words the second link below the download links will give a description off the changes made in the Linux Version Updates .
Downloads
AOSP/Stock (Android Version 5.1.1)
AOSP/Stock Kernel is compiles using Google's GCC 4.8 toolchain and tested tested on the Stock 5.1.1 Rom as well as AOSP compiled Rom using unmodified pure 5.1.1 Source code. The Kernel may or may not work on custom Roms based on 5.1.1 depending on what changes have been made by the Roms developer and how far the Rom has strayed from the original source code. In most cases if the Rom is AOSP based the Kernel will work but provide no guarantee as am not testing with every ROM available. If you do find a Rom the Kernel does not work with feel free to comment but please include what Kernel was used that did not work as I may be able to shed light on reasons why and provide a workaround if possible. Most of incompatibility will find that the Kernel is not the issue rather what is included inside the boot.img like Ramdisk iinit.rc files that set permissions and create the Rom file-system.
Starship-lollipop-5.1_Kernel-3.4.91_r1
https://www.androidfilehost.com/?fid=24052804347767806
Starship-lollipop-5.1_Kernel-3.4.88_r1
https://www.androidfilehost.com/?fid=24052804347766347
Starship-lollipop-5.1_Kernel-3.4.86_r1
https://www.androidfilehost.com/?fid=24052804347760505
Starship-lollipop-5.1_Kernel-3.4.83_r1
https://www.androidfilehost.com/?fid=24052804347756685
Source / Change-log
https://github.com/Starship-Android/android_kernel_lge_hammerhead-starship/commits/lollipop
Including individual explanation of changes included as part of Linux version increment update patches.
https://github.com/Starship-Android/android_kernel_lge_hammerhead-starship/commits/lollipop_staging
CM-12.1
CM-12.1 Kernels may be updated more frequently without posting a new date so don’t be surprised to see multiple release number increments. In most cases there has been no change in the Kernel itself but update frequently as development is fast moving. Because of this some of the files that get packaged into the boot.img along with the Kernel may change and cause issues. Because of this will update as frequently as I can to insure everything packaged into the boot.img is up to date.
Starship-CM-12.1_Kernel-3.4.88_r1
https://www.androidfilehost.com/?fid=24052804347766796
Starship-CM-12.1_Kernel-3.4.86_r1
https://www.androidfilehost.com/?fid=24052804347760507
Starship-CM-12.1_Kernel-3.4.80_r1
https://www.androidfilehost.com/?fid=23991606952613802
Source / Change-log
https://github.com/Starship-Android/android_kernel_lge_hammerhead-starship/commits/cm-12.1_staging
Donations
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=MMEVCWUX83SXJ
I am not responsible for any effect using the downloads from this forum my have on any device and you download and use at your own risk.
Just decided to include the CM-11 Kernel for anyone who may be using CM-11. Is a nice Kernel and gave me an extra hour or two battery so recompiling with a few new commits I have been using in both CM-12 & AOSP. Will post in a few. Checking nothing else may have changed on the CM side with the rest of the boot.img and will post in a bit.
I will try out the AOSP kernel tonight or tomorrow, we are under blizzard conditions right now and can't mess with phone because of work (boss & I texting back and fourth)
Thanks for your work
Sent from my rooted RCT6203W46 using xda-dev app
Downloading now!
Sent from my Nexus 5 using XDA Free mobile app
rickballs said:
Downloading now!
Sent from my Nexus 5 using XDA Free mobile app
Click to expand...
Click to collapse
Sorry about this then but have uploaded an update. I had intended on holding off until reaching Linux version 3.4.40 as it is the version I had left off with for Kit-Kat and have just been modifying each version increment patch from the Kit-Kat 3.4 Kernel for Lollipop. Anyhow last night before bed had used my Bluetooth Headset with the current version and sounded like I had gone out and bought a brand new higher end set so decided to post the update now. Found in the past Android can have a completely different experience when it comes to different BT devices like for example the same headset had become completely unusable on my N7 with constant skips and pauses on 4.4.4 after working beautifully on 4.4.3 so hope others can hear the same boost in overall audio quality including BT headsets.
Updated Kernels with a few new optimizations and 3.4.36 version update
Ok will try it
Can't download from devhost. Anyone else is having problema?
gengi said:
Can't download from devhost. Anyone else is having problema?
Click to expand...
Click to collapse
Looks to be up and running. Can try direct links though.
updated so links are no longer current.
Well it feels like with all the side track projects been talking Starship L long enogh maybe some of those who have sent PM's asking about the lollipop update are starting to become doubters so decided to post up a few screen shots. Was going to finish a few things then go over the theme image by image and color by color but think instead after finishing up a few things will post and then start going over each apk over again for touching up, fixing and adding missed optimizations including Kernel updating along the way. Once again not for everyone so haters can hate and I just keep doing it because its what I like doing.
Made new boot.img for Stock / AOSP 5.1.0 as old image used in 5.0 - 5.0.2 caused boot loops.
The MultiROM not work with this kernel? :-O
dado70 said:
The MultiROM not work with this kernel? :-O
Click to expand...
Click to collapse
Honestly have been meaning but have not tried MultiROM. Looked over at the thread and see allot of mention about the boot.img and modifications. If I had to guess with the limited knowledge I have would say if not working is not so much the Kernel but the boot.img in the same way that both the Stock / AOSP zips posted are the same exact Kernel inside but changes made to files like the init.rc inside the 5.1.0 boot.img that creates the file system and sets permissions among a score of other things caused 5.1.0 from booting properly after updating and flashing the boot.img. As developers we use the name Kernel but there is much more inside than the actual Kernel. In some cases can be more than a dozen other scripts and other files inside. Will need to try and learn a bit about MultiROM. Out of curiosity was it Stock or CM giving you issues?
Little more reading and looks like not everyone including CM has updated to include new bootloader version checks to include new bootloader from the 5..1.0 update. So for example I needed to change the bootloader version in CM source or nightly builds will not flash in TWRP without errors.
Maybe an update on this if flashing CM version, seems latest CM12 is receiving errors flashing with some recovery versions and must be installed via adb / fastboot. Article was not specific on the reason but may be the cause.
Added updates to version 3.4.42 for both 5.1.0 and under. The 5.0.2 zip should work for all stock and AOSP Roms from 5.0 - 5.0.2. Because of changes in 5.1.0 boot.img 5.1.0 will not boot when used with a lower Android Version.
Slightly disappointed as today had planned on posting full Starship Rom but now updating for 5.1.0 so maybe another week maybe two
So any details on what this kernel does? Or is our just close to stock?
CM12 Kernel is on hold until 5.1.0 version update. No reason testing anything new until can confirm everything will still work next week. Also figures the same week I had planned on posting the full Starship Rom the 5.1.0 update hit so now am back in testing optimizing phase for a bit longer.
3.30.2015 update
Linux version has been updated to version 3.4.55
All MR1 changes added to the 5.1.0 AOSP Kernel have been merged into the Kernel
https://github.com/Starship-Android...mmit/8ed8c47ff15f1c5fdd6707f7a52f76110aed6cbf
4.6.2015 update
Not much on the AOSP/Stock side. Wanted to post a cm12 update so decided to post the AOSP/Stock kernel earlier than I would normally with a few Linux version update patches. With that said updating the Kernel only takes a minute or so and not like asking to flash a new Rom. Kernels are easy and these days faster to flash than g-apps. Also used the 5.1.0_r3 source to compile the boot image for 5.1 instead of 5.1.0_r1 source I had been using. Honestly though did not check if anything changed that is packed into the boot.img along with the Kernel between r1 & r3 so may or may not make any difference what so ever.
Forgot, marked the cm-12.1 kernel as beta just because cm-12.1 is pretty much beta. Otherwise the Starship 12.1 Kernel is the Starship CM12 Kernel merged with the Cyanogen 12.1 Kernel . Not that the two had been far apart to start but the 12.1 CM Kernel merged into the Starship cm12 kernel clean as a whistle with 0 conflicts. Was pretty happy about that so going foreword will just be working on the 12.1 Kernel with the Starship cm-12 Kernel soon going the way of the 5.0 - 5.0.2 Stock/AOSP Starship Kernels.
Now finally since the actual Starship Rom I have been working on since the darn preview release ending as mostly caf based with CM-12.1 coming together can start updating from 5.0.2 into 5.1 as had just finished going over the first draft and was about to post when the 5.1 update hit. Otherwise wanted to post the first draft and then go over the entire Rom a second time looking over the theme images, features and optimizations with a magnifying glass.
Have updated both Stock / AOSP and cm-12.1 Kernels up to Linux 3.4.65 with a few other additions and weeding. Has and been running pretty sweet on both so far.
Stock / AOSP 3.4.65 Kernel boot.img has been compiled using the 5.1.1 AOSP Source and tested on both 5.1.0 & 5.1.1 with no issue and as mentioned above running pretty sweet.
I cant install on aicp 5.1.1
Sent from my Nexus 5 using XDA Premium HD app

[Q] Tegra3 camera hal problems

I'm trying to compile Android 4.2.2 for the Lenovo A2109A. AOSP 4.1.2 mostly worked out fine, except that panorama mode for the camera didn't work. In AOSP 4.2.2 the camera HAL didn't seem to connect to the camera, so I switched to CM-10.1. Camera HAL loads fine, but it doesn't take pictures. The problem seems to be that the stock camera HAL is linked to a version of libjpeg with proprietary additions from nvidia and I can't figure out what they are. Someone else was able to successfully compile CM-10.1 with a working camera by using libjpeg-turbo for compilation (see here), but it also needs a patch for skia that I can't find.
So right now I'm basically stuck and I'm looking for different ways forward. I could really use your advice. Should it be possible to use the camera hal from a related device instead? I know that the nexus 7 is also a tegra3 device, and very close to A2109. It does use different camera devices, but these can be configured in nvcamera.conf. I used strings to find whether any proprietary lib referenced the specific cameras and I found only one, libnvodm_imager.so. The most important differences appear to be in the kernel source, in the following files:
drivers/media/video/tegra/tegra_camera.c
drivers/media/video/tegra/tegra_dtv.c
My question--to what extent should it be possible to just use the grouper tegra camera files for the kernel and then use the grouper camera HAL? Or do you have a different suggestion for me to proceed? I'm asking because I can hardly code. I am, however, getting better and better with git and patches, and I did manage to fix two compile issues in the lenovo kernel source.
My kernel source is over here. My device tree is over here (defaults to aosp 4.2.2 branch, cm-10.1 is a different branch). Grouper kernel sources are over here.
P.S., I have a development thread over at androidtablets.net, which also contains various details.
Answering my own post...
I tried using grouper HAL, gives error message. But using tf700 camera HAL worked, when used with tf700 libnvcamerahdr.so, both taken from stock 4.2.
So--problem solved

Android kernel how to make compatible with higher os? (+Where can I find the patch?)

Hello, I'm newbie dev trying to build CM13 for Lenovo Phab plus.
I think I'm almost finished with device and vendor, but I cannot figure it out what to do with kernel.
The circumstance is,
I have a stock kernel source which runs in 5.1.1 LP, with version of 3.10.49.
What I want is to make kernel compatible with 6.0.1.
I already know that linux kernel version doesn't have to be exactly same with new Android OS versions and I can just make a few patches in order to run kernel in higher OS.
So I googled and studied(?) for 2-3weeks, but got not many useful informations and I still cannot figure out where to find required patches for 6.0.1 .
So here's what I am not sure about.
1. I found that I can either upstream, merge, cherry-pick kernel sources from higher OS. For instance, if I merge kernel patches (starting from 3.10.50 to 3.18 step by step) and check if the kernel compiles successfully, is this a right thing to do? I am confused whether merging or cherry-picking is required for my situation.
2. I see lots of commits when comparing with other kernel sources in github. How do you find those kinds of patches? -> just keep compiling kernel and if error comes out->search->commit
Always this pattern goes again and again till boot properly?
3. i'm quite curious with backports. What i know is that "backports" are the files which is compatible for lower version kernels. For example, backported audio driver originally based on 4.9 can be used in kernels with version below 4.9. Is it right?
4. If there is an useful links, anything could be helped a lot.
THANKS IN ADVANCE.

Making an own android image?

Hello everybody. I love this community and I have been lurking for a long time.
I have noticed on a foreign language forum that some people were offering a custom rom for my android 9 TV box.
The chinese box is based on a s905x3 CPU and has a mediatek wifi chip for which it is hard (if not impossible to find the wifi drivers).
The site claims that the image was made by modifying the stock rom that came with the box. Is this possible or do all custom roms need to be build from the source?
The custom rom I want to make is going to replace the launcher with kodi.
I am prepared to build the whole rom from source but I do have a couple of questions.
Since the mediatek wifi drivers cannot be found how would I go about including the binary for the wifi?
I have noticed that the box that I have uses a .ko (kernel object) module to drive the wifi chip.
Can I include these kernel objects in build? It is a shame that the kernel is built as a 32bit system. Would that mean that I can only compile a 32bit kernel if I were to reuse those kernel modules and binaries?
Another idea is to perhaps use the kernel from coreelec in my build since it seems to include a lot of drivers.
Is it possible to use a kernel from something like coreelec but use the source from AOSP for the rest of my build?
Is there anything else that I should be aware of?
Thank you all!!!!
Can anyone give me any hints to any of the questions?
Essentially I want to swap out the stock launcher for Kodi. What is the easiest way to do so?

Categories

Resources