[WIP] AOSP tegra 3 port

noodles2k

Senior Member
Aug 8, 2011
684
185
0
I unplugged the usb keyboard and micro usb, and it looks like that cleaned up the log a little. The looping part at the end of the log has to do with nvavp. Googling around it sounds like this has something to do with some kind of media service. I'm thinking maybe comment out whatever loads it to stop this from even loading and see if it continues... or get a different error...

Looking through the ramdisk of the merged boot for what loads this...



the files themselves are in /system/etc/firmware
Are you using the ucode from the OUYA rom or the Transformers'? It's possible they're different.
 
Last edited:

professorpoptart

Senior Member
Jul 7, 2010
165
110
0
Are you using the ucode from the OUYA rom or the Prime's? It's likely they'll have different ones for the T33 and T30.
ouya ucode, its basically ouya with the tf700 pieces added into it. in the event of a conflict i went with what ouya had. This was all done with what i could see from in .rc files and such. So any thing compiled that a text editor cant see would not have been changed. Might have to go through ouya source on github... but not to the point I want to go that route just yet.
 
Last edited:
  • Like
Reactions: genetic608

noodles2k

Senior Member
Aug 8, 2011
684
185
0
ouya ucode, its basically ouya with the tf700 pieces added into it. in the event of a conflict i went with what ouya had. This was all done with what i could see from in .rc files and such.
Might be worth md5ing them to see if they're different. Couldn't hurt trying the tf700 nvavp ucode as well, probably won't work but it's always worth a shot.

NVAVP as you said has something to do with the media service, presumably rendering offload. It stands for NVidia Audio Video Processor. If you haven't already seen this it might be helpful. http://http.download.nvidia.com/tegra-public-appnotes/tegra-boot-flow.html
 
  • Like
Reactions: professorpoptart

professorpoptart

Senior Member
Jul 7, 2010
165
110
0
looking at the nvavp ucode files:

it looks like the ouya dropped the primary "nvavp_vid_ucode.bin" and only uses "nvavp_vid_ucode_alt.bin" which should only load if the first file is not found. (this is in /system/etc/firmware/)

the function that loads this in the kernel is below:
static int nvavp_load_ucode(struct nvavp_info *nvavp)

Anyone happen to know how to extract the ucode.bin files? or we could look through the kernel source... Specifically at nvavp_dev.c and see if there is any thing there we can leverage.

The files, as could be expected, have different md5sums. This is the AOSP tf700 and ouya OTA files. In my builds I am using the ouya's, which does not get past the nvavp loading... So 2 test (I don't expect either to work, but maybe get some new things to google) , first try the tf700 ucode file and see if there is the same error. 2nd try it without the ucode file altogether and see if it moves on without it or we get a new error...

What I'm looking for in a successful boot as far as nvavp is:
[ 4.913702] nvavp nvavp: allocated IOVM at ff00000 for AVP os
...
[ 8.634588] nvavp nvavp: using SMMU at ff00000 to load AVP kernel
[ 8.666445] nvavp nvavp: read firmware from 'nvavp_os_0ff00000.bin' (15516 b)
[ 8.688074] nvavp nvavp: entry=00000094 control=00004a80 debug=00005280 size2
[ 8.695966] nvavp nvavp: AVP os at vaddr=f0e00000 paddr=ff00000 reset_addr=04
[ 8.719040] nvavp nvavp: read ucode firmware from 'nvavp_vid_ucode_alt.bin' )
[ 8.849721] nvavp nvavp: using SMMU at ff00000 to load AVP kernel
[ 8.856061] nvavp nvavp: AVP os at vaddr=f0e00000 paddr=ff00000 reset_addr=04

Well looks like the tf700 ucode can load nvavp! Its still not booting but got exactly what I was looking for above.

Now it still sits at boot animation for about 60 seconds then I get "init: sys_prop: permission denied uid:1003 name:service.bootanit"

OK so it looks like I'm actually in android but I have no launcher (as I have removed the ouya stuff in this rom)... I'm at a black screen and when I go to manually power down I get the android shutdown toast message. side loaded nova to get up and running. still have the "ouya system" in manage apps so I have some more cleaning to do.

edit: forgot to mention but play was still fc'ing. I have tried so many things with this rom, I think I'm going to try to go through a clean AOSP port again with knowing what I know now...

I love this little time waster! something to look forward to every night!
 
Last edited:

professorpoptart

Senior Member
Jul 7, 2010
165
110
0
on irc, FreeNode #ouya-dev... Will post summary from the channel when I'm done for the night.

And..... time is up for tonight! so heres what happened...

So, I read somewhere that odexed roms cause issues when porting, and all the roms so far are odexed. I was working on a deodexed 328 OTA rom to use as the base for the port. The deodex worked fine but I got to greedy with changes and decided while I'm in the kitchen to add init.d support for the kernel... and busybox/su... after which I got a nice black screen. adb devices says I'm in recovery but no video and a ton of errors on the uart serial output. I am able to get into adb though and shell in... I got scared for a sec with all the errors and no video after the sysreq trick! At least if I break it now I can just run to the store and buy another! Anyway, I have yet to find a way to either 1) flash an OTA zip, 2) restore a CWM backup from where I'm at. I can also get to bootloader to fastboot but booting the CWMrecovery.img or the ota boot.img both seem to do nothing (other then reboot).

