[ROM][32A][HELP] A Chef's Apprentice : Preparing compiled ROM - myTouch 3G, Magic Android Development

Hi,
I have downloaded donut sources from http://source.android.com/download. Code was successfully compiled after some minor tweaks (I am on Fedora 12) and I was able to load the compiled ROM in the emulator.
However I am not able to have it running on my 32A Magic. Obviously I am guessing the code and instructions I got from android.com and HTC is for the Google ION. Probably something to do with the device drivers or memory configuration.
I am quite handy with C programming, Unix and shell scripts but pretty much green when it comes to Android. I have unzipped roms or running unyaffs to view what is under the hood but I am missing something to make this work.
Any help to point me in the right direction is much appreciated.
cheers,
Waerren

the google ION is a 32B device. If you switch kernel (boot.img) and wlan.ko from a working 32A ROM, it'll probably work.

josdehaes said:
the google ION is a 32B device. If you switch kernel (boot.img) and wlan.ko from a working 32A ROM, it'll probably work.
Click to expand...
Click to collapse
Probably the sources from cynogen would be a better place to start. Anyway thanks for the tip.
cheers

Related

[Question] Whats the process to get ROMs portet for 32A?

I was wondering, what the process for porting ROMs?
Some new files, like the wlan.ko and add some BT lines in a init file.
What else? Can I get a direction?
I like to mess around with it, I like this stuff.. Im totally in love with this Magic phone..
We need more porting got the 32A device..
Look at this thread http://forum.xda-developers.com/showthread.php?t=530972 Amon_RA have postet a good guidline in his post http://forum.xda-developers.com/showpost.php?p=4040214&postcount=23 I did follow that guide as I made the cm-recovery-1.4-32A.img all I had to make was to edit the filenames.
If it was that easy, then we have seen more roms for the 32A
We can report the 32B that way, but not directly from G1.
ChrisB said:
If it was that easy, then we have seen more roms for the 32A
We can report the 32B that way, but not directly from G1.
Click to expand...
Click to collapse
That's not completely true, all of the g1 roms have custom kernels which mean custom modules and features that are added which will make the rom your porting limited to certain features... for example cm's kernel which is on every cm rom for the g1 has cgroup which is a module that basically optimized running tasks, squashfs which is a mount type you can use on the system, compcache which is module that you can use for swap memory which is very useful... and i'm pretty sure there is other stuff too... but this issue creates a limitation for us 32A users as far as porting roms because some roms are very unique because of certain stuff that comes with the kernel...
32Bs on the other hand are google branded phones so the g1 kernels work on them and the only thing that you change in the proccess of porting in simply renaming init.trout.rc to init.sapphire.rc from the ram disk and you don't need to change the kernel because it will work since both devices are google branded.
so yeah you can almost port every rom but just don't expect the full features and also another note when porting to 32A you have mess to around with the update-script file most of the time when not touching it you will not be able to get any command to work under the command line due to the symlinks, i would suggest using the update-script from fatal1y's hero rom 1.4 ported by skittleguy or the hofo community rom because those are the ones that i looked at to basically learn...
Good luck,
This basically untill HTC will release the kernel patches. Then you'll be able to port every single ROM to 32a.

Compile wlan.ko for Magic 32A

Hi all,
I need to compile a Magic 32A compatible wlan.ko module for a Hero ROM that I'm using on my phone.
ROM: MoDaCo MCR 2.9
Kernel version: 2.6.27-mck-teknologist-1.8
Everything boots fine, but the kernel module wlan.ko doesn't work for the 32A Magic.
I tried replacing the wlan.ko with a version from 2.6.27-HoFo-V12 (HoFo 3.07), but it quickly gives me an error:
Code:
wlan: version magic '2.6.27-HoFo-V12 preempt mod_unload ARMv6 '
should be '2.6.27-mck-teknologist-1.8 preempt mod_unload ARMv6 '
I assume that there's no way to change the version of wlan.ko without recompiling it...
It's not an option to use the HoFo kernel because there are modules in the teknologist kernel that the ROM needs.
I'm pretty much stuck here. I'm not a developer by any means. I'm capable of installing Ubuntu and downloading the kernel source from HTC, but after that I'm stuck...
Would anyone be able to help me build a wlan.ko kernel module for Magic 32A that has the same version as 2.6.27-mck-teknologist-1.8?
Any help or direction would be great.
Thanks!
Well, I just learned what a toolchain is, and I'm downloading one...
I have the kernel config from the MoDaCo ROM, so that's all good to go. Now once I have this 'toolchain' thing, I think I'll be ready to compile.
maybe...
EDIT: I'm so completely lost here... I have the toolchain and the kernel source and kernel config, all in the right places, and all I get are error messages.
OK, so I compiled a wlan.ko, but it makes my phone reboot every time I try to load it, so I can't even check the logcat or dmesg.
cursordroid said:
OK, so I compiled a wlan.ko, but it makes my phone reboot every time I try to load it, so I can't even check the logcat or dmesg.
Click to expand...
Click to collapse
Maybe you should try installing wlan.ko and boot.img from another ROM made for the 32A?
Check this out and feel free to contact me via gtalk.
http://wiki.cyanogenmod.com/index.php/How_to_build_a_kernel_port
Thanks for the offer to help, but I think this is a lost cause...
The wifi isn't the only thing that's broken when running a Hero ROM on 32A with the new radio. The camera doesn't work, the bluetooth is shaky at best, there are random reboots. It's a huge step back from the 32A Sense ROMs that are available now. It's like before when Hero ROMs were ported to 32B, then to 32A and nothing worked.
So what I've got here now is a 32A Sapphire with radio 6.35.07.29 and SPL 1.76.2007 that can't run any normal ROMs. I have learned a lot though and I'll be sure to try this again when the 2.0 Sense UI ROMs are released for the Hero.

[KITCHEN] Basic ROM Kitchen for aspiring Dream cooks [PC/MAC]

