yashsingh1/xdaforums huggingface dataset:
[Huawei MediaPad, T-Mobile SpringBoard] hwmod:
For this, change line 42 of "kernel/arch/arm/mach-msm/msm_dsps.c":

< #include <time.h>
> #include "time.h"

For the next error (similar) change line 18 of "kernel/arch/arm/mach-msm/include/mach/cpuidle.h":

< #include "pm.h"
> #include "../../pm.h"

WARNING !!!

I am not sure the changes above are correct, however those changes let me quickly proceed further with the compilation.

It goes on for a while compiling everything, however it stops during the linking phase:

...
LD drivers/media/video/uvc/uvcvideo.o
LD drivers/media/video/uvc/built-in.o
CC drivers/media/video/ir-kbd-i2c.o
LD drivers/media/video/built-in.o
LD drivers/media/built-in.o
CC drivers/mfd/marimba-core.o
CC drivers/mfd/timpani-codec.o
CC drivers/mfd/msm-adie-codec.o
CC drivers/mfd/mfd-core.o
CC drivers/mfd/pm8xxx-irq.o
CC drivers/mfd/pmic8058.o
drivers/mfd/pmic8058.c:341: error: rtc_cell_resources causes a section type conflict
drivers/mfd/pmic8058.c:341: error: rtc_cell_resources causes a section type conflict
drivers/mfd/pmic8058.c:241: error: othc0_cell_resources causes a section type conflict
drivers/mfd/pmic8058.c:241: error: othc0_cell_resources causes a section type conflict
drivers/mfd/pmic8058.c:256: error: othc1_cell_resources causes a section type conflict
drivers/mfd/pmic8058.c:256: error: othc1_cell_resources causes a section type conflict
drivers/mfd/pmic8058.c:275: error: othc2_cell_resources causes a section type conflict
drivers/mfd/pmic8058.c:275: error: othc2_cell_resources causes a section type conflict
drivers/mfd/pmic8058.c:183: error: misc_cell_resources causes a section type conflict
drivers/mfd/pmic8058.c:183: error: misc_cell_resources causes a section type conflict
drivers/mfd/pmic8058.c:210: error: thermal_alarm_cell_resources causes a section type conflict
drivers/mfd/pmic8058.c:210: error: thermal_alarm_cell_resources causes a section type conflict
drivers/mfd/pmic8058.c:284: error: batt_alarm_cell_resources causes a section type conflict
drivers/mfd/pmic8058.c:284: error: batt_alarm_cell_resources causes a section type conflict
drivers/mfd/pmic8058.c:152: error: pm8058_charger_resources causes a section type conflict
drivers/mfd/pmic8058.c:152: error: pm8058_charger_resources causes a section type conflict
make[2]: *** [drivers/mfd/pmic8058.o] Error 1
make[1]: *** [drivers/mfd] Error 2
make: *** [drivers] Error 2
root@ubuntu: #

I found references to the same error from another dev working on HTC kernels:

http://xdaforums.com/showthread.php?t=1216197&page=714

scroll down a few messages and see post #7136. Same file same error type.

The dev tried other options as for the "toolchain", seems to me he had no luck with r7 either and there is no clue about what produces that error.

Pass the voice and let us see if we can get a step further.

.:HWMOD:.
[Huawei MediaPad, T-Mobile SpringBoard] after_silence:
After doing these i have errror:

make[3]: *** No rule to make target `net/ipv4/netfilter/ipt_ECN.o', needed by `net/ipv4/netfilter/built-in.o'. Stop.
make[2]: *** [net/ipv4/netfilter] Error 2

Then i renamed ipt_ECN.o to ipt_ecn.o and now i have these:

In file included from net/ipv4/netfilter/ipt_ecn.c:20:
include/linux/netfilter_ipv4/ipt_ECN.h:13:37: error: linux/netfilter/xt_DSCP.h: No such file or directory
net/ipv4/netfilter/ipt_ecn.c: In function 'set_ect_ip':
net/ipv4/netfilter/ipt_ecn.c:33: error: 'XT_DSCP_MASK' undeclared (first use in this function)
net/ipv4/netfilter/ipt_ecn.c:33: error: (Each undeclared identifier is reported only once
net/ipv4/netfilter/ipt_ecn.c:33: error: for each function it appears in.)
net/ipv4/netfilter/ipt_ecn.c: In function 'ecn_tg_check':
net/ipv4/netfilter/ipt_ecn.c:105: error: 'XT_DSCP_MASK' undeclared (first use in this function)

