# 10.2 device tree on github, WIP, not a downloadable ROM



## drmarble (Jan 19, 2012)

I have built a 10.1 rom for the hp tenderloin. I am not posting the actual rom because it has a way to go (no working SDCARD). It is so far from a daily driver that I restore my 10.0 nandroid after testing a build so I can use the tablet. Instead, I am posting a link to the source code so other developers can build their own roms and maybe we can get a fully working cm10.1 rom.
My device tree is on github:
https://github.com/d.../tree/10.1-ugly

On the 10.1-ugly branch is a semi working device tree for hp tenderloin cm10.1.
Many more details are included in the README file.

If you aren't set up to build cyanogenmod roms for the tenderloin, this won't be any use to you. It truely is developer only.
It is a work in progress. Very, very much a WIP.
Sound doesn't work.
Camera doesn't work.
Bluetooth doesn't work.
Most important: NO SDCARD!

This is heavily reliant on the work of Arne Coucheron.
His invaluable patches include:
http://review.cyanog...d.org/#/c/34375
http://review.cyanog....org/#/c/34377/
http://review.cyanog....org/#/c/34374/
and his highly useful google doc:
https://docs.google....IyI4/edit?pli=1
Without his work, I would still have no display.

All my patches are in one big, ugly patch. I included various gerrit patches that my patch is dependent on. I'll work on neatening it up so the commits are readable. I just wanted to get this out there so others could work on it and we can get cm10.1 working.

I think that this is everything.
If you figure out how to get the SDCARD to mount, let me know on freenode #cyanogenmod-tenderloin, RootzWiki, or XDA. Share your work! Between all of us, we can get this working.


----------



## drmarble (Jan 19, 2012)

The legendary jcsullins has produced a patch that allows the SDCARD to mount!
I will update my github/drmarble with this patch.
Still no sound. Most other things seem to work.
I'm still not posting a rom, this is for homebrewers only.
I have no faith that this rom won't brick you tablet after giving all you password to hackers.


----------



## Dorregaray (Jan 26, 2012)

drmarble said:


> Still no sound. Most other things seem to work.


Have you tried jcsullins audio patches:
http://review.cyanogenmod.org/#/c/33638/
http://review.cyanogenmod.org/#/c/33646/


----------



## Gradular (Feb 1, 2012)

drmarble said:


> The legendary jcsullins has produced a patch that allows the SDCARD to mount!
> I will update my github/drmarble with this patch.
> Still no sound. Most other things seem to work.
> I'm still not posting a rom, this is for homebrewers only.
> I have no faith that this rom won't brick you tablet after giving all you password to hackers.


 Sweet!!! I figured it was something simple as mounting the right block, but I'm not wise in the ways of os programing yet.

Sent from my cm_tenderloin using RootzWiki


----------



## Colchiro (Aug 26, 2011)

That's one home brew, I'd like to sample....


----------



## drmarble (Jan 19, 2012)