Hi guys,
Over at the HTC Hero forum I have been developing a kitchen to help ordinary people learn how to build their own ROM. It allows you to do basic things such as rooting a shipped ROM, adding apps2sd, modifying the task killer memory threshold, etc.
The appropriate settings are now in place to make it work for the Dream.
Here is the link to the kitchen:
http://forum.xda-developers.com/showthread.php?t=633246
Before you flash your new custom ROM made from this kitchen, please make a Nandroid backup first of your existing ROM!
Thank you, and enjoy!
Working so far on Ubuntu, figures I just learned how to use git and make my own EBI1 kernels 2 days ago, thanks for this. I'll let you know once I flash a rom how it goes.
carz12 said:
Working so far on Ubuntu, figures I just learned how to use git and make my own EBI1 kernels 2 days ago, thanks for this. I'll let you know once I flash a rom how it goes.
Click to expand...
Click to collapse
Cool, thanks. I am most concerned about how the wireless tethering option will work on the Dream because it requires a kernel fix for Android 1.5 and 1.6. The kitchen is supposed to do that automatically but it will replace your existing kernel.
BTW looks like you are from my home town of Edmonton!
It's not booting, I used my own nan sys and boot img's, set up a working directory and then rebuilt, long time at rogers screen and then boot animation for a minute then a blank back-lit screen, I'll logcat and post it later, time for work.
Is this compatible with the EBI1 dream?
dsixda said:
Cool, thanks. I am most concerned about how the wireless tethering option will work on the Dream because it requires a kernel fix for Android 1.5 and 1.6. The kitchen is supposed to do that automatically but it will replace your existing kernel.
BTW looks like you are from my home town of Edmonton!
Click to expand...
Click to collapse
I may need to go to EBI0 to test if it replaces the kernel?
carz12 said:
It's not booting, I used my own nan sys and boot img's, set up a working directory and then rebuilt, long time at rogers screen and then boot animation for a minute then a blank back-lit screen, I'll logcat and post it later, time for work.
Is this compatible with the EBI1 dream?
Click to expand...
Click to collapse
What is different about EBI1 from a kernel level? If all you did was extract the system and boot.img, and then build without modifying anything, then that should work.
EDIT: If this is a customized ROM (e.g. with custom kernel) then the update-script file under META-INF\.... may need some manual tweaking. The Option 1 in the menu is recommended only for stock ROMs, because this option creates a simple generic update-script file.
If you are indeed using a custom ROM then I'd try to get the original update.zip file of this ROM, which already has the correct update-script file. Just copy that update-script into your existing kitchen.
Or even simpler, just use the original update.zip file and run Option 11 instead of the Nandroid backup.
carz12 said:
I may need to go to EBI0 to test if it replaces the kernel?
Click to expand...
Click to collapse
I am not familiar with all the different Dreams, but it will replace the kernel if you have a 1.5 or 1.6 ROM.
It works on my rogers dream, I took the original rom for the g1, set up a working directory, replaced the launcher, took out a few apps, replaced the boot.img and wlan.ko with the ebi1 compatible versions I compiled and put in my own prop files, booted right up, thanks for this. Can't test the tethering thing as it'll change the kernel on me.
dsixda said:
I am not familiar with all the different Dreams, but it will replace the kernel if you have a 1.5 or 1.6 ROM.
Click to expand...
Click to collapse
What would happen if I just replaced the wlan.ko and boot.img-kernel in the dream_1_6_update folder with my ebi1 versions? could I test out the add wireless tether option?
carz12 said:
What would happen if I just replaced the wlan.ko and boot.img-kernel in the dream_1_6_update folder with my ebi1 versions? could I test out the add wireless tether option?
Click to expand...
Click to collapse
I'll try this tomorrow. Looks cool.
downloading now, ill let you know how things go tomorrow.
carz12 said:
What would happen if I just replaced the wlan.ko and boot.img-kernel in the dream_1_6_update folder with my ebi1 versions? could I test out the add wireless tether option?
Click to expand...
Click to collapse
I'm not sure exactly what the modified boot.img-kernel in the kitchen has, but I'm guessing it's a couple of networking-related variables that were changed. If your kernel has those modifications then maybe it will work. Doesn't hurt to try
Let me know if it works, then we can use your version for individuals who are cooking Rogers ROMs.
A question: Is it possible to tell that a ROM is for a Rogers Dream (ie. somewhere in the build.prop)? In that way, the script can automatically decide what action to take.
carz12 said:
It works on my rogers dream, I took the original rom for the g1, set up a working directory, replaced the launcher, took out a few apps, replaced the boot.img and wlan.ko with the ebi1 compatible versions I compiled and put in my own prop files, booted right up, thanks for this. Can't test the tethering thing as it'll change the kernel on me.
Click to expand...
Click to collapse
That's great news so far! Thank you
will ROMs created work with MyTouch 3G
nicknowsky said:
will ROMs created work with MyTouch 3G
Click to expand...
Click to collapse
Lets hope I am setting this up now to try it for my touch 3g
nicknowsky said:
will ROMs created work with MyTouch 3G
Click to expand...
Click to collapse
Since it's the HTC Magic, yes it should! Please try and let me know.
I'll create a thread for this in the Magic forum so that people can post their feedback there. Thank you
EDIT: Here's the thread where you can post Magic/myTouch 3G feedback:
http://forum.xda-developers.com/showthread.php?t=651470
Question...What section on the HTC site would I look for the shipped rom.exe...Specific device = Mytouch?
holmes901 said:
Question...What section on the HTC site would I look for the shipped rom.exe...Specific device = Mytouch?
Click to expand...
Click to collapse
Just do a search in XDA for Mytouch/Magic shipped ROMs. Usually there are links to the original ROMs in the Wiki page for your device.
dsixda said:
I'm not sure exactly what the modified boot.img-kernel in the kitchen has, but I'm guessing it's a couple of networking-related variables that were changed. If your kernel has those modifications then maybe it will work. Doesn't hurt to try
Let me know if it works, then we can use your version for individuals who are cooking Rogers ROMs.
A question: Is it possible to tell that a ROM is for a Rogers Dream (ie. somewhere in the build.prop)? In that way, the script can automatically decide what action to take.
Click to expand...
Click to collapse
I'll try it out tonight, the sources I used to compile were wes's and his kernel has tethering support unless I broke it, I've never used tethering before.
carz12 said:
I'll try it out tonight, the sources I used to compile were wes's and his kernel has tethering support unless I broke it, I've never used tethering before.
Click to expand...
Click to collapse
Tethering is actually useful even if you don't need it all the time, eg. if your desktop PC cannot access the internet or your wife is using an iPod touch to access the internet in a restaurant.
So do Rogers Dreams require a special kernel, due to the 911 fix? So I guess the stock ROM update has the proper kernel, but modifications like the wireless tether for a Rogers Dream would require a patched Rogers kernel.