Such a mess :-D
[Huawei MediaPad, T-Mobile SpringBoard] cloogshizer:
I think there will be no improvement we keep pointing to the same posts and solutions ;).

As I stated above, the solution was to use gcc 4.4.0 and the R5 toolchain. The relvant links are in my last post. The post by faux123 is http://xdaforums.com/showpost.php?p=27274513&postcount=7152

faux is a hardcore kernel builder, so it might at least be worth a try.
[Huawei MediaPad, T-Mobile SpringBoard] hwmod:
Well I was writing my message while other messages were being written because I did a search in Google.

However I hinted on how to fix the errors on the correct lines and files, not present in the other post.

It was not a cut & paste :) just a timing issue !
[Huawei MediaPad, T-Mobile SpringBoard] cloogshizer:
Nevermind, everything is fine! :D

Could you compile the kernel with the gcc version and the toolchain? I sadly have no box to build on at the moment :(

Tanti saluti a Italia :)
[Huawei MediaPad, T-Mobile SpringBoard] hwmod:
The same happened to me, the only difference is that I got reversed case for the "ipt_ecn.o" error.

I fixed that too, there is a "netfilter" file "xt_dscp.h" that should probably be renamed/copied to "xt_DSCP.h" with the second part upper case.

But there are more errors, these upper/lower case problems tell me they were not building on Linux :)

Yes, an impressive immature work, wanted or not. What a delusion, I start to believe I am just wasting my time.

And yes, I am forced to retire any previous compliment about Huawei delivering quality software not the kernel sources anyway.

Though the hardware is good :)
[Huawei MediaPad, T-Mobile SpringBoard] after_silence:
I thought about it just in time then i have looked at partition layout of our mediapad :-D

Latest error that i have:

net/netfilter/xt_hl.c: In function 'hl_mt6':
net/netfilter/xt_hl.c:52: error: dereferencing pointer to incomplete type
net/netfilter/xt_hl.c:53: error: 'IP6T_HL_EQ' undeclared (first use in this function)
net/netfilter/xt_hl.c:53: error: (Each undeclared identifier is reported only once
net/netfilter/xt_hl.c:53: error: for each function it appears in.)
net/netfilter/xt_hl.c:54: error: dereferencing pointer to incomplete type
net/netfilter/xt_hl.c:55: error: 'IP6T_HL_NE' undeclared (first use in this function)
net/netfilter/xt_hl.c:56: error: dereferencing pointer to incomplete type
net/netfilter/xt_hl.c:57: error: 'IP6T_HL_LT' undeclared (first use in this function)
net/netfilter/xt_hl.c:58: error: dereferencing pointer to incomplete type
net/netfilter/xt_hl.c:59: error: 'IP6T_HL_GT' undeclared (first use in this function)
net/netfilter/xt_hl.c:60: error: dereferencing pointer to incomplete type
net/netfilter/xt_hl.c: At top level:
net/netfilter/xt_hl.c:80: error: invalid application of 'sizeof' to incomplete type 'struct ip6t_hl_info'
[Huawei MediaPad, T-Mobile SpringBoard] hwmod:
Yes for this I should change the definitions found in "ip6t_hl.h" (and copy it with HL to upper case too) to match those requested in the errors.

But I have good news, after a few more changes the kernel finally compiled, I tried installing it on a CWM 5.8.0.9 and it works.

However I have no "adb shell" while running under this freshly baked recovery.img I don't know if there are other tricks to get that work.

I have done it on a slow VM with Ubuntu 10.04 as suggested, but maybe with the right "toolchain" and the fixes/patches it will do on any OS.
[Huawei MediaPad, T-Mobile SpringBoard] after_silence:
Ok, thx for replies, i have builded it too :-) By the way, im working on Ubuntu 12.04 via VirtualBox with toolchain - arm-eabi-4.4.3.
[Huawei MediaPad, T-Mobile SpringBoard] hwmod:
I did the test on Ubuntu 10.04 with Android NDK r5 using arm-eabi-4.4.0 I will test soon with arm-eabi-4.4.3.