Thanks to more machinations by the famous jcsullins the rom has SOUND!
I pushed the needed commit to my github for your building pleasure.
Note, it has sound from the speakers. I don't think it works from the headphones. The mike doesn't work. Bluetooth is non-existant (Bluedroid anyone? needs implementation.)
Yes, you are stuck with the phablet interface. It is supposed to look like that. Google eliminated the tablet interface so we have a notification bar along with the status (button) bar. There are hacks to get the tablet interface but it is very deprecated. I rather like the pull down controls.
It does have James Sullins' low power commits and they do work. -5 mA sleep current.
It is almost useable. Tell me (or pull request on github) (or pm) (or #cyanogenmod-tenderloin on Freenode) (or smoke signals...) if you have any patches. since it uses two non-cm repositories it really isn't a cm-rom so we can't use gerrit to exchange ideas.


----------



## nevertells (Oct 29, 2011)

drmarble said:


> Thanks to more machinations by the famous jcsullins the rom has SOUND!
> I pushed the needed commit to my github for your building pleasure.
> Note, it has sound from the speakers. I don't think it works from the headphones. The mike doesn't work. Bluetooth is non-existant (Bluedroid anyone? needs implementation.)
> Yes, you are stuck with the phablet interface. It is supposed to look like that. Google eliminated the tablet interface so we have a notification bar along with the status (button) bar. There are hacks to get the tablet interface but it is very deprecated. I rather like the pull down controls.


Great to hear. Some screen shots would be nice or a YouTube video would be really cool. You know J.C. is always up to the challenge. Bet he conquers mic and bluetooth before you know it. Can't say it enough, you guys are amazing!


----------



## alexeiw123 (Oct 15, 2011)

This is an exciting thread to be sure...

I've never built a ROM from source before, but I'm very keen to run this, is there much more needed before you will compile a .zip for people to have a look?

Great effort, thank you.

Sent from my cm_tenderloin using RootzWiki


----------



## drmarble (Jan 19, 2012)

To go with the sound patch I removed one commit from the build process: # 34375 # MemoryHeapBase: ifdef for gingerbread/froyo compatibility We aren't using froyo libs apparently, thanks to jcsullins' new sound patch. This means we can remove -DBINDER_COMPAT from Boardconfig.mk. This is the great dissadvantage of my putting up a "big ugly patch" to get cm10.1 to build. If I had taken my time and made separate, simple commits removing things like this would be easier. I'm going to work on another branch without "ugly" in its name that does the same things.
Dorregaray's camera patches don't apply, some merge errors that should be easy to fix. Again, makes me wish I hadn't made just one patch.
Best of luck getting this thing useable. I'll try to remember to put needed build changes into the README and this thread.


----------



## drmarble (Jan 19, 2012)

I have made major changes. We now have a camera, thanks to Dorregaray. It is stretched and upside down but it has a picture.
I have also created a new (and somewhat neater) branch at

```
https://github.com/drmarble/android_device_hp_tenderloin/tree/b10.1
```
I separated the large commit enabling cm10.1 into several separate commits so it is easier to follow. I expect to do further development on this b10.1 branch.
You no longer need any of the commits to either frameworks directory. Dorregaray's camera patches work without gingerbread support. I have modified the README file to explain what is changed and how to use this to generate a cm10.1 rom. Please read the README file, that's why it's there.


----------



## Gradular (Feb 1, 2012)

drmarble said:


> I have made major changes. We now have a camera, thanks to Dorregaray. It is stretched and upside down but it has a picture.
> I have also created a new (and somewhat neater) branch at
> 
> ```
> ...


 Any chance of getting a a zip to flash so those with nonworking build machines like myself can experience this?

Sent from my GT-P3110 using RootzWiki


----------



## Dorregaray (Jan 26, 2012)

drmarble said:


> I have made major changes. We now have a camera, thanks to Dorregaray. It is stretched and upside down but it has a picture.
> I have also created a new (and somewhat neater) branch at
> 
> ```
> ...


You have missed to merge camerahal directory to b10.1 branch. I've created a pull request adding missing files plus the camera config patch.


----------



## JIMcGhee (Oct 15, 2011)

I tried building and am having problems. 
I'm using the same directory structure where I normally build for SGS2 10.1.
I used the readme file at
https://github.com/drmarble/android_device_hp_tenderloin/tree/b10.1
to modify the local_manifests/roomservice.xml, run repo sync, run the patch script, and built it but it wouldn't boot.

Then I realized that I hadn't downloaded the propritary files so I got them from the tp while running 10.0.
But, now when I try to build I get an error:

Notice file: external/strace/NOTICE -- /home/jim/android/cm10.1/out/target/product/tenderloin/obj/NOTICE_FILES/src//system/xbin/strace.txt
Import includes file: /home/jim/android/cm10.1/out/target/product/tenderloin/obj/EXECUTABLES/vim_intermediates/import_includes
make: *** No rule to make target `vendor/hp/tenderloin/proprietary/lib/libc2d2_z180.so', needed by `/home/jim/android/cm10.1/out/target/product/tenderloin/system/lib/libc2d2_z180.so'. Stop.
make: *** Waiting for unfinished jobs....
Export includes file: external/vim/src/Android.mk -- /home/jim/android/cm10.1/out/target/product/tenderloin/obj/EXECUTABLES/vim_intermediates/export_includes

I noticed when I was loading the propritary files that there were a couple that weren't found and I assume that is my problem.
Where can I find the proper files?


----------



## drmarble (Jan 19, 2012)

use unzip-files.sh on the latest 3-3 (3-4?) jcsullins rom, available from goo.im. That has all the latest proprietary files.
cd device/hp/tenderloin
./unzip-files.sh ~/Downloads/cm-10-20130304-EXPERIMENTAL-tenderloin-FOR_LIMITED_TESTING_ONLY_CAM.zip
I have updated the camera files due to an error on my part in committing the camerahal directory. I am still learning git, be patient. Dorregaray caught that mistake and submitted a pull request. It is now merged and fixed. He also got the settings working. The picture is still stretched and flips/mirrors in odd fashions but it is a picture. Like all features of this rom, it is still a WIP.
Because of the update to camera files you should resync to branch b10.1. It should be fast to download. Good luck on building.


----------



## Dorregaray (Jan 26, 2012)

drmarble said:


> The picture is still stretched and flips/mirrors in odd fashions but it is a picture.


let me know if changing the camera mode to webos style or front cam makes any difference


----------



## JIMcGhee (Oct 15, 2011)

drmarble said:


> use unzip-files.sh on the latest 3-3 (3-4?) jcsullins rom, available from goo.im. That has all the latest proprietary files.
> cd device/hp/tenderloin
> ./unzip-files.sh ~/Downloads/cm-10-20130304-EXPERIMENTAL-tenderloin-FOR_LIMITED_TESTING_ONLY_CAM.zip
> I have updated the camera files due to an error on my part in committing the camerahal directory. I am still learning git, be patient. Dorregaray caught that mistake and submitted a pull request. It is now merged and fixed. He also got the settings working. The picture is still stretched and flips/mirrors in odd fashions but it is a picture. Like all features of this rom, it is still a WIP.
> Because of the update to camera files you should resync to branch b10.1. It should be fast to download. Good luck on building.


Thanks for the help! It now builds, installs, and runs great!!
Skype works so the mic and sound are working fine.
I tried the camera and although the preview is srunk and upside down, the picture it takes is correct.








I tried both stills and video and the both worked fine except for the wonky preview.
If someone tells me how to change the camera mode, I'll try that.
Amazon kindle, ES File, Google Maps all work fine.
Wifi works great and so does google play.
Even though wifi is set to always keep wifi on during sleep, it doesn't. In fact it takes a few seconds to turn it on when you wake it. Not a big deal. I noticed this problem on 10.0 too. Except 10.0 didn't take so long to turn it on.
Can't find much to complain about!















You guys have really done a GREAT JOB!!
I'm really impressed at how quickly this is comming togeather.


----------



## alexeiw123 (Oct 15, 2011)

I spent an hour or so trying to research how to create a build environment on my win7 64 PC, but I've given up based on three points;

* no Linux experience outside of android
* seems some more experience builders have difficulty getting successful builds
* PC is invaluable for uni at the moment, seems it would take many hours on my dated computer.

Do you (devs) think this is far away from getting a highly experimental .zip posted online for very enthusiastic users like myself? this is all I'll post on the matter, I don't want to clutter the brilliant progress being made in this thread.

Keep up the brilliant work

Sent from my Galaxy Nexus using RootzWiki


----------



## drmarble (Jan 19, 2012)

SGA has built a rom from this code (I think he's using my device tree). You can find it over on xda: http://forum.xda-developers.com/showthread.php?t=2174642&page=24 is where the talk of the 10.1 rom begins. A link to his rom is:
http://goo.im/devs/SGA/CM10.1/CM10.1_TESTING_ONLY_Apr0213.zip
His is a little behind (no camera) but otherwise pretty close to what I'm building.
When things slow down at university, set up a dual boot linux/windows wystem and enjoy building. It takes me 20 min on an I5 with 12gig ram, 3 hours on a core2duo with 4g ram. That's after the first (twice as slow) build which populates the ccache.


----------



## alexeiw123 (Oct 15, 2011)

Thanks!

I should get around to it, because what I've seen of Linux, I do like.

The PC was a beast 4 years ago haha, probably take hours! Uni break in sight so maybe then. Hopefully creating a build environment isn't too difficult to figure out.

I'll grab that file as soon as I'm home and have a look, thanks again!

Sent from my Galaxy Nexus using RootzWiki


----------



## JIMcGhee (Oct 15, 2011)

alexeiw123 said:


> I spent an hour or so trying to research how to create a build environment on my win7 64 PC, but I've given up based on three points;
> 
> * no Linux experience outside of android
> * seems some more experience builders have difficulty getting successful builds
> ...


It's not nearly as hard as it sounds and lots of folk around here are willing to help.
Here's a set of guides from Red Flea that include how to build TP CM10.0:

https://skydrive.live.com/?cid=b3bff0d42ae1e534&id=B3BFF0D42AE1E534!107

and the only change not covered in the last page and a half here to change to 10.1 is to use

repo init -u git://github.com/CyanogenMod/android.git -b cm-10.1

instead of

repo init -u git://github.com/CyanogenMod/android.git -b jellybean

in the Touchpad CM10 instructions.
Let us know how it works out for you.


----------



## alexeiw123 (Oct 15, 2011)

drmarble said:


> Let us know how it works out for you.


thanks for that info! funny thing is, that damn procrastination had got to me; I set up a dual boot for ubuntu, was just popping back in to here to get an idea of what I'd need to do next.

I installed CM10.1 on the touchpad, and it seems brilliant, I did a dirty flash only with a system wipe, but seems to be performing just fine! I have two assignments to finish tomorrow on my day off work, then I'm going to make a goal of figuring out this android building business! (and actually understand it)


----------



## shumash (Apr 23, 2012)

Last night I built my frankenrom manifest, a kludge of CM, AOSP, AOKP, PA, drmarble's device tree, and my github modified sources, and it boots and runs. It's pretty snappy, none of the lagginess of the previous alpha releases. If you want to play with it, here's the link to my manifest:

https://github.com/s...id/tree/staging

What works
Camera
sdcard mounts
Wifi
various AOKP and PA tweaks
sound

What doesn't
Bluetooth
20130301 4.2.2 gapps
No navbar soft buttons in portrait (but I can use the PA pie)
Power draw is beastly. It also doesn't seem to reduce it during sleep
Probably more

I'm making some changes and recompiling to see if I can fix some of the issues.


----------



## alexeiw123 (Oct 15, 2011)

JIMcGhee said:


> It's not nearly as hard as it sounds and lots of folk around here are willing to help.
> Here's a set of guides from Red Flea that include how to build TP CM10.0:
> 
> https://skydrive.liv...0D42AE1E534!107
> ...


Using these instructions, I have (hopefully) set up a build environment in ubuntu 12.4.2 LTS 64bit running in virtualbox. After a few bumps but google managed to pull me straight.

I had many issues yesterday getting a dual boot working to my satisfaction, due to my PC running a RAID1 array. I managed to destroy windows boot a few times before deciding it was too important with my uni to have windows working properly and fell back on virtualbox.

Anyway, I created a local_manifest.xml from the README on drmarbles 10.1 branch, and have hit *repo sync -j16 *and terminal looks very exciting indeed. fingers crossed this is a correct step.

I haven't found out yet where or when to apply the patches, and which ones from the readme file? Is that at the build step?

Learning a lot here - this is my first dabble into linux, git, and android building - so I'm really just running off of instruction haha! Exciting though.

I'm leaving this thing working and heading off to a wedding in about 2-3 hours, so we'll see what it's up to when I get home.. (maybe the next morning, don't think I'll attempt a first build after an open bar)


----------



## Colchiro (Aug 26, 2011)

alexeiw123 said:


> I had many issues yesterday getting a dual boot working to my satisfaction, due to my PC running a RAID1 array. I managed to destroy windows boot a few times before deciding it was too important with my uni to have windows working properly and fell back on virtualbox.


Sounds like my experience... clobbered my laptop raid when I thought I was installing it on an sdcard.


----------



## drmarble (Jan 19, 2012)

Well, I tried the latest qualcomm 4.2.2 drivers. They don't work. everything is fine up to the screen turning on. I assume that is because we are using legacy qcom repos (4.1) and they don't play nice with 4.2 drivers. The latest drivers we can use are the ones from jcsullins 0303 cm10 build. If someone can get the latest 4.2 drivers working, let the rest of us know how.
I've been looking at the logcats trying to figure out the sleep and wifi problems (I think they are related). I'll let everyone know if I find any solutions.


----------



## JIMcGhee (Oct 15, 2011)

alexeiw123 said:


> Using these instructions, I have (hopefully) set up a build environment in ubuntu 12.4.2 LTS 64bit running in virtualbox. After a few bumps but google managed to pull me straight.
> 
> I had many issues yesterday getting a dual boot working to my satisfaction, due to my PC running a RAID1 array. I managed to destroy windows boot a few times before deciding it was too important with my uni to have windows working properly and fell back on virtualbox.
> 
> ...


Just look at the readme just before the local_manifest.xml text and you'll see a bunch of gits. Execute these after the repo sync and before you build. Each time you run repo sync it will delete all of these patches because they are all cherry picks.
Enjoy the wedding and the build.


----------



## Dorregaray (Jan 26, 2012)

drmarble said:


> Well, I tried the latest qualcomm 4.2.2 drivers. They don't work. everything is fine up to the screen turning on. I assume that is because we are using legacy qcom repos (4.1) and they don't play nice with 4.2 drivers. The latest drivers we can use are the ones from jcsullins 0303 cm10 build. If someone can get the latest 4.2 drivers working, let the rest of us know how.


have you checked logcat or dmesg for errors when using the 4.2.2 drivers?


----------



## alexeiw123 (Oct 15, 2011)

JIMcGhee said:


> Just look at the readme just before the local_manifest.xml text and you'll see a bunch of gits. Execute these after the repo sync and before you build. Each time you run repo sync it will delete all of these patches because they are all cherry picks.
> Enjoy the wedding and the build.


My build stopped after a few hours with no zip, I'm going to clear it all out and start again from scratch and try to understand the process a bit more... Great learning though.

Sent from my cm_tenderloin using Tapatalk HD


----------



## JIMcGhee (Oct 15, 2011)

alexeiw123 said:


> My build stopped after a few hours with no zip, I'm going to clear it all out and start again from scratch and try to understand the process a bit more... Great learning though.
> 
> Sent from my cm_tenderloin using Tapatalk HD


Now that you mention it, mine did the same thing. No error message or anything to indicate the build was over except it stopped building.
Anywho, I just restarted the build and it completed a couple of hours later with a working zip!
Sorry I didn't mention it before, but it slipped my mind plus I thought it was just me.


----------



## alexeiw123 (Oct 15, 2011)

JIMcGhee said:


> Now that you mention it, mine did the same thing. No error message or anything to indicate the build was over except it stopped building.
> Anywho, I just restarted the build and it completed a couple of hours later with a working zip!
> Sorry I didn't mention it before, but it slipped my mind plus I thought it was just me.


No problem, It took up a fair bit more time than I'd hoped for, and with an assignment due this week I think I'll pick this up another day. I'm going to read through some build guides and try to understand the process better: I had a few errors on some terminal commands and found other ways to satisfy the next step, so I wouldn't mind clearing out all the files I'd synced and built and starting fresh.

I'm still using -SGA- april 02 build without working camera, seems to be going quite well, there's no newer zip of plain CM10 posted around is there?


----------



## JIMcGhee (Oct 15, 2011)

alexeiw123 said:


> No problem, It took up a fair bit more time than I'd hoped for, and with an assignment due this week I think I'll pick this up another day. I'm going to read through some build guides and try to understand the process better: I had a few errors on some terminal commands and found other ways to satisfy the next step, so I wouldn't mind clearing out all the files I'd synced and built and starting fresh.
> 
> I'm still using -SGA- april 02 build without working camera, seems to be going quite well, there's no newer zip of plain CM10 posted around is there?


Not that I know of but I haven't been looking since I'm addicted to building my own!









'make clean' will delete all the output from the build.


----------



## drmarble (Jan 19, 2012)

I was wondering why the power consumption was up around 90mA during sleep. I found the cause, the camera driver. If I remove the camera driver the power consumption goes back down to 20mA (still testing). I'll revert those commits from a branch on my github account (probably c10.1, haven't done it yet). Meanwhile, you homebrewers and developers, just revert the camera commits to get better sleeping power use. I guess that the camera is staying on all the time.
For those who need the camera, it will still exist in the b10.1 branch, c10.1 will be camera free until I (or someone) can figure out why it's consuming 70mA all the time. I don't really use the camera anyway. It's just good for video chatting with other people and I don't really like other people all that much.
I will keep folks posted on any other changes I make. Or, you can just peek at my github every now and then.
By the way, I'm sorry to see SGA go from developing. I never used any of his roms and wished he would have make his changes public so other developers could benefit but he did create roms for our touchpads. The pressure of releasing a rom is why I only released source code. I can't be blamed if anything goes wrong on someone's tablet by running my code, they built it and flashed it. Not releasing roms does take some of the pressure off. Maybe the pressure of all the roms he was maintaining was more than he (or his significant other) (or his job/school) could stand. Me, I just push changes to git.
good luck to all you home brewers.


----------



## Dorregaray (Jan 26, 2012)

drmarble said:


> I was wondering why the power consumption was up around 90mA during sleep. I found the cause, the camera driver. If I remove the camera driver the power consumption goes back down to 20mA (still testing). I'll revert those commits from a branch on my github account (probably c10.1, haven't done it yet). Meanwhile, you homebrewers and developers, just revert the camera commits to get better sleeping power use. I guess that the camera is staying on all the time.


