yashsingh1/xdaforums huggingface dataset:
[Touch Viva, MDA Basic ROM Development] MusikMonk:
I was out of town for the weekend (that's Thursday and Friday in my country). So I couldn't reply earlier.

Using .4pre1 with the initramfs and zImage from the Gene project, I've booted Android and executed these commands. If it makes a difference, when it booted, the screen I got this time was the one with "google search" at the top and some icons (messaging, dialer...) at the bottom.

I've redirected output and error to files for ease, and zipped them all together.

The first command's output is the file named 1, the second's is 2 and so on. And I also included the touchscreen values that I got from haretconsole and the output of:

dmesg

I'm not sure what to look for in the outputs myself, but I noticed that "/sys/class/power_supply" is empty. Seeing that there are three commands concerning its contents, I'm gonna take a wild guess here and say that it shouldn't be :D

For some reason haret has decided to start refusing all connection attempts (it connects then terminate the connection directly) so I can't offer anything else using haretconsole, that it's till I figure out what's going on here.

Thanks for your support!

P.S: Quick note for anyone that wants to connect via SSH, here's the necessary information: https://sourceforge.net/apps/trac/wing-linux/wiki/PartitionInstallation (step 10 is all you need).
[Touch Viva, MDA Basic ROM Development] darkstar62:
Wing Linux 0.4pre3 Out!

Just thought I'd let you all know that Wing Linux 0.4pre3 is out on Sourceforge. Get it at http://wing-linux.sf.net.

The installation for this one works a bit different than previous ones. In particular, there's two cab files of interest -- the *-rootfs.cab file, which contains all the common root image and kernels, and the *-herald.cab file which contains the Herald-specific files. You'll want to install both of these (Herald because we don't yet have board support for the Opal).

Please also remember to delete any rootfs.img file you might have in your /Storage Card/linux directory if you installed previous versions of it, as it will not be replaced automatically.

The initramfs should no longer need patching, as it will automatically time out without any keyboard input, accepting defaults (250mb image). Just wait, and it will automatically install.

Lemme know how it works!

- d
[Touch Viva, MDA Basic ROM Development] MusikMonk:
The new installer does look nice, but that's as much as I can say. Before the touchescreen gets supported, the calibration screen is as far as the Opal can get.

I'm about to go have lunch right now, but afterwards I'll try to get on IRC and see if I can get enough help to make some progress.
[Touch Viva, MDA Basic ROM Development] darkstar62:
It just occurred to me...MusikMonk, there's a driver in the kernel for the ADS4947 / TSC2046 touchscreen / battery driver. That driver is different from ours in that I think it assumes 8-bit mode, while our's does 16-bit. I tried using it on my Herald to see if I could get battery info for free, but I was getting constant 0, 0 from it touchscreen-wise, like you are for our driver.

It might be worth it to try that driver for the Elf -- maybe the chip on yours is running in 8-bit and would work with that driver. You'll need to make sure to enable it in your kernel config, and supply the necessary board info in board-htcelf.c -- I can help with that if you need it.

- d
[Touch Viva, MDA Basic ROM Development] MusikMonk:
It's definitely worth a shot.

I can probably figure it out on my own in time, but that'll take ages. :o

So, I better act smart and ask for your help.

What changes do I need to do to enable it in the config? And what's the mtype for elf? I think that it was the same as wizard's (1229), right?

Edit: I'll be on IRC for an hour or two.
[Touch Viva, MDA Basic ROM Development] MusikMonk:
Okay, I tried using the ADS7846 driver and it didn't work.

I tried to take board-nokia770.c as an example and modified board-htcherald.c, as always, and got a new zImage.

Everything boots normally, except that when "checking for tsc2046" appears: instead of getting the calibration screen, android starts booting directly. Obviously it didn't find it.

Afterwards, I tried ts_test and got an error stating that /dev/touchscreen0 doesn't exists. So it seems like the system can't see the touchscreen at all.

Running dmesg seems to confirm this as there's no mention of a touchscreen anywhere in the output (http://pastebin.com/m3920656b).

With the previous driver I had:

input: TSC2046 touchscreen as /class/input/input3

I'm not entirely sure that it's the driver's fault.

It might be that I overlooked something when changing the code. That's not unlikely with my experience. So I'm taking another look at the new structs and trying different values to see if anything happens.

darkstar62, I also wanted to check with you if the current build (pre3) looks for the tsc2046 driver directly in any place beside the initial calibration. I know that this isn't the problem but just to see what I might need to look at.

Edit:

This is the board I'm using: http://pastebin.com/m3b8ad98f

Any touchscreen related changes have //Monk beside them.

Edit2:

Figured out why the system didn't see the screen. It was extremely simple, I just had to change the alias to tsc2046 :)

However, still not working :(

Printk statements showed that the driver isn't getting any calls, not even for initialization. Still can't figure out if I did something wrong or if the driver is simply incompatible.
[Touch Viva, MDA Basic ROM Development] raditzgds:
Keymap for the HTC Opal... how!!!

I'm trying to boot androind n my htc opal... my english is very poor.... so ...I'll try to be as clear as possible

I read the forum, and after follow the steps on (the post named "A Lil' help :)")

and I'm suck in "Then follow the instructions on the wing-linux forum (Page 2) to get the KEY(row,col) values of the keys on your handset. Hopefully you should get atleast a couple. Note down the corresponding keys and their KEY(r,c) values output." and I'donk know how to catch de key's irqs

y read also Haret doc... but... for example trying to chatch power button irq ...that disable the usb connection

Also, seeing carefully the board-htcherald.c file, I saw that thing "#define HTCHERALD_GPIO_POWER 139" maybe this conflicts with the touch screen irq wich is 139, some Idea? ... (sorry for my english... usually speak spanish...).
[Touch Viva, MDA Basic ROM Development] raditzgds:
Screen is no "touch"

Well I'm readin the previous post of Musikmonk, i think I have the same problem, android start directly without the calibration touchscreen; but unlike the Senior Musikmmonk I have no idea about how can I make toucheable my screen. I'll wait hopefull the solution.

About the touch pad, I made a test kernel asigning arbitrary keys values (letters) to an array with 4 rows and 4 columns, and by pressing buttons while android boot (before the X starts) then I have some idea about wich array index have each key. After then my board-htcherald.c results some like this:

static int htc_herald_keymap[] = {

// Volumen keys 0,3 UP; 1,3 Down

KEY(0,3,KEY_VOLUMEUP),

KEY(1,3,KEY_VOLUMEDOWN),

//----------------------------

KEY(2,2,KEY_SLASH), // enter

// teclas cursor

KEY(0,1,KEY_TAB), //arriba up

KEY(1,1,KEY_ENTER), //abajo down

KEY(0,2,KEY_DIRECTORY), //derecha rigth

KEY(1,2,KEY_CALENDAR), //izquierda left

//----------------------------------------------------------

// tecla SEND

KEY(0,0,KEY_PHONE),

// tecla END

KEY(1,0,KEY_CANCEL),

//----------------------------------------------------------

0 }

But the cursor keys as U imagine does anything except what expected, this whas just a test; but I'd like to know if exist some like KEY_LEFT or whatever was the direction ... for assigning to those keys, at least for a while (while I can do something under android) those key do something, but not what they should do.

Other thing is that, the buttons leds stays power on all the time, and the power button, does nothing and also I'm still lokking for haw to enables it.
[Touch Viva, MDA Basic ROM Development] darkstar62:
The board changes you made look right to me. In the dmesg logs, you probably wouldn't see anything about tsc2046 -- it would be ads7846, and you should get an input device from that. If you're not, then it's not registering in your board correctly (did you remember to include the driver in your .config?)

If you see that in dmesg, you should be able to at least start responding to interrupts. I'll dig around a bit, I had an implementation I was trying for herald that at least got interrupts (I got 0, 0 for all my coordinates though).

EDIT: Now that I look at it again, maybe if you put the ads7846_dev_init() call above the spi_register_board_info() call...might have to claim the GPIO before the SPI gets initialized.

- d
[Touch Viva, MDA Basic ROM Development] MusikMonk:
The order of ads7846_dev_init() and spi_register_board_info() it's the same as what's written in the boards of all devices using this driver.

Anyway, it was just being stupid, even for my standards... I did include the driver in .config but, without thinking, I ran

make ARCH=arm omap_android_850_defconfig

After fixing my mistake, the driver is now receiving irq (with a value of 299, same as with the previous one).

Coordinates seem to have maximum values instead of 0,0. I have some errands to run so I'll investigate this further when I'm back.

Other devices running this driver seem to have different structs, I'll see if I can come up with something.

Still the implementation you have will definitely be welcomed if you can find it. And if it's not much of a hassle, can you please check what irq value the touchscreen driver is receiving on the Herald and if it's related to what you get from Haret? I'll understand if you don't have the time. I'm just curious about this.

Edit: Coordinates are always x=8163, y=8163, Rt(Pressure?)=0.

Tried different types of structures with various values. Nothing seems to change...

This is starting to get really frustrating...
[Touch Viva, MDA Basic ROM Development] raditzgds:
Keymap running except for power button...

Well thanks Musikmonk for your file (and off course for your translation to spanish).

In order to answer you i'm using 4pre3.

I'm trying some other things to make toucheable the screen, but nothing results at all, but I'm still working.

I'm interestedly, off course, on port android to the Opal, but I'm still too newbie on this.

Im use linux as deskopt OS long time ago, even in my work, I'm using ubuntu now but I'm start with SuSE 5.0 (Before the Novell intervention) so this thing of try to make the things work on unexplored devices results me an interesting thing. Well thanks again and I'll being workin' on port android to opal.

(by the way I'm so far away to results you useful, but ... well here I am... )
[Touch Viva, MDA Basic ROM Development] htcfreak:
Hey whatz the user name & password for "gizard-20090703"​
[Touch Viva, MDA Basic ROM Development] darkstar62:
Check http://linwizard.sf.net for that.

- d
[Touch Viva, MDA Basic ROM Development] raditzgds:
can't mount rootfs

Well Musimonk I compile my kernel with your board-htcherald.c, and the systems boots but not starts the X, sudt says some like can not find rootfs, so I go back to mi borad-htcherald.c and made the changes on the keymap struct definition and It's works, anyway the screen isn't touchable already.

I want to know how you try some others drivers, to help you if is it possible to discard possibilities and find out a solution.

Maybe this was an incredible stupid question but, can the rootfs.img be modifying in order to load somes drivers? like in en iX86 linux, by changing some stuff in the /etc directory or adding services at init.d? for example assigning priorities a some services or modifying the parameters of others? I'm trying to do some analogy with linux for x86.

Well maybe this is an donkey idea, but it's the only I have right now.
[Touch Viva, MDA Basic ROM Development] MusikMonk:
I must have made a mistake and uploaded a wrong version of the file. As long as the keymapping works for you the rest isn't that important.

For other drivers, I've only tried one other driver(ads7864) and it's for the same touchscreen

chip (ts2046). That's because all OMAP HTC devices seem to have that same chip. Might be worth a shot to try other ones as well.

Anyway, to do that, I've used a simple method:

-Look for another device that uses the driver you want (grep, should be useful).

-Copy the driver specific definitions, structs and functions to the herald board to replace the ones already there (check my previous posts for an example if you want).

-Change the GPIO value to 139.

-Modify the ".config" file to include the driver you're trying.

-Build the zImage but make sure not to make my mistake and use a command that overwrites the config file.

-Putting some printk statements in the driver code is useful for tracing what's going on.

-I also tried changing some values from the structs I copied to see if I can get different results.

As for your other idea, I'm not sure that it would work. I think that specific driver interfaces are hardcoded in the kernel. Still, I'm as much of a newbie here as you are (apparently even more so ;)). You'll have to check with Darkstar or someone from linwizard about this.

I'm not home right now and I won't have a chance to any testing today before at least 6 houres. I still want to chech something with the drivers I was trying before moving on.

I'll share here what I do so that we don't accidentally try the same things.
[Touch Viva, MDA Basic ROM Development] darkstar62:
You can log in to it over SSH using a USB cable. Then it's just like most any other Linux -- you have init scripts in /etc/rc*.d, modules in /etc/modules and /etc/modutils, etc. You've also got ipkg (similar to dpkg and apt), so if you can get your phone online (either routing through the usb or over gprs), you can download and install software online with 'ipkg install <progname>'.

- d
[Touch Viva, MDA Basic ROM Development] raditzgds:
I have an idea

Lets assume, for a while, this: "the driver TSc2046 works fine" , so the main problem is the power button, so fixing this, at least the complete keyboard was work, and maybe by this way we can disscard conflicts between power btn and touchscreen, I assume that: the keyboad is loaded before the touchscreen.

By the way; and related qith my previos post, je... viewing the "make menuconfig" the drivers are built-in on kernel.... I'll be try to connect by SSH.
[Touch Viva, MDA Basic ROM Development] MusikMonk:
Power button already works

I looked at the power button, and actually it is working, just not correctly mapped.

SSH to your device and modify /system/usr/keylayout/qwerty.kl and change line 11 to:

key 116 POWER WAKE

You'll have to either use vi or copy the file via ssh (using scp for example).

After you do that, restart the device and boot android, then the power button will work. It doesn't seem to do anything other than waking the device from standby. You can change "POWER" in that line with another value (I tried "P") to see that it's working properly.

I think that this file should have this change for all devices and not only Opal. Darkstar, am I right?

And I couldn't find anything that suggests a conflict between that button and the touchscreen, other than the value we already changed to 135.

I also noticed another small thing while looking for this, I mapped the dpad center to KEY_ENTER, it should be KEY_SLASH. That way it'll work as dpad center in Android instead of a keyboard enter key. However it would also mean, that before Android boots (during the installation for example), this button will work as a slash '/' (kind of obvious). That's not much of a problem but it's possible to fix it quickly by changing line 44 from:

key 28 ENTER

to

key 28 DPAD_CENTER WAKE_DROPPED

And leaving it mapped to KEY_ENTER.

By the way, look at include/linux/input.h in the kernel source to understand where these numbers are coming from.

I haven't had a chance to try anything concerning the touchscreen yet. I'll see if I can do some testing before my brain shuts down and I have to sleep:D

Oh, and one last thing, the git repos are now at git://wing-linux.git.sourceforge.net/gitroot/wing-linux/wing-linux in case you're trying to update the source and getting an error.
[Touch Viva, MDA Basic ROM Development] raditzgds:
Wow! you are the man of the year!

Well I do wat you do, and I guess, with the pwr btn solved we can disscard it as a trouble.

Analyzing the make process of the kernel I saw that somo structs was defining but not used, typically this shows a warning at compiling time, o I comment the lines useless on board-htcherald.c

/*static struct tsc2046_platform_data htcherald_ts_platform_data __initdata = {
.ts_x_plate_ohm = 496,
.dav_gpio = 76,
// .dav_gpio = 139,
.gpio_debounce = 0,
.ts_max_pressure = 100000,
.ts_touch_pressure = 5000,
};
*/
/*static struct spi_board_info htcherald_spi_board_info[] __initdata = {
{
.modalias = "tsc2046",
.platform_data = &htcherald_ts_platform_data,
.max_speed_hz = 2500000,
.bus_num = 2,
.chip_select = 1,
.irq	= OMAP_GPIO_IRQ(139),
}
};
*/

just change the line

#define HTCHERALD_GPIO_POWER 135

and the keypad; compile and everything fine except for pwr btn and the tsc.

I do the changes of keybord layout; but nothing happen the pwr btn still dead. But maybe for the above reasons... I will try some others idea.. when those arrives....
[Touch Viva, MDA Basic ROM Development] MusikMonk:
The structs you commented are used. I'm surprised that the kernel did build after commenting them.

Inside the function

static void __init htcherald_init(void)

there should be this

spi_register_board_info(htcherald_spi_board_info,
ARRAY_SIZE(htcherald_spi_board_info));

I think that there's something wrong in the board file you're using.

And by the way, ".dav_gpio" should be 139, not that it matters much since the driver doesn't work :rolleyes:

It's weird that the power button doesn't work. Can you check something for me? In the herald board, does this struct look the same for you?

static struct gpio_keys_button herald_gpio_keys_table[] = {
{KEY_POWER, HTCHERALD_GPIO_POWER, 1, "gpio-keys: POWER", EV_KEY, 1},
};

You probably have another line for GPIO_SLIDE but that one doesn't matter (for the obvious reason that there's no sliding keyboard for the Opal). Just this line matters.

If you have any other ideas, please don't hesitate to share them.

In the mean time, I'm setting up a new board for the Opal. I'm getting bored of using herald's :p
[Touch Viva, MDA Basic ROM Development] MusikMonk:
HELP!!!

I think that the RAM on my phone got damaged from the constant testing....

I've suddenly started getting this kernel panic when booting:

KERNEL PANIC - NOT SYNCING: BROKEN PADDING

Right after "extracting initramfs". What's before that is normal.

From my limited knowledge of linux, I believe that this is caused by bad ram modules.

At first I thought that I screwed the code while testing, but I tried a clean installation of 0.4pre3 using default kernel and herald's mtype (a setup that I previously tested and know to work) and I got the same error.

I'm trying to find some tools for diagnosing HTC devices but everything I can find is device specific and nothing for the Opal/Viva.

Till I figure out what's wrong here, I'm not gonna be doing any more testing. I apologize, but I really can't afford damaging my device.
[Touch Viva, MDA Basic ROM Development] raditzgds:
Kernel panic - not syncing: Broken padding

Well... welcome at your first "Kernel Panic".. I remember when in a desktop system usually gets that error, 'cause my hdd-controller has some failure.But Puntually in your case that message was printed by the procces:

NORET_TYPE void panic(const char * fmt, ...) (line 65 ../home/german/wing-linux2/kernel/kernel/panic.c) obviously try to change the code to avoid the error is some stupid thing..., this file only have the purpose to handle those events that cause the kernel stop working literaly the file says

/*
* This function is used through-out the kernel (including mm and fs)
* to indicate a major problem.
*/

.

So, my friend... I, think you've goy a major problem. Try, deleting rostfs.img and do the installing again.. if the problem persists... I have no idea... maybe your sd is damaged.

By the way I wa triying to load the driver of touchscreen as module... compile the kernel without all drivers SPI (tsc related) an set it's as "M" (MODULE) with make menuconfig; after compile the kernel those gives me an kernel capable of loading modules at runtime. But.. after we need de loadable modules for this use some like this:

~$ make modules ARCH=arm CROSS_COMPILE=/"your-install-path"/CodeSourcery/Sourcery_G++_Lite/bin/arm-none-eabi-

All the modules will be created en each driver directory in the touchscreen case in the /kernel/drivers/spi/ files *.ko; after I add those to the rootfs.tar.gz in the sub dir /lib/modules/<kernel-version>/.

Del the older rootfs.img on your phone linux directory and boot android.

After, with ssh, try to load the modules with modprobe <module>.ko or insmod <module>.ko but don't worry about the complicated of all process; none of the modeles works. :(

Ahhh... my power key still doesn't work ... even do the changes of the qwerty.kl.
[Touch Viva, MDA Basic ROM Development] MusikMonk:
Well, it's my first Opal kernel panic, I had a couple of those on computers :)

Already tried deleting rootfs.img and that didn't work. Either way, it's crashing before it reaches the point where it loads that. I have a spare sd card here somewhere, I'll look for it and give that a shot. I hope that it turns out to be the problem although I really doubt that.

Do you know if there's some tool to test device memory? I couldn't find any.

About touchscreen, it doesn't make sense for the Opal to have anything other than tsc2046. Even though I tried a couple other drivers, that's the only one that seemed promising (since it receives irq in the right time). And it's the one used for all omap devices.

Perhaps we need to change some values in the spi_board_info struct. I was planning to try that out before this happened.

By the way, I've registered Opal on http://www.arm.linux.org.uk/developer/machines/

This way it's possible to create a new board for the Opal. This are the steps (taken from http://sourceforge.net/apps/phpbb/wing-linux/viewtopic.php?f=3&t=12):

I've done this on my laptop but I haven't submitted it.
[Touch Viva, MDA Basic ROM Development] MusikMonk:
Seems like it might have been a corrupt SD, I've found the spare card and when I tried it I stopped getting the kernel panic. Perhaps

I

panicked too much :p

I'm currently trying to figure out where the tsc2046 driver fails. Apparently, that and the ads7846 driver are our best shots. Plus, I can't really think of anything else to do. The only other option is tracing memory through haret to write a new driver, and that's not something I'm planning to do in the near future...