Jump to content


Photo

Advent Vega kernel source code now available!


  • Please log in to reply
2861 replies to this topic

#41
PaulOBrien

PaulOBrien

    It's My Party

  • Founder
  • PipPipPipPipPipPip
  • 36,222 posts
  • Gender:Male
  • Location:Norwich, UK
  • Devices:All the Nexus!
  • Twitter:@paulobrien
I've created an additional branch with the changes for host mode, more for my own use really!

P

  • 0

You can follow me on Twitter - http://twitter.com/paulobrien / Follow MoDaCo on Twitter - http://twitter.com/modaco

Want to donate? MoDaCo is raising money for the Multiple Sclerosis society.

Posted Image


#42
dannight

dannight

    Newbie

  • MoDaCo Silver
  • Pip
  • 17 posts
  • Devices:Motorola Milestone Advent Vega
Not 100% sure on this one but I swear I read that the Vega supports up to 4 fingers, and I read somewhere on here that the fact that we can only detect 2 currently was a kernel limitation.

Is this correct? I'd love it if t'were but a simple fix. If I'm wrong I'll shut up ;)

  • 0

#43
craskman

craskman

    Newbie

  • Members
  • Pip
  • 44 posts
  • Devices:Nexus One
Hi Paul (again)

So, last week I setup a baseline for the kernel. Everything works fine (compilers, crosscompilers, etc), it's based on your osx branch and your config file.
Yesterday I was trying to follow the same steps but with with a different source, the tegra kernel from android git (http://android.git.k...a.git;a=summary) which is 2.6.36 kernel.

I had to fix few things to compile on osx (scripts includes like you did) and also the yaffs2 wasnt compiling due a known issue. I just port the yaffs2 section directly form their git. So, in the end I manage to compile successfully a 2.6.36 kernel (I use you config file as start point, then I had to check few other/new options). The prob,.. again,.. it doesn't boot (not even the 'booting...' string) and I cant get the typical boot messages as we do in linux, so I could see where it is failing.

So my questions are:
1) did you try to compile the 2.6.36 kernel already?
2) how can we show the boot messages rather than the boot image screen?

Thanks again,
CrK

PS: btw, I tried to patch your kernel with BFS, again no probs with that but didn't boot either. I got stucked with the string "booting...". really need to find ways to debug/see the boot messages to check where it fails. Cant find good info about that.

  • 0

#44
dconde

dconde

    Newbie

  • Members
  • Pip
  • 11 posts

Hi Paul (again)

So, last week I setup a baseline for the kernel. Everything works fine (compilers, crosscompilers, etc), it's based on your osx branch and your config file.
Yesterday I was trying to follow the same steps but with with a different source, the tegra kernel from android git (http://android.git.k...a.git;a=summary) which is 2.6.36 kernel.

I had to fix few things to compile on osx (scripts includes like you did) and also the yaffs2 wasnt compiling due a known issue. I just port the yaffs2 section directly form their git. So, in the end I manage to compile successfully a 2.6.36 kernel (I use you config file as start point, then I had to check few other/new options). The prob,.. again,.. it doesn't boot (not even the 'booting...' string) and I cant get the typical boot messages as we do in linux, so I could see where it is failing.

So my questions are:
1) did you try to compile the 2.6.36 kernel already?
2) how can we show the boot messages rather than the boot image screen?

Thanks again,
CrK

PS: btw, I tried to patch your kernel with BFS, again no probs with that but didn't boot either. I got stucked with the string "booting...". really need to find ways to debug/see the boot messages to check where it fails. Cant find good info about that.


Hi Crk,

I've been trying the same and I'm seeing the same as you, did you get any further on this?

  • 0

#45
craskman

craskman

    Newbie

  • Members
  • Pip
  • 44 posts
  • Devices:Nexus One
Hi conde,

