Jump to content


Photo

[GUIDE][DEV]Compiling CM9/10/10.1 for ZTE Skate

* * * * * 1 votes

  • Please log in to reply
114 replies to this topic

#1
razzmataz1478

razzmataz1478

    Hardcore

  • Members
  • PipPipPipPipPipPip
  • 2,215 posts
  • Gender:Male
  • Location:HULL
  • Interests:Flashing ROMs, Being distracted by my skate
  • Devices:ZTE Skate
Based on sej7278's blade guide

Make sure you have set up your build environment first.

Ok, first you need to install repo, google's git script.

mkdir ~/bin
PATH=~/bin:$PATH
curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
chmod a+x ~/bin/repo

Now you need to initiate git and download the CM9 source. use
repo sync
to download source and update.

mkdir - p ~/cm9/vendor/zte/
cd ~/cm9
repo init -u git://github.com/cyanogenmod/android.git -b ics
repo sync -j4

Next step is to download our device config.....

mkdir ~/cm9/device/zte
cd ~/cm9/device/zte
git clone git://github.com/ColdFusionX/android_device_zte_skate.git skate

......and ZTE proprietary files

cd ~/cm9/vendor/zte/
git clone git://github.com/koush/proprietary_vendor_zte.git -b ics

Downloading Kernel Source (skip this step first time, if you get stuck on the kernel error because it didn't download automatially then follow this and skip to the last step)

cd ~/cm9
mkdir -p kernel/zte
cd kernel/zte
git clone git://github.com/CyanogenMod/zte-kernel-msm7x27.git -b ics zte-kernel-msm7x27

Update prebuilts (ROM Manager, Terminal Emulator)
cd ~/cm9/vendor/cm
./get-prebuilts

Now to compile...this will download the kernel source first time round, As far as I know CCACHE is optional...
cd ~/cm9
export USE_CCACHE=1 CM_SNAPSHOT=1
. build/envsetup.sh
lunch cm_skate-eng
make bacon -j4

Good Luck!

This will show you how to build ColdFusionX 2, I have'nt gone to in depth, so if it's a bit complicated mix and match instructions from the CM9 tutorial above :)


mkdir cm10 && cd cm10
repo init git://github.com/CyanogenMod/android.git -b jellybean

Download Attached File  local_manifest.xml   837bytes   67 downloads and move to .repo/

repo sync

Apply patches from here and here

To apply Konsta's patches cd to bionic and frameworks/av respectively and apply like this:

git am *.patch

To apply C3C0's patch:

gedit kernel/zte/zte-kernel-msm7x27/drivers/net/wireless/bcm4319

Add this line:

-Wno-array-bounds

underneath:

-Idrivers/net/wireless/bcm4319 -Idrivers/net/wireless/bcm4319/include \


Get prebults:

vendor/cm/get-prebuilts


Setup build, lunch and compile:

export USE_CCACHE=1 CM_EXPERIMENTAL=1 CM_EXTRAVERSION=[yourname]
. build/envsetup.sh
lunch cm_skate-userdebug
make bacon -j4


CM10.1 (rough guide)

Initialise the env.

repo init -u https://github.com/androidarmv6/android.git -b cm-10.1

Download the cm10 manifest above and replace all projects with these.

<project name="androidarmv6/android_device_zte_skate" path="device/zte/skate" />

<project name="androidarmv6/android_device_zte_msm7x27-common" path="device/zte/msm7x27-common" />

<project name="androidarmv6/android_kernel_zte_msm7x27" path="kernel/zte/msm7x27" />


Sync with the sources

repo sync -j32

Build.

. build/envsetup.sh
brunch skate

Please post any errors you get while building. We will be able to help you.

Edited by razzmataz1478, 27 February 2013 - 08:59 PM.

  • 5

Posted Image

Current Phone:

Xperia T


Previous Phones:

Orange Monte Carlo

Nokia 5530 XpressMusic (Nokia C6-00 CFW)

Sony Ericsson v640i

Nokia 3120

Various other Nokia phones.

Not the best history of phones Posted Image


#2
hugobosslives

hugobosslives

    Hardcore

  • Members
  • PipPipPipPipPipPip
  • 1,108 posts
  • Gender:Male
  • Location:hampshire and birmingham (depending on whether at uni or not)
  • Devices:Nexus 4, Zte Skate and Blade
well done mate. can't see any immediate errors.

but prepare for a shite load of pm's with people having problems and asking for you to sort it out ;)

you might also want to do a quick guide on how to add in new features from gerrit that have not been fully merged. as that question is bound to be asked below :)

  • 0

#3
tilal6991

tilal6991

    Hardcore

  • Developer Team
  • PipPipPipPipPipPip
  • 3,781 posts
  • Gender:Male
  • Devices:ZTE Skate, Huawei U8150
cd ~/cm9/vendor/zte/
should be
cd ~/cm9/device/zte/

And you're missing:
cd ~/cm9/vendor/
git clone git://github.com/koush/proprietary_vendor_zte.git -b ics zte

Apart from that looks good.

  • 0
If you like my work or if I helped, click the Plus button.

#4
razzmataz1478

razzmataz1478

    Hardcore

  • Members
  • PipPipPipPipPipPip
  • 2,215 posts
  • Gender:Male
  • Location:HULL
  • Interests:Flashing ROMs, Being distracted by my skate
  • Devices:ZTE Skate

cd ~/cm9/vendor/zte/
should be
cd ~/cm9/device/zte/

And you're missing:
cd ~/cm9/vendor/
git clone git://github.com/koush/proprietary_vendor_zte.git -b ics zte

Apart from that looks good.


OK thanks.

Shouldn't we use the props from your github, I didn't think koush's had the skate in...

  • 0

Posted Image

Current Phone:

Xperia T


Previous Phones:

Orange Monte Carlo

Nokia 5530 XpressMusic (Nokia C6-00 CFW)

Sony Ericsson v640i

Nokia 3120

Various other Nokia phones.

Not the best history of phones Posted Image


#5
tilal6991

tilal6991

    Hardcore

  • Developer Team
  • PipPipPipPipPipPip
  • 3,781 posts
  • Gender:Male
  • Devices:ZTE Skate, Huawei U8150

OK thanks.

Shouldn't we use the props from your github, I didn't think koush's had the skate in...


It didn't. Until 3 days ago when Tom accepted the pull request to merge the Skate.

  • 0
If you like my work or if I helped, click the Plus button.

#6
razzmataz1478

razzmataz1478

    Hardcore

  • Members
  • PipPipPipPipPipPip
  • 2,215 posts
  • Gender:Male
  • Location:HULL
  • Interests:Flashing ROMs, Being distracted by my skate
  • Devices:ZTE Skate

It didn't. Until 3 days ago when Tom accepted the pull request to merge the Skate.


Ah right.

  • 0

Posted Image

Current Phone:

Xperia T


Previous Phones:

Orange Monte Carlo

Nokia 5530 XpressMusic (Nokia C6-00 CFW)

Sony Ericsson v640i

Nokia 3120

Various other Nokia phones.

Not the best history of phones Posted Image


#7
razzmataz1478

razzmataz1478

    Hardcore

  • Members
  • PipPipPipPipPipPip
  • 2,215 posts
  • Gender:Male
  • Location:HULL
  • Interests:Flashing ROMs, Being distracted by my skate
  • Devices:ZTE Skate
I've updated hopefully that's right now

  • 1

Posted Image

Current Phone:

Xperia T


Previous Phones:

Orange Monte Carlo

Nokia 5530 XpressMusic (Nokia C6-00 CFW)

Sony Ericsson v640i

Nokia 3120

Various other Nokia phones.

Not the best history of phones Posted Image


#8
Nofan Tasi

Nofan Tasi

    Regular

  • Members
  • PipPip
  • 147 posts
  • Gender:Male
  • Devices:G SII - M P4310 - M 99300
  • Twitter:@tasinofan
thanks a lot guys!

this recipe brings me much further

but, it seems I need to configure something to be able to download the kernel

--8<--
~/cm9$ lunch cm_skate-eng
Trying dependencies-only mode on a non-existing device tree?