[32ANR][PORT] Multiple ROMs : sanpei 2.6.32.9 Repack Cooks Test and Info

Edit: wasn't even aware of the ROM kitchen before this.
Untested! I don't plan to provide support for these ports!
The reason I am publishing is from my recent trials of compiling my own kernel for new radio 32A Magic. I have learned a lot about what sanpei's kernel consists of and the similarities between our device and the GSM Hero. In particular, the only difference between our ROMs seems to be mainly just the kernel. Everything else is almost identical. As such I want the community to try to use a tested NR kernel, sanpei's 2.6.32.9, and apply it to some different ROMs and report back with results.
We don't need multiple threads of the same kernel on different ROMs. So I'm trying to consolidate some information here.
I can test it on my cousins phone probably this weekend as well. Hoping for some preliminary results till then.
sanpei2.6.32.9_villain_port
This is a repack of sanpei's kernel repacked via ordinary boot.img method, with init.hero.rc copied to init.sapphire.rc
Flash this after you flash Villain ROM:
http://www.villainrom.co.uk/viewtopic.php?f=44&t=680#p11789
2.1 Sense UI ROM
sanpei2.6.32.9_anykernel.zip
This is a repack of sanpei's kernel repacked via Koush Anykernel
The idea is that you can flash most ROMs from old radio using this port with some caveats.
READ THIS BEFORE YOU FLASH
You cannot use this port if:
1) You are NOT on a 6.35 series radio. This rules out any 32Bs or myTouch 1.2
2) the ROM uses squashfs anywhere (open up the update.zip of the ROM and look at /system/modules/lib and /system/
3) modules have special directory structure under /system/modules/lib (such as Cyanongenmod, which has modules under 2.6.xx.x-cyanogenmod instead of just 2.6.xx.x)
4) you use an ext4 apps2sd partition (it will simply not recognize it)
Explanations:
If the ROM uses squashfs, this kernel does not support it and you will need to fix those problems yourself.
There may be other issues involved when you use this kernel. It is recommended that you stick to the one that came with the ROM.
This rules out any Cyanogenmod because of the use of squashfs.
If missing init.sapphire.rc, copy the Hero one (if flashing a Hero ROM) using:
adb shell cp init.hero.rc init.sapphire.rc
Refer to the ROM Bible for reference:
http://forum.xda-developers.com/showthread.php?t=682243
Any new or old ROMs that already use new radio
This is just the kernel carz12 posted repacked:
http://forum.xda-developers.com/showthread.php?t=689652
Credits:
cyanogen for everything
Koush anykernel
sanpei for his version of AOSP kernel with integrated new radio support
And a lot more I might be missing
FYI and FWIW a few weeks back there were a lot of 6.35 roms that were cooked and posted in this forum. They were all using the 2.6.32.9 kernel that Sanpei ported. That is, the boot.img-kernel was the same for all. The ramdisk was changed as you have done and the two were re-packed into the boot.img.
I have successfully applied this approach for maybe 3 or 4 different 1.6 roms and maybe 10 different 2.1 roms.
dsixda's ROM Kitchen makes executing these steps a piece of cake
http://forum.xda-developers.com/showthread.php?t=633246
Then you just replace the wlan.ko module and GPS lib file for wifi and GPS compatibility.
You're probably aware of these details but I thought they might help others.
Tried to flash VillainROM 6.1, but during the flash it aborts saying "Failure at line 2: assert getprop("ro.product.device") == "hero"
How do I solve this?
pellen said:
Tried to flash VillainROM 6.1, but during the flash it aborts saying "Failure at line 2: assert getprop("ro.product.device") == "hero"
How do I solve this?
Click to expand...
Click to collapse
Must have hero recovery not patched recovery by cursor
Ahh...thougt cursors tweaked recovery didn't differ that much. *change recovery*
I am pretty sure the update script can also be modified. The assert statement can be removed and the rom should load fine on the Hero, Cursor and Amon Ra recoveries.
Ok, so now I've flashed VillainROM 6.1 with the sanpei2.6.32.9_villain_port and I can't say it's working especially well
First of all it doesn't ask me to enter the SIM card PIN when i boot, so the mobile connection is dead. Wifi and bluetooth is dead too. The camera flicker, and then fades to black, taking a pic resulted in reboot.
giant_rider said:
FYI and FWIW a few weeks back there were a lot of 6.35 roms that were cooked and posted in this forum. They were all using the 2.6.32.9 kernel that Sanpei ported. That is, the boot.img-kernel was the same for all. The ramdisk was changed as you have done and the two were re-packed into the boot.img.
I have successfully applied this approach for maybe 3 or 4 different 1.6 roms and maybe 10 different 2.1 roms.
dsixda's ROM Kitchen makes executing these steps a piece of cake
http://forum.xda-developers.com/showthread.php?t=633246
Then you just replace the wlan.ko module and GPS lib file for wifi and GPS compatibility.
You're probably aware of these details but I thought they might help others.
Click to expand...
Click to collapse
I completely missed that post actually . Plus it's now closed.
But I wanted to see specifically how well Hero ROMs translate over to Magic ROMs because of what I've been reading about the similar kernels. The thing is that while I know to copy over init.sapphire.rc to resolve some conflicts, I'm not sure what else is involved in porting a ROM right now to get it to work.
I'm new to porting ROMs.
Maybe mods ought to close this one then?
With Eris ports you will be missing SIM card features.
So with 2.6.32.9 bluetooth and wifi break? I was actually expecting bluetooth to work. What works?
I guess I'll do some reading again. But I haven't seen that information posted regarding how to resolve some of the issues of porting ROMs.
I was looking to figure out some of the incompatibility of the kernel I was compiling so I thought this might help
If the Hero ROMs worked well enough I had the idea of modifying the AnyKernel script to add cpio to recovery by updating busybox so that ROMs can be unpacked, modified and repacked all in recovery. It means unpacking the ramdisk gunzip, modifying it and repacking it, essentially adding one script to AnyKernel. But I guess they don't work that well so
xaueious said:
I'm new to porting ROMs......
I guess I'll do some reading again. But I haven't seen that information posted regarding how to resolve some of the issues of porting ROMs.
Click to expand...
Click to collapse
A lot of the issues when porting are not related to the kernel but to the modules and lib files.
Try testing and hacking through some issues. For example, replace the wlan.ko file in the /system/lib/modules folder with one from a similar rom that is working on 32a same radio version. If you're porting Hero, then pull the wlan.ko from one of Capy's roms.
To get camera working, you'll need to replace the camera related libs in the in the /system/lib/ folder with ones from a similar rom that is working on 32a and so on.
Porting involves, at a minimum, replacing the boot.img-ramdisk and the files for stuff that is not compatible with the 32a hardware, radio version, etc.
Once you figure out these basics by experimenting with swapping out stuff with working pieces from a 32a compatible rom on the same radio version, you can then get into making updates to the files in the boot.img-ramdisk yourself, the update-script, the build.prop files, the init files in /system/etc/init.d, etc.
xaueious said:
Maybe mods ought to close this one then?
Click to expand...
Click to collapse
I think it's a good thread. Maybe some of the guys who have been porting roms will add their comments. I may be wrong but I don't there is a how to guide for porting.
anykernel is useful for a direct kernel port like cm5 to EABI1 on same rom scenarios, nice piece of coding by koush though, way many files to change, an update package would work on roms made for your device(proper assert) but most need the update script modified and at least wlan.ko changed.
testing now Flashing
how long does it take to boot?
Working:
USB
Music app (Sound ok)
Gallery 3D OK takes a while to work
Not Working:
Camara
Wifi
Bluetooth
GSM connection
Issues:
Very very long and slow boot alot of patient is required.
Slow Menu Scrolling
Freezes some times (have to take battery)
Reboots alone sometimes