Ok, here are the diffs that fix the kernel build and a small automated script.

Create a new EMPTY directory and unpack the attached archive there. There are three file in the archive.

HWMOD-default.config
HWMOD-quickfix-kernel.diff
build-kernel.sh

In the same directory add the open source kernel ZIP file and call it exactly "open_source_kernel_MediaPad_Android4.0.zip".

(I changed the first space in the original file name with an underscore to make it easier to script).

Now you can automate the build by running the small script in the archive "build-kernel.sh".

.:HWMOD:.

EDIT1: 2012/07/13 16:05: corrected the diff patch and script thanks to users input (dfahren, after_silence)

EDIT2: 2012/07/13 17:00: added missing "ipt_ecn.c" and other files that were overwritten/mangled from "netfilter"
[Huawei MediaPad, T-Mobile SpringBoard] after_silence:
I have flashed compiled kernel today - seems that its working :-)

In case if somebody interested in kernel building/modding - here is sources (100% buildable with arm-eabi-4.4.3) on my github: https://github.com/aftersilence/mediapad_kernel_ics.
[Huawei MediaPad, T-Mobile SpringBoard] cloogshizer:
Very cool! Thank you!
[Huawei MediaPad, T-Mobile SpringBoard] hwmod:
Nice to have a GitHub repo for this thank you for the work.

I have compiled a couple of CWM taking bits from a Pyramid 5.8.0.9.

I published them in a new separated thread here:

http://xdaforums.com/showthread.php?p=28799894

WARNING !!! DON'T FORMAT AND DON'T WIPE PARTITIONS USING THESE CWM !

Enjoy and write your feedbacks.

No warranty :)

Edit: moved to a separated thread, added warnings
[Huawei MediaPad, T-Mobile SpringBoard] after_silence:
Ok, its nice that work have moved from dead place for our mediapad :-)

I have added overclock possibility to kernel, undervolt capabilities and smartassv2 governor - it must to be much better for battery than perfomance governor in stock kernel.

Next goal for me is to build cwm recovery from sources, because thats really important to go in that way. For that I need to solve a problem of why it doesnt booted in mine builded version and then i will start to work on cm9 :-)

Hope that Segler11 will lend a hand of help and will provide his device tree for his version of cwm recovery..
[Huawei MediaPad, T-Mobile SpringBoard] shiranmotha:
Can you please post the modded kernel here and share it with us... with a short guide to flash is as we still dont hav sm good cwm.

Thanks in advance.
[Huawei MediaPad, T-Mobile SpringBoard] after_silence:
Well.. of course i can, but pls note that:

I AM NOT RESPONSIBLE FOR ANY DAMAGE TO YOUR TABLET :-)

I can say for sure that kernel works on C170B009 and its only for ICS. Dont know about other roms.

Changes in my kernel:

- added Interactive, SmartassV2 governors (default governor is Ondemand);

- added overclock possibility up to 1.8 GHZ;

- added possibility of changing voltages right from OS (in CPU Master for example).

You can flash it via fastboot by:

fastboot flash boot boot.img

Or you can create update.zip and flash it with CWM recovery by HWMOD or Segler11.
[Huawei MediaPad, T-Mobile SpringBoard] iswanptr18:
Very nice thanks, so far so good on b005
[Huawei MediaPad, T-Mobile SpringBoard] 441Excelsior:
how to enter fastboot mode?
[Huawei MediaPad, T-Mobile SpringBoard] rurou:
Turn off/shutdown the device, press and hold volume down (the one nearest to the power button) + power button. After a while, it will tell you that it's in fastboot mode. If you can't enter fastboot, you might need to turn off fast boot at the settings page (second option from the bottom).
[Huawei MediaPad, T-Mobile SpringBoard] shiranmotha:
Works well on B005. But there some performance lags in CPU intensive games, even after OC to 1.5GHz. Lags are still there with performance gov.
[Huawei MediaPad, T-Mobile SpringBoard] after_silence:
But its ok on default boot.img? May be its not fully compatible with different roms, 'cause i dont know what sources Huawei have pushed, may be they are not up-to-date or something else :-)
[Huawei MediaPad, T-Mobile SpringBoard] hwmod:
I can confirm what user shiranmotha said, same problem here, very slow visibly and very slow on benchmarks 2400 in Antutu (less than half the normal 5400). However it boots completely and application works (slowly).