============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=4.0.4
TARGET_PRODUCT=cm_skate
TARGET_BUILD_VARIANT=eng
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv6-vfp
HOST_ARCH=x86
HOST_OS=linux
HOST_BUILD_TYPE=release
BUILD_ID=IMM76I
============================================
~/cm9$ make bacon -j4
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=4.0.4
TARGET_PRODUCT=cm_skate
TARGET_BUILD_VARIANT=eng
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv6-vfp
HOST_ARCH=x86
HOST_OS=linux
HOST_BUILD_TYPE=release
BUILD_ID=IMM76I
============================================
system/core/toolbox/Android.mk:98: warning: overriding commands for target `out/target/product/skate/system/bin/lsof'
build/core/base_rules.mk:523: warning: ignoring old commands for target `out/target/product/skate/system/bin/lsof'
build/core/Makefile:36: warning: overriding commands for target `out/target/product/skate/system/etc/mkshrc'
build/core/base_rules.mk:523: warning: ignoring old commands for target `out/target/product/skate/system/etc/mkshrc'
No private recovery resources for TARGET_DEVICE skate
build/core/tasks/kernel.mk:37: ***************************************************************
build/core/tasks/kernel.mk:38: * *
build/core/tasks/kernel.mk:39: * No kernel source found, and no fallback prebuilt defined. *
build/core/tasks/kernel.mk:40: * Please make sure your device is properly configured to *
build/core/tasks/kernel.mk:41: * download the kernel repository to kernel/zte/zte-kernel-msm7x27
build/core/tasks/kernel.mk:42: * and add the TARGET_KERNEL_CONFIG variable to BoardConfig.mk *
build/core/tasks/kernel.mk:43: * *
build/core/tasks/kernel.mk:44: * As an alternative, define the TARGET_PREBUILT_KERNEL *
build/core/tasks/kernel.mk:45: * variable with the path to the prebuilt binary kernel image *
build/core/tasks/kernel.mk:46: * in your BoardConfig.mk file *
build/core/tasks/kernel.mk:47: * *
build/core/tasks/kernel.mk:48: ***************************************************************
build/core/tasks/kernel.mk:49: *** "NO KERNEL". Stop.
--8<--

have a nice day

  • 0

#9
razzmataz1478

razzmataz1478

    Hardcore

  • Members
  • PipPipPipPipPipPip
  • 2,215 posts
  • Gender:Male
  • Location:HULL
  • Interests:Flashing ROMs, Being distracted by my skate
  • Devices:ZTE Skate
Try
lunch cm_skate-userdebug

  • 1

Posted Image

Current Phone:

Xperia T


Previous Phones:

Orange Monte Carlo

Nokia 5530 XpressMusic (Nokia C6-00 CFW)

Sony Ericsson v640i

Nokia 3120

Various other Nokia phones.

Not the best history of phones Posted Image


#10
XMasterNinni

XMasterNinni

    Diehard

  • Members
  • PipPipPipPip
  • 427 posts
  • Gender:Male
  • Location:Austria
  • Devices:ZTE Blade
That shouldn't be the error. Try another prebuilt kernel (device/zte/skate/prebuilt/..)

  • 0

ZTE Porting Tool



Ever wondered how to Port ROMs from one Phone to another? Well it isn't that easy if you do it manually. But, luckily, there is a simple tool, which makes it easy for you to port ROMs. Curious?


Easy ROM Porting for Everyone


#11
Nofan Tasi

Nofan Tasi

    Regular

  • Members
  • PipPip
  • 147 posts
  • Gender:Male
  • Devices:G SII - M P4310 - M 99300
  • Twitter:@tasinofan
Hi razzmataz1478,

After 'lunch cm_skate-userdebug', 'make bacon -j4' first cleans up things and then gives same error.

Hi XMasterNinni,

How do I 'try another prebuilt kernel'? device/zte/skate/prebuilt is a bit skinny:
~/cm9$ ls device/zte/skate/prebuilt/
skate_keypad.kl start_usb0.sh synaptics-rmi4-ts.idc synaptics-rmi-touchscreen.idc

Thanks!

  • 0

#12
razzmataz1478

razzmataz1478

    Hardcore

  • Members
  • PipPipPipPipPipPip
  • 2,215 posts
  • Gender:Male
  • Location:HULL
  • Interests:Flashing ROMs, Being distracted by my skate
  • Devices:ZTE Skate

Hi razzmataz1478,

After 'lunch cm_skate-userdebug', 'make bacon -j4' first cleans up things and then gives same error.

Hi XMasterNinni,

How do I 'try another prebuilt kernel'? device/zte/skate/prebuilt is a bit skinny:
~/cm9$ ls device/zte/skate/prebuilt/
skate_keypad.kl start_usb0.sh synaptics-rmi4-ts.idc synaptics-rmi-touchscreen.idc

Thanks!


Take an existing boot.img and place it there?

And then try and compile again

  • 0

Posted Image

Current Phone:

Xperia T


Previous Phones:

Orange Monte Carlo

Nokia 5530 XpressMusic (Nokia C6-00 CFW)

Sony Ericsson v640i

Nokia 3120

Various other Nokia phones.

Not the best history of phones Posted Image


#13
XMasterNinni

XMasterNinni

    Diehard

  • Members
  • PipPipPipPip
  • 427 posts
  • Gender:Male
  • Location:Austria
  • Devices:ZTE Blade
Would be nice if it's just as easy as replacing a boot.img...lol

Try another device tree (maybe AOSPFX one...). Although I'm pretty sure that it wouldn't work. But worth a try :mellow:

  • 0

