Jump to content

Compiling CM9 (and maybe CM10) for Blade


Guest sej7278

Recommended Posts

Guest jventura

Hi everyone,

I have made some changes in kernel/zte/zte-kernel-msm7x27, namely, i've "make menuconfig" and added support for a device I want to test (ADXL346 3-axis accelerometer). Does anyone know how to compile just the kernel?

The only method to compile just some parts of cm9 fails:


~/android/cm9$ mmm kernel/zte/zte-kernel-msm7x27

No Android.mk in kernel/zte/zte-kernel-msm7x27.

Then, where does the compiled kernel image goes to, and how do I copy it to the device?

Finally, if I'm messing to much on the kernel, how do I revert my changes? "git reset --hard" does not seem to revert my changes on "make menuconfig"..

Thanks,

João Ventura

Link to comment
Share on other sites

Guest jventura

Gentlemen, related to my previous request, can someone test if disabling the "Rotation" in the Screen settings improves the battery life while using the phone for simple things like playing sudoku, seeing mails, browsing net, sending sms, etc.?

In my case, since I'm a light to moderate user (i.e., some sudoku, some mails, some net, some sms, some calls), when doing one of these things, in average it seems to me that the battery drops faster with auto-rotation enabled than with auto-rotation disabled. Technically speaking, looking on the sensors source code, it seems that our cm9's are using the compass as accelerometer input but it draws much more power than the regular accelerometer. AK8973, which is the compass sensor on our blades, also provides accelerometer info, so that is why we have accelerometer info. But our accelerometers (in my case is LIS33DE/ADXL346) is not being used, and is not even enabled on the kernel..

See specifications of the devices:

AK8973 3-axis Magnetic Field Sensor

ADXL346f 3-axis Accelerometer

Link to comment
Share on other sites

Guest jventura

I have made some changes in kernel/zte/zte-kernel-msm7x27, namely, i've "make menuconfig" and added support for a device I want to test (ADXL346 3-axis accelerometer). Does anyone know how to compile just the kernel?

Then, where does the compiled kernel image goes to, and how do I copy it to the device?

Finally, if I'm messing to much on the kernel, how do I revert my changes? "git reset --hard" does not seem to revert my changes on "make menuconfig"..

Answering myself, I was looking in the wrong direction. Basically, the configuration file for the blade kernel is in kernel/zte/zte-kernel-msm7x27/arch/arm/configs/cyanogen_blade_defconfig. So, opening that file, I could see that the ADXL34x driver is already enabled in the kernel:

#

# Miscellaneous I2C Chip support

#

# CONFIG_MSENSORS_FROM_AUXI2C_TO_I2C is not set

# CONFIG_GSENSORS_FROM_AUXI2C_TO_I2C is not set

CONFIG_SENSORS_ONA3301=y

CONFIG_SENSORS_ISL29026=y

CONFIG_SENSORS_TSL2771=y

# CONFIG_SENSORS_BH1721 is not set

CONFIG_SENSOR_ADXL34X=y

CONFIG_SENSOR_ACCELERATOR=y

For the more curious, I've written a blog post detailing a little bit more how you can use menuconfig to navigate through the options, you can read it here.

I still don't know how to compile only the kernel, but compiling everything compiles also the kernel, so it is a question of not syncing more since your latest compile..

Edited by jventura
Link to comment
Share on other sites

Guest nio25

in the kernel folder


export CCOMPILER=${HOME}/android/system/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-

make -j4 ARCH=arm CROSS_COMPILE=$CCOMPILER

the output is here:
~/kernel_zte_blade/arch/arm/boot/zImage
make the image file to flash it:

./mkbootimg --cmdline 'androidboot.hardware=blade console=ttyMSM2,115200 g_android.product_id=0x1354 g_android.serial_number=Blade-CM7' --base 0x2600000 --kernel zImage --ramdisk boot.img-ramdisk.gz -o boot.img

unpack an older boot.img
 ./unpackbootimg -i boot.img[/code]

dont forget to copy the modules too

also copy the cyanogen_blade_defconfig in kernel's root folder and rename it as ".config"

something like the above :P

Edited by nio25
Link to comment
Share on other sites

Guest jventura

something like the above

Thanks for the info! :)

Btw, in ADXL34x driver source code, its .name is adxl34x. Since the kernel already supports this device, I was expecting to find this device in my blade's /dev, like /dev/adxl34xbut there is nothing like this there. For instance, the compass driver has a ".name" of ak8973_out (or something like that) and there is a /dev/ak8973_out in the blade /dev folder.. Does anyone know something about why this may happen?

This is important because the nusensors.c file in cm9, which goes to build the libsensors module, checks for the existence of devices in /dev..

Link to comment
Share on other sites

Guest sej7278

