00:10.33 | cr2 | gnif: use universal. |
00:10.33 | gnif | oh, and PS... i know a lot of x86 asm if that helps? |
00:10.33 | Kevin2 | I 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.34 | gnif | cr2, ty :D |
00:10.37 | cr2 | Kevin2: hmm. so how do i set a breakpoint in wavedev.dll at an offset 0xfoo into the .text ? |
00:10.38 | Kevin2 | Unfortunately, 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.39 | Kevin2 | cr2: Do you know the virtual address of the code? If so, run "set insn 0xabcd1234" and then "wi 10". |
00:10.40 | cr2 | ok. i see. |
00:10.41 | cr2 | i think we can get the virtual addresses of the dlls. "dump modules" ? |
00:10.43 | cr2 | it should be possible to pick from the wince kernel internal structures anyway. |
00:11.27 | Kevin2 | Not 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.31 | cr2 | hmm. the ROM dlls are statically mmaped. it should be visible from the dll header where they are relocated. |
00:11.33 | Kevin2 | About 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.35 | gnif | if you build the kernel into haret... whats going to happen when people want to run a customised one? |
00:11.35 | cr2 | i think something like that is already by jlime |
00:11.37 | cr2 | gnif: it is for the installation only. the experience says that most questions on this channel are about the installation problems/ installation documentation. |
00:11.38 | gnif | ok, 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.00 | cr2 | yes. for now. then we may join the pxa-based phones, omap850-based phones and so on. |
00:12.00 | Kevin2 | I 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.00 | gnif | what 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.00 | gnif | then to boot all they have to do is insert the card |
00:12.01 | cr2 | Kevin2: look at the archived logs ;) |
00:12.01 | gnif | i am too lazy :P |
00:12.01 | cr2 | gnif: it also already exists for the blueangel. but can be made better. |
00:12.03 | Kevin2 | cr2: Correct me if I'm wrong, but wasn't it required to run fdisk and required to run utilities like tar before? |
00:12.03 | Kevin2 | If we just said "put these 5 files on your sd card, run haret, click 'run'" would it still be a huge issue? |
00:12.04 | cr2 | it was required, and a lot of people had a lot of problems to do it right. |
00:12.05 | gnif | hey, 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.05 | cr2 | unfortunately people mix the versions of these 5 files. |
00:12.07 | cr2 | gnif: it is unrealistic. there is a "vmalloc" and "kmalloc" haret commands, so you can see how the RAM is fragmented in wince. |
00:12.08 | gnif | and 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.09 | gnif | *instead of before it |
00:12.11 | cr2 | forget about the inirtd. Kevin2 made initramfs working, and it is the right way to do it. |
00:12.11 | gnif | whats the diff with initramfs? |
00:12.12 | gnif | i though tit was the same thing |
00:12.36 | cr2 | initramfs is linked with the kernel. |
00:12.37 | gnif | lol, ok, exactly what I wanted |
00:12.37 | gnif | :P |
00:12.38 | cr2 | and not a separate image loaded at a weird address sometime overwritten by the decompressor. |
00:12.39 | gnif | well, to stop people mixing the files... |
00:12.40 | gnif | why dont you just create a single file that contains you image/rootfs and config |
00:12.40 | gnif | and have a util to read it in, and run it |
00:12.41 | gnif | you could even combine the exe and the image |
00:12.41 | cr2 | the ultimate solution is the 2577/autoboot.exe which is a haret with linked zimage which is a kernel with linked initramfs :) |
00:12.42 | cr2 | insert the sd card, and get this card repartitioned, formatted and with linux installed. |
00:12.44 | Kevin2 | Sounds good. You still need a rootfs/kernel package to explode onto the sd card. |
00:12.44 | gnif | is it possible to boot off the sd card? |
00:12.44 | gnif | ie, no wince? |
00:12.44 | Kevin2 | no |
00:12.45 | gnif | didnt think so :( |
00:12.45 | cr2 | it should be grabbed over usb or maybe wifi. |
00:12.45 | cr2 | boot from sd ? |
00:12.46 | gnif | yes |
00:12.46 | cr2 | with the htc bootloader ? |
00:12.46 | gnif | yup |
00:12.46 | cr2 | it is possible, but i have not tried it. |
00:12.46 | Kevin2 | Getting 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.46 | gnif | cr2: any info you can point me at? |
00:12.46 | cr2 | g_ether ? |
00:12.47 | cr2 | activesync ip can be trasferred as a kernel commandline parameter. |
00:12.47 | cr2 | gnif: which phone ? |
00:12.48 | Kevin2 | USB configuration would require users configure their host to serve the file. |
00:12.48 | gnif | cr2: magician |
00:12.48 | cr2 | Kevin2: you can assume a boot with the usb cable attached and activesync running. |
00:12.59 | gnif | what about the rndis layer? |
00:12.59 | Kevin2 | Bah. Who uses windows? |
00:12.59 | gnif | *i think its rndis |
00:13.00 | gnif | people who are trying linux on their phone are |
00:13.01 | gnif | or... use the usb gadgets to start a serial connection... then there is no tcp layer involved |
00:13.01 | cr2 | Kevin2: most people who want to install linux ;) |
00:13.01 | cr2 | gnif: http://wiki.xda-developers.com/index.php?pagename=RomTools%2Ftyphoonnbfdecode.pl |
00:13.02 | cr2 | download it and read it. |
00:13.02 | Kevin2 | Well, I think having the user drop two packages (installer.exe and rootfiles.tar) onto their sd card would be more achievable. |
00:13.02 | florian | good night |
00:13.03 | cr2 | gnif: and this one for creating the SD card image: |
00:13.03 | cr2 | http://wiki.xda-developers.com/index.php?pagename=RomTools%2Fsdtool.pl |
00:13.04 | cr2 | Kevin2: what happens with the rootfiles.tar file ? what is the size of this file ? |
00:13.05 | gnif | cr2: looks great, i will have a play with this |
00:13.05 | Kevin2 | It would contain the basic Familiar rootfs, a kernel, a new haret, and a new default.txt. |
00:13.06 | Kevin2 | The 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.07 | cr2 | the rootfiles.tar need some temporary storage when the disk will be repartitioned ? |
00:13.08 | Kevin2 | If you use parted, you should be able to keep the file on the dos partition.. |
00:13.08 | cr2 | good point. |
00:13.10 | cr2 | it should work. in theory :) |
00:13.10 | Kevin2 | :-) |
00:13.11 | gnif | you could, instead of repartitioning... |
00:13.11 | gnif | create a loopback file |
00:13.12 | cr2 | in RAM? |
00:13.12 | gnif | or on the sd |
00:13.12 | gnif | i have had success with that |
00:13.22 | Kevin2 | gnif: You mean run linux out of a loop'd file instead of on a partition? |
00:13.22 | gnif | yup |
00:13.23 | cr2 | slow? |
00:13.23 | gnif | a little, but if you are only trying out linux... what more do you need? |
00:13.23 | gnif | sorta like a live lc |
00:13.25 | gnif | *cd |
00:13.25 | cr2 | you want to show that linux is faster than wince (and it is). |
00:13.25 | Kevin2 | Is the objective to get more people to try it out or to get more developers? |
00:13.53 | cr2 | to get more app developers means "more people to try it". |
00:14.13 | gnif | but 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.26 | cr2 | i think we will finish the core kernel development RSN. |
00:14.31 | gnif | you could make it optional... during the install |
00:16.01 | Kevin2 | Yes, 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.41 | Kevin2 | gnif: 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.05 | Kevin2 | But you're right, a simple 200Mb ext3 in a file might very well be the simplest way forward. |
00:17.52 | gnif | to speed it up, i suppose you could just unpack it into ram |
00:17.59 | gnif | the core stuff anyway |
00:18.06 | cr2 | Kevin2: the first question you will get: does the phone work, the second question: does suspend/resume work. |
00:18.20 | Kevin2 | flash is already slow. I don't think the fatfs will add too much additional overhead. |
00:18.55 | cr2 | the SD card can be simply reformatted if linux messed too much. |
00:18.56 | Kevin2 | cr2: 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.44 | Kevin2 | Right now, even a power user will have a hard time getting linux to boot, and that is a shame. |
00:19.50 | gnif | cr2: actually... the sd car, when formatted as ext2, wince never asks to re-format it |
00:20.02 | gnif | on my phone anyway |
00:20.24 | cr2 | true ;) that's why i want to get the phone work. voice+sms. and finish the battery+suspend/resume. |
00:20.46 | Kevin2 | Well, 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.09 | Kevin2 | cr2: I'd like to find 4 or 5 more developers to help with that. :-) |
00:21.32 | cr2 | gnif: that's right. it's not easy to reformat the card in wince. |
00:21.47 | gnif | or you could just boot with a "unistall" kernel argument to be passed to the ramfs to undo the changes |
00:21.55 | cr2 | Kevin2: it is device-specific, so not very realistic. |
00:22.19 | Kevin2 | Why? We're here. |
00:22.33 | cr2 | universal+magician+apache. |
00:22.49 | cr2 | maybe blueangel, because i also have it. |
00:23.06 | gnif | i have access to a hymalayer aswell |
00:23.54 | gnif | and my old man owns the o2 with the keypad (blue angel?) |
00:24.19 | cr2 | gnif: i think himalaya is dead. |
00:24.36 | gnif | cr2: not quite, my mum uses one :P |
00:24.43 | cr2 | for linux. |
00:24.53 | gnif | yeah, me 2, was just saying |
00:24.54 | Kevin2 | Well, 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.42 | gnif | I 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.14 | gnif | ie... "wow, look at everything it can do... but no phone... lets see if we can fix that" |
00:26.37 | cr2 | gnif: magician has the same phone as blueangel, and blueangel has a working phone. |
00:26.46 | gnif | it was just an example |
00:27.41 | cr2 | me and Kevin2 have a different class of the phone (CDMA/WCDMA/GSM from qualcomm) with a very different hardware interface. |
00:27.43 | gnif | btw... cvs htcuniversal kernel wont compile... "unknown field `phys_ram' specified in initializer" |
00:28.13 | cr2 | in oe ? |
00:28.16 | gnif | yup |
00:28.33 | cr2 | it is a brken *.bb file somewhere |
00:28.50 | cr2 | it uses the wrong defconfig. |
00:28.53 | gnif | thought so... it is looking at "arch/arm/eseries" |
00:29.04 | cr2 | you need y different kernel anyway. |
00:29.38 | gnif | i dont, just trying to get a basic system with ssh/telnet and g_ether working |
00:31.13 | Kevin2 | Does wince have batch files and/or command-line arguments? Can we pass a flag into haret at startup? |
00:31.21 | gnif | there is very little/confusing documentation for the magician (eg, xda dev reports it as only booting) |
00:31.52 | cr2 | Kevin2: yes. but since there is no command line, you need to create the *.lnk files. |
00:32.13 | cr2 | to use the "command-line" arguments. |
00:33.24 | Kevin2 | Okay, thanks. Do you know if they are straight forward to create, or if there some weird binary blob? |
00:33.34 | gnif | i think they are just a text file |
00:33.43 | cr2 | #XX/usr/local/bin/haret.exe |
00:33.45 | gnif | find one for the start menu |
00:33.47 | cr2 | <PROTECTED> |
00:34.06 | cr2 | where XX is the length of the string or something like that. |
00:34.38 | gnif | ya 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.58 | cr2 | hmm. i don't know if you'll get argv[] working. have never tried it. |
00:35.19 | cr2 | gnif: you need to create a linux ROM image first. |
00:35.59 | gnif | i cant be stuffed, just an idea tho |
00:36.00 | cr2 | in the same format as wince ROM. can you do it without the wince platform builder ? |
00:36.40 | gnif | the emulator is just a veriation of "Connexant/MS Virtual PC" |
00:37.01 | cr2 | its structure is known, but it is complex. |
00:37.11 | gnif | i think qemu can make em |
00:37.22 | cr2 | imho, the emulator runs roms |
00:37.54 | gnif | dont know, i never looked too much into it |
00:37.58 | cr2 | i'd prefer to run wince in qemu :) to look for gpios . |
00:38.12 | gnif | your pprobarbly right |
00:38.32 | gnif | that would be cool |
00:38.53 | gnif | argh... my connection is lagging |
00:39.03 | cr2 | the most cool thing is the wince port to wince :) |
00:39.17 | cr2 | wine port to wince. |
00:39.48 | Kevin2 | So, we could run linux on the phone, and then run the phone app under wine under linux? |
00:40.10 | gnif | sounds like a horrible kludge |
00:40.27 | cr2 | i remember running solitair on linux in 1995 :) |
00:40.40 | Kevin2 | :-) It would never work. All the MS software thinks it is running with full access to the hardware. |
00:40.43 | cr2 | i'm thinking of tomtom and such. phone is too lowlevel. |
00:40.53 | gnif | i run Homeworld2 in linux, but thats about it |
00:41.15 | gnif | what exactly is a gpio? |
00:41.25 | Kevin2 | General Purpose Input / Output |
00:41.32 | gnif | i know what it stands for |
00:41.45 | gnif | i mean, on the software/hardware level |
00:41.58 | Kevin2 | It 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.27 | Kevin2 | So, 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.46 | Kevin2 | Or alternatively, you can wire it to another chip (which also has gpio) and send signals to and from it. |
00:42.56 | cr2 | can be thought of as a programmable irq line or a switch. |
00:43.33 | gnif | so just a programmable gate |
00:43.48 | gnif | would a JTAG boundry scan expose them? |
00:44.52 | cr2 | no idea. |
00:45.35 | gnif | have the JTAG pins been identified on the phone? |
00:46.07 | Kevin2 | I think you'd need to solder them on. I'm not a hardware guy, so I don't really know. |
00:46.20 | gnif | yes, I am certain of that |
00:46.25 | cr2 | on magician ? afaik no. only on himalaya. |
00:46.33 | cr2 | Kevin2: http://www.jlime.com/modules/mx_pafiledb/dload.php?action=category&cat_id=17&sid=5bdf63984a08edc5cd950c71e260a04d |
00:47.03 | Kevin2 | cr2: 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.34 | Kevin2 | The optimization is really nice to have on (it is noticeably faster and smaller) so I hope it does work okay. |
00:47.57 | cr2 | i will try tomorrow, err... today. now i need to go to bed :) it's 2:47 here. |
00:48.15 | gnif | send me a copy, i will have a look at it |
00:48.24 | gnif | binaries |
00:48.37 | Kevin2 | gnif: I have a binary on the shadowmite svn site: |
00:48.47 | gnif | where is that? |
00:48.52 | Kevin2 | svn://www.shadowmite.com/home/svn/ppc6700 |
00:48.56 | gnif | cr2: gnight |
00:49.02 | Kevin2 | Goodnight. |
00:49.20 | gnif | well, morning |
00:50.22 | gnif | Kevin2: this is a htc version? |
00:50.58 | gnif | lol, dont answer that |
00:51.00 | gnif | stupid q |
00:51.27 | gnif | its muvh smaller |
00:51.30 | gnif | *much |
00:53.29 | Kevin2 | Huh? It should work on any pxa27x htc phone. |
00:59.24 | gnif | yeah, dw |
01:00.06 | gnif | i am at work, on a MS crappy pc.... just about ready so SCREAM |
01:04.08 | gnif | ok, running the new ver |
01:04.25 | gnif | boots fine :D |
01:06.56 | gnif | ~hail Kenvin2 |
01:06.57 | apt | ACTION bows down to Kenvin2 and chants, "I'M NOT WORTHY!!" |
01:08.17 | Kevin2 | Cool. 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. |