Cocoboot update request-Solved-T755p Thread
Hi,
I have been trying to see if I can get linux to boot my treo 755p. I have tried several different zImages from this site. The kernel appears to be loading, then the treo reboots.
The 755p's lccrs appear to be very similar to the 680 and centro.
See:
http://sites.google.com/site/treolinux/Home
and
http://hackndev.com/node/221#comment-944
I have a hunch that the problem could be fixed by adding the 755p to cocoboot and rebuilding it. Similar problems were initially reported for the 700p and the Centro and had to do with the virt_to_phys() function.
see http://hackndev.com/node/222#comment-848
I think that in the cocoboot source code, the file /m68k/mach.c needs to have the following added to struct Machine mach_table
{ 'D060', 1424, "Palm Treo 755p" },
and
case 1424: /* Treo 755p */
added to the section UInt32 get_tt_offset()
I am not very good at diff and patch and building cocoboot from source with the palm os sdk is over my head.
If someone could kindly update and recompile cocoboot, then I will test it on my 755p and report back to the forum.
Thank you in advance.

Ok, I have done some reading
Ok,
I have done some reading on diff and this is the patch that I propose:
jack@jack-laptop:~$ diff -u ~/cocoboot/m68k/mach.c ~/cocoboot/m68k/mach.c_new
--- /home/jack/cocoboot/m68k/mach.c 2009-06-26 15:47:58.000000000 -0700
+++ /home/jack/cocoboot/m68k/mach.c_new 2009-07-01 15:25:04.000000000 -0700
@@ -34,6 +34,7 @@
{ 'H102', 909, "Palm Treo 650" },
{ 'D053', 1230, "Palm Treo 680" },
{ 'D052', 1421, "Palm Treo 700p" },
+ { 'D060', 1424, "Palm Treo 755p" },
{ 'D061', 1944, "Palm Centro (GSM)" },
{ 'D062', 1944, "Palm Centro (CDMA)" },
{ 'MT64', 918, "Palm Tungsten C" },
@@ -98,6 +99,7 @@
case 909: /* Treo 650 */
case 1230: /* Treo 680 */
case 1421: /* Treo 700p */
+ case 1424: /* Treo 755p */
case 1944: /* Centro */
return 0;
default:
Could someone with commit access review and apply this patch, if it is acceptable? Then could someone familiar with the palm os SDK generate an updated cocoboot.prc?
Thank you in advance.
I need help building
I need help building cocoboot from source. The treo 755p is the only palmos treo that has not been reported to load linux load successfully. I have a hunch that patching cocoboot as I have proposed will allow one of the the 680 zImages to load (based on previous forum threads concerning the 700p and the Centro).
First, I installed a Gentoo guest in Virtualbox and found tried to follow these instructions: http://hackndev.com/trac/wiki/GentooSetup. But I found out that there is no longer an ebuild for prc-tools. I am not familiar with gentoo and decided to try another route.
So then I went back to Ubuntu and installed prc-tools using the sourceforge rpm's and used the command
$sudo alien -vic --fixperms prc-tools-2.3-1-i386.rpm. The sdk-5r3 files are at /opt/palmdev. Cocoboot source code is at ~/Projects/palm/bootloaders/cocoboot. I modified the file /cocoboot/mach.c to to add the treo755p. I installed pilrc with apt-get.
When I ran make I got the following output:
jack@jack-laptop:~/Projects/palm/bootloaders/cocoboot$ make
make clean
make[1]: Entering directory `/home/jack/Projects/palm/bootloaders/cocoboot'
rm -f *.prc *.map *~ *.bin include/*.tmp
make -C arm clean
make[2]: Entering directory `/home/jack/Projects/palm/bootloaders/cocoboot/arm'
rm -f arm.o atag.o boot.o cpu.o debug.o elf.o cocoboot.arm
make[2]: Leaving directory `/home/jack/Projects/palm/bootloaders/cocoboot/arm'
make -C m68k clean
make[2]: Entering directory `/home/jack/Projects/palm/bootloaders/cocoboot/m68k'
rm -f cocoboot.o mainform.o mem.o cpu.o imgloader.o mach.o options.o fwutils.o cocoboot.m68k
make[2]: Leaving directory `/home/jack/Projects/palm/bootloaders/cocoboot/m68k'
make[1]: Leaving directory `/home/jack/Projects/palm/bootloaders/cocoboot'
make cocoboot.prc
make[1]: Entering directory `/home/jack/Projects/palm/bootloaders/cocoboot'
make -C arm DEFINES=-DMOVE_FRAMEBUFFER
make[2]: Entering directory `/home/jack/Projects/palm/bootloaders/cocoboot/arm'
arm-palmos-gcc -Wall -O -s -I../include -DMOVE_FRAMEBUFFER -c -o arm.o arm.c
arm-palmos-gcc -Wall -O -s -I../include -DMOVE_FRAMEBUFFER -c -o atag.o atag.c
arm-palmos-gcc -Wall -O -s -I../include -DMOVE_FRAMEBUFFER -c -o boot.o boot.c
arm-palmos-gcc -Wall -O -s -I../include -DMOVE_FRAMEBUFFER -c -o cpu.o cpu.c
arm-palmos-gcc -Wall -O -s -I../include -DMOVE_FRAMEBUFFER -c -o debug.o debug.c
arm-palmos-gcc -Wall -O -s -I../include -DMOVE_FRAMEBUFFER -c -o elf.o elf.c
arm-palmos-gcc -Wall -O -s -I../include -DMOVE_FRAMEBUFFER -nostartfiles -o cocoboot.arm arm.o atag.o boot.o cpu.o debug.o elf.o
make[2]: Leaving directory `/home/jack/Projects/palm/bootloaders/cocoboot/arm'
make -C m68k DEFINES=-DMOVE_FRAMEBUFFER
make[2]: Entering directory `/home/jack/Projects/palm/bootloaders/cocoboot/m68k'
m68k-palmos-gcc -Wall -O -s -I../include -DMOVE_FRAMEBUFFER -c -o cocoboot.o cocoboot.c
m68k-palmos-gcc -Wall -O -s -I../include -DMOVE_FRAMEBUFFER -c -o mainform.o mainform.c
m68k-palmos-gcc -Wall -O -s -I../include -DMOVE_FRAMEBUFFER -c -o mem.o mem.c
m68k-palmos-gcc -Wall -O -s -I../include -DMOVE_FRAMEBUFFER -c -o cpu.o cpu.c
m68k-palmos-gcc -Wall -O -s -I../include -DMOVE_FRAMEBUFFER -c -o imgloader.o imgloader.c
m68k-palmos-gcc -Wall -O -s -I../include -DMOVE_FRAMEBUFFER -c -o mach.o mach.c
m68k-palmos-gcc -Wall -O -s -I../include -DMOVE_FRAMEBUFFER -c -o options.o options.c
m68k-palmos-gcc -Wall -O -s -I../include -DMOVE_FRAMEBUFFER -c -o fwutils.o fwutils.c
m68k-palmos-gcc -Wall -O -s -I../include -DMOVE_FRAMEBUFFER -static cocoboot.o mainform.o mem.o cpu.o imgloader.o mach.o options.o fwutils.o -o cocoboot.m68k -L/software/apps/prc-tools/sdks/sdk-5r3/lib/m68k-palmos-coff/ -lPalmOSGlue
make[2]: Leaving directory `/home/jack/Projects/palm/bootloaders/cocoboot/m68k'
pilrc -q -I include include/cocoboot.rcp.tmp
tools/chunkimages.py
Traceback (most recent call last):
File "tools/chunkimages.py", line 41, in
if __name__ == '__main__': main()
File "tools/chunkimages.py", line 26, in main
files = os.listdir(DIR)
OSError: [Errno 2] No such file or directory: 'images'
make[1]: *** [iTbl.bin] Error 1
make[1]: Leaving directory `/home/jack/Projects/palm/bootloaders/cocoboot'
make: *** [default] Error 2
Then I set up cygwin in Windows XP and tried to build cocoboot. I got the exact same error message.
So, I don't know if this is is a problem with the make file or the chunkimages.py script. I would appreciate some help with this. Or if you prefer, apply my patch and post the new cocoboot.prc.
Partial Success! I created
Partial Success!
I created a folder called images in ~/Projects/palm/bootloaders/cocoboot and ran make and it created a new cocoboot.prc!
Now cocoboot reports the phys ttb and virt ttb at the same address, like all the other treos. It still reboots when you try to get the LCD registers. LCD test shows a fuzzy screen. When I attempt to boot a zImage I get a frozen psychedelic image, rather than the reboot that I got before.
I think I am the right track. I will try some different zImages from this site and report back.
Update: I am now able to boot to the debian login screen using a Centro zImage.
That's good, join IRC
That's good, join IRC channel and contact me so we can discuss further development of the t755p port.
could you be more specific
could you be more specific about which Centro zImage did you use?
Sleepwalker: I am pretty
Sleepwalker: I am pretty sure that I got it from this forum thread: http://hackndev.com/node/221#comment-901 which points to http://releases.hackndev.com/kernels/. When I get more time I will try some of your 680 zImages and see if they work. I suspect that they will.
Also, Sleepwalker, when you get a chance, can you apply the patch to add 755p support to cocoboot?
Marex: I joined the IRC, but I've never used it before, so I'll have to figure out how it works. I am currently pretty busy with work and family, but I will ping you if I see you on the channel.
I was thinking that my plan of attack would be:
1. Download vanilla kernel source from http://ftp.arm.linux.org.uk/pub/linux/arm/kernel/git-cur/linux-2.6-arm.g...
2. Apply Sleepwalker's 680 patches http://sleepwalker.hackndev.com/upstream/
3. Change all references of 680 to 755p (either with sed or manually) in /arch/arm/mach.pxa/palm680.c and Kconfig.
4. Compile a kernel using instructions from Gentoo wiki and open embedded
5. See if it works.
6. If it doesn't, read the manual, study gpio's, make adjustments,try again ;-).
Does that sound like a reasonable approach?
The only problem is that I have never applied a patch or cross-compiled a kernel before, so this will probably take me a few weeks to try the above steps.
Edit: Actually, in http://hackndev.com/node/221#comment-901, Alex says that he committed the Centro source code to the 2.6.27 tree (which is currently not working correctly). So I would probably start with that source code.
Also, I could not get zImage.T680.sw5 or sw4 to boot. But, I didn't know where to put modules.T680.sw5.tar.bz2. Alex's builds don't need that file.
I was thinking that my plan
I was thinking that my plan of attack would be:
1. Download vanilla kernel source from http://ftp.arm.linux.org.uk/pub/linux/arm/kernel/git-cur/linux-2.6-arm.g...
No, use those: http://marex.hackndev.com/RTFM.txt (read from line starting with "PULL:", there's a howto below, be sure to use that devel branch)
2. Apply Sleepwalker's 680 patches http://sleepwalker.hackndev.com/upstream/
It should be merged already ... at least some treo680 support that is
3. Change all references of 680 to 755p (either with sed or manually) in /arch/arm/mach.pxa/palm680.c and Kconfig.
NO! You can either add support for t755p into treo680 board file if they are similar enough or just prepare new board file (called treo755p.c) and modify Kconfig and Makefile accordingly (all those files go to arch/arm/mach-pxa)
4. Compile a kernel using instructions from Gentoo wiki and open embedded
You can find some instructions on my blog (to compile palmtc kernel) http://marex-hnd.blogspot.com or at http://linux.zipitwireless.com (see Mainline kernel link), there's also some howto, should be understandable ... of course you need to reconfigure the kernel
5. See if it works.
It should
6. If it doesn't, read the manual, study gpio's, make adjustments,try again ;-).
Happy hacking
btw. Centro code isnt in (ask sleepwalker for details), t755p patch for cocoboot was pushed yesterday, thanks
I'm glad that you want to
I'm glad that you want to work on treo 755p!
well, Treo680 patch is curently in git repository you pointed in devel branch - no need to apply patches from point 2.
Rest of approach is right. I'd like to merge treo 755p into one treo file when you've got it working, changes should be small between treo devices and we ommit most of code redundancies.
zImage.T680.sw5 is most suitable for Treo680 so GPIOs, where it differs are breaking the run. Check your gpio dumps, find differences and change code.
Try GPIOtrace for finding important GPIOs.
modules.T680.sw5.tar.bz2 is packed /lib/modules/`uname -r` directory, it should be placed on your root file system. I'm trying to separate kernel and system so you can try any of miska's builds on auryn.karlin.mff.cuni.cz (or any other). This file is not necesary to see it booting.
Treo 755p Summary I would
Treo 755p Summary
I would like to give a quick summary of the progress on the Treo 755p. The above thread may not be entirely clear to other readers.
I was able to get to a debian root file system login, using a Centro zImage that was produced by Alex about a year ago. My card was partitioned similar to Alex's Treo 650 Howto entry in the forums. There are a couple of key points that need to be made.
1. You must use Cocoboot with 755p support added. The source code has recently been updated, but I don't think there is a compiled cocoboot.prc on the hackndev website yet. The reason you need an updated Cocoboot has to do with the mapping of virtual ttb/physical ttb. I recently posted in the forums a "Howto compile cocoboot from source".
2. As always, if you update Cocoboot, you must first erase the old copy on both your card and your handheld.
3. In the upper left corner of cocoboot, you have to change the four digit model number to 1944, to trick cocoboot into thinking this is a Centro.
4. The source code for this zImage is in the hackndev/legacy/linux-2.6.dev repository. Alex's notes say that he "stubbed out initial Centro support". Examination of the source code shows that it is basically the 680 code that was current in August 2008. Large sections of the code is commented out with "#if 0....#endif" So basically, this is a bare-bones or stripped down zImage. There would not be much functionality if you went to the trouble of loading a window manager.
5. As Marex stated above, don't use the hackndev/legacy/linux-2.6.dev code. It is old and unmaintained.
6. I have started to collect GPIO tracings using haretp.prc and gpiotrace.prc. I have collected the data at http://sites.google.com/site/treolinux/Home/treo-755p-data. I have not figured out how to edit the wiki, so I put this information on my own site.
I don't have much experience cross-compiling kernel images from source, so if someone wants to take my data and compile a new zimage, I would be happy to try it out and report back.
Thank you to Marex and Sleepwalker for your comments in the forum and on the IRC.
1. your changes were
1. your changes were applied, common cocoboot can be used - if you have some other changes, please contact us
3. why it must be centro? you don't have correct machine code in your kernel?
4. better example is current treo680.c code in devel branch of arm-linux kernel
6. fine! but I'd better use out wiki for that, if you have problems, contact us
I'm working on unifying palm smartphones now further cooperation with you may be usefull...
SleepWalker, I was just
SleepWalker,
I was just trying to clarify my earlier posts on how to get the 755p to boot to a root login. So far, Alex's Centro zImage was the only one that works "off the shelf" on the 755p.
I've been collecting gpio settings with gpoitrace and haret. As you suggested, I have been using the treo680.c as a template for my 755p.c code. I did manage to compile a zImage. I haven't been able to test it yet because my card reader just went bad.
I'd like to collaborate with you. I'll look for you on the IRC.
I have seen your 755p page
I have seen your 755p page after I made that post 'Call for logs' so you already did it before... I'll have a look for your logs, thanks.
Try also my GPIOeditor. It's not working so well for making any changes, but it can help you with confirming status of GPIO, IRQ, AFN...
I find interesting that there is the change in RTC Counter register in your silent switch dumps, two different dumps, same problem. Do you interrupt GPIOtrace before moving silent switch?
Hm, all logs are affected -
Hm, all logs are affected - problem is always with the frame 70. It sounds like GPIOtrace problem... Like RCNR address is not RCNR address, but memorymap map it to the same address...
I think I was not doing my
I think I was not doing my gpiotraces correctly. I will redo them when I get a working sd card reader. Much of my data is from doing memory dumps with haretp as described in the wiki.
Sleep_Walker: I have some
Sleep_Walker: I have some more 755p information at the bottom of the page at http://sites.google.com/site/treolinux/Home/treo-755p-data.