Anyone else noticed that now CMWallpapers.apk has grown by 2mb, a 210mb /system is getting pretty tight (as in 52kb free - assuming the install didn't just give up trying to write at that point!)

methinks we're going to have to add it to extras.txt

is anyone keeping a list of bullshit apps we don't need in /system - perhaps languages, do we have an up-to-date mini-gapps? oddly enough i'm probably better off with a 209mb /system than a 210mb one as common-mini-phone.mk will kick in then.

Link to comment
Share on other sites

Guest targetbsp

gapps hasn't had an update in a couple of months by the looks of it so this should still be up to date mini wise: http://www.mediafire...w9fp856ybc3fqy8

There's plenty of stuff I wouldn't include in the rom but I can't see anything else that everyone would agree is optional. There is way too much wallpaper though. The reason trebuchet is so big is that it seems to be stuffed full of them. It's actually quite compact if you delete them. I'm not sure what they are in there for - I've never really used trebuchet.

Edited by targetbsp
Link to comment
Share on other sites

Guest sej7278

i think i'll use a few of konstat's patches to remove bootanimation (i never use it and i hate the new one) and livewallpapers etc.

Link to comment
Share on other sites

Guest shezar

Sej, a lot of new wallpapers got merged not so long ago, at first the package was 40 MB so you actually see an already trimmed version of it.

Link to comment
Share on other sites

Guest jventura

i think i'll use a few of konstat's patches to remove bootanimation (i never use it and i hate the new one) and livewallpapers etc.

After each install, I just do echo 1 > /data/property/persist.sys.nobootanimationand it completely removes the boot animations, it even seems much faster to boot since you go from the green android directly to the lock screen.. You need root access to do that, of course.

Link to comment
Share on other sites

Guest sej7278

Sej, a lot of new wallpapers got merged not so long ago, at first the package was 40 MB so you actually see an already trimmed version of it.

yeah well i never use any of the wallpapers (only the stock ics one) so i've made a patch to remove bootanimation and live wallpapers, but leave cmwallpapers and add to lunch menu.

do we need to format /system these days or is that done as part of the flash anyway? i'm thinking if its not done as part of the flash then i'll have to format /system to get rid of the cruft that's already on there (and then reinstall gapps).

edit: yes i've been disabling bootanimation for a while, but might as well delete it to make the rom smaller.

Edited by sej7278
Link to comment
Share on other sites

Guest targetbsp

It wipes system as far as I know. At least when I tried Konsta's version I had a load more space! I dunno if it does like CM7 and deletes everything but gapps or just deletes everything. I always reflash gapps anyway.

Edited by targetbsp
Link to comment
Share on other sites

Guest sej7278

i don't understand this, i've removed this lot from common.mk and common_full_phone.mk and yet i still have videoeditor and livewallpapers, all i removed is the bootanimation

edit: oh its in device.mk now, gotta look at tom_g's new patch for >210mb /system, urgh i hate that patch!

i think i've tracked down all the makefiles that seem intent on putting livewallpapers back into the build, also fudged tom_g's script to not install the extras for my 210mb, but only for 211mb+ :D

trim_patches.zip

the zip is 13mb smaller now, 31mb free in system. maybe i'll put the ringtones back but keep videos (and editor) out.

Edited by sej7278
Link to comment
Share on other sites

Guest MidaMilunk

yeah im asking about the compilation flags (i used -03 and -0s and compiles fine)

if anyone wants to test https://pithos.grnet...e-cm-kernel.zip (min size)

absolutely experimental!

there is a sound bug in videos (+ youtube), other devices have this too.

Not bad at all!

One of the few ICS builds I can bear for a whole day. Unfortunately battery could not stand for a whole day, but it is still one of the bests I have tried recently! I miss some AOKP features, but it still worths to have properly working touchscreen.

The stock dialer for ICS is unbelievably totally useless, I can not imagine how was it possible after so many years of developing Android applications, and with so many really good apps in the market (or Play, of whatever)!

Stock "Messages" still starts very slowly.

Link to comment
Share on other sites

Guest DMM88

If I wan't to change code I have to compile twice?

I have to do the 5th step, change code and do all the 5th step again?

Edited by DMM88
Link to comment
Share on other sites

Guest jventura

If I wan't to change code I have to compile twice?

I have to do the 5th step, change code and do all the 5th step again?

All changes must be compiled if you want to see them on the device! :)

You just need to do make bacon -j8 (or -j6, whatever) to recompile after the changes.. But if you only made changes in one project, you can do for instance mmm packages/apps/Mms which will recompile only the Mms app. But you still have to do, at least one time, the USE_CCACHE, etc.

Link to comment
Share on other sites

Guest targetbsp

Everytime I try and setup a build environment, the last place I got java no longer has it lol.

So with that in mind, people might find this useful: https://github.com/flexiondotorg/oab-java6#how-do-i-download-and-run-this-thing

It sets YOU up to distribute it to yourself if I understand correctly. :D

Whatever it does, it works anyway. Jyst follow that up with the apt-get install sun-java6-jdk

Link to comment
Share on other sites

Guest targetbsp

lol. yeah. That's do it. :D

