irclog2html for #htc-linux on 20060922

00:10.33cr2gnif: use universal.
00:10.33gnifoh, and PS... i know a lot of x86 asm if that helps?
00:10.33Kevin2I used the break points to figure out the Apaches microcontroller interface.  It was toggling way too many gpios for me to observe it with memory traces alone.  So I dissasembled just the small amount of code around it and then setup instruction break points.
00:10.34gnifcr2, ty :D
00:10.37cr2Kevin2: hmm. so how do i set a breakpoint in wavedev.dll at an offset 0xfoo into the .text ?
00:10.38Kevin2Unfortunately, there is no interactive "next"/"nexti" type interface -- there can't be one when you're subverting the OS.  But you can write little C routines that take a specific action.
00:10.39Kevin2cr2: Do you know the virtual address of the code?  If so, run "set insn 0xabcd1234" and then "wi 10".
00:10.40cr2ok. i see.
00:10.41cr2i think we can get the virtual addresses of the dlls. "dump modules" ?
00:10.43cr2it should be possible to pick from the wince kernel internal structures anyway.
00:11.27Kevin2Not sure.  If it is doing some kind of IO around that point, you can just to a "set trace <ioaddress>" and then copy and paste the vm address from the wi output into the set insn command.
00:11.31cr2hmm. the ROM dlls are statically mmaped. it should be visible from the dll header where they are relocated.
00:11.33Kevin2About linking haret and kernel.  I've put together some notes on what I think the initramfs script should do.  I'm hoping we can deploy a script that calls parted to resize the dos partition, creates a new linux partition, and then expands the rootfs onto it.  That way, users can download haret and rootfs onto the sd card and then just click "run" to have it set everything up.
00:11.35gnifif you build the kernel into haret... whats going to happen when people want to run a customised one?
00:11.35cr2i think something like that is already by jlime
00:11.37cr2gnif: it is for the installation only. the experience says that most questions on this channel are about the installation problems/ installation documentation.
00:11.38gnifok, but what are you going to do about needing a different kernel for different phones... just going to make a seperate ver for them?
00:12.00cr2yes. for now. then we may join the pxa-based phones, omap850-based phones and so on.
00:12.00Kevin2I don't think it would be too onerous to require users to put a haret, kernel, default.txt, initramfs, and rootfs all onto their sd card.  (Assuming they could download them from a single http source.)  Obviously it isn't ideal, however.
00:12.00gnifwhat would be nice, is not just a modded haret... a package you put on a SD card with a autorun that loads the kernel/initrd after prompting the user
00:12.00gnifthen to boot all they have to do is insert the card
00:12.01cr2Kevin2: look at the archived logs ;)
00:12.01gnifi am too lazy :P
00:12.01cr2gnif: it also already exists for the blueangel. but can be made better.
00:12.03Kevin2cr2: Correct me if I'm wrong, but wasn't it required to run fdisk and required to run utilities like tar before?
00:12.03Kevin2If we just said "put these 5 files on your sd card, run haret, click 'run'" would it still be a huge issue?
00:12.04cr2it was required, and a lot of people had a lot of problems to do it right.
00:12.05gnifhey, thinking of ways to boot the kernel without loosing phone data... would it be possible to allocate a huge block of ram, and insert/load the kernel from there?
00:12.05cr2unfortunately people mix the versions of these 5 files.
00:12.07cr2gnif: it is unrealistic. there is a "vmalloc" and "kmalloc" haret commands, so you can see how the RAM is fragmented in wince.
00:12.08gnifand about the initrd... could the kernel be appended to the end of the initrd, instead of after it... then you wouldnt have to worry about the decompression of the kernel overwriting it... and, you could make a single file with the initrd/kernel combined that could just be pushed into ram.
00:12.09gnif*instead of before it
00:12.11cr2forget about the inirtd. Kevin2 made initramfs working, and it is the right way to do it.
00:12.11gnifwhats the diff with initramfs?
00:12.12gnifi though tit was the same thing
00:12.36cr2initramfs is linked with the kernel.
00:12.37gniflol, ok, exactly what I wanted
00:12.37gnif:P
00:12.38cr2and not a separate image loaded at a weird address sometime overwritten by the decompressor.
00:12.39gnifwell, to stop people mixing the files...
00:12.40gnifwhy dont you just create a single file that contains you image/rootfs and config
00:12.40gnifand have a util to read it in, and run it
00:12.41gnifyou could even combine the exe and the image
00:12.41cr2the ultimate solution is the 2577/autoboot.exe which is a haret with linked zimage which is a kernel with linked initramfs :)
00:12.42cr2insert the sd card, and get this card repartitioned, formatted and with linux installed.
00:12.44Kevin2Sounds good.  You still need a rootfs/kernel package to explode onto the sd card.
00:12.44gnifis it possible to boot off the sd card?
00:12.44gnifie, no wince?
00:12.44Kevin2no
00:12.45gnifdidnt think so :(
00:12.45cr2it should be grabbed over usb or maybe wifi.
00:12.45cr2boot from sd ?
00:12.46gnifyes
00:12.46cr2with the htc bootloader ?
00:12.46gnifyup
00:12.46cr2it is possible, but i have not tried it.
00:12.46Kevin2Getting networking running from an initramfs will be too difficult.  We'd need to have a full blown GUI to even ask where to get the files from.
00:12.46gnifcr2: any info you can point me at?
00:12.46cr2g_ether ?
00:12.47cr2activesync ip can be trasferred as a kernel commandline parameter.
00:12.47cr2gnif: which phone ?
00:12.48Kevin2USB configuration would require users configure their host to serve the file.
00:12.48gnifcr2: magician
00:12.48cr2Kevin2: you can assume a boot with the usb cable attached and activesync running.
00:12.59gnifwhat about the rndis layer?
00:12.59Kevin2Bah.  Who uses windows?
00:12.59gnif*i think its rndis
00:13.00gnifpeople who are trying linux on their phone are
00:13.01gnifor... use the usb gadgets to start a serial connection... then there is no tcp layer involved
00:13.01cr2Kevin2: most people who want to install linux ;)
00:13.01cr2gnif: http://wiki.xda-developers.com/index.php?pagename=RomTools%2Ftyphoonnbfdecode.pl
00:13.02cr2download it and read it.
00:13.02Kevin2Well, I think having the user drop two packages (installer.exe and rootfiles.tar) onto their sd card would be more achievable.
00:13.02floriangood night
00:13.03cr2gnif: and this one for creating the SD card image:
00:13.03cr2http://wiki.xda-developers.com/index.php?pagename=RomTools%2Fsdtool.pl
00:13.04cr2Kevin2: what happens with the rootfiles.tar file ? what is the size of this file ?
00:13.05gnifcr2: looks great, i will have a play with this
00:13.05Kevin2It would contain the basic Familiar rootfs, a kernel, a new haret, and a new default.txt.
00:13.06Kevin2The installer would contain haret+kernel+initramfs -- it would repartition the sd card and then expand the rootfiles.tar onto the dos and unix partitions.
00:13.07cr2the rootfiles.tar need some temporary storage when the disk will be repartitioned ?
00:13.08Kevin2If you use parted, you should be able to keep the file on the dos partition..
00:13.08cr2good point.
00:13.10cr2it should work. in theory :)
00:13.10Kevin2:-)
00:13.11gnifyou could, instead of repartitioning...
00:13.11gnifcreate a loopback file
00:13.12cr2in RAM?
00:13.12gnifor on the sd
00:13.12gnifi have had success with that
00:13.22Kevin2gnif: You mean run linux out of a loop'd file instead of on a partition?
00:13.22gnifyup
00:13.23cr2slow?
00:13.23gnifa little, but if you are only trying out linux... what more do you need?
00:13.23gnifsorta like a live lc
00:13.25gnif*cd
00:13.25cr2you want to show that linux is faster than wince (and it is).
00:13.25Kevin2Is the objective to get more people to try it out or to get more developers?
00:13.53cr2to get more app developers means "more people to try it".
00:14.13gnifbut people are scared to try somthing that is going to possibly corrupt data... if its just a trial install, then they can just delete it later...
00:14.26cr2i think we will finish the core kernel development RSN.
00:14.31gnifyou could make it optional... during the install
00:16.01Kevin2Yes, of course - more people = more developers.  However, I'd be more interested in tools that got people into a stage where they could be productive, then tools that just showed people stuff.
00:16.41Kevin2gnif: True, I think the average user might have a hard time undoing what linux did to the sd card..  Maybe an uninstall.exe could also be provided.
00:17.05Kevin2But you're right, a simple 200Mb ext3 in a file might very well be the simplest way forward.
00:17.52gnifto speed it up, i suppose you could just unpack it into ram
00:17.59gnifthe core stuff anyway
00:18.06cr2Kevin2: the first question you will get: does the phone work, the second question: does suspend/resume work.
00:18.20Kevin2flash is already slow.  I don't think the fatfs will add too much additional overhead.
00:18.55cr2the SD card can be simply reformatted if linux messed too much.
00:18.56Kevin2cr2: Well, that is kinda what I meant.  Why go out of our way to get new users in when we know those new users wont want what we currently have.
00:19.44Kevin2Right now, even a power user will have a hard time getting linux to boot, and that is a shame.
00:19.50gnifcr2: actually... the sd car, when formatted as ext2, wince never asks to re-format it
00:20.02gnifon my phone anyway
00:20.24cr2true ;) that's why i want to get the phone work. voice+sms. and finish the battery+suspend/resume.
00:20.46Kevin2Well, you'd have two partitions - one dos and one ext3..  You'd have to find some reformat tool that the user would need to find and engage.
00:21.09Kevin2cr2: I'd like to find 4 or 5 more developers to help with that.  :-)
00:21.32cr2gnif: that's right. it's not easy to reformat the card in wince.
00:21.47gnifor you could just boot with a "unistall" kernel argument to be passed to the ramfs to undo the changes
00:21.55cr2Kevin2: it is device-specific, so not very realistic.
00:22.19Kevin2Why?  We're here.
00:22.33cr2universal+magician+apache.
00:22.49cr2maybe blueangel, because i also have it.
00:23.06gnifi have access to a hymalayer aswell
00:23.54gnifand my old man owns the o2 with the keypad (blue angel?)
00:24.19cr2gnif: i think himalaya is dead.
00:24.36gnifcr2: not quite, my mum uses one :P
00:24.43cr2for linux.
00:24.53gnifyeah, me 2, was just saying
00:24.54Kevin2Well, you may be right.  However, my tentative plan (very tentative) is to get a basic install program running, then try to get a CDMA call working (just enough to dial out and/or receive), then spam slashdot, and see what the cat drags in.
00:25.42gnifI think kelvin is right, I would have gotten into dev for this phone months ago had I been able to try a basic install and see where it was at
00:26.14gnifie... "wow, look at everything it can do... but no phone... lets see if we can fix that"
00:26.37cr2gnif: magician has the same phone as blueangel, and blueangel has a working phone.
00:26.46gnifit was just an example
00:27.41cr2me and Kevin2 have a different class of the phone (CDMA/WCDMA/GSM from qualcomm) with a very different hardware interface.
00:27.43gnifbtw... cvs htcuniversal kernel wont compile... "unknown field `phys_ram' specified in initializer"
00:28.13cr2in oe ?
00:28.16gnifyup
00:28.33cr2it is a brken *.bb file somewhere
00:28.50cr2it uses the wrong defconfig.
00:28.53gnifthought so... it is looking at "arch/arm/eseries"
00:29.04cr2you need y different kernel anyway.
00:29.38gnifi dont, just trying to get a basic system with ssh/telnet and g_ether working
00:31.13Kevin2Does wince have batch files and/or command-line arguments?  Can we pass a flag into haret at startup?
00:31.21gnifthere is very little/confusing documentation for the magician (eg, xda dev reports it as only booting)
00:31.52cr2Kevin2: yes. but since there is no command line, you need to create the *.lnk files.
00:32.13cr2to use the "command-line" arguments.
00:33.24Kevin2Okay, thanks.  Do you know if they are straight forward to create, or if there some weird binary blob?
00:33.34gnifi think they are just a text file
00:33.43cr2#XX/usr/local/bin/haret.exe
00:33.45gniffind one for the start menu
00:33.47cr2<PROTECTED>
00:34.06cr2where XX is the length of the string or something like that.
00:34.38gnifya know, if you could get the wince emulator to boot linux... it would allow people to have a look/play without risking their phones
00:34.58cr2hmm. i don't know if you'll get argv[] working. have never tried it.
00:35.19cr2gnif: you need to create a linux ROM image first.
00:35.59gnifi cant be stuffed, just an idea tho
00:36.00cr2in the same format as wince ROM. can you do it without the wince platform builder ?
00:36.40gnifthe emulator is just a veriation of "Connexant/MS Virtual PC"
00:37.01cr2its structure is known, but it is complex.
00:37.11gnifi think qemu can make em
00:37.22cr2imho, the emulator runs roms
00:37.54gnifdont know, i never looked too much into it
00:37.58cr2i'd prefer to run wince in qemu :) to look for gpios .
00:38.12gnifyour pprobarbly right
00:38.32gnifthat would be cool
00:38.53gnifargh... my connection is lagging
00:39.03cr2the most cool thing is the wince port to wince :)
00:39.17cr2wine port to wince.
00:39.48Kevin2So, we could run linux on the phone, and then run the phone app under wine under linux?
00:40.10gnifsounds like a horrible kludge
00:40.27cr2i remember running solitair on linux in 1995 :)
00:40.40Kevin2:-)  It would never work.  All the MS software thinks it is running with full access to the hardware.
00:40.43cr2i'm thinking of tomtom and such. phone is too lowlevel.
00:40.53gnifi run Homeworld2 in linux, but thats about it
00:41.15gnifwhat exactly is a gpio?
00:41.25Kevin2General Purpose Input / Output
00:41.32gnifi know what it stands for
00:41.45gnifi mean, on the software/hardware level
00:41.58Kevin2It is a little metal pin on the chip that can be programmed to either send no current or to send current (output).  Or it can be programmed to sense if something else is sending current or not.
00:42.27Kevin2So, for example, you can hook it up to an LED and drive the led by setting it to output mode and then turning it on or off.
00:42.46Kevin2Or alternatively, you can wire it to another chip (which also has gpio) and send signals to and from it.
00:42.56cr2can be thought of as a programmable irq line or a switch.
00:43.33gnifso just a programmable gate
00:43.48gnifwould a JTAG boundry scan expose them?
00:44.52cr2no idea.
00:45.35gnifhave the JTAG pins been identified on the phone?
00:46.07Kevin2I think you'd need to solder them on.  I'm not a hardware guy, so I don't really know.
00:46.20gnifyes, I am certain of that
00:46.25cr2on magician ? afaik no. only on himalaya.
00:46.33cr2Kevin2: http://www.jlime.com/modules/mx_pafiledb/dload.php?action=category&cat_id=17&sid=5bdf63984a08edc5cd950c71e260a04d
00:47.03Kevin2cr2: I see you checked in the haret changes.  Thanks.  Part of the change involves turning -O on by default.  Does it work for you when booting linux?  I thought you had problems with that way back when.
00:47.34Kevin2The optimization is really nice to have on (it is noticeably faster and smaller) so I hope it does work okay.
00:47.57cr2i will try tomorrow, err... today. now i need to go to bed :) it's 2:47 here.
00:48.15gnifsend me a copy, i will have a look at it
00:48.24gnifbinaries
00:48.37Kevin2gnif: I have a binary on the shadowmite svn site:
00:48.47gnifwhere is that?
00:48.52Kevin2svn://www.shadowmite.com/home/svn/ppc6700
00:48.56gnifcr2: gnight
00:49.02Kevin2Goodnight.
00:49.20gnifwell, morning
00:50.22gnifKevin2: this is a htc version?
00:50.58gniflol, dont answer that
00:51.00gnifstupid q
00:51.27gnifits muvh smaller
00:51.30gnif*much
00:53.29Kevin2Huh?  It should work on any pxa27x htc phone.
00:59.24gnifyeah, dw
01:00.06gnifi am at work, on a MS crappy pc.... just about ready so SCREAM
01:04.08gnifok, running the new ver
01:04.25gnifboots fine :D
01:06.56gnif~hail Kenvin2
01:06.57aptACTION bows down to Kenvin2 and chants, "I'M NOT WORTHY!!"
01:08.17Kevin2Cool.  I didn't have any problems either, but I think cr2 said htcuniversal did.  In any case, it seems to run a bit faster and it is a smaller download.

Generated by irclog2html.pl by Jeff Waugh - find it at freshmeat.net! Modified by Tim Riker to work with blootbot logs, split per channel, etc.