yashsingh1/xdaforums huggingface dataset:
[Nook Color Android Development] lekofraggle:
Meteorrock,

Thank you for the work on this. I may have a small amount of time this weekend. It might be easier to build the whole kernel because then you know you are getting all of the dependencies. That was what I was thinking anyway. Checking out the link, I see why you are asking for that info. I want to caution you though. the tutorial is for a 2.6 kernel, and we are working on the 3.3 kernel. The syntax has changed. Your paradigm of starting from scratch is a good idea and will probably result in a cleaner more stable product, but I am lazy and do not know enough to begin from scratch. I see there is a lot of the otg code already in the kernel we have been building, and I want to edit that to make it work and not re-invent the wheel.

There are three files I edited.

[rootkerneldirectory]/drivers/usb/musb/omap2430.c

[rootkerneldirectory]/drivers/usb/otg/twl4030-usb.c

and

[rootkerneldirectory]/arch/arm/configs/encore_defconfig

I think, the header files are listed in the beginning of each file (hence the name right), I my be wrong though.

In that case, here they are.

omap2430.c

#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/sched.h>
#include <linux/init.h>
#include <linux/list.h>
#include <linux/clk.h>
#include <linux/io.h>
#include <linux/platform_device.h>
#include <linux/dma-mapping.h>
#include <linux/pm_runtime.h>
#include <linux/err.h>

#include "musb_core.h"
#include "omap2430.h"

twl4030-usb.c

#include <linux/module.h>
#include <linux/init.h>
#include <linux/interrupt.h>
#include <linux/platform_device.h>
#include <linux/spinlock.h>
#include <linux/workqueue.h>
#include <linux/io.h>
#include <linux/delay.h>
#include <linux/usb/otg.h>
#include <linux/usb/ulpi.h>
#include <linux/i2c/twl.h>
#include <linux/regulator/consumer.h>
#include <linux/err.h>
#include <linux/wakelock.h>
#include <linux/notifier.h>
#include <linux/slab.h>
#include <linux/earlysuspend.h>

After poking through a bit more, the config seems to be encore_defcofig and not the kconfig file I posted earlier, but I may be wrong about that one.

I do know that the usb driver file is musb-hdrc.

Anyway, thank you for the link. It is quite helpful.

I hope this other info. helps.

~Leko
[Nook Color Android Development] meteorrock:
I understand . Thanks lego. Let me research this new, different 3.3 kernel syntax online for us and I will get back to you.

Update: I found some sort of build code the developers use over in < beagleboard.org > on their custom motherboards for building kernels clear from scratch. Here is the link. Its called buildroot. http://buildroot.uclibc.org/

You should be able to cherrypick some functions for building up that USB host driver. This link here confirms this has been used for linux 3.2 kernels at this link here. and also here. http://unix.stackexchange.com/quest...gin-with-building-a-linux-system-from-scratch

http://www.linux-magazine.com/Online/Features/Qemu-and-the-Kernel

This is getting up into some crazy development, I do not even think I could tackle right now.

Those guys over in <beagleboard.org > build clear from the hardware on up to the linux kernels. I got an account over there I will ask a few questions about that driver and see if I turn up anything on getting that USB host driver built up. They are uber geniuses that hang out over there from TI from developing binary drivers.

Even if you had to build up the whole system for the encore with this, you can always go in and cherrypick out that code you need for the USB host driver.

Update: Dec. 17th. : I will also go through those file for syntax errors in the meantime. They are some long files, ugghhhhhhhhhh. <legofraggle> has the makefiles and init files so we will not need to do this, if anyone is lurking. I will continue up in this thread here to cut down chatter. http://xdaforums.com/showthread.php?t=1459892
[Nook Color Android Development] lekofraggle:
Migration Help

Hey all, I do not mean to get too off topic, but I have a question. So I was building on an Ubuntu 12.04 install in a vm on my mac. My wife's work had a fire sale on some lenovo machines, so I tossed 12.04 on it and am up and running. Is there an easy way to migrate my build environment from the mac (which is running out of space), to my new machine?

I have searched, but I keep running into issues with using tar, rsync, and cp.

I have some large backup media, but I do not know the program to use to get it there.

(I have a bit less than 4 gigs free on the mac)

I could just build it over, but it took a while last time.

Any help would be appreciated.

~Leko

After I get this sorted out, I will get back on usb host.
[Nook Color Android Development] votinh:
Quick update on the uSD (Sandisk 16GB, class 4)

Using verygreen's image, either install ROM then Gapp, one after another or expand the boot partition and copy both ROM,GApp the same time.

+ ROM: from fattire, post #2, I've removed the "emmc" part out of its file name.

+ GApp: using the 20111125-2, renamed to gapps-gb-ics-20111125-2

Installation goes just fine but keep getting the "unfortunately NFC service ....." (or something like that). So I have to go back, unzip the gapp, remove the NfgGoogle.apk and some others as Homer listed on post #299. Name it as gapps-gb-ics-20111125-3.zip. This time, it's all good.

Personal view: maybe I'm too addict with the beauty of CM7, so this CM9 alpha, yes fullofbugs, is not ready for prime time yet but it's snappy, most apps are up and running. Gmail is ok, however composing new mail, screen seems to be off (on the left side). Gmaps 5.11.0 version, is ok, far less response than it counterpart in CM7.

Anyway, CM9 dev. team definitely moving in the right direction. Can't wait to pop Alpha 2 in.
[Nook Color Android Development] Ronin3178:
OK, running eMMC with the 112811 gapps market was working earlier, but now every time I try and open the market it starts, but closes right out and sorta locks, after a few seconds it starts working again. I tried reinstalling gapps, no change .

Any ideas?
[Nook Color Android Development] EverythingNook:
Is there a way to make wallpapers scroll on the default homescreen? Also is their a way to make the browser always show the desktop version?
[Nook Color Android Development] rootfan:
No, it is not the same on gingerbread. Yes you get the little zombie picture, but this is something the cm devs added. The ics sdk just has a yellow bee. cm9 has an ice cream droid. If you press and hold the ice cream droid he will zoom in. eventualy it will play a "VIDEO":rolleyes:
[Nook Color Android Development] sark666:
I'm getting that unfortunately nfc has stopped error that others have mentioned. Is there a workaround yet?

I installed to a fresh sd card via verygreen's method. Booted into ics fine, had wifi working, then put gapps gapps-ics-20111125-2.zip on the sd card.

renamed it to gapps-gb before hand and booted into recovery and now stuck at this error.
[Nook Color Android Development] leapinlar:
Did you try removing the apps from the gapps file before flashing as Homer suggested above?
[Nook Color Android Development] Tyfighter:
Maybe I'm just crazy (I haven't done any benchmarks), but in my limited usage, this is giving me slightly better performance on certain things than GB.

1. The launcher is pretty smooth(er than ADW ex).

2. The browser loads pages faster and handles complex pages like desktop facebook way better than any of the browsers I used on GB

3. Gmote connects in like half a second (which is awesome because I used to have to sit and wait[and waaait] for it)

There's definitely more, I was playing with it last night and only just got home from work now so it escapes me.

Point being, you guys are awesome. I've been waiting for this since I bought my NC to throw the HC SDK build on it. I'm definitely going to make a donation to the EFF.
[Nook Color Android Development] DiDGR8:
This is a great little preview. The absence of sound is a bit of a "stopper", but I enjoyed having a look at things to come. I didn't have any problems running from emmc and using the appropriate gapps, so for a pre-alpha, it's amazingly stable.

I'm not a big fan of the ICS GUI, CM7 w/tablet tweeks meets my needs. I did like having access to "tablet" apps and I'll probably update when a RC shows up, but for now, I'm going back to CM7.

Good work, though everybody involved (fattire, dalingrin, keyodi, whoever I'm forgetting?)
[Nook Color Android Development] rampart51:
There are 3 icons in the bottom status bar or tray bar or whatever you want to call it:

1. back

2. home

3. recent or open programs

Number 3 does NOT work on my Nook.

Does yours?
[Nook Color Android Development] zequav:
Of course NOT. Read the OP (or, in this case, the second post).
[Nook Color Android Development] fattire:
It's apparently an issue with all tablets, not just nook...
[Nook Color Android Development] rampart51:
Thx fattire.....I missed it in your earlier post.

And FYI.....I have an Acer Iconia as well and the button works.
[Nook Color Android Development] Homer_S_xda:
Something missing or is it related to the 2D acceleration?

Homer
[Nook Color Android Development] BaileyJ205:
Flashing CM7 first then ICS fixed this for me.
[Nook Color Android Development] sark666:
I did as homer suggested and removed those files and rebooted into recovery with the modified gapps file on my sd card.

It seemed to install but on reboot the same nfc error occurs. Do I have to start over and format the sdcard or is there a way to fix this.
[Nook Color Android Development] cybertimber2007:
As per my experience, you'll have to format the SD card and start over.

I really should make up a modified gapps file for this rom and post it. Unless someone beats me to it.
[Nook Color Android Development] Dr. Light:
worked for me too
[Nook Color Android Development] rigy73:
for desktop browser, go to address bar, type

about:debug

After that check menu, go to settings, there sud be a debug option in which u can find user string, open and select whatever you want.
[Nook Color Android Development] Homer_S_xda:
I can send you mine if you have a place to host it.

Homer

---------- Post added at 04:17 PM ---------- Previous post was at 04:16 PM ----------

No one has explained why flashing CM7 helps at all if you are supposed to wipe /data and /system.

Unless you have a Nook Color that has near field communications capability, why is NFC on there and/or loaded?

Homer
[Nook Color Android Development] kcls:
So let me get this straight before I wipe my CM7 SD card for this :) I'm super psyched :)

1. Format my sd card with something like SD Formatter (slow format)

2. Download the ICS zip in the second post

3. Download the Gapps found in THIS post, specifically THESE Gapps

4. Write verygreen's image, then expand the boot partition to 200mb or so, so the Gapps and the rom zip fit on there at the same time

5. Rename the rom zip to update-cm-9.0-0-encore-sneakpeek1-fullofbugs.zip and the Gapps zip to gapps-gb-20111125-2.zip

6. Put 'em on the DS, pop it into the nook and let it do it's thing

Is that it? I just want to be sure as since I am on the SD Card there's no way to make a nand backup. I already backed up my "CM7 SD" partition to my computer, so I'm good to go :)

Can't wait for this :D
[Nook Color Android Development] unibroker:
One of the moderators, oldfred, over at the ubuntu forum will help you out. He's helped me out a ton. http://ubuntuforums.org/forumdisplay.php?f=326

Post to the general board or click his name at the bottom of the page to pm him.
[Nook Color Android Development] stolenmoment:
If you can ssh from the VM to the laptop, you should be able to do something like

% cd [top of build tree]

% tar zcf - . | ssh [laptop] tar -C [root of new build] -zxf -

Spaces and weird punctuation are critical, and [...] means replace with your info.

Experiment with smaller trees before moving something huge like a build tree.

If the VM can be made to see the backup drive, you can do

% tar zcf [filename on backup drive] .

Safely move drive, open shell on laptop...

% cd [ new build ]

% tar zxf [ file on backup drive ]

And you have a build environment backup!
[Nook Color Android Development] lekofraggle:
Thanks everyone for your responses. None of those options worked. I just tried to start from scratch. I tried on 12.04, but when that failed with multiple issues, I put 12.1 on my lenovo.

With both of these builds, I can do my initial repo sync, but then I get this error on all subsequent attempts.

fatal: unable to connect to github.com:

github.com[0: 207.97.227.239]: errno=Connection refused

I can ping with no problem, and I did install the sdk and run the first sync fine.

Any thoughts?

~Leko
[Nook Color Android Development] bytte:
Assuming this is still not working for you:

Have 2 terminal windows. One for the repo sync one for monitoring.

In the monitoring window run a root shell ("sudo bash" ). Determine the network interface in use (eth0, wlan0) by running "netstat -i". Assuming wlan0:

Now run "tcpdump -i wlan0 -v -n host github.com"

Then run "repo sync" in the other window.

There should be output in the monitoring window. CTRL-C to cancel tcpdump.

Post the output from tcpdump (given it errors I'm not expecting much output, otherwise post it to pastebin).

Nigel
[Nook Color Android Development] lekofraggle:
Nigel,

Thank you. You are a lifesaver. I tried the commands, and this time with repo sync -j1, it worked. At least for a few minutes (but did not finish syncing.

I tried it again and it did not work at all.Here is the pastebin.

~Leko
[Nook Color Android Development] bytte:
My recommendation is to keep trying, if you get a lot of consecutive failures leave it a while. The last packet in the dump was a RESET (flags R) from your connection request (SYNC) in the previous packet (flags S): that was just the server being busy / broken.

Nigel
[Nook Color Android Development] lekofraggle:
Thanks,

But it only happens on this machine. So I find it odd.

Sent from my ADR6425LVW using Xparent Cyan Tapatalk 2
[Nook Color Android Development] bytte:
Doing this remotely is hard!

Github will likely limit the number of open tcp connections that you can have at any one time. (That might explain why you are getting resets). When repo sync fails type "netstat -antp" in the diagnostic window. Do you see a large number of entries for github?

If so what is their state / the associated program?

Does rebooting help? Depending how you are connected to the internet, rebooting your modem may get you a new IP address and thus reset 'your' counts at github.

If it seems like that is the problem, I would check the versions of repo, git and python (I have never analysed how repo works, so there may be other key components).

Fwiiw I use Ubunto 11.04 without issue.

Nigel
[Nook Color Android Development] meteorrock:
Got my hypervisor up and running smooth. Looking into still building up that module for the USB host, unless someone more knowledgeable is already working on it. Downloading all of the packages and toolchains plus the android ADK for linux. Following this one guide up in XDA. http://xdaforums.com/showthread.php?t=1966751

If I can get that module up on this machine I will go ahead and post it in the room for testing. For you guys trying to use switches on the github, those switches are way buggy with github. Try to pull from the github FIRST, update your ^^head on the branch you are working in, then try to see if your commands work.
[Nook Color Android Development] hwong96:
I was looking over Leko's encore defconfig in git. Config_USB_gadget=y but the following configs are not set to =y:

#config_USB_gadgetfs is not set

#config_USB_mass_storage is not set

I have been researching other sites where USB host does not work in Linux 3.2 if g_file_storage.ko or g_ether.ko is not included in the build. I don't have a Linux/Ubuntu set up to try this. Maybe Meteor rock or Leko can try to include these two configs.
[Nook Color Android Development] lekofraggle:
I just got my build setup up and running (sync is scetchy, but) I can continue to work on this finally. Can you point me to your resources? I want to see what else I can dig up.

~Leko

Sent from my ADR6425LVW using Xparent Cyan Tapatalk 2
[Nook Color Android Development] hwong96:
I have attached a screen shot of one site for reference. I just googled "Linux 3.2 g_file_storage.ko" and "Linux 3.2 g_ether.ko". Search results in results discussing USB host/otg. One discussion forum says that g_file_storage.ko is necessary for thumb drive because two changes were made in Linux 3.2 in July 2012 to disable something. I'll see if I can find that discussion. In the meantime...
[Nook Color Android Development] steven676:
Um, (1) we're not on 3.2 (we're running 3.0), (2) 3.2.0 is much older than July of 2012, and changes of that magnitude are not made in the -stable series, and (3) the "Android" gadget, already built into our kernel, is some sort of unholy combination of a bunch of the other gadgets (including file_storage).
[Nook Color Android Development] bytte:
I just had the situation where the screen did not turn on following deep sleep.

I managed to get an adb connection.

Normally log cat shows the following when waking from sleep:

I/WindowManager: Lock screen displayed!

D/SurfaceFlinger: Screen about to return, flinger = 0x..

...

In this case the second line was missing.

ps showed that surfaceflinger was still running.

HTH

(Default build 27 Dec)

Nigel
[Nook Color Android Development] steven676:
If you haven't rebooted yet, please get dmesg output from that tablet.
[Nook Color Android Development] bytte:
dmesg http://pastebin.com/JUrD4LDF

logcat http://pastebin.com/nd6iKs5K

ps http://pastebin.com/A9axEpAL

It worked fine following reboot.

I suspect that this was a random event rather than anything I had done. I was trying to get to grips with battery usage, so following boot I had killed running apps using settings (DSP Mgr and Google Services), and then left it sleeping for 6 hours. It is clear from the logcat that there are other apps running which aren't reported as running from the apps interface.

HTH

Nigel
[Nook Color Android Development] steven676:
Unfortunately, that's dmesg output from your computer, not your tablet (unless you have a Nook Color with an Intel Core i5 2410M processor, in which case we're all very interested to see it!). For future reference, you can run dmesg in a shell on the tablet, or do something like "adb shell dmesg".

That's to be expected -- the running apps screen in Settings doesn't show a bunch of system services. That said, nothing you do in userland should cause your Nook Color to fail to resume from suspend, so it's likely you hit some corner case where we still have a bug lurking.
[Nook Color Android Development] bytte:
Oops - I have corrected the original pastebin post to contain the correct dmesg output. I did wonder why it had timestamps ... (if only ...)

Nigel
[Nook Color Android Development] meteorrock:
Yeah, I give up on trying to develop that kernel for the USB host. So confusing on what linux kernel we are on developing for the encore at this moment. I just pull straight from the project on the github. That information about us being on the 3.2 linux kernel was my mistake.

Information on making an external loadable module for that USB host driver is so sketchy on the internet for the newer kernels you might as well be trying to develop blind if you are not trained and already know how to develop kernels. Not even my google skills are turning up much. These guys are the TOP true hackers. Someday I might be that good but not today. I will keep researching into this though.

I went through line by line of all of that code 2 or 3 times by hand looking for any typo or syntax error in the included kconfig and makefiles in that musb and usb file branch for the Jellybean, did not find anything to report. The source code for the driver is straight from Texas Instruments. Might have to find someone to write up that module from scratch. <hwong> check out my thread I updated down in cyanogenmod for learning how to develop kernels here if you like :) I will change the linux kernel version down there to help keep others from being misinformed. http://forum.cyanogenmod.org/topic/...h-me-trying-to-learn-how-to-code/page__st__20
[Nook Color Android Development] les02jen17:
According to fattire's new build encore link found here: http://wiki.cyanogenmod.org/index.php?title=Build_for_encore

I only have a 32 bit operating system... does that mean I won't be able to pull this off? :'( Can I somehow just install an Ubuntu 64 bit on a VM? Is that even possible? :(
[Nook Color Android Development] bytte:
It will depend. See http://stackoverflow.com/questions/56124/can-i-run-a-64-bit-vmware-image-on-a-32-bit-machine.

I have built and run CM10 for encore on 32bit Ubuntu. It's not easy and I never managed to get the CM10 start-up graphic to work, but it can be done (I didn't have caching working during the build, so its not fast).
[Nook Color Android Development] ParMaster:
I still am unable to determine why USB Host worked for me the first time I tried it and never thereafter on nightly 1229. I will be ready next time if I do an upgrade and it works on the first try again to grab logs and check for enumeration / presence on the live system about the driver...
[Nook Color Android Development] mateorod:
According to my inbox, that is possible but somewhat sluggish.

Edit: see last post in that link
[Nook Color Android Development] bytte:
Some observations on using USB Host Diag v1.2 and a powered hub.

If the hub was not powered, the NC didn't power it (its LED was off).

When powered:

On one occasion it was detected under Rooted API

On several occasions the NC crashed (display frozen, no response to touch or button press, WiFi adb stopped responding, didn't charge when charger connected - LED stayed green). These crashes occurred both when attaching as directed by USB HD, and otherwise.

Most of the time it was ignored, although the NC charger saw it as a power source.
[Nook Color Android Development] bytte:
I'm getting file not found in logcat for libOMX.TI.720P.Decoder.so.

The file isn't in /system/lib but I see it mentioned several months ago in this thread.

Any thoughts on what's wrong?

Thanks

Nigel
[Nook Color Android Development] steven676:
Very puzzling, though given bytte's results, you may not be the only one seeing this intermittently ...

Out of curiosity, what kernel are you using when running these tests?

Expected. Without V_bus from somewhere, nothing will happen. Unclear as to whether it should be possible to get the NC to provide V_bus itself.

Very puzzling -- but that makes you the second person reporting this ...

If you're using a kernel from a nightly, please try this again with a kernel from a nightly dated January 7 January 6 or later, and check the contents of /proc/last_kmsg after a crash. EDIT: I checked -- this made it into the January 6 nightly. If you're building yourself, the patch in question is https://github.com/CyanogenMod/andr...mmit/5a03014194338527e395b96244071a0d6985588e (merged in the CM and NookieDevs trees as of a few minutes ago, so you'll get it if you do a repo sync unless you're using some other upstream).

This applies to anyone else who's trying this, by the way -- if you're seeing crashes, please make sure that patch is in your kernel and check /proc/last_kmsg after a crash -- you may very well get useful information.

That's the expected behavior.

It should be included in any CM10 nightly build. If you're building yourself, check to see if the proprietary blobs you're using are current ... hmm, we may need to update proprietary-files.txt to get it in sync with the blobs the nightly autobuilder uses.

EDIT: Just pushed (https://github.com/CyanogenMod/andr...mmit/229299b5468707fbb252321492753d77603caf77) -- after merging that and running extract-files.sh with a NC running a current nightly attached to your computer, your /vendor should be functionally identical to the one the nightlies are built from.