ZTE Porting Tool



Ever wondered how to Port ROMs from one Phone to another? Well it isn't that easy if you do it manually. But, luckily, there is a simple tool, which makes it easy for you to port ROMs. Curious?


Easy ROM Porting for Everyone


#14
tilal6991

tilal6991

    Hardcore

  • Developer Team
  • PipPipPipPipPipPip
  • 3,781 posts
  • Gender:Male
  • Devices:ZTE Skate, Huawei U8150
cm ~/cm9
mkdir kernel
mkdir kernel/zte
cd kernel/zte
git clone git://github.com/CyanogenMod/zte-kernel-msm7x27.git -b ics zte-kernel-msm7x27

And then run lunch and make again.

  • 1
If you like my work or if I helped, click the Plus button.

#15
razzmataz1478

razzmataz1478

    Hardcore

  • Members
  • PipPipPipPipPipPip
  • 2,215 posts
  • Gender:Male
  • Location:HULL
  • Interests:Flashing ROMs, Being distracted by my skate
  • Devices:ZTE Skate
mehhh, i can't download the kernel source automatically now, same error

  • 0

Posted Image

Current Phone:

Xperia T


Previous Phones:

Orange Monte Carlo

Nokia 5530 XpressMusic (Nokia C6-00 CFW)

Sony Ericsson v640i

Nokia 3120

Various other Nokia phones.

Not the best history of phones Posted Image


#16
razzmataz1478

razzmataz1478

    Hardcore

  • Members
  • PipPipPipPipPipPip
  • 2,215 posts
  • Gender:Male
  • Location:HULL
  • Interests:Flashing ROMs, Being distracted by my skate
  • Devices:ZTE Skate
updated to include kernel source downloading

  • 0

Posted Image

Current Phone:

Xperia T


Previous Phones:

Orange Monte Carlo

Nokia 5530 XpressMusic (Nokia C6-00 CFW)

Sony Ericsson v640i

Nokia 3120

Various other Nokia phones.

Not the best history of phones Posted Image


#17
razzmataz1478

razzmataz1478

    Hardcore

  • Members
  • PipPipPipPipPipPip
  • 2,215 posts
  • Gender:Male
  • Location:HULL
  • Interests:Flashing ROMs, Being distracted by my skate
  • Devices:ZTE Skate
Now I'm getting this:

make: *** No rule to make target `device/zte/blade/releasetools/extras.sh', needed by `out/target/product/skate/system/bin/extras.sh'. Stop.
make: *** Waiting for unfinished jobs....


  • 0

Posted Image

Current Phone:

Xperia T


Previous Phones:

Orange Monte Carlo

Nokia 5530 XpressMusic (Nokia C6-00 CFW)

Sony Ericsson v640i

Nokia 3120

Various other Nokia phones.

Not the best history of phones Posted Image


#18
Nofan Tasi

Nofan Tasi

    Regular

  • Members
  • PipPip
  • 147 posts
  • Gender:Male
  • Devices:G SII - M P4310 - M 99300
  • Twitter:@tasinofan
Hi tilal6991

make now continues (after adding kernel source tree)

btw: 'cm ~/cm9' almost bit me ;-)

thanks all for your kind help!

ps: perhaps soon I can change my profile 'Member Title "Newbie"' to something else, if only I knew how ...

  • 0

#19
Nofan Tasi

Nofan Tasi

    Regular

  • Members
  • PipPip
  • 147 posts
  • Gender:Male
  • Devices:G SII - M P4310 - M 99300
  • Twitter:@tasinofan
would there be an issue with 2 makefiles below?

~/cm9$ grep device/zte/blade $(find -iname makefile -or -iname "*.mk") | grep -v proprietary_vendor_zte/blade
./device/zte/skate/device.mk: device/zte/blade/releasetools/extras.sh:system/bin/extras.sh
./device/zte/skate/BoardConfig.mk:TARGET_RELEASETOOL_OTA_FROM_TARGET_SCRIPT := device/zte/blade/releasetools/ota_from_target_files

thanks

  • 0

#20
Nofan Tasi

Nofan Tasi

    Regular

  • Members
  • PipPip
  • 147 posts
  • Gender:Male
  • Devices:G SII - M P4310 - M 99300
  • Twitter:@tasinofan
and with device/zte/skate/releasetools/ota_from_target_files itself?

~/cm9$ grep blade device/zte/skate/releasetools/*
device/zte/skate/releasetools/ota_from_target_files:EXTRAS_FILE = 'device/zte/blade/releasetools/extras.txt'

  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users