Further I did some test to see if OC was really working and I looked at this:

shell@android:/ # cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
1188000
shell@android:/ #

Still 1.188.000 Hz (1.2GHz).

I have tried using both CPUMaster and SetCPU with the same results, the interface let me increase max_freq to over 1.800 MHz and it also remembers that setting if I exit the application and relaunch it again. However the setting is lost if I reboot the device.

Seems OC is not working for me, or maybe I did something wrong. Can somebody do the same tests and confirm ?
[Huawei MediaPad, T-Mobile SpringBoard] after_silence:
Hwmod, You need to check Set on reboot option to save it after reboot. On default the max frequency is 1.188ghz. For me OC works with CPU Master, have tried frequencies up to 1.5 ghz. In Antutu i have: 3374.
[Huawei MediaPad, T-Mobile SpringBoard] 441Excelsior:
does that kernel support init.d?
[Huawei MediaPad, T-Mobile SpringBoard] after_silence:
No, it doesnt. Its not hard to edit ramdisk, but currently im trying to build working cwm recovery from sources.
[Huawei MediaPad, T-Mobile SpringBoard] hwmod:
By using the stock C232B005 kernel I get results of around 5400 - 5600 points in Antutu, which is almost double.

I am not sure the fact that CPUMaster seems to let you set frequencies over 1.2GHz means it will really work.

For me the only way to have proof of that is by reading the current setting from hardware like I said before:

cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq

maybe, under CPU stress (during a benchmark), it could help to also read the values in:

cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq

to see if frequencies higher than 1.2GHz are ever reached.

.::.
[Huawei MediaPad, T-Mobile SpringBoard] after_silence:
Then i set in CPU Master max freq to 1512 then i see:

cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
1512000

What else proof you need? :-D

I think that huawei have just pushed not up-to-date sources, so something doesnt fit with our roms - thats about slow perfomance in 3d. And its not connected with oc capabilities or cpu freq. imo.
[Huawei MediaPad, T-Mobile SpringBoard] hwmod:
Thank you for confirming that I have something wrong in my setup here. No doubts the kernel is working. I just can't OC it yet.

Need more time to test ... too many things to digest but I am ready to leave for vacations :)
[Huawei MediaPad, T-Mobile SpringBoard] after_silence:
Ha, sad to hear that, so I am almost alone now in this work :-D Have a good vacation :-)
[Huawei MediaPad, T-Mobile SpringBoard] rurou:
Using performance governor with after silence kernel (at the default max speed 1.2Ghz):

Overall: 2745

CPU: 702

GPU: 1380

RAM: 282

IO: 381

Can someone post what is the benchmark number in antutu using the standard kernel in detail?

@after silence: can you make a kernel without any mod (besides the one needed to successfully compile it) and benchmark it? I suppose it wouldn't have any effect, but no harm to try it :)

The performance a bit fickle, especially after changing the governor mode. I try it again and the cpu goes to 962 and ram to 407 and 3077 overall score.
[Huawei MediaPad, T-Mobile SpringBoard] Corn Flake:
rurou: Score with stock kernel is 5000+.
[Huawei MediaPad, T-Mobile SpringBoard] after_silence:
Ooooooops :-) Sorry guys, seems that my OC changes really is the fault of slowdown problems, with no changes in sources i have 4500-4700 in Antutu (on default boot.img from C170B009 rom i have 4512 too)..

Here its, check it pls..

I will revert my current commit about OC and will try another way that used in HTC Sensation..
[Huawei MediaPad, T-Mobile SpringBoard] kakabobo:
smartass governor missing.

overclock option disable.
[Huawei MediaPad, T-Mobile SpringBoard] after_silence:
Yeah, 'cause i have deleted all changes to check perfomance w/o them.
[Huawei MediaPad, T-Mobile SpringBoard] kakabobo:
i get around 5100-5300 using the boot.img attached.
[Huawei MediaPad, T-Mobile SpringBoard] after_silence:
Eh, it seems that i have fixed problem with OC kernel (thx to cyanogenmod team and their gerrit :-D) - there was a problem with enabling 2nd cpu core :-)

