Related
Hello,
First of all, I am not attempting to compete with the other awesome images for the G Tablet available. I am doing this process to learn, and maybe contribute to the community.
I have grabbed the AOSP directly from Google's repo tree, and compiled it in two different ways: Generic build, modifying BoardConfig.mk and other files as necessary. I have also used the Device/Vendor files from the Cyanogen Beta 4 harmony repo tree, and compiled a harmony target with AOSP.
When I compiled the generic build (or the the targeted build), I made sure all proprietary files from the tablet had been extracted and replaced in my system.img. (I got this list from the extract-files.sh script in Cyanogen harmony repo).
I have found that using the stock boot.img from the original nvflash files will boot nearly any system.img (from my update.zip in clockwork). I used this original boot.img, combined with my system.img from the AOSP build (with the proprietary files in place), and made an updater-script which installed things. I found that the system.img was properly extracted to /system.
The problem that occurs -- when booting, the Viewsonic bootup screen will load the GTablet screen, but it will eventually loop back to the Viewsonic screen and report "deleting msc" prior to returning to Recovery Mode on it's own.
I have enabled ADB persistence in the boot ramdisk, and it works fine as long as it's not my system.img. When I use the AOSP system.img, adb devices shows the device, but adb shell/logcat fail until the device power cycles.
Does anyone know what I might be missing?
Also want to add:
I have tried the stock boot.img, which lacks a 'cmdline' parameter, and I have tried using the cmdline parameters from the Cyan Harmony boot.img specifications. I am not sure if this might have something to do with the issue or not.
kornyone said:
Hello,
First of all, I am not attempting to compete with the other awesome images for the G Tablet available. I am doing this process to learn, and maybe contribute to the community.
I have grabbed the AOSP directly from Google's repo tree, and compiled it in two different ways: Generic build, modifying BoardConfig.mk and other files as necessary. I have also used the Device/Vendor files from the Cyanogen Beta 4 harmony repo tree, and compiled a harmony target with AOSP.
When I compiled the generic build (or the the targeted build), I made sure all proprietary files from the tablet had been extracted and replaced in my system.img. (I got this list from the extract-files.sh script in Cyanogen harmony repo).
I have found that using the stock boot.img from the original nvflash files will boot nearly any system.img (from my update.zip in clockwork). I used this original boot.img, combined with my system.img from the AOSP build (with the proprietary files in place), and made an updater-script which installed things. I found that the system.img was properly extracted to /system.
The problem that occurs -- when booting, the Viewsonic bootup screen will load the GTablet screen, but it will eventually loop back to the Viewsonic screen and report "deleting msc" prior to returning to Recovery Mode on it's own.
I have enabled ADB persistence in the boot ramdisk, and it works fine as long as it's not my system.img. When I use the AOSP system.img, adb devices shows the device, but adb shell/logcat fail until the device power cycles.
Does anyone know what I might be missing?
Click to expand...
Click to collapse
Did you ever get your AOSP build to boot?
tjohnsonjr said:
Did you ever get your AOSP build to boot?
Click to expand...
Click to collapse
I did. It's in the Dev section now
I am no longer working on this project (see the 3/15 update below).
However cas_xp is already working on porting ICS/CM9 to the LePan TC970.
The XDA thread with all his work is here: http://forum.xda-developers.com/showthread.php?t=1483954
(if anyone has a link to the thread specific to CM9 for the TC970, please let me know and I'll update the link above).
================================================================================
This thread is about gathering and sharing info about the hardware, firmware, Linux kernel and modules for the Mitsunichi/Innocom 'Griffin' M6001 tablet, aka Le Pan TC970 in order to be able to port ICS/CM9 to it, if possible.
I'd like to keep this thread about 'low-level' hardware/kernel, i.e. please do not post questions about rooting this tablet (it has already been done, see here: http://forum.xda-developers.com/showthread.php?t=1353951) or about problems with specific applications.
Since there are so many awesome developments in this thread, I decided to just put the interesting news and links here and move the historical info in the second post below.
Franco
================================================================================
Update 3/15/2012
Last Sunday flying back home they had me check-in with the regular luggage my bag with the LePan 970 and when I turned it back on at home that night, it had a bunch of stripes of dead pixels on the screen; it is pretty much unusable now.
Also my wife gave me a new different tablet (which already runs ICS) for my birthday yesterday, so at this point I won't be working on the LePan TC970 anymore.
I just saw that the great cas_xp is already working and making good progress on a version of CM9/ICS for the LePan TC970 (see here http://forum.xda-developers.com/showthread.php?t=1483954 and here https://github.com/cas-xp/device_lepan_griffin) and I wish the best of luck in this project.
I had really fun working on this tablet with all the people here (chinabull, cas_xp, and everyone else of course) and I am already working on the new one.
See you later,
Franco
================================================================================
Update 2/20/2012
I was finally able to compile all of CM9/ICS with specific files for the griffin/TC970 (no ROM yet).
All the details, how to get the files, and compile it on your PC are in the 'how-to' post ( http://forum.xda-developers.com/showpost.php?p=22007753&postcount=113).
Please do try to compile it yourself, but don't try to run those files on your tablet.
================================================================================
Update 2/7/2012
Big news!
cas_xp has released a beta version of Gingerbread/CM7 for the griffin/TC970. The thread with all the information is here: http://forum.xda-developers.com/showthread.php?t=1483954
Awesome job cas_xp!!!
================================================================================
Update 1/30/2012
I tried to put together an initial attempt of an 'how-to' docoment about trying to build CM9/ICS for the griffin/TC970 tablet (movie spoiler: no, I can't build/run ICS yet).
The link to the post is here: http://forum.xda-developers.com/showpost.php?p=22007753&postcount=113
I also created a github repository with the device specific code and configuration files to port CM9/ICS to this tablet (it is all in the post).
Comments, contributions to the code and conf files in the repo are most welcome!
================================================================================
Update 1/27/2012
cas_xp was able to get Gingerbread (CM7) running on the first time! (http://forum.xda-developers.com/showpost.php?p=21888312&postcount=93)!!!
Congratulations to cas_xp for this big success!
================================================================================
Update 1/22/2012
I finally found the time to write the Innocomm firmware 'packer' (and a newer version of 'unpacker'), so we can create our own firmwares for the TC970/griffin.
Since I thought it is better if I keep this post just for the progress updates for this this thread, I just put the descriptions on what 'unpacker 'and 'packer' do and how to use them here: http://forum.xda-developers.com/showpost.php?p=21707308&postcount=80.
Sometime I'll also clean up this post a little bit (and put all the historical information in the second post).
================================================================================
Update 1/19/2012
chinabull has created a working ClockworkMod Recovery for the LePan TC970/griffin; his post with all the instructions is here: http://forum.xda-developers.com/showpost.php?p=21563628&postcount=44.
Please read his whole post wuth all the instructions; please not that this is still a work in progress and that there are risks with your tablet involved with this installation; you may want to read all the posts after chinabull's to have an idea of the possible risks and workarounds.
Again my hat off to chinabull for this great achivement!
================================================================================
Update 18/1/2012
More great news!
chinabull figured out a way to replace Innocomm recovery with an already existing ClockworkMod, sign the firmware with this new version and install it on his tablet.
This means that we should now the able to build our own firmwares for the TC970/griffin.
Many thanks to chinabull for his awesome achievement!
================================================================================
You can find all the other information in the 'historical' log below.
This post is just to keep an archive of all the historical information about porting ICS/CM9 to the griffin/TC970 tablet.
Most of the information here has been superseded by the progress made more recently (see post #1), but I thought it would be useful to have it around, just in case.
Franco
================================================================================
Update 1/16/2012
Great news!
With chinabull's help, I found out how to generate the 20 bytes SHA1 checksum for trhe images contained in the firmware.
It is the SHA1 checksum of the image + the 'cafeefac' trailer + the length of the image (including the 'cafeefac' trailer).
I updated the C program 'unpacker.c' to also compute and check the SHA1 checksum.
The program can be compiled with the following command:
gcc -O -Wall -o unpacker unpacker.c -lz -lcrypto
We still haven't found out how to generate the 20 byte SHA1 checksum for the whole firmware, but I think we are very close now.
I'll also start writing the 'packer' because I think we'll have all the pieces in place very soon.
Many thanks to chinabull again for all his help.
Franco
================================================================================
Update 1/15/2012
What chinabull found is the CRC32-like checksum for the header of the firmware and for each of the images.
As he pointed out in the thread there is still a 20 bytes (160 bits) signature/checksum that we haven't figured out.
I updated the 'unpacker' code attached to this thread with the header CRC checksum stuff that chinabull found out.
The still unknown 160 bits field is displayed as 'signature/checksum' if you run the'unpacker'; if you figure out how to generate it from each image content, please let us know, since this is the last thing we need to know to be able to create ourown firmware images.
Franco
================================================================================
Update 1/13/2012
Very good news!
Chinabull figured out the algorithm used by Innocom to sign/checksum the images and the firmware!
This means that it should be possible to create our own firmware images (possibly with CWM recovery) and start replacing parts of the firmware on the TC970/griffin.
Congratulations to chinabull!
Franco
================================================================================
Update 1/8/12
First of all, thanks to the many who posted useful information about the hardware in this tablet and thanks for the comments (btw, negative critiques do not upset me, so don't worry about them, as long as they don't violate this forums policies).
I thought that in order to boot any alternative ROM or firmware it would be useful to find out how locked down Innocomm has made this tablet.
Since the CPU is an OMAP3630 and the Wifi is a WL1271 and they are the same on the Nook Color tablet and since we know that the TC970 can boot off the SD card using the same type of MLO x-loader and bootloader used by the Nook Color, I downloaded the Nook Color 'Monster Bootpack' SD card bootable images from here: http://code.google.com/p/monster-rootpack/downloads/list. They have a couple of 2GB SD card images there.
I tried both of them and in both cases I had the 'bad firmware image' screen, which seems to indicate that the Innocomm recovery boot checks for 'something' (beyond what a normal OMAP3630 does) in order to boot an MLO x-loader from the SD card.
At this point I thought I would try to discover the full format of the 'griffin.ifw' file, in order to be able to create our own ROM images.
I was able to decode a few more fields in the firmware (the memory load address and a few other value) and I have updated the attached 'unpacker.c' accordingly.
Unfortunately a couple of values are still unknown:
- one is a 28 byte (224 bits) field in the header of each image in the firmware - I strongly suspect it is some sort of checksum (224 bits is the length of a SHA224 checksum), but I haven't been able to find out how to generate that value (I tried doing SHA224 checksums of the image,the image+header, and other combinations, but without any luck). If someone here can find how to generate it, big reward!
- the second one is a 24 byte (192 bits) field in the header of the whole firmware - it is probably some other checksum/signature, but I haven't found out any kind of 192 bit signature to make sense of it, so big reward here too if you can figure out what it is.
Both values are printed out by this version of 'unpacker', so you can play around with it and let me know if you find anything.
Finally, I saw from the FCC schematics that the TC970 presents the OMAP3630 UART3/serial port on the 30 pin connector and I saw that one guy ('chinabull') in the TC970 rooting thread was able to connect to it and obtain a shell in recovery mode. My next step is going to be buying the $15 'podbreakout' from sparkfun Electronics (among others) http://www.sparkfun.com/products/8295 (I am not good with the soldering iron; if you are good and have patience, you may want to try with the $4 iPod connector from the same site) and connect to pins 17, 18, and the ground to have a serial connection and be able to see the actual messages when I try to boot with a different MLO x-loader (should be also useful to 'de-brick' the TC970, since I only have this tablet).
I'll let you know how it goes.
Franco
================================================================================
This thread is about gathering and sharing info about the hardware, firmware, Linux kernel and modules for the Mitsunichi/Innocom 'Griffin' M6001 tablet, aka Le Pan TC970 in order to be able to port ICS/CM9 to it, if possible.
I'd like to keep this thread about 'low-level' hardware/kernel, i.e. please do not post questions about rooting this tablet (it has already been done, see here: http://forum.xda-developers.com/showthread.php?t=1353951) or about problems with specific applications.
Below is what I found so far.
- Hardware
According to the application with the FCC, these are the most interesting components:
- Name: griffin
- Model: 6001
- Manifacturer: Innocomm
- Processor: TI OMAP3630 ES1.2
- LCD: LP097X02-SLA3 (transmitter: TI SN75LVDS83B)
- Power regulator: TI TWL5030
- Front facing camera: 2M pixel fixed focus CM8188-A200SF-E
- g-Sensor: BMA150
- e-Compass: YAS529-PZ
- light sensor: EPL5804
- gas gauge: OZ8805
- Wireless/Bluetooth/FM: TI WL1271-YFV
- GPS: GSD-4t
- Firmware:
Le Pan has apparentely two versions of its latest firmware, V4431 and V4431-2. My analysis below is based on the one with MD5 checksum f9cabf696f08f1c3791d0a4ec14876db.
I wrote the attached C program to extract all the 'images' (files) from the firmware.
The program can be compiled with the following command:
gcc -O -Wall -o unpacker unpacker.c -lz
(all these commands should work on Linux - Fedora 64 bit; you may have to change them to run them on a different version of Linux/OS).
The firmware is composed of the following nine 'images':
- recovery ('.cpio.gz' archive - it can be opened with the command: gzip -dc recovery | cpio -idm)
- linux (this is the actual Linux kernel; see more about it below)
- iload (same as the first stage 'MLO' x-loader binary in the firmware installation disk)
- iboot (same as the second stage 'iboot.ism' loader in the firmware installation disk)
- splash (probably a bitmap image for the splash screen)
- chargesplash (probably a bitmap image for the splash screen when charging)
- bootifw_logo (probably a bitmap image with the company logo to be displayed at boot time)
- ramdisk (.cpio.gz' archive - it can be opened with the command: gzip -dc ramdisk | cpio -idm)
- system (a YAFFS2 filesystem - it can be opened with the 'unyaffs' program - available here: http://code.google.com/p/unyaffs/downloads/list)
The griffin board is based on the TI OMAP3630 ARM CPU, which is the same used by the very popular BeagleBoard (http://beagleboard.org/). Most of the information available for the BeagleBoard apply to griffin, included the functions of the files MLO, iload, iboot (see here: http://omappedia.org/wiki/Bootloader_Project - OMAPpedia is definitely a good starting point here).
- Kernel and drivers:
The firmware file 'linux' is the actual Linux ARM kernel; it has some code at the beginning to uncompress it and the rest is a 'gzip' compressed file.
The actual uncompressed kernel can be extracted with the command:
dd if=linux bs=12878 skip=1 | gunzip -dc > kernel
I then ran 'strings -td -a kernel' and it looks like all the drivers are compiled into this kernel (also confirmed by the very few '.ko' files contained in 'system').
The 'strings' command shows the following lines toward the beginning:
183356 twl5030
183392 griffin-i2c-touch
183428 bma150
183464 yas529
183500 OZ8805
183536 epl5800-ls
183572 hynix253
183608 griffin-ha2608-tk
I think these are the drivers which we need to come up in order to be able to compile ICS/CM9 for this tablet.
Here is what I found about them:
- 'twl5030' is the power regulator for the OMAP board and it is already supported by Linux
- 'griffin-i2c-touch' is the capacitive touch screen (see more about it below)
- 'bma150' is the accelerometer and it is already supported by Linux
- 'yas529' is the magnetometer and it is already supported by Linux
- 'oz8805' is the gas gauge - I didn't find much about it
- 'epl5800-ls' is the light sensor - I didn't find much about it
- 'hynix253' is the 2M pixel camera - I didn't find much about it
- 'griffin-ha2608-tk' is the touch key - I found some code about it here http://topic.csdn.net/u/20110810/09/1a96d532-c517-4771-8bbe-d2dd4c980b4e.html
I started looking at the touch screen first, since it is probably the most critical component in this list (and the one that took some work to get to work correctly on the CM7 for the HP Touchpad).
The 'bootinfo.txt' log file posted on the TC970 rooting thread shows the following kernel message lines for the TS:
input: griffin-i2c-touch as /devices/virtual/input/input7
griffin-i2c-touch 2-0055: registered with irq (313)
Goodix TouchScreen Version:GT801NI_1R02_13T
griffin-i2c-touch 2-0055: Create proc entry success!
Goodix debug sysfs create success!
griffin-i2c-touch 2-0055: Start touchscreen griffin-i2c-touch in interrupt mode
which show that the TS is a Goodix GT801.
Search for Goodix Linux drivers, I found the following page (in Chinese) http://blog.csdn.net/baiduluckyboy/article/details/6616533. It looks like it contains the source code for the Linux driver for the TS and it looks like the driver is under the GPL license. Unfortunately the source code refers to a couple of include files ('goodix_touch.h' and 'goodix_queue.h') that I was not able to find anywhere. The guy who posted that source code might have them, I did not try to contact him. Also the 'goodix_touch.ko' kernel drivers out there refer to a source file 'goodix_touch_1024n.c' that I was not able to find either.
Interestingly enough, the schematics posted on the FCC site do not mention any Goodix chip at all (at least I wasn't able to find it there).
This is what I found so far; I'll add more updates as I find them.
I would also appreciate very much if anyone could post information about the source code for the drivers (or even developer's guides, SDKs, datasheets) for the touch screen (most important), the light sensor, the camera, the GPS, etc
Thanks,
Franco
If you want the kernel source, contact the manufacturer, as the Linux kernel is licenced under GPL and they need to release source!
From my fingers to your eyez
just in case 2
Best of luck!!!!
DerKoch
Sent from my SGH-I897 using XDA App
Good luck.
Appreciate the work to gather the info together, OP. Glad another soul fights for our shiny toy
Having a forum would help putting such info in stickies. Keep voting!
Vote +1 Le Pan forum here
As for source code... anyone threatening legal action yet? j/k ...
Dude, problem? Calm down, I think this is the best thread with all the infos right now.
10chars...
$30 US to the first person with a working CM7 (or CM9) custom ROM on the Le Pan, via Paypal!
gfinockio said:
$30 US to the first person with a working CM7 (or CM9) custom ROM on the Le Pan, via Paypal!
Click to expand...
Click to collapse
I'll give $50
Sent from my TC970 (Wi-Fi) using XDA Premium App
Thx OP, nice... Keep up the good work guys!
So, correct me if I am wrong. In theory the first step is to recreate a 2.2 'custom' kernel replace the existing one, repackage, and try to flash it and see if it works, right?
Worst case (assume the boot loader is not messed up), it should be able to flash back to the official ROM image, right?
(or I should say, first test is to replace the boot screen in ROM image to test repackage and see if it works... Yes I am aware you can change the boot logo in the filesystem afterwards but that's not the point)
I do plan to set up a build environment over the holiday, but I hope those alreay have experience can have a head start!
---------- Post added at 06:33 AM ---------- Previous post was at 06:02 AM ----------
OZ8805 Gas Gauge seems to be an obsolete product from O2Micro. However from some old document (http://www.docin.com/p-97287653.html or http://www.scribd.com/doc/61448457/o2m-Int-Power-Brochure) it shows the pin out which looks like I2C interface (SCL/SDA)
Hynix253 Camera:
Bit and piece of info
http://e2e.ti.com/support/dsp/davinci_digital_media_processors/f/100/t/135743.aspx
And looks like it is widely available in China for use in cell phone camera, however can't fins much specs other than a few photos. It is made by 冠普科技. http://detail.china.alibaba.com/buyer/offerdetail/891985423.html
ePL580x Light sensor:
according to this page http://www.computex.biz/elan/default.aspx?pagetype=ProductDetail&pdt_id=38766&cid=561 it is made by ELAN Microelectronics Corp. http://www.emc.com.tw But I can't seems to find the product on their website
Digging continues...
I was able to find this website with
more on the tablet. I tried to email them for more information but idk if it sent to them. Maybe someone else can try on a PC, only have my phone for now....
Edit: forgot the Website. http://211.72.69.29/en/product5802.html
So here it is
Sent from my i777 high in the sky
colbynmeghan said:
I was able to find this website with
more on the tablet. I tried to email them for more information but idk if it sent to them. Maybe someone else can try on a PC, only have my phone for now....
Sent from my i777 high in the sky
Click to expand...
Click to collapse
what is the website?
There is a new firmware file on the horizon for the Le Pan TC 970. Not sure if that's of any importance to you...
gfinockio said:
There is a new firmware file on the horizon for the Le Pan TC 970. Not sure if that's of any importance to you...
Click to expand...
Click to collapse
Source?
Op, is there anything community members can do to help?
sockbot said:
Source?
Op, is there anything community members can do to help?
Click to expand...
Click to collapse
A member of le pan support is a member of the le pan group and asked a few members to test out the firmware. It should be released publicly soon.
Sent from my SPH-D710 using Tapatalk
Let us know if theres anything that can be done to help. Would love to see some CM9 port on this thing. Thanks again for the hard work. Keep it up.
Any info on significant changes, I'm pretty happy with the current firmware....
esunday said:
Any info on significant changes, I'm pretty happy with the current firmware....
Click to expand...
Click to collapse
There is a discussion on the new firmware here: http://forum.xda-developers.com/group.php?do=discuss&discussionid=1446&pp=10
It looks like it is mostly stability fixes but it is still a 2.2 firmware.
This thread is about getting a custom 2.3+ firmware on the TC 970 which I want so my apps behave as tablet apps instead of large phone apps. Ever notice how sometimes you see an app screenshot in landscape mode having two panels for navigation and content but when you actually download it it only shows the content? Its because the tablet can only act as a huge phone in 2.2. Need 2.3 and ideally 4.0 in order to have proper tablet behaviour.
Hi guys!
Someone requested a tutorial on how to build the kernel source code, so I thought I might as well do it I'll give you a bit more information too.
Maybe this will kick start kernel development a little bit too. Who knows.
Anyway:
1. Set up your build environment as per this guide by AOSP here: http://source.android.com/source/initializing.html
This guide will be primarily aimed at Ubuntu, but it should be easy enough to do on other Linux PCs. Ubuntu is highly recommended. And don't ask about Windows.
2. Download the toolchains: http://code.google.com/p/rohan-kernel-evita/downloads/detail?name=toolchains.tar.gz&can=2
I've hosted both GCC 4.4 and GCC 4.6 (prebuilt) on my Google Code page. These are for Linux.
Download the toolchain package here: http://code.google.com/p/rohan-kernel-evita/downloads/detail?name=toolchains.tar.gz&can=2
Then un-tar the archive and extract it to your home folder so that the path to the toolchain directories are ~/toolchain/whatever-one-you-want
3. At this point you can decide which kernel source you want to download. There are really two sources.
The first choice is getting it from HTC Dev directly. This is good if you want to build your kernel for a Sense 4 ICS ROM. If you want to build for AOSP/JB, then scroll down below all the following HTC stuff.
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
To use HTC's source:
Go to HTCdev.com and make an account. Then download the source code for our device (I'd recommend the "One X" source under carrier "AT&T" version "2.20". Let the zip file download and extract it to your home folder (so the path is /home/user/evita-ics..../
To build HTC's source, run these commands:
Code:
cd ~/evita-ics-whatever_the_directory_is_named
export ARCH=arm
make elite_defconfig
Second command is saying what type of architecture we want (we are compiling for ARM processors, so we want ARM)
Third command is saying to make the default config for our device (whose hardware is codenamed "elite")
Then to build the actual kernel:
Code:
make -j# ARCH=arm CROSS_COMPILE=~/toolchain/arm-eabi-4.4.3/bin/arm-eabi-
In the command above, there is "-j#". Replace the "#" with the number of CPUs you have.
Ask me about it if you need help. That should be it! Let the build go and in a few minutes you should have a zImage file located at ~/evita-ics-..../arch/arm/boot. That is the actual kernel.
To test out the zImage (kernel), connect your device via fastboot mode and type:
Code:
fastboot boot /path/to/zImage
Combined with the ramdisk, thats what makes the boot.img file. Eventually if you want to distribute your kernel, you should use an installer that injects the zImage into the boot.img or combine the zImage with a ramdisk to make a boot.img. I can do a tutorial on that later on as well.
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
To get the "other" source:
This source is based off of HTC's source and includes other devices as well in it (the One S and Evo 4G LTE). Its good if you want to build JB AOSP kernels.
To download this kernel source do this:
Code:
mkdir ~/kernel
cd ~/kernel
git clone https://github.com/CyanogenMod/android_kernel_htc_msm8960.git -b android-msm-evita-3.0
This version also includes a number of optimizations and odd bug fixes present in the HTC version.
To build this second source, run these commands:
Code:
cd ~/kernel/android_kernel_htc_msm8960
export ARCH=arm
make elite_defconfig
Second command is saying what type of architecture we want (we are compiling for ARM processors, so we want ARM)
Third command is saying to make the default config for our device (whose hardware is codenamed "elite")
Then to build the actual kernel:
Code:
make -j# ARCH=arm CROSS_COMPILE=~/toolchain/arm-linux-androideabi-4.6/bin/arm-eabi-
In the command above, there is "-j#". Replace the "#" with the number of CPUs you have.
Ask me about it if you need help. That should be it! Let the build go and in a few minutes you should have a zImage file located at ~/evita-ics-..../arch/arm/boot. That is the actual kernel.
To test out the zImage (kernel), connect your device via fastboot mode and type:
Code:
fastboot boot /path/to/zImage
Combined with the ramdisk, thats what makes the boot.img file. Eventually if you want to distribute your kernel, you should use an installer that injects the zImage into the boot.img or combine the zImage with a ramdisk to make a boot.img. I can do a tutorial on that later on as well.
-----------------------------------------------------------------------------
The second option is also a bit better as it uses the 4.6 toolchain instead of GCC 4.4. HTC's source doesn't work with GCC 4.6 so it can't be used without changes that the second source has.
If you have any questions, feel free to post here, message me on twitter (@rohanXm), chat me on IRC (#HTC-One-XL) or PM me!
If this helped you, please consider hitting the donation link under my username on the left. Donations are never required but always appreciated.
Instead of downloading cm10 the readme inclided with the HTC source has directions for getting a tool chain which will compile the source.
Sent from my HTC One X using Tapatalk 2
Perfect. Now I just have to read.
Sent from my HTC One XL bumping it
rohan32 said:
Code:
repo init -u git://github.com/CyanogenMod/android.git -b jb
Click to expand...
Click to collapse
FYI, It looks like the branch name has changed. When I changed "jb" to "jellybean" the repo init command worked.
Rohan. You are one bad MF'er
Sent from my twin turbo'ed OneXL rocking rezound beats
rohan32 said:
2. You can either try to find a standalone package of the precompiled toolchain, or you are going to need to download a ROMs source. I'd recommend downloading a ROMs source since I've never found a good toolchain that worked for me. If you find one that works, post below
For now we will download CM10 since that seems like the defacto standard.
Click to expand...
Click to collapse
I downloaded the 2.20.502.7 kernel source and when I extracted it there was a file named evita_readme.txt which gave another, possibly more "official", location for downloading a toolchain:
--Please follow below command to download the official android toolchain: (arm-eabi-4.4.3)
git clone https://android.googlesource.com/platform/prebuilt
Click to expand...
Click to collapse
I just performed a build with this toolchain but got this error when I attempted to load zImage via fastboot:
c:\>fastboot flash boot zImage
sending 'boot' (5140 KB)...
OKAY [ 1.044s]
writing 'boot'...
FAILED (remote: image error! (BootMagic check fail))
finished. total time: 1.077s
Click to expand...
Click to collapse
I'm not sure if this is caused by the toolchain or if I screwed something up. Have you ever seen this error before?
EDIT: Ok I see what I did incorrectly. The zImage needs to be "Combined with the ramdisk". You wouldn't know how to perform this operation... would you?
denversc said:
I downloaded the 2.20.502.7 kernel source and when I extracted it there was a file named evita_readme.txt which gave another, possibly more "official", location for downloading a toolchain:
I just performed a build with this toolchain but got this error when I attempted to load zImage via fastboot:
I'm not sure if this is caused by the toolchain or if I screwed something up. Have you ever seen this error before?
EDIT: Ok I see what I did incorrectly. The zImage needs to be "Combined with the ramdisk". You wouldn't know how to perform this operation... would you?
Click to expand...
Click to collapse
You are trying to flash a zImage
To my knowledge, only booting zImages work on this device. For the time being just boot the zImage (use fastboot boot zImage)
I will make a tutorial on how to combine the zImage created with a ramdisk to make a boot.img when I get the chance
denversc said:
FYI, It looks like the branch name has changed. When I changed "jb" to "jellybean" the repo init command worked.
Click to expand...
Click to collapse
Oops, my bad! That was a mistake. AOKP uses -jb and CM uses -jellybean so I got them switched fixed now
Out of any device I've seen more people actually interested in helping and learning to help then any other community. I've watched noobs become less noobish.. I've watched skizz learn how to make themes. Hell I've learned 10 fold what I knew before this phone myself.
That is beautiful, and now such an informed, helpful post such as this.
Have great Sunday you guys! I think I might give this a shot!
Sent from my One X
I'll streamline this process in a bit, so that you don't need to download CM10
Edit: cleaned up post, now I'm uploading just the toolchains. Its a tar.gz archive, around 150mb. Much better than downloading the entire CM10 source
rohan32 said:
You are trying to flash a zImage. To my knowledge, only booting zImages work on this device. For the time being just boot the zImage (use fastboot boot zImage)
Click to expand...
Click to collapse
Thanks for your response, rohan. You are absolutely right: I was incorrectly attempting to flash zImage straight to the boot partition, and the error produced by flashboot was justified. I have since successfully "tested out" my compiled zImage by flashing it via "fastboot boot zImage" and it worked like a charm! I ported the modifications from sbryan's Blackout BeastMode kernel and I am now able to OC to 2106 MHz and UC to 192 MHz. It's been running solid for the past few hours at least
Of course, the kernel reverts back to the one stored in the boot partition after a reboot, and I want my shiny new kernel to "stick". I've done a bit of research on this topic and found some information about combining my zImage with a ramdisk into a "real" boot.img but have not yet been successful in creating a boot.img which does not bootloop after flashing it.
For example, I found an article on xda called Basic Kernel Kitchen for Minor Kernel Tweaking which points to a "kitchen sink" tool for creating a boot.img from a zImage and a ramdisk. My problem is that I don't know where to get or how to make a ramdisk. So I tried using the ramdisk from the boot.img of the ROM that I am currently running (CleanROM 4.5 DE) but just got into a bootloop. I've since been doing some yard work today so haven't gotten back to investigating further.
I also found another program named abootimg which can also produce a boot.img from a zImage abd a ramdisk, but when I tried it an error message about my zImage being "too big" was produced.
If it's not obvious yet, I am kind of fumbling around in the dark as compiling and deploying custom kernels is completely new to me! But this post was the most valuable resource I've come across in getting to this point. Thanks so much for writing it! I eagerly await your next article about creating the boot.img
---------- Post added at 06:05 PM ---------- Previous post was at 05:50 PM ----------
rohan32 said:
cleaned up post
Click to expand...
Click to collapse
Thanks for cleaning up the post rohan. I have a few follow-up questions/comments:
missing toolchains link -- the post says "Download the toolchains:" but there is no link to download anything... did you forget to paste the link?
official toolchain -- That's great that you uploaded the toolschains to save tonnes of bandwidth. The CM10 source was taking a VERY long time for me to grab. However, I imagine some people (like me) would prefer to get the toolchain from an "official" source. In the "evita_readme.txt" file of the kernel sources downloaded from HTC dev it instructs one to use the official sources from "git clone https://android.googlesource.com/platform/prebuilt". This is the toolchain that I used and it successfully built the zImage.
ko files -- I noticed in the ZIP file for Blackout BeastMode, in additional to installing the zImage it also puts a bunch of "ko" (kernel modules I believe) into the /system partition (eg. qce40.ko). Should I also be deploying .ko files from my build to the device?
Thanks!
denversc said:
Thanks for your response, rohan. You are absolutely right: I was incorrectly attempting to flash zImage straight to the boot partition, and the error produced by flashboot was justified. I have since successfully "tested out" my compiled zImage by flashing it via "fastboot boot zImage" and it worked like a charm! I ported the modifications from sbryan's Blackout BeastMode kernel and I am now able to OC to 2106 MHz and UC to 192 MHz. It's been running solid for the past few hours at least
Of course, the kernel reverts back to the one stored in the boot partition after a reboot, and I want my shiny new kernel to "stick". I've done a bit of research on this topic and found some information about combining my zImage with a ramdisk into a "real" boot.img but have not yet been successful in creating a boot.img which does not bootloop after flashing it.
For example, I found an article on xda called Basic Kernel Kitchen for Minor Kernel Tweaking which points to a "kitchen sink" tool for creating a boot.img from a zImage and a ramdisk. My problem is that I don't know where to get or how to make a ramdisk. So I tried using the ramdisk from the boot.img of the ROM that I am currently running (CleanROM 4.5 DE) but just got into a bootloop. I've since been doing some yard work today so haven't gotten back to investigating further.
I also found another program named abootimg which can also produce a boot.img from a zImage abd a ramdisk, but when I tried it an error message about my zImage being "too big" was produced.
If it's not obvious yet, I am kind of fumbling around in the dark as compiling and deploying custom kernels is completely new to me! But this post was the most valuable resource I've come across in getting to this point. Thanks so much for writing it! I eagerly await your next article about creating the boot.img
---------- Post added at 06:05 PM ---------- Previous post was at 05:50 PM ----------
Thanks for cleaning up the post rohan. I have a few follow-up questions/comments:
missing toolchains link -- the post says "Download the toolchains:" but there is no link to download anything... did you forget to paste the link?
official toolchain -- That's great that you uploaded the toolschains to save tonnes of bandwidth. The CM10 source was taking a VERY long time for me to grab. However, I imagine some people (like me) would prefer to get the toolchain from an "official" source. In the "evita_readme.txt" file of the kernel sources downloaded from HTC dev it instructs one to use the official sources from "git clone https://android.googlesource.com/platform/prebuilt". This is the toolchain that I used and it successfully built the zImage.
ko files -- I noticed in the ZIP file for Blackout BeastMode, in additional to installing the zImage it also puts a bunch of "ko" (kernel modules I believe) into the /system partition (eg. qce40.ko). Should I also be deploying .ko files from my build to the device?
Thanks!
Click to expand...
Click to collapse
Hey!
Sorry, set it to upload then got distracted Link posted
The reason why your boot.imgs bootloop is because there is a special ramdisk address that needs to be set when combining the ramdisk with the zImage, and most kitchens don't support this. You also need to set the address after setting the base value.
I will post a guide on how to make it a real boot.img whenever I get the chance.
I'm telling you people, Rohan is a BOSS. Most helpful dev I know.
Sent from my HTC One XL using xda app-developers app
rohan32 said:
Hey!
Sorry, set it to upload then got distracted Link posted
The reason why your boot.imgs bootloop is because there is a special ramdisk address that needs to be set when combining the ramdisk with the zImage, and most kitchens don't support this. You also need to set the address after setting the base value.
I will post a guide on how to make it a real boot.img whenever I get the chance.
Click to expand...
Click to collapse
I have the zImage thanks to your tutorial, but I want to know how to create the kernel zip, whenever you have time will be amazing if you can post a guide, I'm really looking forward to that guide, because i haven't been able to locate a guide that works
Sent from my HTC One XL using xda premium
rohan32 said:
Hi guys!
Second command is saying what type of architecture we want (we are compiling for ARM processors, so we want ARM)
Third command is saying to make the default config for our device (whose hardware is codenamed "elite")
Then to build the actual kernel:
Code:
make -j# ARCH=arm CROSS_COMPILE=~/toolchain/arm-linux-androideabi-4.6/bin/arm-eabi-
Click to expand...
Click to collapse
This is the correct make for "other source" kernel.
Code:
make -j# ARCH=arm CROSS_COMPILE=~/toolchain/arm-linux-androideabi-4.6/bin/[COLOR="Red"]arm-linux-androideabi-[/COLOR]
Can you make a tutorial on how to insert governors into a kernel?
Compiling problem
Hey man,
Please help me I followed your article but when I try copile with:
make -j2 ARCH=arm CROSS_COMPILE=~/toolchain/arm-eabi-4.4.3/bin/arm-eabi
I got something like this:
/home/martin/toolchain/arm-eabi-4.4.3/bin/../lib/gcc/arm-eabi/4.4.3/../../../../arm-eabi/bin/as: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory
Thanks
UPDATE:
now its work
I went deeper and install lib32z1 with "sudo apt-get install lib32z1"... now its work
My device repositories are not available on github, But I got device tree and vendor blobs by making changes in similar device repo. That reference device's kernel's lineageos_defconfig is situated in htc msm8974 kernel repo. So how can I get lineageos_defconfig for my device, and which other my device related kernel files(.dtsi or any other) I have to push in htc msm8974 repo and get those files to make things ready for build?
Please help......
Hi everyone,
I am trying to create a complete firmware (meaning OS + kernel) from scratch, for a rockchip device rk3066. I have done several things but there’s something stopping me now.
I have looked quite a lot around on the web, but finding relevant (and good quality) information is far from easy. I hope you can help me. At the same time, I want to share what I’ve done so far, hoping it can be useful for other people in a similar situation.
First, I have downloaded and compiled the OS source code as explained in the official Google guide. I followed instructions for my Linux machine (with Ubuntu 12.04LTS, 64bit). I downloaded Android version 4.2.
After compiling the sources, I have obtained my img files: userdata.img, system.img, ramdisk.img (their path is ~/target/product/generic). Of course, in the same path, I also have the system folder, which contains all of the system folders and files.
Second, in order to compile the kernel for rk3066 using the UG802/MK802III configuration.
Third, at last, I have created the boot image with abootimg, giving as input the compiled kernel and ramdisk.img.
I downloaded a tool from Rockchip: “Rockchip Batch Tool v1.5” for Windows to flash the device, and this is where I’m stacked.
The tool requires a single image and I do not know how to make a single image starting from the different compiled components (i.e. starting from boot.img, kernel.img, system.img, userdata.img e ramdisk.img and the system folder).
I have looked around for some guide or manual, but all I’ve found were tutorials on how to modify an already existing image.
I hope someone can help me, maybe point me in the right direction.
Thanks!
Hi guys,
I was working on this since some time and here it is
Please read FAQ first
FAQ :
Can I compile a MT6589 kernel for every phone ?
As you know, a MT6589 kernel won't fit in every MT6589 smartphone because of specific configs/files in the kernel source tree.
So, if you compile my kernel which is expected to work on a Faea F2S don't expect it to work on a Acer Liquid E3 for example.
Conclusion : You have to get the kernel source for your phone
How can I check my kernel source ?
Of course, this is not enough to see "source code for ZTE N986", you have to check if it's full or not and if it works.
Most people don't know what is working kernel source. You just have to read the GPL guidelines that every manufacturer have to complain with :
“ The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. ”
The part which has not to be included is the toolchain but there should reference to it (which toolchain to use)
For MT6589 kernel, the toolchains arm-eabi-4.6 and arm-linux-androideabi-4.6 should be used. (mtk used arm-linux-androideabi-4.6 for kernel but it should be arm-eabi-4.6)
So now you know which toolchain to grab and then for kernel source you have to check this minimal structure :
bionic
kernel
mediatek
build
config
custom
kernel
platformREADME
If I have kernel source, can I build it for my device ?
Erm... Sometimes the structure is here but the kernel source is messy... Why ?
Because you were not provided the matching source of the kernel used on your smartphone and the reasons are multiple (I won't give details).
So, the idea is to run a first build. If you get errors, then check the step above about toolchain and structure.
The next step for fixing errors is to play with source. Good luck for that.
What are the benefits of a custom kernel for MT6589 ?
First big benefit is to introduce kitkat compatibility because there was an issue on android binder driver in mtk kernel source.
Next benefit is to be able to remove some stuff from mtk which is useless on user side and waste ressources (a lot of debug for example).
Others benefits will be in optimizations or new features (see frandom for example)
HOWTO :
Build from my repo (specific devices supported) - It's not for compiling your kernel source but to understand how kernel build worksI explain how to build from my repo first because it can help you to understand how you should build kernel source
Prerequisites : A build environment (actually Ubuntu Saucy x64 with build-essentials, ccache, repo, java, perl v5.14+ and openssl) and I won't explain how to get one as there is multiple howto on the net.
For repo, the idea is to create a bin directory in your $HOME (usually /home/accountname/), copy repo binary inside it and then add this bin to $PATH var.
BE CAREFULL TO WHAT YOU DO WITH $PATH VAR ! I always see people doing :
Code:
export PATH=/home/foo/bin
this is erasing $PATH var, just check before and after with echo $PATH
So the idea is to introduce your path AFTER the actual $PATH var
This is easy...
Code:
export PATH=[COLOR="red"]$PATH:[/COLOR]/home/foo/bin
And of course, $PATH is reset once you close terminal and I won't explain how to set $PATH automatically.
Once you got this, everything should be working and it will be easy
Code:
mkdir workdir
cd workdir
repo init -u https://github.com/Dr-Shadow/android_kernel_mt6589_manifest.git -b master
repo sync
Then you should get this in your workdir :
kernel
manifest
mtk-tools
out
ramdisk
scripts
toolchainJust do :
Code:
cd kernel
./certificates.sh
./build.sh
./certificates.sh is needed only once (it's for signing flashable zip and it will setup some keys for it, just reply to questions and don't add passphrase)
And of course, the build.sh contains most things you need to know on steps for building kernel (which commands to use) and you need to know how it works Build from your own kernel source
I'm building the doc... I have to remind which vars need to be overriden
Reserved
Reserved #2
Thanks for making this thread brother it will help us to learn... Subscribed
Looking forward to the how-to to build with your own kernel source.
Dr-Shadow said:
Hi guys,
I was working on this since some time and here it is
Click to expand...
Click to collapse
Thank you Dr-Shadow! This is very cool. I'm going to try it out!
Great
It's always nice to see further development on MTK Based Devices.
Regards
I'll chip in and say thanks too. Finally getting around to trying to compile Alcatel's OneTouch Hero (aka TCL Y910) provided sources.
I might be in as well with A820, but I'm relatively new to Android and have only done porting of 4.1 and 4.2 so far.
Haven't built anything although I have some knowledge about the source code and SDK, which I've only used for reference purposes and the tools from it.
Will try to compile the stock kernel this weekend, but I'm not quite sure if something else is needed, even if the kernel source seems complete to me.
I'm a quick learner and have a lot of programming experience in other technologies, even thought I'm more of a front-end developer these days.