Jump to content


Photo

Advent Vega kernel source code now available!


  • Please log in to reply
2861 replies to this topic

#21
azareus22

azareus22

    Newbie

  • Members
  • Pip
  • 6 posts

Just so you know, your English is terrible and thus what you're asking is _still_ not clear.

Advent gave Paul a tar.gz of the kernel source.
Paul created a git repo for us to use (thanks Paul)
Paul has continued to work on _his_ repo adding some fixes and other useful stuff.

Advent are unlikely to give us _anything_ else at this stage (They are an OEM, and most likely do none of the development work)



If you prefer we can speak Spanish or another language you do not practice ;) . I just try to adapt to the language spoken in the forum.

Paul, thanks for your reply.

  • 0

#22
pdej

pdej

    Regular

  • MoDaCo Silver
  • PipPip
  • 125 posts

If you prefer we can speak Spanish or another language you do not practice ;) . I just try to adapt to the language spoken in the forum.

Paul, thanks for your reply.

Azareus22 - I wouldn't worry about your English. I work in export and deal with over 30 languages...your english is actually better than good enough. I don't understand the technical stuff here, but I could as I think Paul could grasp what you were trying to say.

  • 0

#23
craskman

craskman

    Newbie

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

I was giving a spin on the kernel. I'm on macosx (like you i believe).
My setup is pretty much as described on cyanogen "build from source" for mac.
So I believe I have everything I need (cross compiler, etc)

I have cloned the kernel from your git (osx) and now i am trying to compiled it. For now I am using the .config you have there.
I am using the following line:

make ARCH=arm CROSS_COMPILE=$CCOMPILER -j2

My $CCOMPILER is set on my profile file:
export CCOMPILER=/Volumes/CyanogenModWorkspace/android/system/prebuilt/darwin-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-

The compilation starts ok in the beginning but then I got the following:

scripts/mod/mk_elfconfig.c:4:17: error: elf.h: No such file or directory
scripts/mod/mk_elfconfig.c: In function ‘main’:
scripts/mod/mk_elfconfig.c:9: error: ‘EI_NIDENT’ undeclared

Do you have any tips (you have done) to compile on macosx?

Thanks,
CrK

  • 0

#24
craskman

craskman

    Newbie

  • Members
  • Pip
  • 44 posts
  • Devices:Nexus One
Paul,.. I was digging around and found the reason.

I found a modified elf.h for cross compiling on macosx targeting linux. This might help others.

http://ben-collins.b...l-from-mac.html

Now it is running/compiling (no error so far but still in the middle of it).
Still, would be interesting to know your (or other) tricks you have made, most likely I am still missing some.

Thanks again,
CrK

  • 0

#25
craskman

craskman

    Newbie

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

I have finished everything,.. but no joy (black screen with backlight on).

So, I have compiled the kernel and get the zImage from there. Then I get from your git the ramdisk and did the following:

mkbootfs ./vega-ramdisk | gzip > ramdisk-vega.gz
mkbootimg --kernel zImage --ramdisk ramdisk-vega.gz -o boot-vega.img --cmdline '--base 0x10000000 --pagesize 2048'

Then I did the typical:

adb push boot-vega.img /data/local/
adb shell /data/local/flash_image boot /data/local/boot-vega.img

And,... black screen,.. doesn't boot.
Any help or clue of what I have missed would be really appreciated.

Thanks (whatta saturday night ;) gonna sleep )
CrK

  • 0

#26
craskman

craskman

    Newbie

  • Members
  • Pip
  • 44 posts
  • Devices:Nexus One
After messing up with my Vega, I couldn't boot anymore.
I was trying to find a way to re-flash only the boot image, so I wouldn't have to flash everything again.

I couldn't find any thread specifically describing this but I decided to play around with nvflash.
So, with the following command I manage to put paul's r2 boot.img back.

nvflash.exe --bl bootloader.bin --download 7 boot-paul.img --go

bootloader.img --> original which comes with advent 1.08 file.
number 7 is the ID of the boot partition.

Now I have my vega as it was. (kinda easy, it will be easier to mess around with the kernel again:) )

CrK

  • 0

#27
simonta

simonta

    Hardcore

  • Members
  • PipPipPipPipPipPip
  • 1,298 posts
  • Gender:Male
  • Location:Southampton
  • Devices:Vega. HTC Desire

After messing up with my Vega, I couldn't boot anymore.
I was trying to find a way to re-flash only the boot image, so I wouldn't have to flash everything again.

I couldn't find any thread specifically describing this but I decided to play around with nvflash.
So, with the following command I manage to put paul's r2 boot.img back.

nvflash.exe --bl bootloader.bin --download 7 boot-paul.img --go

bootloader.img --> original which comes with advent 1.08 file.
number 7 is the ID of the boot partition.

Now I have my vega as it was. (kinda easy, it will be easier to mess around with the kernel again:) )

CrK


A slightly easier way is to use flash_image and ADB (no reference to partitions and no need for recovery).

If you don't have flash_image already in /data/local (or some other place you want to store it):

adb push flash_image /data/local
adb shell chmod 4755 /data/local/flash_image
adb push boot.img /data/local
adb shell flash_image boot /data/local/boot.img

If you already have flash_image in place (recommended)
adb push boot.img /data/local
adb shell flash_img boot /data/local/boot.img

  • 0
If I've helped you, you want to say "thanks" and you do not use Dropbox (it's enormously useful, especially with mobile devices), please consider signing up for it using my reference. You'll get 2GB of disk space for files available anywhere, any time on any device. They give us both an extra 250MB if you do sign up!

Sign up for Dropbox

Apple? I'd rather eat my own kidneys!

#28
PaulOBrien

PaulOBrien

    It's My Party

  • Founder
  • PipPipPipPipPipPip
  • 36,369 posts
  • Gender:Male
  • Location:Norwich, UK
  • Devices:All the Nexus!
  • Twitter:@paulobrien

Paul,.. I was digging around and found the reason.

I found a modified elf.h for cross compiling on macosx targeting linux. This might help others.

http://ben-collins.b...l-from-mac.html

Now it is running/compiling (no error so far but still in the middle of it).
Still, would be interesting to know your (or other) tricks you have made, most likely I am still missing some.

Thanks again,
CrK

Which toolchain are you using? I'm using 4.4.3 from the Gingerbread AOSP, specifically:

make -j8 ARCH=arm CROSS_COMPILE=~/ROMraid/gingerbread/prebuilt/darwin-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-
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


#29
Buzing Bee

Buzing Bee

    Regular

  • Members
  • PipPip
  • 97 posts
  • Gender:Male
  • Devices:N1, Desire, G1
Paul im compiling the wifi module separately but you seem to have a way around that .... how are u getting the original module to load ?

many thanks in advanced

  • 0

#30
PaulOBrien

PaulOBrien

    It's My Party

  • Founder
  • PipPipPipPipPipPip
  • 36,369 posts
  • Gender:Male
  • Location:Norwich, UK
  • Devices:All the Nexus!
  • Twitter:@paulobrien
I'm not doing anything, it just works...

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


#31
martinbrook

martinbrook

    Enthusiast

  • Members
  • PipPipPip
  • 180 posts
  • Location:Kettering
  • Devices:T-Mobile Pulse
  • Twitter:@vgrade
azareus22,

thanks for the pointer to the usb code.

If I boot with USB1Property set to _host instead of device in the harmony tree my keyboard is recognised by the kernel,

Jan 30 04:48:32 localhost klogd: [ 6.243414] usb 1-1: New USB device found, idVendor=413c, idProduct=2106
Jan 30 04:48:32 localhost klogd: [ 6.248271] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
Jan 30 04:48:32 localhost klogd: [ 6.253131] usb 1-1: Product: Dell QuietKey Keyboard
Jan 30 04:48:32 localhost klogd: [ 6.258027] usb 1-1: Manufacturer: Dell
Jan 30 04:48:32 localhost klogd: [ 6.263092] usb 1-1: configuration #1 chosen from 1 choice

but later in the boot process I get

Jan 30 04:48:32 localhost klogd: [ 8.583754] usb 1-1: USB disconnect, address 2

and my keyboard does not work.

the disconnect line does not appear in a log from the usbhost kernel from the mobii which does recognise the keyboard.


I work with svn and git and I know how to do reverts, but it is not normal to have to reverse the changes to have the original source code, this has a name... fork ;) .
In https://github.com/p...dm_query.c#L718 Usb2Property is asigned with NvOdmUsbModeType_Host.

In https://github.com/p...dm_query.h#L967 it defines NvOdmUsbModeType_Host and NvOdmUsbModeType_Device

Changing Usb2Property or Usb3Property is probable that we can change host to slave. I think that Usb2Property is the USB controller for touchscreen eGalax and camera.


  • 0
standing on the shoulders of giants

#32
craskman

craskman

    Newbie

  • Members
  • Pip
  • 44 posts
  • Devices:Nexus One
@Simonta: Yes you right, I always use the ADB method BUT this time I couldn't boot my vega to use ADB, so in order to fix the boot I found that using nvflash to re-frash the boot.img only,.. it works. If there is anyway of doing it with ADB (wihout booting or just in bega's recovery mode) please share, would be great.

@Paul: I have used the tool chain "arm-eabi-4.4.0" and "arm-eabi-4.4.3" from cyanogen (nexus) git. I will be trying with AOSP version as per your suggestion. Can you share your .config,.. I think the secret relies on there:)

I will be posting my progress, there are a couple of things I would like to try:
- patch the kernel with BFS and deadline IO sched
- try to merge with tegra 2.6.35 or 36 (loads of improvements around CPU shed CFS)

In meantime if there are brave chaps doing these, please let me know.
CrK

  • 0

#33
azareus22

azareus22

    Newbie

  • Members
  • Pip
  • 6 posts

azareus22,

thanks for the pointer to the usb code.

If I boot with USB1Property set to _host instead of device in the harmony tree my keyboard is recognised by the kernel,

Jan 30 04:48:32 localhost klogd: [ 6.243414] usb 1-1: New USB device found, idVendor=413c, idProduct=2106
Jan 30 04:48:32 localhost klogd: [ 6.248271] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
Jan 30 04:48:32 localhost klogd: [ 6.253131] usb 1-1: Product: Dell QuietKey Keyboard
Jan 30 04:48:32 localhost klogd: [ 6.258027] usb 1-1: Manufacturer: Dell
Jan 30 04:48:32 localhost klogd: [ 6.263092] usb 1-1: configuration #1 chosen from 1 choice

but later in the boot process I get

Jan 30 04:48:32 localhost klogd: [ 8.583754] usb 1-1: USB disconnect, address 2

and my keyboard does not work.

the disconnect line does not appear in a log from the usbhost kernel from the mobii which does recognise the keyboard.


Hi martinbrook

In the webcam driver https://github.com/p.../shuttle.c#L672 you must add comments to the USB0 gpio hack. It works to me.

  • 0

#34
craskman

craskman

    Newbie

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

I was looking into the compilers (on MacOSx).
I am updating the cross compiler with this git (http://android.git.k...t.git;a=summary)
Also, I forgot to say that I was using the darwin10-gcc4.2 as host compiler.
There are some bits on the kernel compilation that requires the host CC, thats why I had to port the elf.h into the headers of darwin10-gcc42.
Reading a bit ahead, seems that I should use gcc44 host compiler from macports, do you confirm?
Which host cc are you using?

Thanks,
CrK

Edited by craskman, 31 January 2011 - 07:04 AM.

  • 0

#35
martinbrook

martinbrook

    Enthusiast

  • Members
  • PipPipPip
  • 180 posts
  • Location:Kettering
  • Devices:T-Mobile Pulse
  • Twitter:@vgrade
And for me now, many thanks

Hi martinbrook

In the webcam driver https://github.com/p.../shuttle.c#L672 you must add comments to the USB0 gpio hack. It works to me.


  • 0
standing on the shoulders of giants

#36
PaulOBrien

PaulOBrien

    It's My Party

  • Founder
  • PipPipPipPipPipPip
  • 36,369 posts
  • Gender:Male
  • Location:Norwich, UK
  • Devices:All the Nexus!
  • Twitter:@paulobrien

@Simonta: Yes you right, I always use the ADB method BUT this time I couldn't boot my vega to use ADB, so in order to fix the boot I found that using nvflash to re-frash the boot.img only,.. it works. If there is anyway of doing it with ADB (wihout booting or just in bega's recovery mode) please share, would be great.

@Paul: I have used the tool chain "arm-eabi-4.4.0" and "arm-eabi-4.4.3" from cyanogen (nexus) git. I will be trying with AOSP version as per your suggestion. Can you share your .config,.. I think the secret relies on there:)

I will be posting my progress, there are a couple of things I would like to try:
- patch the kernel with BFS and deadline IO sched
- try to merge with tegra 2.6.35 or 36 (loads of improvements around CPU shed CFS)

In meantime if there are brave chaps doing these, please let me know.
CrK

Hmmm, I built with the default config and it builds OK... you can get my config from /proc/config.gz on a running device too! ;)

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


#37
PaulOBrien

PaulOBrien

    It's My Party

  • Founder
  • PipPipPipPipPipPip
  • 36,369 posts
  • Gender:Male
  • Location:Norwich, UK
  • Devices:All the Nexus!
  • Twitter:@paulobrien

Paul,

I was looking into the compilers (on MacOSx).
I am updating the cross compiler with this git (http://android.git.k...t.git;a=summary)
Also, I forgot to say that I was using the darwin10-gcc4.2 as host compiler.
There are some bits on the kernel compilation that requires the host CC, thats why I had to port the elf.h into the headers of darwin10-gcc42.
Reading a bit ahead, seems that I should use gcc44 host compiler from macports, do you confirm?
Which host cc are you using?

Thanks,
CrK

My host compiler is i686-apple-darwin10-gcc-4.2.1...

I don't have gcc installed as part of my macports build (and 'which' indeed confirms the above is being used).

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


#38
craskman

craskman

    Newbie

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

Yes I can get the config.gz (lazzy me).
I really thought you weren't using the darwin-gcc, so we have pretty much the same setup. Do you remember if you had to 'manually' add the "elf.h" from somewhere to the header folder of darwin-gcc? (it is required but doesn't exist by default)

Nonetheless, tonight I will try my setup with your .config. This "smells" like a small tiny 'little' thing somewhere ;)

Thanks,
CrK

  • 0

#39
PaulOBrien

PaulOBrien

    It's My Party

  • Founder
  • PipPipPipPipPipPip
  • 36,369 posts
  • Gender:Male
  • Location:Norwich, UK
  • Devices:All the Nexus!
  • Twitter:@paulobrien

Paul,

Yes I can get the config.gz (lazzy me).
I really thought you weren't using the darwin-gcc, so we have pretty much the same setup. Do you remember if you had to 'manually' add the "elf.h" from somewhere to the header folder of darwin-gcc? (it is required but doesn't exist by default)

Nonetheless, tonight I will try my setup with your .config. This "smells" like a small tiny 'little' thing somewhere ;)

Thanks,
CrK

Hmmm, I don't remember doing that, but i've had this machine built a while so it's possible! ;)

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


#40
craskman

craskman

    Newbie

  • Members
  • Pip
  • 44 posts
  • Devices:Nexus One
Finally got it working... ;)

The compilers are fine (apart of the elf.h needs to be ported manually to darwin-gcc)

Turns out that was indeed a small tiny little thing...

I was using mkbootimg like this:

mkbootimg --kernel zImage --ramdisk ramdisk-vega.gz -o boot-vega.img --cmdline '--base 0x10000000 --pagesize 2048'

And its wrong, should be:

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

And voila, everything works now. Lets the fun begin:)

Thanks guys,
CrK

  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users