[DEV] Discussion about porting AOSP-based ROMs - HTC Desire X

I have done some research about our device. To start with, we have two options:
1. CyanogenMod
Because our stock ROM is on ICS, it would be better if we first tried CM9, then CM10 and perhaps cm-10.1. But the difference between CM9 and CM10, is that in CM10 the hardware repository for msm7k-devices adds support for msm7x27a, and as you can see in the logcat beneath, we should target it. A problem is that I tried targetting msm7x27a using Lloir's config and I got a compile error due to undefined variables. Keep in mind that msm7x27a was added only for Sony devices; it's possible that HTC did something different. That's why maybe it's better to experiment with Code Aurora first.
2. Code Aurora
Code Aurora provides an Android fork that targets Qualcomm devices. You can see in the protou-specific configuration files in the kernel source code released by HTC copyright statements of Code Aurora (example).
Someting interesting from adb logcat:
adb logcat said:
I/Adreno200-EGL( 200): <qeglDrvAPI_eglInitialize:290>: EGL 1.4 QUALCOMM build: AU_LINUX_ANDROID_ICS_STRAWBERRY_RB2.04.00.04.22.006_msm7627a_ICS_STRAWBERRY_RB2.2_CL2527005_release_AU (CL2527005)
I/Adreno200-EGL( 200): Build Date: 09/12/12 Wed
I/Adreno200-EGL( 200): Local Branch:
I/Adreno200-EGL( 200): Remote Branch: m/ics_strawberry_rb2.2
I/Adreno200-EGL( 200): Local Patches: NONE
I/Adreno200-EGL( 200): Reconstruct Branch: NOTHING
Click to expand...
Click to collapse
You can see Code Aurora's branches on this page. There is a branch called 'ics_strawberry_rb2' (for msm8625). That seeems right, as the only difference between msm8225 and msm8625 is the modem (msm8225 is UMTS-only and msm8625 adds upport for CDMA). Look here for more details (PDF).
They also have their own kernel fork (here). There is a list of heads, where you can find ics_strawberry_rb2.2. And the kernel version is 3.0.21, the same as ours! Unfortunately, there is no device support, only hardware support.
In theory, we can diff this repository with the kernel source code provided by HTC, create a patch based on the diff and apply it to the newest one for JB.
Let the party begin!
EDIT: It seems Code Aurora also uses the configs for msm7627a for msm8625 (https://www.codeaurora.org/gitweb/q...8ece3b993b95fe5ef6;hb=refs/heads/jb_rel_rb2.1)

Related

[Q]+[SOLVED] Building faux123 Atrix 4g CM_kernel from source

Hello,
I am trying to build the faux123 Atrix 4g CM_kernel from source and run it on my device. I have been able to load the pre-compiled zImage and ramdisk on my atrix without any problems, but when I try to load the zImage I compiled the system never boots. The screen stays locked on the fastboot message without ever advancing.
I am using the code sorcery toolchain and I compiled the kernel with the tegra_olympus_cyanogenmod_defconfig configuration and I grabbed the latest version of the CM_kernel branch from faux123's github repository.
Part of the difficulty is that the system never gets to a point where it can output information, so I have no idea how far it is making it in the boot sequence.
Any help debugging this is appreciated.
I got it to work. I changed to the android ndk toolchain (android-ndk-r6) for my cross compiler and it worked. Here is what I did:
$ make ARCH=arm tegra_olympus_cyanogenmod_defconfig
$ make ARCH=arm CROSS_COMPILE=/home/kingst/NVPACK/android-ndk-r6/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi- -j20
the -j20 tells the compiler to use 20 jobs (rule of thumb -- use #cpu*2 for this) and the CROSS_COMPILE parameter tells kbuild the prefix of my cross compiler.
I did have to change a few things to get it to work, I will submit a patch to the faux123 kernel for the change
Update: if you use the arm-2010.09 toochain from code sourcery then you can compile the faux123 CM_kernel without any modifications. This is the toolchain being used for official builds, so it is the best one to use.

[Q] Build a compatible kernel

For build a kernel compatible with my device, what do I need ? module list (took from /sys/module) ? only or what else ?
Can I simple use device/generic/common/ source and then configure with module list from /sys/module?
see this and thank me if i helped.
hotvic said:
For build a kernel compatible with my device, what do I need ? module list (took from /sys/module) ? only or what else ?
Can I simple use device/generic/common/ source and then configure with module list from /sys/module?
Click to expand...
Click to collapse
You will want to look at the git log for the kernel binary
in the device project that you are interested in.
Device projects are of the form device/<vendor>/
<name>.
$ git clone https : //android.googlesource.com/device/ti/panda
$ cd panda
$ git log -- max - count= 1 kernel
The commit message for the kernel binary contains a
partial git log of the kernel sources that were used to
build the binary in question. The first entry in the log is
the most recent, i.e. the one used to build that kernel.
You will need it at a later step.
Identifying kernel version
To determine the kernel version used in a particular
system image, run the following command against the
kernel file:
$ dd if= kernel bs =1 skip = $ (LC_ALL = C grep - a -b - o $ '\x1f\x8b\x08\x00\x00\x00\x00\x00' k
For Nexus 5 (hammerhead), this can be accomplished
with:
$ bzgrep - a 'Linux version' vmlinux . bz2
Downloading sources
Depending on which kernel you want,
$ git clone https : //android.googlesource.com/kernel/common.git
$ git clone https : //android.googlesource.com/kernel/exynos.git
$ git clone https : //android.googlesource.com/kernel/goldfish.git
$ git clone https : //android.googlesource.com/kernel/msm.git
$ git clone https : //android.googlesource.com/kernel/omap.git
$ git clone https : //android.googlesource.com/kernel/samsung.git
$ git clone https : //android.googlesource.com/kernel/tegra.git
The goldfish project contains the kernel sources for
the emulated platforms.
The msm project has the sources for ADP1, ADP2,
Nexus One, Nexus 4, and can be used as a starting
point for work on Qualcomm MSM chipsets.
The omap project is used for PandaBoard and Galaxy
Nexus, and can be used as a starting point for work on
TI OMAP chipsets.
The samsung project is used for Nexus S, and can be
used as a starting point for work on Samsung
Hummingbird chipsets.
The tegra project is for Xoom and Nexus 7, and can
be used as a starting point for work on NVIDIA Tegra
chipsets.
The exynos project has the kernel sources for Nexus
10, and can be used as a starting point for work on
Samsung Exynos chipsets.
Downloading a prebuilt gcc
Ensure that the prebuilt toolchain is in your path.
$ export PATH = $ (pwd )/ prebuilts /gcc / linux - x86/ arm / arm -eabi- 4.6 /bin : $PATH
or
$ export PATH = $ (pwd )/ prebuilts /gcc / darwin- x86 /arm / arm - eabi-4.6 / bin: $PATH
On a linux host, if you don't have an Android source
tree, you can download the prebuilt toolchain from:
$ git clone https : //android.googlesource.com/platform/prebuilts/gcc/linux-x86/arm/arm-ea
Building
As an example, we would build the panda kernel using
the following commands:
$ export ARCH = arm
$ export SUBARCH = arm
$ export CROSS_COMPILE = arm - eabi-
$ cd omap
$ git checkout <commit_from_first_step>
$ make panda_defconfig
$ make
To build the tuna kernel, you may run the previous
commands replacing all instances of "panda" with
"tuna".
The kernel binary is output as: `arch/arm/boot/zImage`
It can be copied into the Android source tree in order
to build the matching boot image.
Or you can include the TARGET_PREBUILT_KERNEL
variable while using make bootimage or any other
make command line that builds a boot image.
$ export TARGET_PREBUILT_KERNEL =$your_kernel_path / arch/arm / boot/ zImage
That variable is supported by all devices as it is set up
via device/common/populate-new-device.sh
@SidDev said:
You will want to look at the git log for the kernel binary
in the device project that you are interested in.
Device projects are of the form device/<vendor>/
<name>.
$ git clone https : //android.googlesource.com/device/ti/panda
$ cd panda
$ git log -- max - count= 1 kernel
The commit message for the kernel binary contains a
partial git log of the kernel sources that were used to
build the binary in question. The first entry in the log is
the most recent, i.e. the one used to build that kernel.
You will need it at a later step.
Identifying kernel version
To determine the kernel version used in a particular
system image, run the following command against the
kernel file:
$ dd if= kernel bs =1 skip = $ (LC_ALL = C grep - a -b - o $ '\x1f\x8b\x08\x00\x00\x00\x00\x00' k
For Nexus 5 (hammerhead), this can be accomplished
with:
$ bzgrep - a 'Linux version' vmlinux . bz2
Downloading sources
Depending on which kernel you want,
$ git clone https : //android.googlesource.com/kernel/common.git
$ git clone https : //android.googlesource.com/kernel/exynos.git
$ git clone https : //android.googlesource.com/kernel/goldfish.git
$ git clone https : //android.googlesource.com/kernel/msm.git
$ git clone https : //android.googlesource.com/kernel/omap.git
$ git clone https : //android.googlesource.com/kernel/samsung.git
$ git clone https : //android.googlesource.com/kernel/tegra.git
The goldfish project contains the kernel sources for
the emulated platforms.
The msm project has the sources for ADP1, ADP2,
Nexus One, Nexus 4, and can be used as a starting
point for work on Qualcomm MSM chipsets.
The omap project is used for PandaBoard and Galaxy
Nexus, and can be used as a starting point for work on
TI OMAP chipsets.
The samsung project is used for Nexus S, and can be
used as a starting point for work on Samsung
Hummingbird chipsets.
The tegra project is for Xoom and Nexus 7, and can
be used as a starting point for work on NVIDIA Tegra
chipsets.
The exynos project has the kernel sources for Nexus
10, and can be used as a starting point for work on
Samsung Exynos chipsets.
Downloading a prebuilt gcc
Ensure that the prebuilt toolchain is in your path.
$ export PATH = $ (pwd )/ prebuilts /gcc / linux - x86/ arm / arm -eabi- 4.6 /bin : $PATH
or
$ export PATH = $ (pwd )/ prebuilts /gcc / darwin- x86 /arm / arm - eabi-4.6 / bin: $PATH
On a linux host, if you don't have an Android source
tree, you can download the prebuilt toolchain from:
$ git clone https : //android.googlesource.com/platform/prebuilts/gcc/linux-x86/arm/arm-ea
Building
As an example, we would build the panda kernel using
the following commands:
$ export ARCH = arm
$ export SUBARCH = arm
$ export CROSS_COMPILE = arm - eabi-
$ cd omap
$ git checkout <commit_from_first_step>
$ make panda_defconfig
$ make
To build the tuna kernel, you may run the previous
commands replacing all instances of "panda" with
"tuna".
The kernel binary is output as: `arch/arm/boot/zImage`
It can be copied into the Android source tree in order
to build the matching boot image.
Or you can include the TARGET_PREBUILT_KERNEL
variable while using make bootimage or any other
make command line that builds a boot image.
$ export TARGET_PREBUILT_KERNEL =$your_kernel_path / arch/arm / boot/ zImage
That variable is supported by all devices as it is set up
via device/common/populate-new-device.sh
Click to expand...
Click to collapse
but... I want a general way of build the kernel, i.e not using the device-specific code.
My idea is build most recent kernel to devices w/o updates in source tree.
and the device in my mind is a Alcatel One Touch POP C3, which there's no device/alcatel ...
Thank you.
hotvic said:
but... I want a general way of build the kernel, i.e not using the device-specific code.
My idea is build most recent kernel to devices w/o updates in source tree.
and the device in my mind is a Alcatel One Touch POP C3, which there's no device/alcatel ...
Thank you.
Click to expand...
Click to collapse
You will need device specific code to get you started, I would recommend checking out this section on source forge where Alcatel keeps it's open source files that include the kernel source for most all there devices by searching for your device model. Let me know if you still have questions.
hotvic said:
but... I want a general way of build the kernel, i.e not using the device-specific code.
My idea is build most recent kernel to devices w/o updates in source tree.
and the device in my mind is a Alcatel One Touch POP C3, which there's no device/alcatel ...
Thank you.
Click to expand...
Click to collapse
kernel is general made device specific
shimp208 said:
You will need device specific code to get you started, I would recommend checking out this section on source forge where Alcatel keeps it's open source files that include the kernel source for most all there devices by searching for your device model. Let me know if you still have questions.
Click to expand...
Click to collapse
Ok, I've got 4033E code and kernel source is inside it.
@SidDev said:
kernel is general made device specific
Click to expand...
Click to collapse
is there a general kernel where I can merge the alcatel's source and most recent source ?
hotvic said:
Ok, I've got 4033E code and kernel source is inside it.
is there a general kernel where I can merge the alcatel's source and most recent source ?
Click to expand...
Click to collapse
You can now use that kernel source to build the defconfig for your device which is usually listed under arch/arm/configs your devicecodename_defconfig. If the sources don't include any compile instructions or a README let me know and I can help if you get stuck. While you could take the latest version of the Android kernel for say the Nexus 5, and merge the Alcatel sources there are a lot of merge problems that would have to be fixed as well as other compile errors that would result, best to stay away from this until you really know what your doing and feel more comfortable with all the things involved.

[Q] Problem with building android from source.

Helloo!
I`m trying to builld the android from source for me htc buzz.
I have the AOSP source and the device tree downloaded from cyanogenmod source page and when i type "lunch generic_buzz-eng" i get the error:
[email protected]:/home/pawelplsi/WORKING_DIRECTORY# lunch generic_buzz-eng
build/core/combo/TARGET_linux-arm.mk:39: *** Unknown ARM architecture version: armv6j. Stop.
android not support my architecture??
i dont have someone package??

Building AOSP

I am trying to build AOSP. I have followed some instructions and the best are the instructions of Sony. But when I come to the point to clone the local_manifests, I need to have another file because I am trying to build it for the OnePlus One. I have found the AOSP-bacon repo on github where is a local_manifests to clone. So I have done that but when I try to sync the repo with the command 'repo sync' it gives this back:
[email protected]:~/android$ repo sync
fatal: remove-project element specifies non-existent project: platform/build
I have searched but could not find the answer what to do now. Can someone help me or say what I need to do to build AOSP?
You're cluttering your roomservice.xml with too much stuff. You only really need 3 things, device tree, vendor and kernel sources. You don't need to define the github tag since it should already have been defined in your default.xml located in .repo/manifests.

[Help] Android code download from codeaurora return manifest not find?

Hi,I want to download the Qcom code from it's release tags showning in wiki.codeaurora.org
The release page showing the released manifest tag and android version I want to download
November 12, 2020 LA.UM.9.12.r1-09000-SMxx50.0 kona LA.UM.9.12.r1-09000-SMxx50.0.xml 11.00.00
I follow the guide using below to download a released tag:
repo init -u git://codeaurora.org/platform/manifest.git -b release -m LA.UM.9.12.r1-09000-SMxx50.0.xml
But it returns error the manifest are not exist, any idea that if some thing more needed to download a Android code from codeaurora ?
fatal: manifest 'LA.UM.9.12.r1-09000-SMxx50.0' not available
fatal: manifest LA.UM.9.12.r1-09000-SMxx50.0 not found
more info: I found the code already merged in AOSPA and other community ,so the repo is opensourced
manifest: Update to LA.UM.9.12.r1-09000-SMxx50.0. · AOSPA/[email protected]
Change-Id: I2c50904782d11d33666176a1ee07bcde89ea0537
github.com
butterl said:
Hi,I want to download the Qcom code from it's release tags showning in wiki.codeaurora.org
The release page showing the released manifest tag and android version I want to download
November 12, 2020LA.UM.9.12.r1-09000-SMxx50.0konaLA.UM.9.12.r1-09000-SMxx50.0.xml11.00.00
I follow the guide using below to download a released tag:
repo init -u git://codeaurora.org/platform/manifest.git -b release -m LA.UM.9.12.r1-09000-SMxx50.0.xml
But it returns error the manifest are not exist, any idea that if some thing more needed to download a Android code from codeaurora ?
fatal: manifest 'LA.UM.9.12.r1-09000-SMxx50.0' not available
fatal: manifest LA.UM.9.12.r1-09000-SMxx50.0 not found
more info: I found the code already merged in AOSPA and other community ,so the repo is opensourced
manifest: Update to LA.UM.9.12.r1-09000-SMxx50.0. · AOSPA/[email protected]
Change-Id: I2c50904782d11d33666176a1ee07bcde89ea0537
github.com
Click to expand...
Click to collapse
Hi,
sorry to bring up this old topic but I'm having the precise same issue with another manifest, it's listed on the Qualcomm XWik but I do get the same manifest not available / not found error.
Did you find a solution to this issue?
Thanks

Categories

Resources