I was trying to push the ota update.zip line directly to the recovery command with [below] but no luck...
adb shell "echo '--update_package=SDCARD:update.zip' >> /cache/recovery/command"

Any restore methods via adb/shell let me know!

So step one get back to stock! Then flash my "non-greedy" deodexed ota rom. Once I verify that the deodexed rom works then I will use that as the base for the port and try to use that with the stock kernel and see what UART says and go from there...
 
Last edited:

gianptune

Senior Member
Oct 10, 2010
212
87
0
I was trying to push the ota update.zip line directly to the recovery command with [below] but no luck...
adb shell "echo '--update_package=SDCARD:update.zip' >> /cache/recovery/command"
This command, by itself, wont work. "adb shell echo ....." will only let you write places that uid 2000 (shell user) can write. Try "adb shell", "su", and get a root prompt, and then "echo derpy_derp >> /cache/blabla/fartypants"
 

professorpoptart

Senior Member
Jul 7, 2010
165
110
0
Might be having a display issue, have you tried hooking up to a different display and booting into recovery? Your ROM didn't overwrite CWM did it?
Now that you say that, I had the same thing happend back when I first put cwm on it. I remember posting about it. Havent had an issue for months now though...

Sent from my SAMSUNG-SGH-I337 using xda app-developers app
 

professorpoptart

Senior Member
Jul 7, 2010
165
110
0
Tried other tvs same thing, tried echoing to /recovery/command from shell in recovery and cant really tell if its doing anything but after waiting a few minutes and rebooting no changes. I tried to fastboot flash the OTA boot.img (as i'm 90% sure its kernel related) but still get a ton of uart nvhdcp errors and have to sysrq to get back to recovery. Tried fastbooting the cwm.img and it does go directly into recovery, so its booting that, as normally it tries to go into regular mtp mode...

sure would be nice to have an odin or something... but wheres the fun in that!

Tried to dd the boot.img to mmcblk0p2 no change. Its almost like a permissions thing, but I dont get any error or other feedback...

Next thing to try is to dd the parts of one of the cwm backups.
 
Last edited:

MasterZen88

Senior Member
Feb 13, 2012
569
1,162
0
on irc, FreeNode #ouya-dev... Will post summary from the channel when I'm done for the night.

And..... time is up for tonight! so heres what happened...

So, I read somewhere that odexed roms cause issues when porting, and all the roms so far are odexed. I was working on a deodexed 328 OTA rom to use as the base for the port. The deodex worked fine but I got to greedy with changes and decided while I'm in the kitchen to add init.d support for the kernel... and busybox/su... after which I got a nice black screen. adb devices says I'm in recovery but no video and a ton of errors on the uart serial output. I am able to get into adb though and shell in... I got scared for a sec with all the errors and no video after the sysreq trick! At least if I break it now I can just run to the store and buy another! Anyway, I have yet to find a way to either 1) flash an OTA zip, 2) restore a CWM backup from where I'm at. I can also get to bootloader to fastboot but booting the CWMrecovery.img or the ota boot.img both seem to do nothing (other then reboot).

I was trying to push the ota update.zip line directly to the recovery command with [below] but no luck...
adb shell "echo '--update_package=SDCARD:update.zip' >> /cache/recovery/command"

Any restore methods via adb/shell let me know!

So step one get back to stock! Then flash my "non-greedy" deodexed ota rom. Once I verify that the deodexed rom works then I will use that as the base for the port and try to use that with the stock kernel and see what UART says and go from there...

Did you use the kitchen to add init.d via the menu option or did you use the kitchen to unpack the boot.img and apply the init.d service to ramdisk?

I'm hoping I wont brick mine...Fingers crossed
 

professorpoptart

Senior Member
Jul 7, 2010
165
110
0
Did you use the kitchen to add init.d via the menu option or did you use the kitchen to unpack the boot.img and apply the init.d service to ramdisk?

I'm hoping I wont brick mine...Fingers crossed
I used the kitchen menu. I'm back up and running now. Took the whole weekend to figure it out though. Worst case just fastboot boot anything before you install and you should be fine. had i done that first I would have saved myself a weekend! lol
 

professorpoptart

Senior Member
Jul 7, 2010
165
110
0
So the good news is that due to my no video output scare I have another ouya on the way, which means I will be able to test twice as fast!... Really I will just have a backup for the next time I break it :).

What happened;
I have had issues with no video before, when i was first putting cwm on it. There must be something finicky with the way it loads hdmi video... like if a display is not detected it wont enable that piece of hardware? Or some kind of cache that needs to be cleared out by unplugging power? Not sure what exactly causes it but once it happens I have to hook it up to an old TV that has no power saving auto off functions. I had tried this after sonofskywalker had brought it up but it didn't work... so two days later after running out of options I tried it again. This time after rebooting a couple times and hitting sysrq+i in different combinations and frequencies (for about 5 minutes... at the point of giving up), I noticed the screen flickered but thing came up, sysrq'ed some more waited, screen flickered... a few more times of this.... BAM CWM comes up on the screen! flashed stock 328, and haven't had the video issue since.

Now back to work on this port!
 
Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone