Jump to content

Advent Vega kernel source code now available!


Guest PaulOBrien

Recommended Posts

Guest rvdgeer

From my limited knowledge, bad blocks surge due to excessive writing to the blocks. /system is mounted readonly, so it's only written when flashing.

Having /system on the nand (or whatever it is) storage, and /data on a partition on the sdcard would be much more profitable, as we wouldn't be risking the internal storage that much.

Correct (as far as I know)

But, repartitoning will increase the chance to have critical files being written to existing bad blocks while flashing. At least, that's what we've seen in the past (Honey Ice).

Link to comment
Share on other sites

Guest Daedric1383

Correct (as far as I know)

But, repartitioning will increase the chance to have critical files being written to existing bad blocks while flashing. At least, that's what we've seen in the past (Honey Ice).

That's a question for Luck. Imagine that is it is now, you're writing a critical file to a bad block, repartitioning could allow it to be written to a good block.

Also, bad blocks theoretically are marked as such and never used again.

But let's be honest, if it's the writing that damages the blocks, then we agree that /data as a higher risk of having them (or /cache, but let's stick to /data and /system).

Now, by increasing /system and decreasing /data, you're in practice giving /system blocks that used to be assigned to /data. Those could be bad, but they will also be in the end of /system, assuming /data is right after /system. (i belive it isn't :D)

Now, imagine that block 3 (random number) of /data got assigned to /system, and it's a bad block. It will be on the end of /system, and probably spared any writing :)

Edited by Daedric1383
Link to comment
Share on other sites

Guest rvdgeer

That's a question for Luck. Imagine that is it is now, you're writing a critical file to a bad block, repartitioning could allow it to be written to a good block.

Also, bad blocks theoretically are marked as such and never used again.

But let's be honest, if it's the writing that damages the blocks, then we agree that /data as a higher risk of having them (or /cache, but let's stick to /data and /system).

Now, by increasing /system and decreasing /data, you're in practice giving /system blocks that used to be assigned to /data. Those could be bad, but they will also be in the end of /system, assuming /data is right after /system. (i belive it isn't :D)

Now, imagine that block 3 (random number) of /data got assigned to /system, and it's a bad block. It will be on the end of /system, and probably spared any writing :)

I understand everything you're saying...

Unfortunately recent history tells us that increasing the partition size for system files (system partition) causes a lot of issues (regarding bad blocks) for a substatial amount of users. This could mean a lot of users have a lot of bad blocks on the data partition at the moment, which would be part of the system partition on repartitioning.

Like you said: the data partition has a higher risk of having bad blocks, but the amount of write actions increases the chance of them being recognized and marked as bad blocks. That, and the fact that bad blocks on the data partition mostly aren't as critical as they are on the system partition...

I read somewhere that nvflash (the only way of repartitioning at the moment, as far as I know) wipes all memory of bad blocks, so the risk of errors is highest after every repartition, no matter the partition sizes...

[Edit: added some more details]

Edited by rvdgeer
Link to comment
Share on other sites

Guest brucelee666

re. partition sizes, nice discussion but I doubt these will be increased or changed (if Cass releases a new image then it will be squashfs and fit into current structure I would think) as for my image it currently uses squashfs and is around 10mb smaller than beta1 with all gapps (gmail/youtube).

Couple of questions for Cass (or anyone who would like to answer):-

Cannot get bluetooth to work for some reason, seems to be disabled and no mac address being created in data/misc/bluetoothd dir ?

This may be the cause of that but in the boardconfig.mk we have "BOARD_HAVE_BLUETOOTH_BCM=true" set but this is not set in Cass original setup but is in the adam board - could this stop it from working ?

Also in boardconfig.mk we have "BOARD_USES_OVERLAY=true" cannot see this set in the wingray/stingray setups, is this still needed for shuttle devices or has this been removed by moto due to updates in kernel/libs ?

Link to comment
Share on other sites

Guest Scanno

Hi All,

Some news here... I have managed to make a CWM update zip that installs 4.0.4 without problems (it also boots without problems). Sadly i still have the problems when using the squashfs files (also with the zip install). So it is something i am doing wrong i guess. Should be something stupid. I am only trying to do /system/app at the moment.

I have tried to reduce the locales /languages, but that does not create enough extra space.

Can anyone post the steps they took to succesfully use squashfs with 4.0.4?

Regards,

Scanno

Edited by Scanno
Link to comment
Share on other sites

Guest Scanno

I see that you added recovery to github... when you use it, you get the black screen or reboot directly to recovery?

Corvus

It works... with the recovery image i build (see the thread at tabletroms). It boots directly into recovery. I put the pull request after i tested it out.

Look at my thread here: Recovery thread at Tabletroms

or download my recovery image (with touch) : Vega Touch Recovery v01b1

Regards,

Scanno

Link to comment
Share on other sites

Guest brucelee666

Scanno - squashfs,

1 - You have your app folder (or others lib etc) with all your files and then from terminal making sure your in /system enter "mksquashfs app app.sfs -always-use-fragments", you should now have a app.sfs file.

2 - Create a new system folder that you will use to make your yaffs image (this is where I create my system.img structure).

3 - create an empty app folder in the system dir (so your app.sfs has a folder to mount to).

4 - copy your app.sfs into your new system folder (same structure as in beta1) do the same for other folders you want to squash.

5 - so you should end up with a system folder with empty app folder and an app.sfs in the same location as your build.prop (unsquash beta1 to see structure)

6 - libc should sit in vendor/lib (think this causes issues if left in lib.sfs)

7 - mkyaffs2image as normal (just checking you have not removed the squash mount lines from the init.rc of the ramdisk ?)

If you follow same structure as beta1 with empty folders and matching sfs files and you have created the sfs using the correct command it should work (unless you have removed some other libs which stop it from booting for example while playing aroung I removed the three libnfc files and nfc apk think we don't use it but this resulted in issues with netd so could not boot but you can see from adb logcat if it is something else).

Can I take it from no reply to bluetooth working from yourself or corvus that its either not working in your image or you have not tried it yet ?

Edited by brucelee666
Link to comment
Share on other sites

Guest Scanno
Scanno - squashfs,

1 - You have your app folder (or others lib etc) with all your files and then from terminal making sure your in /system enter "mksquashfs app app.sfs -always-use-fragments", you should now have a app.sfs file.

2 - Create a new system folder that you will use to make your yaffs image (this is where I create my system.img structure).

3 - create an empty app folder in the system dir (so your app.sfs has a folder to mount to).

4 - copy your app.sfs into your new system folder (same structure as in beta1) do the same for other folders you want to squash.

5 - so you should end up with a system folder with empty app folder and an app.sfs in the same location as your build.prop (unsquash beta1 to see structure)

6 - libc should sit in vendor/lib (think this causes issues if left in lib.sfs)

7 - mkyaffs2image as normal (just checking you have not removed the squash mount lines from the init.rc of the ramdisk ?)

If you follow same structure as beta1 with empty folders and matching sfs files and you have created the sfs using the correct command it should work (unless you have removed some other libs which stop it from booting for example while playing aroung I removed the three libnfc files and nfc apk think we don't use it but this resulted in issues with netd so could not boot but you can see from adb logcat if it is something else).

Can I take it from no reply to bluetooth working from yourself or corvus that its either not working in your image or you have not tried it yet ?

Thanks for the reply. That is almost the same way i created my squashfs files, except i did not use the -always-use-fragments option. The squashfs file got mounted because i can see the contents in the app directory (and yes it was empty). I will have a go tomorrow again.

I have a good working update zip, so i do not have to recreate the image.

Regarding bluetooth, i saw it does not work with me. But i did not have time yet to look into that. At a first look i thought that we are missing some files that are present in beta1 and not in our device config. But i could be mistaken.

Regards,

Scanno

Link to comment
Share on other sites

Guest Cass67

Hi All,

Some news here... I have managed to make a CWM update zip that installs 4.0.4 without problems (it also boots without problems). Sadly i still have the problems when using the squashfs files (also with the zip install). So it is something i am doing wrong i guess. Should be something stupid. I am only trying to do /system/app at the moment.

I have tried to reduce the locales /languages, but that does not create enough extra space.

Can anyone post the steps they took to succesfully use squashfs with 4.0.4?

Regards,

Scanno

Post the image somewhere so i can have a look, it may be just something simple ...

Link to comment
Share on other sites

Guest Scanno

Hi guys

Not managing with squashfs....Can anybody have a look at this logcat ? I did what i also did with my squashfs update to vegaics. In this case i just used app.sfs to make sure it has nothing to do with libs or framework.

Logcat

Thanks in advance

Link to comment
Share on other sites

Guest brucelee666

Scanno, Corvus (anyone else interested), Re. power menu so its the same as beta1.

Previously Cass mentioned and I posted a direct link to here

These changes alone dont get the upgraded power menu option, I think you also need the updated framework res values in Cass's device setup located here mainly the updated config.xml here currently I think this is set to 2 in the original config.xml source files and this sets it to 1.

Waiting on a recompile to confirm but if you have not already got this working you may want to have a look.

edit:- It worked power menu now same as beta1, so you do need both files in first link and also to merge the config.xml files from Cass device into shuttle device setup

Edited by brucelee666
Link to comment
Share on other sites

Guest Scanno

Hey Guys,

Regarding BT, i followed the directions Cass gave me in PM, but that did not make BT work,

keep getting this in logcat:

21:34:43.214 Info bluedroid 151 bt_enable: ret: -1, errno: 19

21:34:43.314 Info bluedroid 151 bt_enable: ret: -1, errno: 19

21:34:43.417 Error bluedroid 151 bt_enable: Timeout waiting for HCI device to come up, error- -1,

21:34:43.454 Error BluetoothAdapterStateMachine 151 failed to prepare bluetooth, abort turning on

Running Youtube HD movies, there are codec errors. Guess i am missing still some stuff ??

Logcat shows:

21:35:12.636 Info OMXCodec 95 [OMX.google.h264.decoder] AVC profile = 100 (High), level = 31

21:35:12.643 Info OMXCodec 95 [OMX.google.h264.decoder] video dimensions are 320 x 240

21:35:12.644 Info OMXCodec 95 [OMX.google.h264.decoder] Crop rect is 320 x 240 @ (0, 0)

21:35:12.667 Debug dalvikvm 1123 GC_CONCURRENT freed 1585K, 13% free 20207K/22983K, paused 3ms+11ms

21:35:12.865 Debug dalvikvm 1123 GC_FOR_ALLOC freed 1623K, 13% free 20160K/22983K, paused 70ms

21:35:12.956 Debug dalvikvm 1123 GC_FOR_ALLOC freed 775K, 12% free 20299K/22983K, paused 48ms

21:35:13.650 Debug YouTube 1123 youtube.core.client.DefaultAnalyticsClient.trackEvent:87 event [version=3.3.0, action=PlayStarted, label=STREAM_720P,WIFI, value=267]

21:35:13.673 Error SoftAVC 95 Decoder failed: -2

21:35:13.673 Error OMXCodec 95 [OMX.google.h264.decoder] ERROR(0x80001001, -1007)

21:35:13.673 Error MediaPlayer 1123 error (1, -2147483648)

21:35:13.673 Error MediaPlayer 1123 Error (1,-2147483648)

21:35:13.673 Warning YouTube 1123 youtube.core.player.YouTubePlayer$InternalListener.onError:718 MediaPlayer error during playback [what=1, extra=-2147483648]

21:35:13.676 Warning YouTube 1123 youtube.core.player.YouTubePlayer$InternalListener.onError:725 Retrying MediaPlayer error [retry=1, max=3]

21:35:13.689 Warning TimedEventQueue 95 Event 3 was not found in the queue, already cancelled?

21:35:13.689 Warning AudioFlinger 95 session id 54 not found for pid 1123

21:35:13.689 Debug MediaPlayer 1123 Couldn't open file on client side, trying server side

21:35:13.689 Info AwesomePlayer 95 setDataSource_l('http://redirector.c.youtube.com/videoplayback?id=6e38051f4d64d205&itag=22&source=youtube&uaopt=no-save&upn=mVMo3S1V-Xk&el=related&devKey=ATpxuMO4AN5NR1nGmfaQDBQO88HsQjpE1a8d1GxQnGDm&app=youtube_gdata&ip=0.0.0.0&ipbits=0&expire=1338060881&sparams=id,itag,source,uaopt,upn,ip,ipbits,expire&signature=D195BCAAACEC3186D28EBEE32CE7916E5BF430AC.BF6F969454C096DB1F60834F8CC37ACC031FD221&key=yta1&androidcid=android-google''>http://redirector.c.youtube.com/videoplayback?id=6e38051f4d64d205&itag=22&source=youtube&uaopt=no-save&upn=mVMo3S1V-Xk&el=related&devKey=ATpxuMO4AN5NR1nGmfaQDBQO88HsQjpE1a8d1GxQnGDm&app=youtube_gdata&ip=0.0.0.0&ipbits=0&expire=1338060881&sparams=id,itag,source,uaopt,upn,ip,ipbits,expire&signature=D195BCAAACEC3186D28EBEE32CE7916E5BF430AC.BF6F969454C096DB1F60834F8CC37ACC031FD221&key=yta1&androidcid=android-google')

21:35:13.689 Verbose ChromiumHTTPDataSource 95 connect on behalf of uid 10055

21:35:13.689 Info ChromiumHTTPDataSource 95 connect to http://redirector.c.youtube.com/videoplayback?id=6e38051f4d64d205&itag=22&source=youtube&uaopt=no-save&upn=mVMo3S1V-Xk&el=related&devKey=ATpxuMO4AN5NR1nGmfaQDBQO88HsQjpE1a8d1GxQnGDm&app=youtube_gdata&ip=0.0.0.0&ipbits=0&expire=1338060881&sparams=id,itag,source,uaopt,upn,ip,ipbits,expire&signature=D195BCAAACEC3186D28EBEE32CE7916E5BF430AC.BF6F969454C096DB1F60834F8CC37ACC031FD221&key=yta1&androidcid=android-google @0

21:35:14.191 Info OMXCodec 95 [OMX.google.h264.decoder] AVC profile = 100 (High), level = 31

21:35:14.198 Info OMXCodec 95 [OMX.google.h264.decoder] video dimensions are 320 x 240

21:35:14.199 Info OMXCodec 95 [OMX.google.h264.decoder] Crop rect is 320 x 240 @ (0, 0)

21:35:15.209 Error SoftAVC 95 Decoder failed: -2

21:35:15.216 Error OMXCodec 95 [OMX.google.h264.decoder] ERROR(0x80001001, -1007)

21:35:15.235 Error MediaPlayer 1123 error (1, -2147483648)

21:35:15.235 Error MediaPlayer 1123 Error (1,-2147483648)

21:35:15.235 Warning YouTube 1123 youtube.core.player.YouTubePlayer$InternalListener.onError:718 MediaPlayer error during playback [what=1, extra=-2147483648]

21:35:15.235 Warning YouTube 1123 youtube.core.player.YouTubePlayer$InternalListener.onError:725 Retrying MediaPlayer error [retry=2, max=3]

21:35:15.235 Warning TimedEventQueue 95 Event 3 was not found in the queue, already cancelled?

21:35:15.235 Warning AudioFlinger 95 session id 55 not found for pid 1123

@Cass: Thanks for the PM. Will send you one soon. The update zip sets the permissions correctly and the busybox links are also created by the script. The problem with the update zip is that empty directories are not copied, so the squashfs is never mounted. Creating some placeholder files solved it. I have now a correctly working update zip that has squashfs working.

@Brucelee666: Thanks for the kernel, but it seems that with your kernel i cannot boot into recovery anymore. But i managed to change the ramdisk of the kernel i use and mkbootimg it back correctly.

Regards,

Scanno

Link to comment
Share on other sites

Guest brucelee666

Scanno,

Thanks for pointing out the boot.img issue, made a typing error when created now fixed so can boot into recovery (had not tried since I created the img).

Re. bluetooth I get the exact same error so, nice to know its not just my img.

edit:- Cass, Scanno, Corvus - pm sent hopefully you get the image and can have a look, let me know if it goes ok.

Edited by brucelee666
Link to comment
Share on other sites

Guest Scanno
Scanno, Corvus (anyone else interested), Re. power menu so its the same as beta1.

Previously Cass mentioned and I posted a direct link to here

These changes alone dont get the upgraded power menu option, I think you also need the updated framework res values in Cass's device setup located here mainly the updated config.xml here currently I think this is set to 2 in the original config.xml source files and this sets it to 1.

Waiting on a recompile to confirm but if you have not already got this working you may want to have a look.

edit:- It worked power menu now same as beta1, so you do need both files in first link and also to merge the config.xml files from Cass device into shuttle device setup

Can you give a rundown what you did to make it work? That way we can add it to the devce config. If you have a github account, send to me and i can add you to the vegaics account so you can add changes yourself.

I guess we will have to change to power menu to make the reboot into recovery work.

Who made the recovery reboot app? If we know the correct command, it should be easy to implement. We can add the changed framework project to the vegaics manifest so it is downloaded with a repo sync.

Regards,

Scanno

Link to comment
Share on other sites

Guest brucelee666

Can you give a rundown what you did to make it work? That way we can add it to the devce config. If you have a github account, send to me and i can add you to the vegaics account so you can add changes yourself.

I guess we will have to change to power menu to make the reboot into recovery work.

Who made the recovery reboot app? If we know the correct command, it should be easy to implement. We can add the changed framework project to the vegaics manifest so it is downloaded with a repo sync.

Regards,

Scanno

Scanno,

Attached zip with changes required, don't have github account so will leave to you to update if thats ok:-

You should see in the overlay folder how my device/nvidia/shuttle/overlay/frameworks/base folder looks and what files are added/changed compared to same location on github device setup.

Also in the frameworks folder you should see what files need to be copied/changed and the location of each file in the /frameworks folder of your ICS source.

edit - zip removed new one added here

Edited by brucelee666
Link to comment
Share on other sites

Guest brucelee666

Trying to figure what I could post as my 100th post and thought why not info about gralloc.tegra.so.

This may be of interest or you may already know but cannot remember seeing info posted as to why the gralloc.tegra.so libs from the latest acer, asus, moto tegra2 ics roms prevent our roms from booting.

So on investigation it is down to above manufacturers using a different kernel config/kconfig options, these are:-

In /drivers/video/tegra/kconfig under the depends line of the "TEGRA_OVERLAY" they have "default y" entered and under "TEGRA_DC_EXTENSIONS" they have no default option.

Under our kconfig in the same location we have no default option in the "TEGRA_OVERLAY" and "default y" under the "TEGRA_DC_EXTENTIONS".

This also means in the .config of the kernel they have "CONFIG_TEGRA_OVERLAY = y" and "# CONFIG_TEGRA_DC_EXTENSIONS is not set" while we have no entry for the overlay and "CONFIG_TEGRA_DC_EXTENSIONS=y".

If you go with the acer/asus/moto config options your kernel will boot with one of their gralloc libs, if you go with our setup your image boots with gralloc used in beta1 and the current ICS test images.

Just to say our kernel config options are correct nvidia moved away from overlay to dc_extensions in the latest 39.4 and even more so in ver3.* kernel versions, its acer/asus/moto who have decided not to use the most upto date 39.4 config/kconfig.

Have attached a modified boot.img with a kernel that will work with the the other gralloc.tegra.so, this will not boot with the current beta1/ICStst gralloc lib - Using this boot.img with an asus/acer/moto gralloc may also give issues using an ICS image that has "BOARD_USES_OVERLAY" set in the boardconfig, it will work as I have tried it but seemd to cause freeze issues (not tried yet with this option removed).

You may ask does this matter and I guess only if you want to test other gralloc/nvidia libs from other roms, my thought was on checking the a100 files as this is a tegra2/1024x600/maybe 512mb/1gb tablet and may have been a better fit or the latest 4.0.4 proprietary stingray libs.

overlaytestboot.img

Edited by brucelee666
Link to comment
Share on other sites

Guest brucelee666

A quick way to test the above is place a gralloc.tegra.so (from ICS acer/asus/moto rom) that you know prevents rom to boot in vendor/lib/hw (of beta1 or 4.0.4 tests roms) then try to boot it should not, now flash only the above attached boot.img and it should now boot into rom.

To reverse you delete the gralloc from vendor/lib/hw and reboot again it should not boot, flash the roms original boot.img and it will now boot again back to normal.

Link to comment
Share on other sites

Guest brucelee666

Okay bluetooth now working.

Boardconfig removed the bluetooth_bcm line.

Copy the hciattach and nv_hciattach from beta1 and place in your system/bin directory with root access, reboot turn on bluetooth should now work - also copy the main.conf from beta1 system/etc/bluetooth dir.

Cass,Scanno,Corvus if your looking at my test image think it has nv_hciattach so copy over the beta1 hciattach and it should work, I remember trying this before probably one of the first things but must have changed something since (bcm line or busybox) or forgot to do something simple then like reboot but at least it now works as before.

Edited by brucelee666
Link to comment
Share on other sites

Guest Scanno

Okay bluetooth now working.

Boardconfig removed the bluetooth_bcm line.

Copy the hciattach and nv_hciattach from beta1 and place in your system/bin directory with root access, reboot turn on bluetooth should now work - also copy the main.conf from beta1 system/etc/bluetooth dir.

Cass,Scanno,Corvus if your looking at my test image think it has nv_hciattach so copy over the beta1 hciattach and it should work, I remember trying this before probably one of the first things but must have changed something since (bcm line or busybox) or forgot to do something simple then like reboot but at least it now works as before.

Thanks for the info. Replacing the main.conf and hciattach and the modification in the boardconfig did the trick and i got BT working. Keeps me wondering why the hciattach that is build standard is not working.

Link to comment
Share on other sites

Guest brucelee666

Scanno,

Thanks for the message re. my test rom, glad everything seemed to work ok - I think now bluetooths working I have it at least to same stage as beta1 (camera,bluetooth,hq video, general speed about the same, gapps work) so am pleased with my initial efforts now on to trying to fix other issues.

re. hciattach I guess the working one is amended in some way to work with nv_hciattach, now in the vega device setup on cyanogenmod boardconfig they have a line "BOARD_HAVE_BLUETOOTH_CSR:=true" I have not tried compiling with this option but maybe this sets something.

re. reboot to recovery in the same location above you should find a folder "setrecovery" I guess this is the code used to compile the "setrecovery" we have in our bin dir.

Check these post over on tabletroms for other info "Cass request" read on from here for the discussion in next few posts, I posted this back then with a link to how I think the apk may work.

Link to comment
Share on other sites

Guest Scanno
Scanno,

Thanks for the message re. my test rom, glad everything seemed to work ok - I think now bluetooths working I have it at least to same stage as beta1 (camera,bluetooth,hq video, general speed about the same, gapps work) so am pleased with my initial efforts now on to trying to fix other issues.

re. hciattach I guess the working one is amended in some way to work with nv_hciattach, now in the vega device setup on cyanogenmod boardconfig they have a line "BOARD_HAVE_BLUETOOTH_CSR:=true" I have not tried compiling with this option but maybe this sets something.

re. reboot to recovery in the same location above you should find a folder "setrecovery" I guess this is the code used to compile the "setrecovery" we have in our bin dir.

Check these post over on tabletroms for other info "Cass request" read on from here for the discussion in next few posts, I posted this back then with a link to how I think the apk may work.

I agree, with BT working and video working (the standard device config does not copy all the files needed) i also have a rom that equals vegaics beta1). I will have a look at the boardconfig from cm7. I have the cm7 sources anyway because of the recovery images i built based on cwm 5.0.2.8. I also see that the errata is enabled in the cm7 boardconfig. Perhaps that is also something to try...

First i have to update the device config on github with all the changes that are needed to get to the "beta1" stage. After that some experimenting.

Regards,

Scanno

Link to comment
Share on other sites

Guest brucelee666

Scanno,

I don't have 3g so can't test but one thing I noticed was Eduardo added an entry to the init.rc "service pppd_gprs /system/etc/init.gprs-pppd" but could not see a "init.gprs-pppd", a quick search turned this up maybe you want to create and add this to your system/etc folder and see what happens.

Also I see Stransky(tabletroms) mention about screen timeout, you may have noticed I increased mine on my test image to "30secs,5min,15,30,1hour,2hours", I have attached my amended arrays.xml file.

This needs to replace the arrays.xml file in "device/nvidia/shuttle/overlay/packages/apps/settings/res/values" and all the other values-* folders in this location - or amend the timeout_entries and timeout_values to what you want.

arrays.xml

Edited by brucelee666
Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.