Not really, lack of time for this to be honest.
I am willing to give another go on [git://android.git.kernel.org/kernel/tegra.git] honey kernel.

Also, about changing boot options/cmdline, no luck. I think those options are 'hardcoded' in the bootloader.img and as far as i know, we dont have sources for that. I tried to set boot commands in the kernel and through mkbootimg, but no luck. Actually, if you set any cmdline in the mkbootimg then your kernel wont boot at all. In the kernel, seems those cmds will be ignored. So, probably we need another bootloader (or sources).

Finally, I notice that nvflash is quite sensible (or probably my vega). If I flash boot.img a couple of times, I will get stuck in the nvflash recovery and the boot partition gets corrupted (also using the traditional adb flash). So, the best way I found to avoid corruptions in the boot partition is to follow the procedure described by advent and replace their boot.img with mine, and make sure that nvflash recovery perform its 'natural' reboot in the end (if not, most likely the boot part is not good). This way, it is guaranteed that my boot partition is not corrupted. And if doesn't work is because of the kernel itself (or its options).

I will post here if I manage to boot the 'honey' kernel. btw, for those with issues on getting in recovery mode,.. just turn off completely the vega, then remove the power cable, then wait 5 seconds and connect again. Then, do the sequence and it will work. Never fail with me and I already mess my vega a lot.

CrK

  • 0

#46
craskman

craskman

    Newbie

  • Members
  • Pip
  • 44 posts
  • Devices:Nexus One
Hi,

Good news and bad news.
Bad news is that I still can't boot the honey kernel, and the good news is that finally I manage to get the boot messages output.

As I suspected, the kernel commands are coded in the bootloader and anything else will be ignored.
Once we don't have the bootloader source code, I decided to have a go with oldschool cracking technics:) So basically I open the bootloader.bin in a hexeditor and tried to find for the 'console' stuff. Easily I found it, then edit.

By default the kernel cmdline is (console bit)
console=none console=ttyS0,115200

So, I knew the last one was the important one, so I've changed to:
console=ttyS0,115200 console=tty0

note: we need to preserve the same number of characters, lucky both combinations have exactly the same number of characters.

And thats it, finally I can see the boot messages.
Another bad news is that the honey kernel gets stuck before the initial boot messages :( can't see a bloody thing.
The boot messages start a bit before the 'loading...' string.

Hope this helps someone,.. I've spent hours searching for this info and until today I haven't found.

Any tips about the .config options for the honey kernel (for android) I really appreciate.

btw, in the boot messages I can see loads of bad blocks (tegra-nand), I think that explains why every 'now and then' I have to flash the whole thing to test kernels. I didnt give too much use (only flashing kernels), I wonder if your vegas have bad blocks as well. It seems that is not just the display that is rubbish, the nand flash seems to be cheap as well.

CrK

  • 0

#47
dconde

dconde

    Newbie

  • Members
  • Pip
  • 11 posts

Hi,

Good news and bad news.
Bad news is that I still can't boot the honey kernel, and the good news is that finally I manage to get the boot messages output.

As I suspected, the kernel commands are coded in the bootloader and anything else will be ignored.
Once we don't have the bootloader source code, I decided to have a go with oldschool cracking technics:) So basically I open the bootloader.bin in a hexeditor and tried to find for the 'console' stuff. Easily I found it, then edit.

By default the kernel cmdline is (console bit)
console=none console=ttyS0,115200

So, I knew the last one was the important one, so I've changed to:
console=ttyS0,115200 console=tty0

note: we need to preserve the same number of characters, lucky both combinations have exactly the same number of characters.

And thats it, finally I can see the boot messages.
Another bad news is that the honey kernel gets stuck before the initial boot messages :( can't see a bloody thing.
The boot messages start a bit before the 'loading...' string.

Hope this helps someone,.. I've spent hours searching for this info and until today I haven't found.

Any tips about the .config options for the honey kernel (for android) I really appreciate.

btw, in the boot messages I can see loads of bad blocks (tegra-nand), I think that explains why every 'now and then' I have to flash the whole thing to test kernels. I didnt give too much use (only flashing kernels), I wonder if your vegas have bad blocks as well. It seems that is not just the display that is rubbish, the nand flash seems to be cheap as well.

CrK


Crk,

I didn't have an issue in passing parameters to the kernel at boot time. Using fastboot with the -c parameter worked fine for me. I left instructions on how to access fast boot at http://android.modac...p...t&p=1620277

  • 0

#48
craskman

craskman

    Newbie

  • Members
  • Pip
  • 44 posts
  • Devices:Nexus One
Dconde,

Thanks for the info, actually I read that post but didnt realise that were you. I thought the mkbootimg was similar process as fastboot but more stable. But if you tried it, i will give it a go.

Have you tried to compile the honey kernel (2.6.36) on vega?

I tried loads of stuff, by this time I would expect at least to see the initial boot process. Seems that there is something missing on this kernel sources to work with vega (or harmony boards). I was browsing the sources (vega and honey) and I saw some missing bits on honey kernel. The ODM kit files are not there, still not sure if they are necessary. I though that perhaps the honey kernel wouldn't need those. Then there are few drivers missing as well, but that is secondary for now.

Does anyone already got a successful boot with the honey kernel (just boot not android itself)? (from android branch, not linux)

I wonder what is really lacking on this honey kernel, seems to be a very little thing:)

CrK

  • 0

#49
craskman

craskman

    Newbie

  • Members
  • Pip
  • 44 posts
  • Devices:Nexus One
Dconde,

Just tried fastboot,.. indeed makes everything quicker to test. Also, I am not getting corruptions, probably coz we dont actually flash the partition 7 all the time with fastboot.

I've compiled few more kernels, and with fastboot we can just run/boot the zImage without ramdisk. So, the zImage from honey kernel will show up for sure,... unfortunately that still not happening. Cant really find what is wrong with this kernel on vega hardware.

I will continue posting on the thread you mention (makes more sense) [Kernel 2.6.36 build for Vega] http://android.modac...o...t&p=1620277

Cya around and post any progress
CrK

  • 0

#50
the_corvus

the_corvus

    Enthusiast

  • Members
  • PipPipPip
  • 200 posts
Please, can you upload your bootloader, because i have made this change and get nothing at boot...

Corvus

Dconde,

Just tried fastboot,.. indeed makes everything quicker to test. Also, I am not getting corruptions, probably coz we dont actually flash the partition 7 all the time with fastboot.

I've compiled few more kernels, and with fastboot we can just run/boot the zImage without ramdisk. So, the zImage from honey kernel will show up for sure,... unfortunately that still not happening. Cant really find what is wrong with this kernel on vega hardware.

I will continue posting on the thread you mention (makes more sense) [Kernel 2.6.36 build for Vega] http://android.modac...o...t&p=1620277

Cya around and post any progress
CrK


  • 0
If you like my work, you can buy me some beer... Press here.

If you have a problem, i will spend the same time helping you than you've spent for asking for help, so write a detailed description of your problem.

#51
craskman

craskman

    Newbie

  • Members
  • Pip
  • 44 posts
  • Devices:Nexus One
Sure, here it is.
CrK

Attached Files


  • 0

#52
craskman

craskman

    Newbie

  • Members
  • Pip
  • 44 posts
  • Devices:Nexus One
Hi,

Just want to share some stuff. After more than a month without looking into this, I've decided to have another go.
Until now, I wasn't been able to even get a boot screen from kernel .36. But finally I started to get some output.
Based on some other developments by other communities (folio100 guys, specially DerArtem git) I have tried something different.

So basically I got the source from nvidia git, kernel36 [git://nv-tegra.nvidia.com/linux-2.6.git] and the HEAD [android-tegra-2.6.36].
Then I have used the .config from DerArtem with few changes, 1st) I have enabled generic Harmony support and 2nd) I have patched for yaffs2 support.

So, now I am able to see the boot screen and the ramdisk starts mounting the yaffs2 fs successfully, but then it will reboot itself, I get loads of errors in terms of memory addressing. Next challenge is to port the specific drivers for vega and potentially fix some memory addresses specific for vega (currently I am using the generic harmony board config)

So, I am going to try to follow DerArtem idea, creating a copy of hamorny board source and make adjustments for vega-harmony board. On this field my knowledge lacks. So, if anyone willing to help from here, would be really great. I have no idea how far I can go with this. For now, I am trying to boot successfully the CM7 rom, though this kernel would serve honeycomb... eventually,... who knows:)

Cheers,
CrK

  • 0

#53
add.thebad

add.thebad

    Enthusiast

  • Members
  • PipPipPip
  • 290 posts
  • Location:Lincoln Uk
  • Interests:Android and disliking apple
  • Devices:Motorola Defy (+ Pulse)
  • Twitter:@adam.gypo
could some one upload a boot.img for me please
im trying to edit it but i think the one i have must be corrupt because i got and error somewhere and when i run repack-boot.img i get
adam@ubuntu:~/Desktop/mytools$ mkbootimg --kernel kernel.gz --ramdisk ramdisk-new.gz -o boot-vega.img --base 0x10000000 --pagesize 2048
usage: mkbootimg
	   --kernel <filename>
	   --ramdisk <filename>
	   [ --second <2ndbootloader-filename> ]
	   [ --cmdline <kernel-commandline> ]
	   [ --board <boardname> ]
	   [ --base <address> ]
	   -o|--output <filename>

any ideas

  • 0
Cheers Adam

Watch my defy go for a swim!!

Moto Defy CM7 :o :o :D Advent vega 2.4
T-Mobile pulse CM6
Posted Image

#54
craskman

craskman

    Newbie

  • Members
  • Pip
  • 44 posts
  • Devices:Nexus One

could some one upload a boot.img for me please
im trying to edit it but i think the one i have must be corrupt because i got and error somewhere and when i run repack-boot.img i get

adam@ubuntu:~/Desktop/mytools$ mkbootimg --kernel kernel.gz --ramdisk ramdisk-new.gz -o boot-vega.img --base 0x10000000 --pagesize 2048
usage: mkbootimg
	   --kernel <filename>
	   --ramdisk <filename>
	   [ --second <2ndbootloader-filename> ]
	   [ --cmdline <kernel-commandline> ]
	   [ --board <boardname> ]
	   [ --base <address> ]
	   -o|--output <filename>

any ideas


I think you have something wrong there, under your --kernel you should put the zImage generated after the kernel compilation. It seems you are using some sort of kernel.gz which doesnt seem correct. Below the mkbootimg I use:

mkbootimg --kernel zImage --ramdisk ramdisk-vega.gz --output boot-vega.img --base 0x10000000 --pagesize 2048

Nonetheless, i have attached the boot.img for CM7 vega rom.

CrK

Attached Files

  • Attached File  boot.img   3.76MB   12 downloads

Edited by craskman, 17 April 2011 - 03:40 PM.

  • 0

#55
brucelee666

brucelee666

    Enthusiast

  • Members
  • PipPipPip
  • 203 posts
  • Devices:Advent Vega

I think you have something wrong there, under your --kernel you should put the zImage generated after the kernel compilation. It seems you are using some sort of kernel.gz which doesnt seem correct. Below the mkbootimg I use:

mkbootimg --kernel zImage --ramdisk ramdisk-vega.gz --output boot-vega.img --base 0x10000000 --pagesize 2048

Nonetheless, i have attached the boot.img for CM7 vega rom.

CrK


I could be wrong as I am trying to learn this stuff myself, but I think Adam may have used the unpack-boot image pl script which creates a kernel.gz file and your ramdisk output in a folder.

I don't know but if you use the split-boot image pl script it creates a kernel file with no .gz extension and this may be more suitable for repacking.

  • 0

#56
craskman

craskman

    Newbie

  • Members
  • Pip
  • 44 posts
  • Devices:Nexus One

I could be wrong as I am trying to learn this stuff myself, but I think Adam may have used the unpack-boot image pl script which creates a kernel.gz file and your ramdisk output in a folder.

I don't know but if you use the split-boot image pl script it creates a kernel file with no .gz extension and this may be more suitable for repacking.


Yes indeed. Just tried the "bootbuilder" scripts and the kernel.gz is the corresponding zImage, actually the file is not even a .gz file.

So, to answer back to the other chap, he might be using old 'split' scripts. Try this bootbuilder ones, they worked for me (though I just use this to extract ramdisks)

http://forum.xda-dev...ad.php?t=909490

CrK

  • 0

#57
add.thebad

add.thebad

    Enthusiast

  • Members
  • PipPipPip
  • 290 posts
  • Location:Lincoln Uk
  • Interests:Android and disliking apple
  • Devices:Motorola Defy (+ Pulse)
  • Twitter:@adam.gypo
thanks for the help guys
i was using the unpack-bootimg.pl scripts but i will try again now using those others you said and see what happend

in the end i did get it to repack but got error (0) when trying to flash. i made lots of mistakes tho i think so gunna start again fresh

  • 0
Cheers Adam

Watch my defy go for a swim!!

Moto Defy CM7 :o :o :D Advent vega 2.4
T-Mobile pulse CM6
Posted Image

#58
add.thebad

add.thebad

    Enthusiast

  • Members
  • PipPipPip
  • 290 posts
  • Location:Lincoln Uk
  • Interests:Android and disliking apple
  • Devices:Motorola Defy (+ Pulse)
  • Twitter:@adam.gypo

in the end i did get it to repack but got error (0) when trying to flash. i made lots of mistakes tho i think so gunna start again fresh


ok i started again and got every thing to work fine so thanks for you help
now i have a problem when i go to flash via clockwork it stalls at installing package and goes back to main menu can some one tell me what im doing wrong

  • 0
Cheers Adam

Watch my defy go for a swim!!

Moto Defy CM7 :o :o :D Advent vega 2.4
T-Mobile pulse CM6
Posted Image

#59
craskman

craskman

    Newbie

  • Members
  • Pip
  • 44 posts
  • Devices:Nexus One
I can see that you are trying to port honeycomb SDK to vega, are you using .32 kernel?

Also, I am having some fun on porting .36 kernel to vega. As I said earlier I am following the steps of DerArtem from folio100.
I have forked his kernel and I have applied my changes.
The kernel is compiling successfully and its bootable, but still loads of errors from i2c bus. I also have ported all driver, so far the BMA150, SMB380, IT7260 and EGALAX. There are still work to do and I am still learning with this adventure.

So, if you guys have ideas or suggestions, please let me know and I can merge any change to my git. Everybody is welcome to help on this.

git://github.com/craskman/android-tegra-2.6.36-vega.git

Thanks,
CrK

  • 0

#60
craskman

craskman

    Newbie

  • Members
  • Pip
  • 44 posts
  • Devices:Nexus One
Hi add,

About your ramdisk, I didnt touch it, I just add the binaries [sh] and [busybox] in the folder /system/bin (on your image)
attached are:
zImage - kernel .36
boot-vega.img - kernel .36 with your ramdisk (EDIT: in the next post,.. no quote to attach here)

Let me know if you are doing some progress.

CrK

Attached Files


Edited by craskman, 21 April 2011 - 11:34 PM.

  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users