Does this battery drain occurs even if the camera was never started since the boot? Or after opening and closing the camera app?


----------



## drmarble (Jan 19, 2012)

Dorregaray: I just checked and the power drain is high (90ma) even if the camera hasn't been used. when built without the camera, sleep power is 19ma. I wish it was 4 ma but something uses more power than 10.0. for those who want or need a camera, it works. The user, builder actually, has a choice.


----------



## Dorregaray (Jan 26, 2012)

drmarble said:


> Dorregaray: I just checked and the power drain is high (90ma) even if the camera hasn't been used. when built without the camera, sleep power is 19ma. I wish it was 4 ma but something uses more power than 10.0. for those who want or need a camera, it works. The user, builder actually, has a choice.


so if the camera is not even initialized this is really odd to me. it shouldn't consume the battery at all. and on CM9 & CM10 it doesn't. are you using exactly the same kernel sources as it is used for CM9/CM10 builds?


----------



## drmarble (Jan 19, 2012)

It seems odd to me too. The kernel source is the same, the ICS tree. Just the power and camera patches from gerrit. I haven't looked at logcat dmsg or any such thing. I don't know what could be consuming power before the camera is used but something does.


----------



## nevertells (Oct 29, 2011)

drmarble said:


> It seems odd to me too. The kernel source is the same, the ICS tree. Just the power and camera patches from gerrit. I haven't looked at logcat dmsg or any such thing. I don't know what could be consuming power before the camera is used but something does.


Speaking of the kernel, you seem to be pretty close to this project. How is it that most posts of screen captures of CM10 or 10.1 running on other devices show that the version of the kernel being used is 3.0XX and the TouchPad is still using the older 2.0XX kernel? At one time there was discussion that work was being done to move the TouchPad to 3.0XX, but that all seems to have gone by the wayside. Any enlightenment you could provide would be appreciated.


----------



## Dorregaray (Jan 26, 2012)

nevertells said:


> Speaking of the kernel, you seem to be pretty close to this project. How is it that most posts of screen captures of CM10 or 10.1 running on other devices show that the version of the kernel being used is 3.0XX and the TouchPad is still using the older 2.0XX kernel? At one time there was discussion that work was being done to move the TouchPad to 3.0XX, but that all seems to have gone by the wayside. Any enlightenment you could provide would be appreciated.


We're using the 2.6.35 kernel that HP released with the WebOS 3.0.x for Touchpad. The 2.6.35 kernel has also been used for the HP's Froyo build.
The HP didn't released any newer kernel for Touchpad and will never release.
The Android 4.x has been designed and released with 3.x kernel. There was some work done by dalingreen and jcsullins on getting the msm 3.0 kernel to work on Touchpad but the work hasn't been finished yet so we don't have fully working 3.0 kernel on Touchpad.
So the TP is one of the minority of the devices that are running Jellybean on such old kernel.


----------



## Dorregaray (Jan 26, 2012)

I've just pushed a pull request fixing the camera preview orientation to b10.1 branch.


----------



## nevertells (Oct 29, 2011)

Dorregaray said:


> We're using the 2.6.35 kernel that HP released with the WebOS 3.0.x for Touchpad. The 2.6.35 kernel has also been used for the HP's Froyo build.
> The HP didn't released any newer kernel for Touchpad and will never release.
> The Android 4.x has been designed and released with 3.x kernel. There was some work done by dalingreen and jcsullins on getting the msm 3.0 kernel to work on Touchpad but the work hasn't been finished yet so we don't have fully working 3.0 kernel on Touchpad.
> So the TP is one of the minority of the devices that are running Jellybean on such old kernel.


Great explanation, thanks!


----------



## drmarble (Jan 19, 2012)

Dorregaray:
I merged you latest camera changes into my b10.1 branch.
Thanks for your continued support of the camera. Nobody else understands it as well as you.
I like you suggestion to rename /system/lib/hw/camera.msm8660.so to disable the camera. I'll check that this cuts down the sleep power drain. This will be good for folks using prebuilt roms with the camera enabled who prefer low sleep power drain.
Thanks again for you continued work.


----------



## Dorregaray (Jan 26, 2012)

@dmarble please make a test with rom made agains b10.11 branch - remove the camera.msm8660.so from /system/lib/hw and reboot the device. The camera driver won't exist so no camera code will be loaded. Then check the battery drain. I've made such test and haven't seen any improvement on battery drain.
If you can confirm thatnit will mean that it's not the driver itself causing a problem.


----------



## drmarble (Jan 19, 2012)

dorregaray: I tested renaming that library file and rebooting. It didn't change the sleep power consumption, still 74mAmps. Something else in the camera patches is causing this increase. I'm stumped. All your changes are merged into my b10.1 branch so anyone who wants can look at either one of our branches and try to find the cause.
I should have named them c10.1 for camera and b10.1 for better power. Too late now.


----------



## Dorregaray (Jan 26, 2012)

@dmarble: Have you been cherry picking the jcsullins patches:
http://review.cyanog....org/#/c/33635/
http://review.cyanog....org/#/c/33632/
http://review.cyanog....org/#/c/33633/
http://review.cyanog....org/#/c/31595/
http://review.cyanog....org/#/c/33634/
http://review.cyanog....org/#/c/33630/
when building your test rom from b10.1 branch? Maybe it's worth considering merging those changes to b10.1 and c10.1?

You can try to add TARGET_DISABLE_ARM_PIE := true to BoardConfig.mk in c10.1 branch and check the impact on battery drain.
This is the only change that the camera patch introduces (except the camera driver itself). It disables the -fPIE -pie compilation flags (see build/core/combo/TARGET_linux-arm.mk) that breaks the camera driver.

btw. shumash in his rom thread at xda-developers announced that he has solved the battery drain issue while having the camera driver installed: http://forum.xda-developers.com/showthread.php?t=2223665&page=5
maybe he will share with us the details about the fix


----------



## drmarble (Jan 19, 2012)

I have included all those patches and more in my device tree and kernel. I list the recommended kernel patches in the README file on github since I don't really have a separate kernel tree. I have every touchpad commit for jellybean except your camera commits. I also have all the kernel commits.
You can look at shumash's github and see the changes he made. He seems to be pretty conscientious about updating. SGA was more closed mouthed about his changes. I've been able to sync and build his schizoid roms; the jellybean ones worked fine. None of his changes look like they should make a big difference. I just don't understand what is eating that power.
I'll look into the TARGET_DISABLE_ARM_PIE := true.


----------



## drmarble (Jan 19, 2012)

Dorregaray:
You were right about the power drain. It is caused by TARGET_DISABLE_ARM_PIE := true.
Without that line, 4mA, with disabled ARM_PIE, 74mA.
Now we know. I wonder what it does that increases power use so much in cm10.1.
Back to weekend chores.


----------



## Dorregaray (Jan 26, 2012)

drmarble said:


> Dorregaray:
> You were right about the power drain. It is caused by TARGET_DISABLE_ARM_PIE := true.
> Without that line, 4mA, with disabled ARM_PIE, 74mA.
> Now we know. I wonder what it does that increases power use so much in cm10.1.
> Back to weekend chores.


This option just disables the adress space layout randomization (ASLR). I wasn't expecting it to have such huge impact on battery drain...

We 're using some proprietary libs for camera that comes from froyo. On froyo the libs has been prelinked to be loaded at some particular addresses in memory. When the image is compiled with ASLR other apps/libs are loaded to this addresses preventing those libs from being loaded.
You can try loading camera.msm8660.so to the rom made using c10.1 branch and see if the camera will be loading. If so we don't need to disable the PIE, if not, we need to keep this option to have a working camera. Or we can get the libs from gingerbread leak but as far as I know the only one device having this rom has been bricked when the owner tried to install the CM9 or CM10 on it.


----------



## drmarble (Jan 19, 2012)

I tried the camera without ARM_PIE. I can get one picture using the native app and then the camera crashes. uCam doesn't even find the camera. It seems we do need ARM_PIE for the camera libs to work in 10.1. I wonder how shumash got low power usage with the camera. I didn't see any major changes in his github.


----------



## shumash (Apr 23, 2012)

drmarble said:


> I tried the camera without ARM_PIE. I can get one picture using the native app and then the camera crashes. uCam doesn't even find the camera. It seems we do need ARM_PIE for the camera libs to work in 10.1. I wonder how shumash got low power usage with the camera. I didn't see any major changes in his github.


FWIW, I am, too. One notable is that I can compile using either your c10.1 or b10.1 device trees, and the camera works with either of them. As I pointed out in my edited post, I did patch John Newby's a6 fixes, but you already said you tried that, and it didn't do anything. You can look at my cm-10.1 branch manifest. I was testing out some bluez repos to see if I could get that working. Perhaps the non-working CM bluetooth is causing issues?


----------



## JIMcGhee (Oct 15, 2011)

Dorregaray said:


> I've just pushed a pull request fixing the camera preview orientation to b10.1 branch.


I must be doing something wrong.








I just built what I thought was b10.1 but the camera preview is still upside down and squished.
Looking at the README for b10.1 and c10.1, the only difference I see is that b uses:
<project name="drmarble/android_device_hp_tenderloin" path="device/hp/tenderloin" remote="github" revision="10.1-ugly" />

and c10.1 uses:

<project name="drmarble/android_device_hp_tenderloin" path="device/hp/tenderloin" remote="github" revision="c10.1" />

in (local_manifests/roomservice.xml).

I initialize the repository to 10.1, like normal, 
add the text from the b10.1 README to roomservice.xml, 
execute all the gits from the README, 
and then build with 'brunch tenderloin'.
Am I missing something?


----------



## drmarble (Jan 19, 2012)

So, I am behind in the README for b10.1. That is the working camera branch (almost identical to the ugly one but nicer commits to bring up cm10.1) You should use branch b10.1 for working camera and high sleep power consumption. c10.1 has no camera support (almost works) and excellent sleep power consumption.
The preview is all stretched/shrunk/ugly. the pictures are good. According to Dorregaray (the camera expert) rotation isn't supposed to apply to preview mode, only picture taking. Not preadjusting preview helps certain apps that use the camera. I wouldn't know, I don't use the camera except to test it works. If you need and use the camera, use b10.1. and let us know here if it works or doesn't work with your essential apps.
So, you should use:
<project name="drmarble/android_device_hp_tenderloin" path="device/hp/tenderloin" remote="github" revision="b10.1" />
It shouldn't take long to resync since they are just different branches of the same repo. Only the first time syncing is slow because it needs to get the whole repo. This is just downloading a few changes. It is a little different then the ugly branch (camera settings changes) so it should work a bit better for you.
Glad it built ok for you.