Now w/o OC on stock freq. 1188Mhz i have 6100 points in Antutu Benchmark against 4500-4700 at stock kernel of C170B009 rom :-)
[Huawei MediaPad, T-Mobile SpringBoard] brainmaster:
Great news. Please share the kernel. That would be very kind of you.
[Huawei MediaPad, T-Mobile SpringBoard] after_silence:
My sources are presented at github: https://github.com/aftersilence/mediapad_kernel_ics.

I will upload boot.img later than will finish adding some new cpu governors.
[Huawei MediaPad, T-Mobile SpringBoard] after_silence:
Here it is.

Changes from stock kernel:

- added OC up to 1.8Ghz and vdd to adjust voltages "on the fly";

- added Interactive, InteractiveX, SmartassV2 and Hotplug governors.

There are boot.img for flashing via bootloader and flashable boot_after_silence_170712.zip for CWM Recovery (flash w/o sign checking).
[Huawei MediaPad, T-Mobile SpringBoard] CarpeNoctem:
I tried to flash with fastboot -> boot loop
[Huawei MediaPad, T-Mobile SpringBoard] rurou:
Maybe corrupted download? I didn't run into any problem and my antutu score is 5800 (using smartass).
[Huawei MediaPad, T-Mobile SpringBoard] rurou:
Maybe corrupted download?
[Huawei MediaPad, T-Mobile SpringBoard] CarpeNoctem:
no, download is good, I tried with the zip too, same file, same bootloop
[Huawei MediaPad, T-Mobile SpringBoard] ZimniY:
doesn't work

same thing... =(

----

I've set up "Unlock with PIN-code" - and I can't enter any digit(( auto-rotation don't work and finally I get reboot.
[Huawei MediaPad, T-Mobile SpringBoard] brainmaster:
Try this one. It works for sure. I have edited the boot.img: it have init.d scripts support (busybox run-parts) and ro.secure=0.
[Huawei MediaPad, T-Mobile SpringBoard] CarpeNoctem:
Same result...
[Huawei MediaPad, T-Mobile SpringBoard] after_silence:
Well, as i said before it can be incompatible with other roms than C170B009, 'cause ramdisk is from there.
[Huawei MediaPad, T-Mobile SpringBoard] CarpeNoctem:
unfortunately it seems it is
[Huawei MediaPad, T-Mobile SpringBoard] neo1704:
works fine with hwmod
[Huawei MediaPad, T-Mobile SpringBoard] after_silence:
May be to work in other roms you will need rebuilded modules from this sources, or there can be more hard changes. Anyway logcat can help.

But, thats not a goal for my work, my goal is cm9. Two parts of this i are already done - i can build kernel and cwm recovery from sources.
[Huawei MediaPad, T-Mobile SpringBoard] CarpeNoctem:
Maybe aiming for CM10 would be a better plan ? ;)
[Huawei MediaPad, T-Mobile SpringBoard] after_silence:
I dont think so, cm10 is in very early development stage, so i think it will need to much tweaking and hacking of sources to get it working.

Cm9 running well on msm8260 devices and there are a lot of similar official supported devices with the same hardware.

Other thing that may be i will not be able to do all work by myself, 'cause im not very skillful programmist. But i have very good experience in building cm9 for my phone (Acer Liquid) from scratch, i have worked with it since january, so i know something useful in this case.

Any help will be very appreciated :-)
[Huawei MediaPad, T-Mobile SpringBoard] CarpeNoctem:
I am more than willing to help even if I am not up to date with compiling from source, I have no problem learning
[Huawei MediaPad, T-Mobile SpringBoard] after_silence:
Well.. currently i want to get fully working CWM Recovery so i can make good backup of stock rom.

I have builded from sources 5.5.0.4 version yesterday and 6.0.0.5 version today and i have some problems (almost all that hwmod have in his port):

1. I have no adb at recovery. Thats very weird 'cause im using settings from default recovery about idvendor, idproduct etc.. I have tried a couple of other variants - still no luck.

2. USB mounting doesnt work. But thats a common problem for devices with MTP usb gadget and Galaxy Nexus cant mount internal memory too, but we have sdcard additionally, so may be its possible to fix..

3. In backup i have no /cust partition, even if i have it in recovery.fstab.

4. And final is not really problem or bug - in backup of /data partition i have backup of data/share which is contain internal memory of tablet.. Its can be solved only by hacking cwm sources..

So, here is the work that must be done :-D At first must be solved 3 and 1 points.

If somebody can help me and needs my device tree for mediapad to build cwm recovery - i can send it to them.
[Huawei MediaPad, T-Mobile SpringBoard] ZimniY:
doesn't work too

Nope.

Unlock screen -> Freeze -> Reboot

---------- Post added at 02:53 AM ---------- Previous post was at 02:50 AM ----------

Is there a Github repo for your CWM?
[Huawei MediaPad, T-Mobile SpringBoard] after_silence:
Anyone have occasional reboots with my kernel and on stock frequencies? Because i have :-(
[Huawei MediaPad, T-Mobile SpringBoard] brainmaster:
I can confirm that. On stock frequencies and up to 1,8 GHz also.

Are the voltage values standard/default from the kernel sources?
[Huawei MediaPad, T-Mobile SpringBoard] after_silence:
In stock variant actually there are 4 different freq./volt. tables, i dont know which exactly works there.
[Huawei MediaPad, T-Mobile SpringBoard] brainmaster:
Can you look into github sources for the devices with the same CPU and see which voltage values are used?
[Huawei MediaPad, T-Mobile SpringBoard] after_silence:
This table i have copied from official cyanogenmod kernel sources for samsung msm8260 devices. I will try now another variant of freq/volt table.
[Huawei MediaPad, T-Mobile SpringBoard] brainmaster:
I would recommend compiling a standard kernel without any editions and tweaks so that we can test it and have one stable basis on which you can work further.

I don't know if you are familiar with morfic and his kernels. He compiles stable but fast and tweaked kernels without many additions.

I'm using his kernels on my Nexus S.

Here is his site with the github sources.

Maybe you can use something from him.
[Huawei MediaPad, T-Mobile SpringBoard] after_silence:
I have posted already a kernel w/o tweaks on previous pages, so stable basis is already exists. I need sources of kernel from the same platform - msm8660 - i look at htc pyramid, samsung skyrocket - all this changes are from them.

I got oc and vdd changes from cm gerrit of android_kernel_samsung_msm8660-common, so as long as it have not been merged to github - here still can be problems. May be there will be some additional patches later, Ill wait for them.
[Huawei MediaPad, T-Mobile SpringBoard] 441Excelsior:
mediapad uses MSM8260 platform
[Huawei MediaPad, T-Mobile SpringBoard] after_silence:
really????? damn!!!! :-D

Actually they have common sources, 8660 is additionally support cdma, so everywhere its called msm8x60. So the sources are right.
[Huawei MediaPad, T-Mobile SpringBoard] 441Excelsior:
that means huawei released most recent kernel source?
[Huawei MediaPad, T-Mobile SpringBoard] after_silence:
Seems so, because pure kernel from sources works normally as default one.
[Huawei MediaPad, T-Mobile SpringBoard] ZimniY:
Could you implement only init.d & governors without overclocking?

>_<
[Huawei MediaPad, T-Mobile SpringBoard] brainmaster:
Use my edited boot.img. It has init.d and you don't have to OC.
[Huawei MediaPad, T-Mobile SpringBoard] after_silence:
Hmmm, a little progress in developing of "fully working" cwm recovery (currently its v. 6.0.0.7):

- fixed backup of /cust partition (by tweaking cwm rec. sources)..

Now backup must contain all needed data (images) for a full backup of stock rom (but i still havent tested restoring, only backup - too lazy to flash stock rom if something wrong).

The most annoying problem now is adb.. Because w/o adb in recovery it'll be very hard to work with cm9 building.
[Huawei MediaPad, T-Mobile SpringBoard] voided:
Thank you

Thanks for the great work!:good::good: I'm trying to setup and compile the Stock Kernel source now. Still having issues getting my compiling environment right. Hopefully, I can be of some service soon. I want to have CM9 on my mediapad7 :crying:

Does wiping of partition works? And were can I get your latest recovery? Thanks in advance again!:cowboy: