porting android one roms to another media tek devices - Android One (First-Generation) Cross-Device Genera

Hi i want to port android one (sprout) rom to another media tek based devices .Any help will be appreciated.

Hello Ab200000,
This is a lecagy boot.img, MTKIMG dont work on it because there is no MTK header at the begining of each bloc.
I will modify MTKIMG to handle this case but for tide you i manually unpack kernel and ramdisk.
In the next message i will explain you how i do
Hop this help you (Dont forgot to click on thank button )

To manually extract your boot.img this is how i do :
I use mtkimg to get the image layout
Code:
> mtkimg.exe info boot.img
MTKIMG V0.44(win64) by rom1nux
Image header :
Signature : ANDROID!
Kernel size : 4931048 bytes
Kernel load address : 0x80008000
Ramdisk size : 1075216 bytes
Ramdisk load address : 0x84000000
Second stage size : 0 bytes
Second stage load address : 0x80F00000
Tags address : 0x80000100
Page size : 2048 bytes
Product name : ''
Command line : ''
ID : 12FF85BE30433CB9FCDBF9C90DC5EE8BCBC70C04
Image layout :
Bloc Offset Pages Size (bytes)
------------------------------------------------
Header 0x00000000 1 2048
Kernel 0x00000800 2408 4931584
Ramdisk 0x004B4800 526 1077248
Free 0x005BB800 2185 4474880
------------------------------------------------
Total 5120 10485760
------------------------------------------------
With an hexadecimal editor i extract kernel from 0x800 to 0x4B4800 from boot.img
I check for valid kernel at offset 0x24 we need to find magic 0x18 0x28 0x6F 0x01, good it's a "Linux ARM zImage"
With an hexadecimal editor i extract ramdisk from 0x4B4800 to 0x5BB800 from boot.img
I check for valid gzip at offset 0x00 we need to find magic 0x1F 0x8B, good it's a cpio.gz
I try to extract the ramdisk, no error, well, all good
I will modify mtkimg soon as possible
Hope this help you
(Dont forget to click on thank button)

Thank you for this
rom1nux said:
To manually extract your boot.img this is how i do :
I use mtkimg to get the image layout
Code:
> mtkimg.exe info boot.img
MTKIMG V0.44(win64) by rom1nux
Image header :
Signature : ANDROID!
Kernel size : 4931048 bytes
Kernel load address : 0x80008000
Ramdisk size : 1075216 bytes
Ramdisk load address : 0x84000000
Second stage size : 0 bytes
Second stage load address : 0x80F00000
Tags address : 0x80000100
Page size : 2048 bytes
Product name : ''
Command line : ''
ID : 12FF85BE30433CB9FCDBF9C90DC5EE8BCBC70C04
Image layout :
Bloc Offset Pages Size (bytes)
------------------------------------------------
Header 0x00000000 1 2048
Kernel 0x00000800 2408 4931584
Ramdisk 0x004B4800 526 1077248
Free 0x005BB800 2185 4474880
------------------------------------------------
Total 5120 10485760
------------------------------------------------
With an hexadecimal editor i extract kernel from 0x800 to 0x4B4800 from boot.img
I check for valid kernel at offset 0x24 we need to find magic 0x18 0x28 0x6F 0x01, good it's a "Linux ARM zImage"
With an hexadecimal editor i extract ramdisk from 0x4B4800 to 0x5BB800 from boot.img
I check for valid gzip at offset 0x00 we need to find magic 0x1F 0x8B, good it's a cpio.gz
I try to extract the ramdisk, no error, well, all good
I will modify mtkimg soon as possible
Hope this help you
(Dont forget to click on thank button)
Click to expand...
Click to collapse
Thank you rom1nux
I appreciate the work you done on this mediatek boot.img . I hope i can port rom now without any problem.
Yes it will be helpful if you include this method in your future mtkimg tool. As it will increase the porting possibilities android one roms

Mtk 6582 KitKat 4.4.4 miui rom available ,is it possible to port for android one

android one uses
android one uses legacy boot.img
sheshank said:
Mtk 6582 KitKat 4.4.4 miui rom available ,is it possible to port for android one
Click to expand...
Click to collapse

@Ab20000
I guess you could also try AIK for unpacking stock boot.img. I was able to unpacked sprout recoveries without any issue

1cefire said:
@Ab20000
I guess you could also try AIK for unpacking stock boot.img. I was able to unpacked sprout recoveries without any issue
Click to expand...
Click to collapse
do you have any android one device? Does it have alarm function even when the phone is powered off? As other media tek phones have it.
I want to port android one rom to other mediatek based soc of mine. I am not sure what else i need to besides editing ramdisk, using device's original kernel , fixing updater script , original specific drivers and what else?

Ab20000 said:
do you have any android one device? Does it have alarm function even when the phone is powered off? As other media tek phones have it.
I want to port android one rom to other mediatek based soc of mine. I am not sure what else i need to besides editing ramdisk, using device's original kernel , fixing updater script , original specific drivers and what else?
Click to expand...
Click to collapse
yes, one of the sprout4 variant. I haven't had any chance to verify if the alarm function is working while powered off. Sorry dude, i wish i could help you, but my porting abilities is very limited Better ask ricky_adhitya, as i was saying, he was able to port RR 5.1.1 to other mtk6582 devices

I will contact him,
1cefire said:
yes, one of the sprout4 variant. I haven't had any chance to verify if the alarm function is working while powered off. Sorry dude, i wish i could help you, but my porting abilities is very limited Better ask ricky_adhitya, as i was saying, he was able to port RR 5.1.1 to other mtk6582 devices
Click to expand...
Click to collapse

Thanks for the boot.img method, did anyone succed to make it work ? (Ex with CM12.1 port from Spout)
I'll try this when im at home.
I usually use this tutorial for porting LL : http://mtkromsxda.blogspot.fi/2015/08/how-to-port-cm12cm121-lollipop-based.html
But i just found this !! : http://techintact.com/how-to-port-cm-12-1-for-mt6582-from-android-one/
Ill try them when im home

Ab20000 said:
Hi i want to port android one (sprout) rom to another media tek based devices .Any help will be appreciated.
Click to expand...
Click to collapse
Can you help me to port Android one marshmallow update to port into mt6582 running Lollipop based phone using kernel 3. 10. x? please email me at [email protected]

Related

[DEV] LG P500 Sourcecode Release!

http://www.lg.com/global/support/opensource/opensource-detail.jsp
type LGP500
This will go nicely with the Gingerbread 2.3 SDK just released... I am done deving for the night though... too much of a headache.
Correct link is:
http://www.lg.com/global/support/opensource/opensource-detail.jsp?detailCustomerModelCode=LGP500
this is an original rom who can be flashed on phone?
What is the password of the zip file? thanks
fsangio said:
What is the password of the zip file? thanks
Click to expand...
Click to collapse
No pass and it's *.tar
Build instructions :
1. Android buid
- Download original android source code (froyo) from http://source.android.com
- Untar opensource packages of Thunder_Froyo.tar.gz into downloaded android source directory
- And, merge the source into the android source code(froyo)
- Run following scripts to build android
a) . ./build/envsetup.sh
b) choosecombo 1 1 generic 3
c) make -j4
- When you compile the android source code, you have to add google original prebuilt source(toolchain)
into the android folder
- After build, you can find output at out/target/product/generic
2. Kernel Build
- Untar using follwwing command at the android folder
tar zxvf Thunderg_Kernel.tar.gz
- cd Kernel
- make thunderg-perf_defconfig
- make zImage -j4
3. After Build, You Can find the build image at arch/arm/boot
4. Compile environment
- gcc 4.4.1
- Ubuntu 9.10
Click to expand...
Click to collapse
Has anybody been able to build it successfully ???
I've tried it (following the README steps)...but it does not built.
Here I paste a chunk of the prompted errors:
Code:
target thumb C: liblgdrmwbxml <= device/lge/cappucino/modules/liblgdrm/WBXmllib/wbxml_tree_clb_wbxml.c
target thumb C: liblgdrmwbxml <= device/lge/cappucino/modules/liblgdrm/WBXmllib/wbxml_tree_clb_xml.c
make: *** No rule to make target `out/target/product/generic/obj/STATIC_LIBRARIES/liblgdrmexpat_intermediates/liblgdrmexpat.a', needed by `out/target/product/generic/obj/SHARED_LIBRARIES/liblgdrmwbxml_intermediates/LINKED/liblgdrmwbxml.so'. Stop.
make: *** Waiting for unfinished jobs....
target thumb C: liblgdrmport <= device/lge/cappucino/modules/liblgdrm/Adapt/Source/DRM_Port_Linux.c
device/lge/cappucino/modules/liblgdrm/Adapt/Source/DRM_Port_Linux.c: In function 'drmLibFsOpen':
device/lge/cappucino/modules/liblgdrm/Adapt/Source/DRM_Port_Linux.c:2108: error: 'AID_LGDRM' undeclared (first use in this function)
device/lge/cappucino/modules/liblgdrm/Adapt/Source/DRM_Port_Linux.c:2108: error: (Each undeclared identifier is reported only once
device/lge/cappucino/modules/liblgdrm/Adapt/Source/DRM_Port_Linux.c:2108: error: for each function it appears in.)
device/lge/cappucino/modules/liblgdrm/Adapt/Source/DRM_Port_Linux.c:2108: error: 'AID_LGDRM_ACC' undeclared (first use in this function)
device/lge/cappucino/modules/liblgdrm/Adapt/Source/DRM_Port_Linux.c: In function 'drmLibFsCreateDir':
device/lge/cappucino/modules/liblgdrm/Adapt/Source/DRM_Port_Linux.c:2861: error: 'AID_LGDRM' undeclared (first use in this function)
device/lge/cappucino/modules/liblgdrm/Adapt/Source/DRM_Port_Linux.c:2861: error: 'AID_LGDRM_ACC' undeclared (first use in this function)
make: *** [out/target/product/generic/obj/STATIC_LIBRARIES/liblgdrmport_intermediates/Adapt/Source/DRM_Port_Linux.o] Error 1
[email protected]:~/droidP509$
My environment is:
- java -version : java version "1.5.0_19" (I've tried with java 1.6 and it doesn't built either)
- gcc --version: gcc (Ubuntu/Linaro 4.4.4-14ubuntu5) 4.4.5
- Ubuntu 10.10 (64 bits)
Any suggestion??? What could be failing?? I'm completely stuck :/
Note: I'm able to build the straight android code (without the P500/9 patch)
Thanks in advanced!!
Hello,
How can I merge lg source with google source?
Sorry,
how can I apply lg patch to android source code?
I have downloaded the source with repo
repo init -u git://android.git.kernel.org/platform/manifest.git
repo init -u git://android.git.kernel.org/platform/manifest.git -b froyo
and now? How can I merge lg patch with android froyo source?
I have the source code for p509. how do I install it?
maybe we can resolve the cpu lag when the touch screen is pressed?
cozydroid said:
Any suggestion??? What could be failing?? I'm completely stuck :/
Click to expand...
Click to collapse
It failed to build liblgdrmwbxml because liblgdrmexpat.a is missing. You can either ask LG for liblgdrmexpat.a or grab a copy of liblgdrmwbxml.so from your phone (it's in /system/lib/).
jtaylor63 said:
It failed to build liblgdrmwbxml because liblgdrmexpat.a is missing. You can either ask LG for liblgdrmexpat.a or grab a copy of liblgdrmwbxml.so from your phone (it's in /system/lib/).
Click to expand...
Click to collapse
and after that what should i do to make the whole think compile ?
jtaylor63 said:
It failed to build liblgdrmwbxml because liblgdrmexpat.a is missing. You can either ask LG for liblgdrmexpat.a or grab a copy of liblgdrmwbxml.so from your phone (it's in /system/lib/).
Click to expand...
Click to collapse
and after that what should i do to make the whole think build ?
Januka said:
and after that what should i do to make the whole think build ?
Click to expand...
Click to collapse
. ./build/envsetup.sh
choosecombo 1 1 generic 3
make -j4
irondevil said:
. ./build/envsetup.sh
choosecombo 1 1 generic 3
make -j4
Click to expand...
Click to collapse
this i know, but i mean what shall i do with liblgdrmwbxml.so
I already built the source without the lg code, how can i build it also after merging it?
p500 2.2.2 sources?
DookMatt said:
p500 2.2.2 sources?
Click to expand...
Click to collapse
froyo 2.2 sources but i think there aren't many differents
irondevil said:
froyo 2.2 sources but i think there aren't many differents
Click to expand...
Click to collapse
2.2 kernel and 2.2.2 kernel are different!

S5PV210/S5PC110 Development Board

Hey Guys.
Does someone own such a Development Board?
We need uBoot sources from someone who's owning this board.
http://www.armdesigner.com/KIT S5PV210.html
You might want to send miki4242 a PM, it seems he's got a S5PC110 dev board:
- I received my Odroid-T (S5PC110 based) development board, which will hopefully help with testing and debugging kernels.
Click to expand...
Click to collapse
http://forum.xda-developers.com/showpost.php?p=8807712&postcount=75
While it's not the exact same dev kit, they might have (some of) the same sources delivered with it. It's worth a shot.
Samsung S5PV210 1.0G Mhz
with flash memory 8G
DDR2 512MB
Support 32GB Micro SD
Wifi 802.11 b/g
8" TFT LCD
Camera
HDMI output
USD 220
email : [email protected]
samsung s5pv210 board
Hello
you can also see Embest Devkit7000 samsung s5pv210 board, the board comes with Android 2.3 source code
_com.odroid.com/sigong/nf_file_board/nfile_board.php?kind=download&kernel=&page=
Here you can download the sources of kernel, android (2.2 - 2.3) and u-boot.
There are also instructions of compiling:
_dev.odroid.com/projects/odroid-t/wiki/KernelPage
_dev.odroid.com/projects/odroid-t/wiki/AndroidPage
OFFTOP: I've successfully builded, but I'm too scary to try it on real device, which seems pretty similar to reference (Dropad A8X).
I'm willing to try if someone has built it? Lemme know
xxxXxFeLiXxXxxx said:
_com.odroid.com/sigong/nf_file_board/nfile_board.php?kind=download&kernel=&page=
Here you can download the sources of kernel, android (2.2 - 2.3) and u-boot.
There are also instructions of compiling:
_dev.odroid.com/projects/odroid-t/wiki/KernelPage
_dev.odroid.com/projects/odroid-t/wiki/AndroidPage
OFFTOP: I've successfully builded, but I'm too scary to try it on real device, which seems pretty similar to reference (Dropad A8X).
Click to expand...
Click to collapse
Sent from my SGH-I897 using XDA App
codeworkx said:
Hey Guys.
Does someone own such a Development Board?
We need uBoot sources from someone who's owning this board.
http://www.armdesigner.com/KIT S5PV210.html
Click to expand...
Click to collapse
Hi,
See attached u-boot which works on this: http://www.wvshare.com/product/x210ii-Package-C.htm
Its basically a S5PV210 development board.
And another one which was on dvd... the previous one came from some chinese website to make it boot from SD (i think, not sure since i have not gotten anything to work yet!)
http://www.mediafire.com/?29bm4y7nzv7uddz
Does anybody got working sources for uboot movinand of x210ii-Package-C board ?
Seller disk contains configs only for nand and sd. There is mkmovi script in the root folder of uboot. But it's seems not working.
Could anybody say which configs I should change to make the board booting from movinand?
So, nobody know...
The solution was found by experiment way.
We should change u-boot configs.
Firstly one should add some strings to Makefile of u-boot.
Code:
x210_inand_config : unconfig
@$(MKCONFIG) $(@:_config=) arm s5pc11x x210 samsung s5pc110
@echo "TEXT_BASE = 0x23e00000" > $(obj)board/samsung/x210/config.mk
Then new file x210_inand.h must be created. Copy content of the x210_sd.h and put it into our x210_inand.h.
And make changes:
Code:
#define MEMORY_BASE_ADDRESS 0x30000000
//#define MEMORY_BASE_ADDRESS 0x20000000
#define MEMORY_BASE_ADDRESS2 0x40000000
Code:
//#define CONFIG_BOOTCOMMAND "movi read kernel 20008000; movi read rootfs 30B00000 300000; bootm 20008000 30B00000"
#define CONFIG_BOOTCOMMAND "movi read kernel 30008000; movi read rootfs 30B00000 300000; bootm 30008000 30B00000"
Terminal commands to build u-boot:
Code:
make x210_inand_config && make
Now the board is boot from inand.

[HOWTO] Increase available RAM in ROMs based on "That kernel" and "Those libs"

[HOWTO] Increase available RAM in ROMs based on "That kernel" and "Those libs"
Most Atrix users using ROMs with "That kernel" and "Those libs" are stuck with 778MB or 784MB of available RAM (even after applying the ramfix for international Atrix users), but a few users are reporting getting around 855MB of RAM available on their phones. After a quick comparison of the /proc/cmdline on these phones (and since having more RAM can't hurt), here's a guide how to increase your available RAM on these ROMs. This guide is intended for people who have 778-784MB available on their phone when using ROMs based on "That kernel" and "Those libs" with the original ramfix. DO NOT USE ON OTHER ROMS!
WARNING: STOP NOW AND DO NOT FLASH IF YOU DON'T KNOW WHAT YOU'RE DOING!!!
PLEASE READ AND UNDERSTAND EVERYTHING BEFORE YOU DO ANYTHING!
I have personally tested this with Somebody's CM10 and AtrICS v2.
It should theoretically work with other ROMs based on "That kernel" and "Those libs", but use it at your own risk!
Now, on to the good part:
1. Get your current /proc/cmdline.
You can do this by using terminal emulator and typing:
su
cat /proc/cmdline
Click to expand...
Click to collapse
or by using a root browser and copy your /proc/cmdline to your sdcard.
A note from NFHimself:
NFHimself said:
Hi,
Please emphasize that the script needs YOUR complete /proc.cmdline in there, from a working phone adb session, not recovery adb session as the recovery has it's own possible /proc/cmdline via a different kernel, etc. You are not just editing the mem=?? stuff.
What would be best is to first create a zip that is plain jane what your /proc/cmdline is or one that uses setcmdline with a blank argument or "". That way you can reset to default in case of errors. Or you can just fastboot flash your boot partition, no need for an sbf.
Cheers!
Click to expand...
Click to collapse
2. Download attached file.
3. Edit the updater-script file in the zip.
Extract the zip and find META-INF\com\google\android\updater-script
Windows users: Edit the file using Notepad. DO NOT USE WORDPAD. WordPad changes the Unix-style CR to Windows style CR-LF, which may cause problems.
Once you open the file, find this in the file:
run_program("/tmp/setcmdline", "[email protected] [email protected] [email protected] vmalloc=256M video=tegrafb console=null usbcore.old_scheme_first=1 tegraboot=sdmmc tegrapart=mbr:d00:100:800,kpanic:2100:400:800 security=tomoyo mot_prod=1 androidboot.serialno=XXXXX00000");
Click to expand...
Click to collapse
Change the red part with your own cmdline, which you got in step 1. Take care especially on the tegrapart and androidboot.serialno parameters. DO NOT USE A TEGRAPART AND/OR SERIAL NUMBER FROM ANOTHER PHONE!
If your original cmdline that you got in step one was:
[email protected] [email protected] [email protected] vmalloc=320M video=tegrafb console=null usbcore.old_scheme_first=1 tegraboot=sdmmc tegrapart=mbr:1100:100:800,kpanic:2500:400:800 security=tomoyo mot_prod=1 androidboot.serialno=12345ABCDE
Click to expand...
Click to collapse
then you should modify the part of the updater-script mentioned above to look like this:
run_program("/tmp/setcmdline", "[email protected] [email protected] [email protected] vmalloc=256M video=tegrafb console=null usbcore.old_scheme_first=1 tegraboot=sdmmc tegrapart=mbr:1100:100:800,kpanic:2500:400:800 security=tomoyo mot_prod=1 androidboot.serialno=12345ABCDE"
Click to expand...
Click to collapse
Only the change the red part in the script with the red part in your original cmdline. DO NOT MODIFY ANYTHING ELSE!
4. Save the file, and repack the zip.
5. Flash zip.
6. You should now have 855MB of RAM available. Enjoy your extra 70+MB of RAM.
WARNING: DO NOT FLASH IF YOU DON'T KNOW WHAT YOU'RE DOING!!!
I AM NOT RESPONSIBLE FOR ANYTHING THAT GOES WRONG BECAUSE OF YOU BORKING YOUR CMDLINE!!!
Thanks to: NFHimself for creating the ramfix binary and Ilkinansr92 for his cmdline.
Thanks!!! I will givi it a try.
Edit: Working just fine....thanks again!
from the (m)ATRIX...
Thanks!
Now i have 855mb of RAM available
I have 815mb of ram available and i am using Nottachtrix Rom, i am going to try this method in 2 mins and i will give feedback..
Edit:
it gives me error which number 6 (my rom is working, no problem). i know nottachtirx is not based on that kernel but i had wanted to try it whether work or not.
ramanujan20 said:
I have 815mb of ram available and i am using Nottachtrix Rom, i am going to try this method in 2 mins and i will give feedback..
Edit:
it gives me error which number 6 (my rom is working, no problem). i know nottachtirx is not based on that kernel but i had wanted to try it whether work or not.
Click to expand...
Click to collapse
I got that error too....on JB...but that was because I was doing something wrong.
But I think this is for JB...
Cocolopes said:
I got that error too....on JB...but that was because I was doing something wrong.
But I think this is for JB...
Click to expand...
Click to collapse
are you using something related to "that rom"? (kernel, libs, rom)
jhonnyx said:
are you using something related to "that rom"? (kernel, libs, rom)
Click to expand...
Click to collapse
No...someones Cm10 here...but now is working...I just replace the update script in the zip...and work perfect
from the (m)ATRIX...
successful
oh yeah~
now i have 855mb ram now!
i found that you can copy the file /proc/cmdline to computer,and select the words you need
in this way,you can do it more simple and more safe!
Well. 855 MB RAM. I am using CM10 with that libs.
Thank a lot.
Cocolopes said:
No...someones Cm10 here...but now is working...I just replace the update script in the zip...and work perfect
from the (m)ATRIX...
Click to expand...
Click to collapse
Well, "Somebody's" CM10 IS using the kernel & libs from "That ROM", so I'd say it's very much related.
Can anybody help me i don't even have 500 mb in manage apps - running apps section
International user and using MRom
Sent from Otterbox Atrix 4G Rockz
ranjithkumar1201 said:
Can anybody help me i don't even have 500 mb in manage apps - running apps section
International user and using MRom
Sent from Otterbox Atrix 4G Rockz
Click to expand...
Click to collapse
Have you applied the ramfix? If not download this and apply it and it will fix that problem:
http://forum.xda-developers.com/attachment.php?attachmentid=710806&d=1315237274
Perfect. Thanks !
I hope the OP doesn't mind...
Here's my take on this. I took the source of the cmdline utility and improved it greatly, now it's almost a full-featured kernel cmdline editor. Then I used this new utility in the update script to dynamically edit the system cmdline.
Bottom line: this ZIP should work on all systems without any modifications.
WARNING: not fully tested, use at your own risk!
(If anything goes wrong, it should be easily revertable simply by reflashing the kernel, either from recovery or via fastboot.)
EDIT: added a couple more options, recompiled the cmdline binary and repackaged the ZIP.
ravilov said:
I hope the OP doesn't mind...
Here's my take on this. I took the source of the cmdline utility and improved it greatly, now it's almost a full-featured kernel cmdline editor. Then I used this new utility in the update script to dynamically edit the system cmdline.
Bottom line: this ZIP should work on all systems without any modifications.
WARNING: not fully tested, use at your own risk!
(If anything goes wrong, it should be easily revertable simply by reflashing the kernel, either from recovery or via fastboot.)
EDIT: added a couple more options, recompiled the cmdline binary and repackaged the ZIP.
Click to expand...
Click to collapse
Works beautifully on someone's cm10! Big thanks.
Sent from my MB860
ravilov said:
I hope the OP doesn't mind...
Here's my take on this. I took the source of the cmdline utility and improved it greatly, now it's almost a full-featured kernel cmdline editor. Then I used this new utility in the update script to dynamically edit the system cmdline.
Bottom line: this ZIP should work on all systems without any modifications.
WARNING: not fully tested, use at your own risk!
(If anything goes wrong, it should be easily revertable simply by reflashing the kernel, either from recovery or via fastboot.)
EDIT: added a couple more options, recompiled the cmdline binary and repackaged the ZIP.
Click to expand...
Click to collapse
sorry for ask but i don't get it this is a script to modify the cmdline or is an auto modify tool for the cmdline?
Maibol said:
sorry for ask but i don't get it this is a script to modify the cmdline or is an auto modify tool for the cmdline?
Click to expand...
Click to collapse
Both actually.
It includes a tool that can modify the cmdline, and a script that does modify the cmdline automatically, by utilizing the tool.
ravilov said:
Both actually.
It includes a tool that can modify the cmdline, and a script that does modify the cmdline automatically, by utilizing the tool.
Click to expand...
Click to collapse
thanks nice tool i gon give it a try
Why so some Atrixes have 815 MB RAM and some others 879 MB ?
And ravilov, does your script work on gingerbread ROMs, too?
Sent from my CM7 powered Atrix using TapaTalk \o/
the.cybot said:
And ravilov, does your script work on gingerbread ROMs, too?
Click to expand...
Click to collapse
Actually, I'm not sure. It doesn't seem to work for me. The boot image gets updated correctly but for some reason the new cmdline is not used when the kernel boots. I'm using MROM, latest release. Maybe it works different on another ROM. Maybe this whole cmdline business is specific to stock kernels only. Needs more research.

[HELP][DEV]Making kernel from source

I was trying to compile the kernel from source (cm12.1 kernel) using doomlords 4.7 toolchain.
I was able to get the zImage but during the building process saw the following 3 errors:-
Code:
/home/user/arm-linux-androideabi-4.7/bin/arm-linux-androideabi-ld: warning: unwinding may not work because EXIDX input section 25 of arch/arm/common/built-in.o is not in EXIDX output section
/home/user/arm-linux-androideabi-4.7/bin/arm-linux-androideabi-ld: warning: unwinding may not work because EXIDX input section 99 of arch/arm/mach-msm/built-in.o is not in EXIDX output section
/home/user/arm-linux-androideabi-4.7/bin/arm-linux-androideabi-ld: warning: unwinding may not work because EXIDX input section 955 of kernel/built-in.o is not in EXIDX output section
/home/user/arm-linux-androideabi-4.7/bin/arm-linux-androideabi-ld: warning: unwinding may not work because EXIDX input section 1121 of fs/built-in.o is not in EXIDX output section
/home/user/arm-linux-androideabi-4.7/bin/arm-linux-androideabi-ld: warning: unwinding may not work because EXIDX input section 57 of crypto/built-in.o is not in EXIDX output section
/home/user/arm-linux-androideabi-4.7/bin/arm-linux-androideabi-ld: warning: unwinding may not work because EXIDX input section 402 of block/built-in.o is not in EXIDX output section
/home/user/arm-linux-androideabi-4.7/bin/arm-linux-androideabi-ld: warning: unwinding may not work because EXIDX input section 284 of lib/built-in.o is not in EXIDX output section
/home/user/arm-linux-androideabi-4.7/bin/arm-linux-androideabi-ld: warning: unwinding may not work because EXIDX input section 77 of drivers/built-in.o is not in EXIDX output section
/home/user/arm-linux-androideabi-4.7/bin/arm-linux-androideabi-ld: warning: unwinding may not work because EXIDX input section 11 of sound/built-in.o is not in EXIDX output section
/home/user/arm-linux-androideabi-4.7/bin/arm-linux-androideabi-ld: warning: unwinding may not work because EXIDX input section 859 of net/built-in.o is not in EXIDX output section
Code:
arch/arm/kernel/return_address.c:62:2: warning: #warning "TODO: return_address should use unwind tables" [-Wcpp]
Code:
defined(@array) is deprecated at kernel/timeconst.pl line 373.
(Maybe you should just omit the defined()?)
I tried cleaning and mrproper but same errors kept propping!
Please if anyone can help do post and will it be safe to use the zImage for further steps(building kernel.elf)
Thanks in advance
Anyone??? @Furrydaus @Mrcl1450 @Tomoms
Sent from my Xperia SP using XDA Free mobile app
[==)BULLET(==] said:
Anyone??? @Furrydaus @Mrcl1450 @Tomoms
Sent from my Xperia SP using XDA Free mobile app
Click to expand...
Click to collapse
Try to build with a different toolchain, maybe.
The kernel isn't modified for the Toolchain. Try looking at DoomKernel sources to see how he modifies it to work with his tool chain
Mrcl1450 said:
Try to build with a different toolchain, maybe.
Click to expand...
Click to collapse
Any recommended toolchain?
Sent from my Xperia SP using XDA Free mobile app
[==)BULLET(==] said:
Any recommended toolchain?
Sent from my Xperia SP using XDA Free mobile app
Click to expand...
Click to collapse
Since is for xsp try to search for a Krait Optimized one like linaro.
I use Linaro toolchain based on GCC 4.9 (the latest version): http://www.google.it/url?sa=t&rct=j...7XDpqF255c0-mytVQ&sig2=kgiWuzjIcEATdjeDiUenBw
Before building I run export ARCH=arm, export CROSS_COMPILE=/path/to/toolchain/toolchainprefix- and then I start editing the kernel configuration.
GCC 4.7 & its toolchains are outdated bro!
Tomoms said:
I use Linaro toolchain based on GCC 4.9 (the latest version): http://www.google.it/url?sa=t&rct=j...7XDpqF255c0-mytVQ&sig2=kgiWuzjIcEATdjeDiUenBw
Before building I run export ARCH=arm, export CROSS_COMPILE=/path/to/toolchain/toolchainprefix- and then I start editing the kernel configuration.
GCC 4.7 & its toolchains are outdated bro!
Click to expand...
Click to collapse
Thanks finally got the zImage.
Any good guides for the following?
1: converting to elf
2. Converting elf into flashable zip
3. Adding and changing recoveries
4. Adding features to kernel
Sent from my Xperia SP using XDA Free mobile app
[==)BULLET(==] said:
Thanks finally got the zImage.
Any good guides for the following?
1: converting to elf
2. Converting elf into flashable zip
3. Adding and changing recoveries
4. Adding features to kernel
Sent from my Xperia SP using XDA Free mobile app
Click to expand...
Click to collapse
1. Converting to elf: download Tangerine kernel or the zip of any Lollipop ROM. Then extract the boot.img/tangerine.elf from the zip andrename it to boot.elf and unpack it w/ FlashTool. You will find 4 files. Delete the kernel Image and leave only ramdisk, bootcmd and bin files. Download this script: https://github.com/DooMLoRD/build_tools/blob/master/msm8960t_viskan/mkelf.py
Then place it into a directory together with the three files mentioned above + the zImage. Then run this command
Code:
python mkelf.py -o kernel.elf [email protected] [email protected],ramdisk [email protected],rpm [email protected],cmdline
don't forget to change the filenames in the command to match the real names.
2. Download Tangerine kernel zip, open the zip and delete tangerine.elf. Then go to the updater-script file, change the name of the file the script will flash from tangerine.elf to your_kernel_name.elf and edit the messages that will be displayed on the screen.
3. Unpack the ramdisk with some ramdisk unpack/repack scripts you will find on XDA. Then delete ramdisk-recovery.cpio and replace it with a cpio archive of any recovery you want (you can extract the cpio's from XZDR - rename the recovery to ramdisk-recovery.cpio).
4. To add features to the kernel you need to import them from a repository of another kernel for another device. Git will help you. Then when you will run make oldconfig it will ask to activate the new features. Anyway, you can run make menuconfig/xconfig/gconfig depending on your favorite GUI to enable disable built-in and new features whenever you want.
A good read: http://forum.xda-developers.com/android/software/ultimate-guide-compile-android-kernel-t2871276
Hey !
I worked today on two decompiling / recompiling scripts for the boot.img from CM12.1 ROMs,
here's what it does (running under Ubuntu 15.04) :
[ boot.img-Decompile.sh ]
- Extract the boot.img
- Extract the ramdisk.img
- Extract the ramdisk.cpio
- Extract the ramdisk.recovery.cpio
- Export the logo.rle to logo.png
[ boot.img-Compile.sh ]
- Rebuild the logo.rle
- Rebuild the cpios
- Rebuild the ramdisk.img
- Rebuild the boot.img
It worked just now to replace the boot logo with one I made (Sony make.believe and Powered by Android)
and an other change in the init.target.rc files.
You can find and test it here : http://adriandc.comeze.com/xperiaspbootimg.html

Arch Linux running natively on Pixel C

Hi Guys, i'm there again,
https://www.youtube.com/watch?v=WQMGkCT9yy0&t=6s
On some free time, i could have run Archlinux natively on Pixel C,
Here are my instructions to play a bit with your device in order to have it working on your device too !
First some warnings :
- You have no warrantly it will work on your device, maybe it can break your device
- This is in a prealpha state, reserved for developpers :
- Wifi is not working, you will have to have an OTG adapter and an USB ethernet card in order to be connected
- GPU is not working (so yes the UI is very slow, consequence of the great resolution of the screen)
- DRM drivers of the google kernel are bugged as hell, for example the cursor won't be visible on the screen if you use an USB mouse.
- No sound
Working things :
- boot
- Touchscreen
- Display
- Gnome Desktop (but quite slow due to no harware acceleration)
How to make this work (Developpers only):
- Format your Data partition on your Pixel C in order to disable the default encryption of Data partition.
USE WITH CAUTION !
Code:
fastboot format userdata
- Install a stock kernel on your pixel C that disable forced data encryption, otherwise as soon as you will reboot to android, you will have to format your data partition again ! (you can flash superSu that will modify your stock kernel and will do that for you)
- Download the rootfs here : https://drive.google.com/open?id=0BzWwMqZZvtXSTDhZWTA0RUhrTjg
- Untar the rootfs in your data partition in /data (so that the directories bin,etc... are in /data/Arch). You can use TWRP and a comandline for this (tar -xzpvf Arch.tar.gz )
- Download the kernel here : https://drive.google.com/open?id=0BzWwMqZZvtXScUsyYXBwaXpoRm8
Now enter fastboot mode and run :
Code:
fastboot boot boot_Data.img
if you want to flash it on your boot partition :
DO THIS WITH CAUTION !
Code:
fastboot flash boot boot_Data.img
Your Arch sytem will boot
user : alarm
password :alarm
Note that a sshd deamon is running and accessible on the network !
Good luck !
If you're happy of this work and you want to have more detailed instructions please pay me a beer ! Because developing for Pixel C is time consuming
http://paypal.me/MathieuTournier
Reserved
Download links are now available
Great work Samt434!!!!
Finally a desktop linux distro for our beloved pixel c.
:Q______
Wow, this is amazing! I'm interested in the modifications to 'stock' Arch you did to achieve this. Is it running a modified recent Arch kernel or what? Great work!
Arch linux domining the world! <3
GREAT JOB!!!
clixer said:
Wow, this is amazing! I'm interested in the modifications to 'stock' Arch you did to achieve this. Is it running a modified recent Arch kernel or what? Great work!
Click to expand...
Click to collapse
From the video I can see he runs "alarm" (Arch Linux Arm)
I'm not a Pixel C owner, but as an Arch Linux user, i find this news great
Does bluetooth works?
If they can get ubuntu running natively I'm in
Did you compile the kernel yourself? How did you figure out what modules to include? Do you have a (menu)config file you could share?
This is incredible, wondering how hard it is to repeat on other tablets/devices
This is great
I wish someone could port it for HP Slate 21
@Samt434 interesting, can you go into more detail about how you built the data partition image?
@Samt434 , hi Archlinux friend
Really good job
I have a similar project for Xperia S with working GPU acceleration. Maybe we can share some stuff. I already pushed some package like libhybris into AUR.
https://forum.xda-developers.com/xp...om-archlinux-phone-gnu-linux-android-t3398769
H0lmEd said:
Did you compile the kernel yourself? How did you figure out what modules to include? Do you have a (menu)config file you could share?
This is incredible, wondering how hard it is to repeat on other tablets/devices
Click to expand...
Click to collapse
Yes I will share more details soon !
The current state is not usable yet, but I know it's possible to run a mainline kernel on this device (thanks to Nvidia guys ). There is still a lot of work to do and I am very busy too with other projects I hope my work will give ideas to some Linux kernel developpers so that they can help us to have mainline kernel running on Pixel C more quickly.
Not sure the hybris approach can work here as Pixel C is using nouveau and tegra DRM + Nvidia blob for GPU acceleration.
I will share some code soon so that people can contribute.
Pixel C has great hardware, and we are approaching to run something on it that will be able to benefit of all its capabilities.
Beware that I cannot garranty any improvements as I'm doing this on my free time,
Stay stunned !
Samt434
Bray90820 said:
If they can get ubuntu running natively I'm in
Click to expand...
Click to collapse
Well.... I supposed if we run something like Ubuntu's netinstaller initrd http://ports.ubuntu.com/dists/zesty...urrent/images/netboot/ubuntu-installer/arm64/ on boot.img then we can install it and run it natively with some few more manual modification to boot.img, I've done these on raspberry pi and it worked perfectly well
Just as long as you don't delete all the partition, install / to /system
Teltarif.de a German website about telecommunication published an article: Pixel C: Richtiges Linux statt Android
Guys i have some good news about this project,
I could finally boot and run Arch on a mainline kernel (4.9) on the pixel C. (Yeah !)
Unfortunatly, DRM is not initialising correctly yet... so no display yet with the 4.9 kernel...
[ 3.622872] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[ 3.629493] [drm] No driver support for vblank timestamp query.
[ 3.635453] drm drm: failed to allocate buffer of size 18432000
[ 3.641375] drm drm: failed to set initial configuration: -12
It seems there is still some work to do to initialise the display correctly,
but I think we will have soon Arch with GPU accelerated UI soon
Samt434
Thanks for your efforts and the time you dedicate to this! I've been dreaming with something like this since I decided to buy this tablet! Keep it up!
Samt434 said:
Guys i have some good news about this project,
I could finally boot and run Arch on a mainline kernel (4.9) on the pixel C. (Yeah !)
Unfortunatly, DRM is not initialising correctly yet... so no display yet with the 4.9 kernel...
[ 3.622872] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[ 3.629493] [drm] No driver support for vblank timestamp query.
[ 3.635453] drm drm: failed to allocate buffer of size 18432000
[ 3.641375] drm drm: failed to set initial configuration: -12
It seems there is still some work to do to initialise the display correctly,
but I think we will have soon Arch with GPU accelerated UI soon
Samt434
Click to expand...
Click to collapse
Can you provide more instructions on how did you compiled the kernel?

Categories

Resources