I have a question. Is the GPU memory shared with system ram?

From a gamers point of view, the memory management in all ICS builds is screwed up. After you've loaded a few games - you then can't play anymore without rebooting as certain textures aren't being loaded in subsequent running of games. And Plants vs Zombies doesn't load its textures 90% of the time even on a clean boot it's that short.

Link to comment
Share on other sites

Guest vNa5h

lol. yeah. That's do it. :D

I have a question. Is the GPU memory shared with system ram?

From a gamers point of view, the memory management in all ICS builds is screwed up. After you've loaded a few games - you then can't play anymore without rebooting as certain textures aren't being loaded in subsequent running of games. And Plants vs Zombies doesn't load its textures 90% of the time even on a clean boot it's that short.

yeah noticed this...

esp in panic Flight, shark dash

Link to comment
Share on other sites

  • 2 weeks later...
Guest shmizan

I've just made a new build after 6 weeks (had some exams going on).

it doesn't seem we're advancing anywhere. CM barely adds new features, Blade is still slow.

MMS takes 7-9 seconds to load up for me. returning to call log after a call is 3-4 seconds. maybe I should wipe but I can't bother myself downloading my apps and resetting every setting.

am using the barcode patch now (thanks sej) but that made barcode scanner the slowest thing on earth.

thinking about upgrading very soon (finally Google made a worthy release - JB). I NEED responsiveness. I might go with the big guns this time.. Samsung? HTC? a lot more action there.

also I came across this page. scrolling down to the sorted by devices section made me proud. our Blade is the fourth (in numbers of CM installs) of all time! nice.

KonstaT is making nice progress with all of his patches. that's some really nice work. shame I can't apply most of his made patches firsthand. changing the bits necessary is too much work for me right now.

Link to comment
Share on other sites

Guest sej7278

yes it does seem cm9 is not going anywhere on the zte kit at the moment.

samsung obviously has a lot of action as its supported by AOSP (Google!) and has mostly opensource or at least supported drivers, its not armv6 for a start.

konstat seems to be porting a lot of cm7 features to cm9, but we need to get them onto gerrit i guess.

blade is popular with cyanogenmod as its so easy to root/unlock and official upgrades haven't really happened, but as we're now an unsupported device without openmax or a recent kernel, i can't see it going much further into jellybean.

there's something wrong if your call log is taking 3-4secs, have you actually timed that or is it "just feels like it" as mine takes 1-2secs, but it feels a bit longer. MMS is the same, i assume you haven't moved them to sdcard or sd-ext somehow?

try leaving your phone on rather than turning it off, as the longer its on the more gets cached. if you turn it off every day, then when you boot in the morning things will naturally take longer. hell the phone's not even properly usable for about 5mins after a boot.

barcode reader is just slow, nothing you can do, that's possibly an openmax issue too, as its doing all that photo recognition in software. tom_g said he didn't think my fix was the full story, there's probably some more that needs tweaking.

i was thinking of getting a huawei g300 but even with armv7 and openmax, they're still having issues with it, partially to do with not having the ics kernel source and huawei not including bluetooth or opengl in their builds ffs! that makes it not much better than the blade for me.

Edited by sej7278
Link to comment
Share on other sites

Guest targetbsp

I might make the switch to the G300 myself this month. That does seem to be quite serious omissions from the rom though. I'd be getting it as a gamer (for the armv7 compatibility) so I suspect opengl would be handy!

Link to comment
Share on other sites

Guest sej7278

I might make the switch to the G300 myself this month. That does seem to be quite serious omissions from the rom though. I'd be getting it as a gamer (for the armv7 compatibility) so I suspect opengl would be handy!

yeah opengl is going to be pretty essential for you target! hopefully the uk ics build will include it. it would be a shame if huawei is messing it up as the g300 could become the next blade, as the blade has had its day now i think.

hey why do you game so much on your phones, surely a console or even tablet/laptop would be better?

Link to comment
Share on other sites

Guest targetbsp

I mostly game on a desktop PC. Which is why I use VM's for compiling rather the dual boot. I can be gaming whilst it's compiling. :D

There's not much point in having both a gaming PC and console because of the large crossover between the games. And as they cost more on consoles, if you've gone to the larger expense of building a gaming PC vs a cheap console you may as well have the cheaper PC games that are available to you. And then where there are platform exclusive games I tend towards those that are exclusive to PC like strategy games.

However, being in my 30's, I often reminisce of simpler times where it was all about the gameplay and less about the graphics, hours of cut scenes and complicated controls. PC gaming is beginning to be catered for now in that market with the rise of Indie gaming.

But prior to that I had a DS where the lack of power kind of limited it and so it was all about classic Nintendo gameplay. And this is what the phone basically replaced. You always have your phone with you to play a quick game for 10 minutes. But you sort of have to have planned ahead to have the DS with you! And as these phone games are so cheap, I've built up a huge collection of them - spending in total more than the Blade cost lol.

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.