----------



## JIMcGhee (Oct 15, 2011)

drmarble said:


> So, I am behind in the README for b10.1. That is the working camera branch (almost identical to the ugly one but nicer commits to bring up cm10.1) You should use branch b10.1 for working camera and high sleep power consumption. c10.1 has no camera support (almost works) and excellent sleep power consumption.
> The preview is all stretched/shrunk/ugly. the pictures are good. According to Dorregaray (the camera expert) rotation isn't supposed to apply to preview mode, only picture taking. Not preadjusting preview helps certain apps that use the camera. I wouldn't know, I don't use the camera except to test it works. If you need and use the camera, use b10.1. and let us know here if it works or doesn't work with your essential apps.
> So, you should use:
> <project name="drmarble/android_device_hp_tenderloin" path="device/hp/tenderloin" remote="github" revision="b10.1" />
> ...


With b10.1, the camera preview is now right side up but it is still squished. Haven't had time to try it with skype but it does take pictures with the camera app.
Thanks for the update.


----------



## drmarble (Jan 19, 2012)

Dorregaray:
I merged in your latest commits. I don't notice much difference.
Maybe I should just send folks over to your github for the camera branch.
I can't figure out how Shumash gets the camera to work from my c10.1 branch. For me, it pops up with a picture and then closes with a gallery error. I get the same error if I try the b10.1 branch without ARM_PIE. Something goes wrong in memory and then camera, gallery and audioflinger all crash. I do get a little bit of preview even without any of your camerahal included. I just don't understand how the camera works.
I'm trying builds with some of Arne Coucheron's legacy ics/froyo camera patches. They don't seem to change anything.


----------



## Dorregaray (Jan 26, 2012)

drmarble said:


> I'm trying builds with some of Arne Coucheron's legacy ics/froyo camera patches. They don't seem to change anything.


I don't expect them to change anything - we don't need this stuff. You can PM me the links so I can tell you if anything make sense for our camera.


----------



## drmarble (Jan 19, 2012)

It looks like Arne Coucheron has updated his qcom display-legacy tree. We have been using the cm-10.1 branch. This is now renamed cm-10.1_old. Modify your local manifest!.
There are a lot of changes to his new cm-10.1 branch. I haven't tried it yet (tornadoes in the neighbourhood). I did try his HWC branch but my build wasn't stable. It semed to allow hardware acceleration. I'll try his new cm-10.1 branch later and tell you what I learn. Or, you tell us what you learn.
I just wanted to warn you that your builds might break. Modify that local manifest .xml.


----------



## JIMcGhee (Oct 15, 2011)

drmarble said:


> It looks like Arne Coucheron has updated his qcom display-legacy tree. We have been using the cm-10.1 branch. This is now renamed cm-10.1_old. Modify your local manifest!.
> There are a lot of changes to his new cm-10.1 branch. I haven't tried it yet (tornadoes in the neighbourhood). I did try his HWC branch but my build wasn't stable. It semed to allow hardware acceleration. I'll try his new cm-10.1 branch later and tell you what I learn. Or, you tell us what you learn.
> I just wanted to warn you that your builds might break. Modify that local manifest .xml.


If I understand you correctly, if we build as is, we get Arne's changes and if we change the two qcom patches revision to cm-10.1_old, we get our normal stuff. Right??
I tried building without the rename and the build got an error.
Thanks for working so hard on this!!!


----------



## Dorregaray (Jan 26, 2012)

@dmarble: I've made a patch disabling the PIE for camerahal only, so you could build a rom without adding TARGET_DISABLE_ARM_PIE := true to BoardConfig.mk
but I haven't tested if it works (for sure it compiles), here it is if you want to try it: http://pastebin.com/najFZdjk


----------



## drmarble (Jan 19, 2012)

Dorregaray:
I tried out your patch with TARGET_DISABLE_ARM_PIE := true commented out. It didn't make the camera work. It still took a couple of pictures and then said gallery stopped and closed. Apparently, it wasn't enough of a change.

JimMcGhee:
You are correct. use arco's cm-10.1_old branches. Everything works just fine. You can build with his new branches. It boots up but crashes often when the screen is on. According to logcat, it looks like something goes wrong with adreno200.so. Someone needs to look into what isn't working and fix it.

Everyone else:
Wifi is still flakey. I just toggle it off/on/off/on and it comes back up. I wish the dock would be on the side in landscape mode.Otherwise, it seems to work pretty well. Still needs lots more work. What we really need is a new 3.x kernel. Then we could put in modern features. Keep on cm10.1 folks. Share your improvements with other developers. We will get this working well eventually.


----------



## ericdabbs (Aug 25, 2011)

drmarble said:


> Dorregaray:
> I tried out your patch with TARGET_DISABLE_ARM_PIE := true commented out. It didn't make the camera work. It still took a couple of pictures and then said gallery stopped and closed. Apparently, it wasn't enough of a change.
> 
> JimMcGhee:
> ...


Is there a way to get the new 3.x kernel on the Touchpad? I just thought there was always some issue stopping us from getting the 3.x kernel. I am sure JCSullins would have thought about it by now if there was a way. Maybe the focus is to make sure everything is stable on a 2.6.35 kernel first?


----------



## DroidTouchpad_22 (Dec 6, 2012)

There is already some people who are working at kernel 3.x

https://github.com/jcsullins/kernel-tenderloin-3.0
https://github.com/b-man/msm-3.4


----------



## drmarble (Jan 19, 2012)

I have started on 3.08 using jcsullins' staging2 branch (https://github.com/j...-tenderloin-3.0).
I had to revert the latest sound commit from my branch to get it to boot (AudioFlinger errors). It has no boot animation, no wifi, no overclock, no sound, touch stone causes lockup, and probably many other problems. All it really does is boot and taunt you. There is hope for a newer kernel with ION instead of pmem so we could use real qcom 4.2.2 graphics. I'm going back go the old 2.6 kernel until I make some more progress.
Here's a screen shot:







I'll put up changes to my github if I make any progress.


----------



## Gradular (Feb 1, 2012)

drmarble said:


> I have started on 3.08 using jcsullins' staging2 branch (https://github.com/j...-tenderloin-3.0).
> I had to revert the latest sound commit from my branch to get it to boot (AudioFlinger errors). It has no boot animation, no wifi, no overclock, no sound, touch stone causes lockup, and probably many other problems. All it really does is boot and taunt you. There is hope for a newer kernel with ION instead of pmem so we could use real qcom 4.2.2 graphics. I'm going back go the old 2.6 kernel until I make some more progress.
> Here's a screen shot:
> View attachment 38339
> ...


that's a start though and there is hope...

Sent from my GT-P3110 using RootzWiki


----------



## Colchiro (Aug 26, 2011)

drmarble said:


> All it really does is boot and taunt you.


The story of my life..... Hope it works for you. This would be a sweet deal.


----------



## drmarble (Jan 19, 2012)

I'm making progress on the 3.08 kernel. I now have wi-fi. I had to rebuild compat-wireless for a 3.0x kernel.
Still no overclock, sound, touchstone, or stability. I'll push up the changes sometime. I want it to be more usable.


----------



## nevertells (Oct 29, 2011)

Rumor has it that Dalingrin and possibly others had been working on the 3.XX kernel for the TouchPad before he bailed out do to school needing his attention. Don't know what kind of response you will get from him, maybe you have already tried, but he might be able to offer some pointers and maybe even what code he had already developed.


----------



## drmarble (Jan 19, 2012)

I am using dahlingrin/jcsullins 3.08 source code for my build. I'm just picking up where they left off. I forked jcsullins' repo. I used his compat wireless work to get wi-fi working. Don't worry, I'm not working in a vacuum. I am standing on the shoulders of giants. Nobody has touched the code for almost a year. All I've done so far is get it to boot up with cm10.1. Not much original work on my part yet. I'm still learning.
Right now I am reading logcats, kmsgs, etc from a locked up but still running touchpad. I think SurfaceFlinger seized up. It makes my brain hurt. I see why they stopped working on it. But without a more modern kernel with ION instead of pmem we really won't be able to go much farther. 10.1 is pretty kludgy right now. This just seemed like the best place to exert my efforts.


----------



## shumash (Apr 23, 2012)

drmarble said:


> I am using dahlingrin/jcsullins 3.08 source code for my build. I'm just picking up where they left off. I forked jcsullins' repo. I used his compat wireless work to get wi-fi working. Don't worry, I'm not working in a vacuum. I am standing on the shoulders of giants. Nobody has touched the code for almost a year. All I've done so far is get it to boot up with cm10.1. Not much original work on my part yet. I'm still learning.
> Right now I am reading logcats, kmsgs, etc from a locked up but still running touchpad. I think SurfaceFlinger seized up. It makes my brain hurt. I see why they stopped working on it. But without a more modern kernel with ION instead of pmem we really won't be able to go much farther. 10.1 is pretty kludgy right now. This just seemed like the best place to exert my efforts.


The kernel condition at this point may be sufficient for remolten to get his CWM Touch Recovery project moving again, do you think?. I really appreciate the knowledge you bring to bear on this. Down and dirty in the kernel is above my paygrade.


----------



## drmarble (Jan 19, 2012)

The kernel build right up. My changes were just for wifi and sound (elimination). It does seem to lock up the display some but that might not happen in a recovery. They don't use SurfaceFlinger do they? It's problems shouldn't have any effect on a recovery. He should get it off of jcsullins' (or my) github.
I haven't worked much with kernels either but somebody needs to try. It's just C after all, how hard can it be.


----------



## shumash (Apr 23, 2012)

drmarble said:


> --SNIP--
> 
> ... It's just C after all, how hard can it be.


Chortle. You make funny.


----------



## Colchiro (Aug 26, 2011)

... and now 4.3 is coming in a few weeks... http://www.androidpolice.com/2013/04/26/google-is-working-on-and-testing-android-4-3-its-still-jelly-bean/


----------



## drmarble (Jan 19, 2012)

I just got my replacement espresso maker (warranty from DeLonghi). I should start making more progress on porting the Cyanogenmod Samsung 8660 kernel to the touchpad. This should allow us to use the real cm10.1 qcom video tree instead of the legacy one. Using the jcsullins et.al. 3.0 kernel only worked with legacy. I'm working on combining the hp features/chips/libs into the Samsung kernel which does work with the new trees.


----------



## jcsullins (Sep 27, 2011)

drmarble said:


> I just got my replacement espresso maker (warranty from DeLonghi). I should start making more progress on porting the Cyanogenmod Samsung 8660 kernel to the touchpad. This should allow us to use the real cm10.1 qcom video tree instead of the legacy one. Using the jcsullins et.al. 3.0 kernel only worked with legacy. I'm working on combining the hp features/chips/libs into the Samsung kernel which does work with the new trees.


Yeah, that 3.0 kernel port was done about a year ago ... the qcom video stuff has changed a bit since then.


----------



## shumash (Apr 23, 2012)

drmarble said:


> I just got my replacement espresso maker (warranty from DeLonghi). I should start making more progress on porting the Cyanogenmod Samsung 8660 kernel to the touchpad. This should allow us to use the real cm10.1 qcom video tree instead of the legacy one. Using the jcsullins et.al. 3.0 kernel only worked with legacy. I'm working on combining the hp features/chips/libs into the Samsung kernel which does work with the new trees.


I trying to fix my OC'd kernel for CM9 users who complain that it doesn't mount the sdcard when flashed on an installed CM9 ROM. Can you give me some idea where I might look to find out why that's happening? I thought the sdcard mount point was set in vold.fstab and had nothing to do with the kernel.


----------



## drmarble (Jan 19, 2012)

I don't know why the kernel should affect sdcard mounting. I thought it was all over in the device tree. Wish I could help. cm 9, 10, and (kang)10.1 all use the same kernel. Google just keeps changing the mounting system and we fix it in the device.


----------



## shumash (Apr 23, 2012)

drmarble said:


> I don't know why the kernel should affect sdcard mounting. I thought it was all over in the device tree. Wish I could help. cm 9, 10, and (kang)10.1 all use the same kernel. Google just keeps changing the mounting system and we fix it in the device.


yah, that's what I thought. It's the same kernel for all of them, but when I flashed it over a CM9 nightly, it didn't see any files on the sdcard. It may be some filesystem issue rather than a mounting issue. I'll try replacing boot.img in the zip file and see if that makes a difference.


----------



## jcsullins (Sep 27, 2011)

shumash said:


> yah, that's what I thought. It's the same kernel for all of them, but when I flashed it over a CM9 nightly, it didn't see any files on the sdcard. It may be some filesystem issue rather than a mounting issue. I'll try replacing boot.img in the zip file and see if that makes a difference.


Remember that the boot.img (i.e. the uImage.CyanogenMod file that moboot loads) is a combined kernel+ramdisk.

Although the kernel (proper) can be the same between the different ROMs (at least now), the ramdisk most likely cannot.


----------



## shumash (Apr 23, 2012)

jcsullins said:


> Remember that the boot.img (i.e. the uImage.CyanogenMod file that moboot loads) is a combined kernel+ramdisk.
> 
> Although the kernel (proper) can be the same between the different ROMs (at least now), the ramdisk most likely cannot.


That makes sense. Did the ramdisk change between CM9 and CM10? If it did, it would be easy to separate out the ramdisk from a CM9 boot.img and recombine it with a hacked kernel.


----------



## jcsullins (Sep 27, 2011)

shumash said:


> That makes sense. Did the ramdisk change between CM9 and CM10? If it did, it would be easy to separate out the ramdisk from a CM9 boot.img and recombine it with a hacked kernel.


Yes, it has. To be safe, it's best to use the exact ramdisk that came with the ROM (they do change every once in a while).


----------



## shumash (Apr 23, 2012)

jcsullins said:


> Yes, it has. To be safe, it's best to use the exact ramdisk that came with the ROM (they do change every once in a while).


Worked. Thanks.


----------



## drmarble (Jan 19, 2012)

Still nothing useable on the 3.0 kernel front. That new qcom video stuff is hard to fit in. I've managed to get it to boot enough to give me klogs but it still won't finish booting. I'll keep you posted. It's kind of like doing a really big crossword puzzle.
The real information is that a recent commit http://review.cyanogenmod.org/#/c/42991/ causes our home screens to get all messed up again. The icons don't all fit on the screen since they eliminated stretching for tablets. People keep believing that the code correctly sets the icon spacing for all tablets. Well, they're wrong. Once again, I have built and submitted a patch to fix it. You need to apply http://review.cyanogenmod.org/#/c/43117/ or your home screens will not look right. So, all you home brewers, apply this patch, and if it helps you, give it a +1 on Gerritt. That will help it get merged.


----------



## Dorregaray (Jan 26, 2012)

Have anyone tried removing the -fstack-protector flag from build/core/combo/TARGET_linux-x86.mk? Maybe getting rid of it can help with battery drain when having PIE disabled for camera? Also we could try using -Ofast instead of -O2/O3 to enable some more optimization. Does it make sense?


----------



## shumash (Apr 23, 2012)

I've been having no problem repo syncing, replacing the external/tinyalsa source folder with one that has jcsullins multivalued control commit, then making the ROM. All of a sudden, I'm getting this error:


```
in function audio_route_apply_path:device/hp/tenderloin/audio/audio_route.c:261: error: undefined reference to 'mixer_ctl_set_multivalue'<br />
collect2: ld returned 1 exit status<br />
make: *** [/home/admin/android/skz/out/target/product/tenderloin/obj/SHARED_LIBRARIES/audio.primary.tenderloin_intermediates/LINKED/audio.primary.tenderloin.so] Error 1<br />
```
I've checked asoundlib.h in external/tinyalsa/include/tinyalsa and it has the reference defined. I've moved the header file around to see if it could find it in its own directory, defined the reference in another header file. Nothing works. The only thing I can do is copy audio.primary.tenderloin.so into the LINKED folder, do a make bacon -i, wait for the audio.primary.tenderloin.so in the LINKED folder to disappear, and then recopy audio.primary.tenderloin.so into it so the build completes successfully.

Any ideas?


----------



## Dorregaray (Jan 26, 2012)

shumash said:


> I've been having no problem repo syncing, replacing the external/tinyalsa source folder with one that has jcsullins multivalued control commit, then making the ROM. All of a sudden, I'm getting this error:
> 
> 
> ```
> ...


Are you sure that the repo sync didn't reverted the jcsullins patches for external/tinyalsa? It looks like some jcsullins patch has been reverted.


----------



## shumash (Apr 23, 2012)

Dorregaray said:


> Are you sure that the repo sync didn't reverted the jcsullins patches for external/tinyalsa? It looks like some jcsullins patch has been reverted.


Rather than cherry-pick the patch on the tinyalsa source each time I sync, I delete the folder and copy in a patched tinyalsa source folder that I store outside the build directory. Are you saying the jcsullins' patches aren't required anymore, or that changes to tinyalsa require that I apply the patch each time I sync?

EDIT: Problem caused for unknown reasons; problem solved by cleaning the out directory and starting the build from scratch.


----------



## Dorregaray (Jan 26, 2012)

Returning to the TARGET_DISABLE_ARM_PIE case you can try to not use this option but instead add the following line to the build.prop:

```
kernel.randomize_va_space:1
```
or add


```
<br />
write /proc/sys/kernel/randomize_va_space 1<br />
```
to on init section in init.tenderloin.rc
It fixes the preview crashes on some Samsung devices (thx to TheWisp for finding it) - maybe it will work for TouchPad too.


----------



## JIMcGhee (Oct 15, 2011)

I see that jcsullins has merged a bunch of stuff bui I am not sure about the current state of things. There is now a d10.1 branch but its readme is the same as the c10.1. Should I use the c or the d branch? Should I use the qcom cm-10.1 or the cm-10.1_old drivers? When I use the d10.1 branch and the qcom cm-10.1 drivers, I get an error compiling. 
What are you guys using?








Any chance of listing your patch batch file and your local_manifests/roomservice.xml?
If there's anything I can do to help test or whatever, just let me know.


----------



## shumash (Apr 23, 2012)

Here's the lines I modified in the BoardConfig.mk to incorporate the new backports driver source:

```
<br />
# Define kernel config for inline building<br />
TARGET_KERNEL_CONFIG := tenderloin_android_defconfig<br />
KERNEL_WIFI_MODULES:<br />
cd external/backports-3.10-2; $(MAKE) defconfig-ath6kl; ./scripts/driver-select ath6kl<br />
export CROSS_COMPILE=$(ARM_EABI_TOOLCHAIN)/arm-eabi-; $(MAKE) -C external/backports-3.10-2 KLIB=$(KERNEL_SRC) KLIB_BUILD=$(KERNEL_OUT) ARCH=$(TARGET_ARCH) $(ARM_CROSS_COMPILE)<br />
# export CROSS_COMPILE=$(ARM_EABI_TOOLCHAIN)/arm-eabi-; $(MAKE) -C external/backports-3.10-2 KLIB=$(KERNEL_SRC) KLIB_BUILD=$(KERNEL_OUT) ARCH=$(TARGET_ARCH) $(ARM_CROSS_COMPILE) install-modules<br />
cp `find $(KERNEL_OUT)/$(TARGET_KERNEL_SOURCE) -name *.ko` $(KERNEL_MODULES_OUT)/<br />
arm-eabi-strip --strip-debug `find $(KERNEL_MODULES_OUT) -name *.ko`<br />
cd external/backports-3.10-2; ./scripts/driver-select restore<br />
TARGET_KERNEL_MODULES := KERNEL_WIFI_MODULES<br />
```


----------



## drmarble (Jan 19, 2012)

Shumash:
I don't think your Boardconfig.mk will work. I tried it like that. Those scripts don't exist any more. Here is what I use:


```
# Define kernel config for inline building<br />
TARGET_KERNEL_CONFIG := tenderloin_android_defconfig<br />
TARGET_KERNEL_SOURCE := kernel/hp/tenderloin<br />
<br />
EXTRA_MODULES:<br />
    $(MAKE) -C external/backports defconfig-ath6kl<br />
    export CROSS_COMPILE=$(ARM_EABI_TOOLCHAIN)/arm-eabi-; $(MAKE) -C external/backports KLIB=$(KERNEL_SRC) KLIB_BUILD=$(KERNEL_OUT) ARCH=$(TARGET_ARCH) $(ARM_CROSS_COMPILE)<br />
    cp `find external/backports -name *.ko` $(KERNEL_MODULES_OUT)/<br />
    arm-eabi-strip --strip-debug `find $(KERNEL_MODULES_OUT) -name *.ko`<br />
    $(MAKE) -C external/backports clean<br />
<br />
TARGET_KERNEL_MODULES := EXTRA_MODULES
```
Obviously, change your directories as needed.
I'm not sure about the arm-eabi-strip --strip-debug command. It works with it included.


----------



## shumash (Apr 23, 2012)

drmarble said:


> Shumash:
> I don't think your Boardconfig.mk will work. I tried it like that. Those scripts don't exist any more. Here is what I use:
> 
> 
> ...


Yah, as I said in IRC, I had to copy the driver-select script from the compat-drivers source to the scripts in the backports source. I like your commands better anyway. I'll try them.

EDIT: Worked out of the box. Thanks.


----------



## shumash (Apr 23, 2012)

drmarble said:


> --SNIP--
> 
> I'm not sure about the arm-eabi-strip --strip-debug command. It works with it included.


That strips out the debug symbols to make the binaries smaller. Comment out the line if you want to use sysfs commands to track the debugging stuff that jcsullins put in.


----------



## drmarble (Jan 19, 2012)

After testing, I'm going back to compat-wireless 3.5. I get too many SODs.
Also, I agree with the opinion expressed by jcsullins on #cyanogenmod-touchpad. It isn't worth building in line every time. Just build once, get the .ko files for your kernel, copy to prebuilts and copy back over with each build. If the code for ath6kl etc. doesn't change we don't need to keep rebuilding the modules. This should save time on builds. I set up a branch for inline building to get wifi to work with a 3.08 kernel. That misbegotten son keeps changing so I need to keep rebuilding. But wifi is the least of my problems with that kernel.


----------



## jcsullins (Sep 27, 2011)

drmarble said:


> After testing, I'm going back to compat-wireless 3.5. I get too many SODs.
> Also, I agree with the opinion expressed by jcsullins on #cyanogenmod-touchpad. It isn't worth building in line every time. Just build once, get the .ko files for your kernel, copy to prebuilts and copy back over with each build. If the code for ath6kl etc. doesn't change we don't need to keep rebuilding the modules. This should save time on builds. I set up a branch for inline building to get wifi to work with a 3.08 kernel. That misbegotten son keeps changing so I need to keep rebuilding. But wifi is the least of my problems with that kernel.


I haven't had a SOD yet on CM9/CM10 with the latest backports drivers.

Grabbing /proc/last_klog after the reset from the SOD could help diagnose the cause.


----------



## shumash (Apr 23, 2012)

jcsullins said:


> I haven't had a SOD yet on CM9/CM10 with the latest backports drivers.
> 
> --SNIP--


Ditto with Schizoid CM10.1. As far as building inline, I agree, but I feel like I should stay consistent with milaq's nightlies.


----------



## drmarble (Jan 19, 2012)

Here's the last_klog2 from my last SOD. Looks a lot like the previous one. Spinlock problems.
http://pastebin.com/wt16vnJB
This is on my own cm10.1 build (very very similar to the one on my github, I just haven't commited and pushed in a while).
It's working fine with the old compat-wireless.
shumash, it make sence to stay the same as milaq's configuration. It makes it easier for anyone to use others changes. I should move over myself. Lots of nifty new kernel and device features you two are developing. What we really need is a cm10.1 tree on gerritt. Or two, one for kernel, one for device.


----------



## jcsullins (Sep 27, 2011)

drmarble said:


> Here's the last_klog2 from my last SOD. Looks a lot like the previous one. Spinlock problems.
> http://pastebin.com/wt16vnJB
> This is on my own cm10.1 build (very very similar to the one on my github, I just haven't commited and pushed in a while).
> It's working fine with the old compat-wireless.
> shumash, it make sence to stay the same as milaq's configuration. It makes it easier for anyone to use others changes. I should move over myself. Lots of nifty new kernel and device features you two are developing. What we really need is a cm10.1 tree on gerritt. Or two, one for kernel, one for device.


OK, that one should be fixed now.

See https://github.com/jcsullins/backports-3.10-2/commit/80d57bfdb1d1d4c24dd560146ae56a0724895e6a

Please let me know if you can find any others.


----------



## shumash (Apr 23, 2012)

drmarble said:


> --SNIP--
> What we really need is a cm10.1 tree on gerritt. Or two, one for kernel, one for device.


I agree. One of the issues that we need to decide is whether we intend to follow milaq's lead in his "use distinct local version" kernel commit. As I found out, the vermagic screws up my kernel builds, but I don't know which developer is/is not using his local version. We all need to use a standardized naming convention or else we won;t be able to share code easily.


----------



## shumash (Apr 23, 2012)

[DERP]


----------



## jcsullins (Sep 27, 2011)

More soon...


----------



## Gradular (Feb 1, 2012)

jcsullins said:


> View attachment 46202
> 
> 
> More soon...


Is that working BT I see? . I can't wait!

Sent from my TouchPad using RootzWiki


----------



## Bwangster12 (Dec 29, 2011)

If it's not a JCSullins' ROM... it's just not worth it.


----------



## oldpapa49 (Sep 19, 2011)

Gradular said:


> Is that working BT I see? . I can't wait!
> 
> Sent from my TouchPad using RootzWiki


Good eye's, I did not see that..


----------



## nevertells (Oct 29, 2011)

Gradular said:


> Is that working BT I see? . I can't wait!
> 
> Sent from my TouchPad using RootzWiki


Sorry, my old eyes are not seeing what you are seeing. What tells you there is BT working?


----------



## oldpapa49 (Sep 19, 2011)

nevertells said:


> Sorry, my old eyes are not seeing what you are seeing. What tells you there is BT working?


Never-tells, Look on top where the Wifi is, the BT is shown Blue.. means it is connected..


----------



## jonpagecr (Aug 4, 2013)

Yes, the Bluetooth is working!
JCsullins has uploaded this file

http://goo.im/devs/j...ETOOTH_TEST.zip

I had paired my bluetooth MOGA controller, and can play GTA III without issues.

Thank you JCsullins,

Great work!


----------



## len207 (May 21, 2012)

jonpagecr said:


> Yes, the Bluetooth is working!
> JCsullins has uploaded this file
> 
> http://goo.im/devs/j...ETOOTH_TEST.zip
> ...


I also found jc's 10.1 ROM and installed it today! I was able to pair my cell with the TP and transfer data from the TP to the cell! I also tried connecting my BT earpiece, it connected and when I dialed a number (with Talkatone) - you could hear a tone through the earpiece... but there was no audio passed to the earpiece. Great job JC and I'm sure that you will continue to keep out TP's alive!
Thank you JCsullins,


----------



## oldpapa49 (Sep 19, 2011)

Did you do a factory reset or just clear stuff...


----------



## oldpapa49 (Sep 19, 2011)

Ok, some time ago, the Rev made a video on how to use your phone as a GPS for your TP. I followed it all (except for the tether wifi) and was able to use my S3 to TP as a GPS. THe BT worked great.


----------



## DroidFan12 (Dec 30, 2012)

jonpagecr said:


> Yes, the Bluetooth is working!
> JCsullins has uploaded this file
> 
> http://goo.im/devs/j...ETOOTH_TEST.zip
> ...


Hello,

Need Help!!!, i flashed this bluetooth zip on my cm-10-20130418-EXPERIMENTAL-tenderloin-FOR_LIMITED_TESTING_ONLY_CAM.zip, My Touchpad is trying to boot with the new logo. Apparently nothing happens after that, it freezes.

I dont have any backup rom to flash back, kindly suggest me with a solution.

Thanks,


----------



## oldpapa49 (Sep 19, 2011)

DroidFan12 said:


> Hello,
> 
> Need Help!!!, i flashed this bluetooth zip on my cm-10-20130418-EXPERIMENTAL-tenderloin-FOR_LIMITED_TESTING_ONLY_CAM.zip, My Touchpad is trying to boot with the new logo. Apparently nothing happens after that, it freezes.
> 
> ...


Did you flash gapps 0301 JB I think it is?


----------



## DroidFan12 (Dec 30, 2012)

Thanks


----------



## Colchiro (Aug 26, 2011)

DF12, you could boot into recovery and clear both caches OR do a factory reset (which I think is recommended) OR restore the backup you created before flashing 10.1.


----------



## drmarble (Jan 19, 2012)

Now that everybody is excited by jcsullins' release of a BT capable cm10.1 rom it is time to think cm10.2.
I have got it to compile and boot but it doesn't work right. The sdcard doesn't mount, no wifi, and no sound.
The hard part was getting ght display to work. qcom/display-legacy didn't compile. I fixed that, and any home-brewers are welcome to use my changes at:
https://github.com/drmarble/android_hardware_qcom_display-legacy/tree/cm-10.2
I'll post my changes to the device tree soon if I can't get them working. They are simple, setting CPU_VARIANT, recovery type, modifying init.tenderlin.rc and making fstab.tenderloin. It is the last step that is causing me headaches. All the reset are easy, just look at commits for other devices on gerrit. There are lots of examples of bringing up cm10.2 available.
My big question is: how do you mount a virutal disk using the new vold syntax? /dev/block/dm-6? I am looking over at: https://github.com/s...android-lvm-mod and hoping sluo's information will help me understand the mounting process. Trial and error has just been resulting in errors.
I will post a screen shot when I get the sdcard mounted and am able to take one.

edit derp: I put the display-legacy commit in media-legacy.


----------



## drmarble (Jan 19, 2012)

OK, I surrender. Let others work on cm-10.2. I still can't mount the sdcard with vold. I can manually mount it but android isn't happy if it isn't vold managed. I'll keep at it but I don't think I'll solve it soon. Let the homebrewing/developing begin. I pushed my device tree to github:
https://github.com/drmarble/android_device_hp_tenderloin/tree/cm-10.2-WIP
I made a new README file that you should read before building.
I hope that one of the other developers, such as milaq, shumash, patrickc, OaT, flintman or jcsullins can use this as a start to get cm-10.2 working for us.


----------



## shumash (Apr 23, 2012)

I'm trying to update my outdated updater-script to the latest that doesn't require reflashing gapps. Anyone know where the edify tenderloin updater-script text file(s) are in the various build source/device files?


----------



## drmarble (Jan 19, 2012)

shumash:
The backup script is in releasetools/tenderloin_ota_from_target_files
The important lines are 64-68:
if OPTIONS.backuptool:
script.Mount("/system")
script.RunBackup("backup")
script.Unmount("/system")
I'm not sure where RunBackup is located. Somewhere in cm build I guess.
Mouniting and unmounting system lets us save the gapps, I believe.
Found it:
build/tools/releasetools/edify_generator.py
Good luck. It is a handy feature to have.


----------



## shumash (Apr 23, 2012)

drmarble said:


> shumash:
> The backup script is in releasetools/tenderloin_ota_from_target_files
> The important lines are 64-68:
> if OPTIONS.backuptool:
> ...


Thanks, I figured some of that out, but where is the device-specific OPTIONS.list (info_dict?) that specifies which of these options to write to the updater-script?

EDIT: Figured it out. Once again hoisted by my own petard. In my skz.common config file:
TARGET_CUSTOM_RELEASETOOL := vendor/skz/tools/squisher


----------



## nevertells (Oct 29, 2011)

Glad you guys know what you're talking about, because you are way over my head!


----------



## DroidFan12 (Dec 30, 2012)

JC, Thanks for this awesome build. Bluetooth works fine. I have strange problem WiFi goes off over a period of time. I have to turn it back ON again.. any fix i need to do from my end..


----------



## Colchiro (Aug 26, 2011)

Did you try turning wifi optimization off?


----------



## DroidFan12 (Dec 30, 2012)

Let me try that first!.. Thankyou.


----------



## shumash (Apr 23, 2012)

shumash said:


> Thanks, I figured some of that out, but where is the device-specific OPTIONS.list (info_dict?) that specifies which of these options to write to the updater-script?
> 
> EDIT: Once again hoisted by my own petard. In my skz.common config file:
> TARGET_CUSTOM_RELEASETOOL := vendor/skz/tools/squisher


EDIT: Finally figured it out. The ota_from_target_files script that is used by the build system is in [build tree topdir]build/tools/releasetools (no others seem t make any difference). Make changes to the options you want in that file, then build. Python is a chore...


----------



## shumash (Apr 23, 2012)

drmarble said:


> OK, I surrender. Let others work on cm-10.2. I still can't mount the sdcard with vold. I can manually mount it but android isn't happy if it isn't vold managed. I'll keep at it but I don't think I'll solve it soon. Let the homebrewing/developing begin. I pushed my device tree to github:
> https://github.com/d...ree/cm-10.2-WIP
> I made a new README file that you should read before building.
> I hope that one of the other developers, such as milaq, shumash, patrickc, OaT, flintman or jcsullins can use this as a start to get cm-10.2 working for us.


Have you looked at milaq's device cm-10.1-staging branch? Could the commit that he made for an emulated sdcard work for 10.2?


----------



## drmarble (Jan 19, 2012)

I've got the sdcard to mount! Using the miracle of DEBUG statements I figured out how to format the vold managed fstab.<device> file for cm-10.2.This still uses our old partitioning, 1.5GB data, the remainder sdcard. Details on the changes are available in the README file at:
https://github.com/drmarble/android_device_hp_tenderloin/tree/cm-10.2-WIP

Thanks to the eagle eyes of Milaq I have now put my modifed display-legacy cm-10.2 branch into the correct repo. It is needed for cm-10.2 building. It can now be found at:
https://github.com/drmarble/android_hardware_qcom_display-legacy/tree/cm-10.2
It is nolonger sitting incongruoulsy in qcom_media-legacy.
The wifi still doesn't work. I'm sure there are other problems. I just wanted to share this success with the other developers and homebrewers.


----------



## drmarble (Jan 19, 2012)

I forgot the obligatory screenshot:
http://i.imgur.com/7wCyPX0.png


----------



## Colchiro (Aug 26, 2011)

drmarble said:


> I forgot the obligatory screenshot:
> http://i.imgur.com/7wCyPX0.png


Dang! Foiled my chance to say, "screenshot or it didn't happen"!


----------



## nevertells (Oct 29, 2011)

drmarble said:


> I've got the sdcard to mount! Using the miracle of DEBUG statements I figured out how to format the vold managed fstab.<device> file for cm-10.2.This still uses our old partitioning, 1.5GB data, the remainder sdcard. Details on the changes are available in the README file at:
> https://github.com/d...ree/cm-10.2-WIP
> 
> Thanks to the eagle eyes of Milaq I have now put my modifed display-legacy cm-10.2 branch into the correct repo. It is needed for cm-10.2 building. It can now be found at:
> ...


 You guys are amazing!


----------



## Gradular (Feb 1, 2012)

Time to update the title.









Sent from my GT-P3110 using RootzWiki


----------



## drmarble (Jan 19, 2012)

I got the wifi working in cm-10.2. I needed to update the wifi drivers in hardware/atheros/wlan/ath6kl/wpa_supplicant_8.lib. I used Googles latest Broadcom lib with a few edits. It works, but can probably be made better.
To use it, you need to use my repo: drmarble/android_hardware_atheros_wlan, branch cm-10.2:
https://github.com/d...an/tree/cm-10.2
I think I know how to fix sound, or at least where it is broken. We need to fix up jcsullins multi patch for external/tinyalsa. The repository has been changed for cm-10.2 and the patch no longer applies. I think it just needs some hand melding.
Homebrewers and developers, get building.
The connection takes a while (several minutes) but it really does happen eventually. I had my doubts and thought I was hallucinating but here is the screenshot with a wifi icon up in the corner:

http://i.imgur.com/rdkl7WC.png


----------



## shumash (Apr 23, 2012)

drmarble said:


> I got the wifi working in cm-10.2. I needed to update the wifi drivers in hardware/atheros/wlan/ath6kl/wpa_supplicant_8.lib. I used Googles latest Broadcom lib with a few edits. It works, but can probably be made better.
> To use it, you need to use my repo: drmarble/android_hardware_atheros_wlan, branch cm-10.2:
> https://github.com/d...an/tree/cm-10.2
> I think I know how to fix sound, or at least where it is broken. We need to fix up jcsullins multi patch for external/tinyalsa. The repository has been changed for cm-10.2 and the patch no longer applies. I think it just needs some hand melding.
> ...


i'm using jcsullins backports source, same as 10.1, compiled in-line, and it seems to be working fine. Lags in connecting, pretty much the same as in 10.1.

With regard to the sdcard mount, I rewrote the 10check_media_minor script, but it doesn't work because (I think), a) tenderloin.fstab is in the root now instead of /system, doesn't appear to be a text file and I'm not sure if it can be parsed or written, and the script reports "/dev/store/media does not exist". My revised 10check_media_minor script looks like this:
#!/system/bin/sh
#
# This script corrects the SDCARD= entry in /system/etc/vold.fstab
# to match the minor device number for the /dev/store/media lvm volume
# if it is not correct
#

if [ ! -e /dev/store/media ];
then
echo "$0: /dev/store/media does not exist"
exit 1
fi

# get the minor device number for /dev/store/media
MM=`/system/xbin/ls -lLn /dev/store/media | sed -r -e 's/ +/\t/g' | cut -f6`

# get the existing fstab.tenderloin SDCARD value
OSTR=`sed -rn -e 's/.*(devices\/virtual\/block\/.*)$/\1/p' /fstab.tenderloin`

if [ -z "${OSTR}" ];
then
echo "$0: Failed to read existing SDCARD= value"
exit 1
fi

if [ -n "${MM}" ];
then
NSTR="devices/virtual/block/dm-${MM}"

# just exit if no change needed
if [ "x${OSTR}" == "x${NSTR}" ];
then
exit 0
fi

echo "$0: Setting fstab.tenderloin media /devices/virtual/block/dm-${MM}"

# remount /system read-write
mount -o remount,rw /

# make the change
sed -e "s/devices\/virtual\/block\/dm-.*$/devices\/virtual\/block\/dm-${MM}/" -i \
/fstab.tenderloin

# remount /system read-only
mount -o remount,ro /
else
echo "$0: Unable to determine media minor"
exit 1
fi
When I look at my vold.fstab file in 10.1, it shows the sdcard mount point as dm-6, just as you have it, so I'm not sure why it isn't mounting properly.


----------



## shumash (Apr 23, 2012)

DUPLICATE


----------



## drmarble (Jan 19, 2012)

Shumash:
I think your problem is that you edit the file "tenderloin.fstab" the actual file is "fstab.tenderloin".
You could just manually look in dev/store/media and see the media minor number, if it is 6 then nothing should need to be done. If it is another number just hard code it into fstab.tenderloin in place of dm-6. This should make it work for your device (but still not fully portable without 10check_media_minor.sh.
Everyone:
I still have very laggy wifi connection, but once it connects, it works fine. I removed my atheros_wlan changes since they seemed to make no difference. We don't even use wep. Maybe the nl80211 changes help, I'm not sure. I have been enabling all possible debugging to try to figure out why connecting is so slow. Wlan0 is not being created. Wifi can't be turned on till wlan0 is available. I'm not sure of the order between klog and logcat. Is the supplicant stopping the kernel or the kernel stopping the supplicant. When wifi connects, they both come up at about the same time. I'll enable debugging in backports.
Still no sound, wifi is a higher priority for me.


----------



## shumash (Apr 23, 2012)

drmarble said:


> Shumash:
> I think your problem is that you edit the file "tenderloin.fstab" the actual file is "fstab.tenderloin".
> You could just manually look in dev/store/media and see the media minor number, if it is 6 then nothing should need to be done. If it is another number just hard code it into fstab.tenderloin in place of dm-6. This should make it work for your device (but still not fully portable without 10check_media_minor.sh.
> --SNIP--


David,

Good catch. At the bottom of the post, I noted that I checked, and the media minor number was 6, so it shouldn't have needed to be changed. I tried milaq's fstab.tenderloin, which is basically the same as yours, and it didn't work either. So my question is this: Did I miss the memo that requires that the webOS partition be shrunk in order for this to work?


----------



## drmarble (Jan 19, 2012)

nope, no fancy partitioning. Just a new stupid, annoying fstab and vold system. I figured it out by enabling debug in some disk mounting functions and seeing what it was looking at as vold mountable. I saw that it was looking at devices/virtual/block/dm-*, not dev/store/media or dev/block/dm-6 or whatever. That's how I got the crucial line:
/devices/virtual/block/dm-6 /storage/sdcard0 auto	defaults voldmanaged=sdcard:auto,wait,nonremovable
Maybe using vfat instead of auto would help. Or maybe one of the flags isn't right. auto, wait, or nonremovable. I don't know why it doesn't mount for you.
I still can't get my wifi to mount reliably. debugging atheros/wlan and supplicant_8 didn't help. Next is debugging backports. I just keep telling myself I'm doing this for fun.


----------



## shumash (Apr 23, 2012)

drmarble said:


> nope, no fancy partitioning. Just a new stupid, annoying fstab and vold system. I figured it out by enabling debug in some disk mounting functions and seeing what it was looking at as vold mountable. I saw that it was looking at devices/virtual/block/dm-*, not dev/store/media or dev/block/dm-6 or whatever. That's how I got the crucial line:
> /devices/virtual/block/dm-6 /storage/sdcard0 auto	defaults voldmanaged=sdcard:auto,wait,nonremovable
> Maybe using vfat instead of auto would help. Or maybe one of the flags isn't right. auto, wait, or nonremovable. I don't know why it doesn't mount for you.
> I still can't get my wifi to mount reliably. debugging atheros/wlan and supplicant_8 didn't help. Next is debugging backports. I just keep telling myself I'm doing this for fun.


Here's milaq's line: /devices/virtual/block/dm-6 /storage/sdcard1 vfat defaults voldmanaged=sdcard:auto,nonremovable

They're essentially the same except for sdcard1 instead of 0, vfat and wait. Neither one worked for me, so luckily, I'm still gonna have lots more fun.


----------



## shumash (Apr 23, 2012)

Okay, here's a poser. The /sdcard and /data aren't mounted, apparently, but I have ALL my apps, including those in /data. They optimize on flash and work fine after (they even update from Playstore). Any ideas how there is access to the apps and data, yet the folders not show as mounted (or at the least, empty)?


----------



## Gradular (Feb 1, 2012)

shumash said:


> Okay, here's a poser. The /sdcard and /data aren't mounted, apparently, but I have ALL my apps, including those in /data. They optimize on flash and work fine after (they even update from Playstore). Any ideas how there is access to the apps and data, yet the folders not show as mounted (or at the least, empty)?


 What app or command are you using to tell you they aren't mounted? I know its a lil different but I can run that on sammy tab2 running 10.2 and see what comes up.

Sent from my TouchPad using RootzWiki


----------



## shumash (Apr 23, 2012)

Gradular said:


> What app or command are you using to tell you they aren't mounted? I know its a lil different but I can run that on sammy tab2 running 10.2 and see what comes up.
> 
> Sent from my TouchPad using RootzWiki


Two ways: In Terminal: mount gives list of mounted devices, and ROM Toolbox Lite which shows an empty folder for /data, /dev/store, and all the /storage mounts. I doubt the tab2 mount points are going to tell me much because they're different from the TP.


----------



## shumash (Apr 23, 2012)

drmarble said:


> I've got the sdcard to mount!
> --SNIP--


 David, What kernel source are you using
Let me rephrase the question since the answer is in your readme. What are you using for recovery, CWM or TWRP?

Sent from my skz_tenderloin using Tapatalk 2


----------



## drmarble (Jan 19, 2012)

Shumash, I am using cwm and the normal cm kernel with one addition for cm10.2 to get rid of logcat warning/errors. I just added this line to tenderloin_anderoid_defconfig: CONFIG_AUDIT=y
The diff is:

```
diff --git a/arch/arm/configs/tenderloin_android_defconfig b/arch/arm/configs/te<br />
index 7126f60..994e1c1 100644<br />
--- a/arch/arm/configs/tenderloin_android_defconfig<br />
+++ b/arch/arm/configs/tenderloin_android_defconfig<br />
@@ -51,7 +51,7 @@ CONFIG_SYSVIPC_SYSCTL=y<br />
 # CONFIG_POSIX_MQUEUE is not set<br />
 # CONFIG_BSD_PROCESS_ACCT is not set<br />
 # CONFIG_TASKSTATS is not set<br />
-# CONFIG_AUDIT is not set<br />
+CONFIG_AUDIT=y<br />
 <br />
 #<br />
 # RCU Subsystem
```
I mount the sdcard without problems. I just have trouble connecting to wifi. It just doesn't come up according to logcat and dmesg. Then, it appears and wifi works. I'm trying new super-duper enable all network debugging now. Time to go check dmesg.


----------



## shumash (Apr 23, 2012)

drmarble said:


> Shumash, I am using cwm and the normal cm kernel with one addition for cm10.2 to get rid of logcat warning/errors. I just added this line to tenderloin_anderoid_defconfig: CONFIG_AUDIT=y
> The diff is:
> 
> ```
> ...


Thanks. Whatever's causing my problem, it's not the recovery app; neither mounts the sdcard.


----------



## shumash (Apr 23, 2012)

Well, I built a straight cm10.2 build using David's device tree and local manifest, and it mounted the sdcard. On a hunch, I extracted the ramdisk from that build's boot.img and built a new one with my kernel image and the extracted ramdisk. I then replaced the boot.img in my failed schizoid build with the rebuilt boot.img, flashed the ROM, and it mounted the sdcard.

So, I've checked init.tenderloin.rc, fstab.tenderloin, boardconfig.mk, etc., and they seem to be the same as straight cm10.2 build. Any other places to look that would end up in the ramdisk?


----------



## drmarble (Jan 19, 2012)

Shumash:

I'm glad it worked. I don't know what you've changed in your device tree that would make the sdcard not mount. Maybe an init file? Recovery shouldn't have any effect. I doubt it was the README file. Still, I'm glad it worked for you since you are the only one who has gotten wifi to connect regularly. None of my debugging tells me anything about it. It just won't start wlan0. I even have a logcat and dmesg from a successful wifi pairing and it doesn't show any changes except that it works. My major changes to wext in atheros/wlan had no effect because we don't use wext. We use nl80211. I don't think the minor changes to nl80211 do anything. Of course, my router seems to be giving up the ghost. Other wireless devices are having trouble connecting and staying connected. I paid $20 for that Dlink 4 years ago. It should still work.

Again, I'm glad that you got the adcard mounted.


----------



## shumash (Apr 23, 2012)

drmarble said:


> --SNIP--
> 
> you are the only one who has gotten wifi to connect regularly. None of my debugging tells me anything about it. It just won't start wlan0.
> 
> ...


----------



## shumash (Apr 23, 2012)

One of CM's latest updates to the fsck_msdos external package splits the make into two parts, an executable and a static library. We have a custom package that's in the device tree, dosfstools (or something similar), that builds the executable but not the library, so the build breaks when any other package needs that dependency, specifically, recovery. I got it to build by relocating the custom package check in fsck_msdos Android makefile, but I'm concerned that it will cause problems in recovery. Will it, or can we build a substitute library? If we need a substitute library, what would the additional commands look like in the device tree dostools folder make file?

Sent from my skz_tenderloin using Tapatalk 2


----------



## drmarble (Jan 19, 2012)

It's back.

Much progress has been made. Thanks to the efforts of flintman we now have wifi and sound (sort of). As always, go to my README file https://github.com/drmarble/android_device_hp_tenderloin/blob/cm-10.2-WIP/README for details. No bluetooth of course. The sound is touchy. You have to disable touch sound or it just fills the logcat with errors and gives no sound. You need to play a sound such as a song in apollo or a round of angry birds to get the sound to work. If it starts with a notification, the sound stops working. Touch sounds always break the sound.

I had to do an ugly hack to fsck_msdos to get our fsck to work. I broke building recovery. We should be using jcsullins' cwm anyway because it uses the correct fsck_msdos for our finicky tenderloins.

There is still lots more work to do but I figured I should share my progress with other home brewers/developers. My build instructions are a little less complete this time but they should be clear enough for any experienced builders.


----------



## shumash (Apr 23, 2012)

I've got the ROM booting and generally working, but I need some help sleuthing a mount issue. Using a root browser, I can see all the files on the sdcard, but /data shows empty (which causes no end of problems with certain apps). Using terminal, I can see that /dev/store/cm-data is mounted with the fstab parameters, but if I attempt to cd or ls the directory, I get a permission denied error (I tried fixing permissions from recovery and that didn't work). All my downloaded apps restore from Google backup, show up as installed, and work so they must be in /data even if I can't see them.

EDIT: Superuser is broken and won't update, so I have probably lost root. Although it's a chicken and egg thing, I suspect that's why I can't do anything in the filesystem. I'm using TWRP 2.6, not CWM. Could this be related to the broken recovery build?

Any ideas on how to sniff out the problem?


----------



## drmarble (Jan 19, 2012)

I don't think it's the fsck that is causing problems. I don't use the recovery I build, I just use jcsullins' cwm. I recall it solving some bad sector problems. Similar to the new moboot that he made. And the new acmeinstaller. We use our fsck for that sdcard scanning on boot. It eliminates the sdcard problems found in cm7 and early cm9 builds. Just use whatever recovery works for you. I'll do some research on just why we needed our own fsck.

I think that superuser is your problem. I can only see the contents of /data if I am root (root in esfile manager, su in terminal, root-explorer). I expect that fixing su fill fix your /data problems.

I was having problems with SurfaceFlinger, nothing booted for about a week. Some new cm commits fixed it. I admit that I am not convinced it is worth running cm10.2. It is fun to make it work but I don't really see any advantages over 10.1 for what I do. Our kernel doesn't support fstrim. I don't use or really understand selinux. The sound is still flakey. I will keep working on it but I really think we are maxed out at cm10.1. I will still try to get cm10.3 (jb4.4) running when it comes out.


----------



## shumash (Apr 23, 2012)

drmarble said:


> --SNIP--
> 
> I think that superuser is your problem. I can only see the contents of /data if I am root (root in esfile manager, su in terminal, root-explorer). I expect that fixing su fill fix your /data problems.
> 
> ...


Thanks for the insight, David. Superuser is where I'm concentrating now. As to your second comment: Amen I get all the vaunted smoothness and speed out of 4.3 by just compiling with Linaro


----------



## nevertells (Oct 29, 2011)

drmarble said:


> I don't think it's the fsck that is causing problems. I don't use the recovery I build, I just use jcsullins' cwm. I recall it solving some bad sector problems. Similar to the new moboot that he made. And the new acmeinstaller. We use our fsck for that sdcard scanning on boot. It eliminates the sdcard problems found in cm7 and early cm9 builds. Just use whatever recovery works for you. I'll do some research on just why we needed our own fsck.
> I think that superuser is your problem. I can only see the contents of /data if I am root (root in esfile manager, su in terminal, root-explorer). I expect that fixing su fill fix your /data problems.
> I was having problems with SurfaceFlinger, nothing booted for about a week. Some new cm commits fixed it. I admit that I am not convinced it is worth running cm10.2. It is fun to make it work but I don't really see any advantages over 10.1 for what I do. Our kernel doesn't support fstrim. I don't use or really understand selinux. The sound is still flakey. I will keep working on it but I really think we are maxed out at cm10.1. I will still try to get cm10.3 (jb4.4) running when it comes out.


 What happened to the efforts to get a 3.X kernel working on the TouchPad? Have not seen anything mentioned about it in quite a while.


----------



## shumash (Apr 23, 2012)

drmarble said:


> --SNIP--
> 
> I think that superuser is your problem. I can only see the contents of /data if I am root (root in esfile manager, su in terminal, root-explorer). I expect that fixing su fill fix your /data problems.
> 
> --SNIP--


It's definitely a root problem. I can see all the directories with adb, but nothing I do will allow the su binary to update or run, yet the permissions seem to be correct. I can't run su from adb shell, and have tried installing both supersu and koush's superuser fixes from recovery. I am beginning to think that I should be exploring the fstab mounts again. Comments?


----------