Relationship between Android and kernel

Hi all,
Looking to build my first custom Rom and had some queries terminology-wise.
What is the relationship between the kernel and Google's android platform? For instance, is froyo tied to a specific kernel and is this in the source tree?
Second q: HTC release their kernel sources. Say I wanted to get a froyo build up for a device that currently only has eclair, would the procedure be to diff the HTC modifications against the vanilla version and then make the appropriate changes to froyo?
Third q: what makes a Rom specific to a device? Probably linked to first question...
Many thanks,
Martin
Sent from my HTC Wildfire using XDA App
The kernel is basically just a linux kernel with device specific drivers and such added. I've done a 'diff' between the Eris 2.6.29 kernel from HTC and the 'generic' 2.6.29 kernel from kernel.org. It's kind of neat to see the difference. I highly recommend you do that.
There are also device specific drivers in the file structure that the ROM needs in order to function.
What I've done is compile AOSP from source, compile the kernel from source, zip up the needed files/folders, signed the ROM, and then flashed it to test. If you look at Android Builder in my sig, you can figure out the difference between the Eris and your device. You'll have to change the kernel that gets downloaded, of course. And it really just gives you a basic ROM without the device specific drivers, so things will not work without figuring the rest out. Grab a stock ROM to get drivers, libs, etc. out of.
/system/usr/keychars & /system/usr/keylayout usually have the keyboard drivers, which are somewhat important.
Also in my sig is the SgtShultz ROM where I tried to make a usable ROM from as close to source as possible. You might get some ideas from there. I still haven't figured out how to get the audio to work. If I get that worked out, I'll actually start using the ROM daily and work out the rest!
Froyo seems to work with kernel versions 2.6.29+, btw.
Many thanks for this; it's given me a good set of places to start reading.
Just pulling down all the AOSP source as we speak, with the hopes of getting a basic build up in the near future
gnarlyc said:
What I've done is compile AOSP from source, compile the kernel from source, zip up the needed files/folders, signed the ROM, and then flashed it to test. If you look at Android Builder in my sig, you can figure out the difference between the Eris and your device. You'll have to change the kernel that gets downloaded, of course. And it really just gives you a basic ROM without the device specific drivers, so things will not work without figuring the rest out. Grab a stock ROM to get drivers, libs, etc. out of.
[...]
/system/usr/keychars & /system/usr/keylayout usually have the keyboard drivers, which are somewhat important.
[...]
Froyo seems to work with kernel versions 2.6.29+, btw.
Click to expand...
Click to collapse
A couple of questions on this front...
I can see, obviously, where to get the kernel source and needed drivers; I am, however, unclear as to where I should obtain AOSP drivers from (to go, for instance, in /devices/htc/buzz and/devices/htc/buzz-common). Can I extract these from my device? (or do I need to wait until they release Froyo and then extract them from a device running the newer build?) Where on the device should I be looking for this driver set?
Thanks again,
Martin
MartinEve said:
A couple of questions on this front...
I can see, obviously, where to get the kernel source and needed drivers; I am, however, unclear as to where I should obtain AOSP drivers from (to go, for instance, in /devices/htc/buzz and/devices/htc/buzz-common). Can I extract these from my device? (or do I need to wait until they release Froyo and then extract them from a device running the newer build?) Where on the device should I be looking for this driver set?
Thanks again,
Martin
Click to expand...
Click to collapse
For the most part, any Eclair drivers seem to work. At least that's what I have used for the Eris. 2.1 -> 2.2 isn't too big of a jump. I used drivers from a stock 2.1 ROM.
Look up vendor tree, vendor config, and 'extract-files.sh'. You'll see what people with other devices have done. I have yet to quite get the whole vendor tree thing worked out, but others have. You can just come up with a list of needed drivers to add to the 'extract-files.sh' script and just copy those files in manually. (That's what I have done.) This will get pretty close to making an AOSP build complete. However, it appears that actually using the vendor tree setup while compiling will get things 'right'. There appear to be some libs that will compile differently for different devices.
So, basically, if you compile AOSP without a vendor tree for your device, the build will be located in out/target/product/generic. (And, you can copy drivers in later while using the kitchen, but you might miss out on some AOSP stuff with device-specific changes.) If you use the vendor tree, it will be in /out/target/product/buzz and will contain the drivers that the 'extract-files.sh' script grabbed from your device along with custom compiled libs.
If you are able to get a working vendor tree for your device, it will be helpful to the entire community. They'll all be able to use it for their builds. I highly recommend doing that. Most groups use github or something similar to post the code.
I still have much to learn myself, and you are starting to reach my limit! Good stuff.
Hi,
Many thanks for your reply; to a degree, it's about knowing the terms to search for -- the extract-files.sh is a godsend for information that I would have otherwise missed.
Anyway, onwards to build a usable vendor tree
Best,
Martin

Categories

Resources