OESF Portal | OESF Forum | OESF Wiki | LinuxPDA | #planetgemini chat on matrix.org | #gemini-pda chat on Freenode | #zaurus and #alarmz chat on Freenode | ELSI (coming soon) | Ibiblio

IPB

Welcome Guest ( Log In | Register )

8 Pages V   1 2 3 > »   
Reply to this topicStart new topic
> New pdaXrom installer (to have just Root partition)
Ashley
post Apr 15 2004, 11:15 AM
Post #1





Group: Members
Posts: 46
Joined: 4-February 04
From: Castellón / Spain
Member No.: 1,677



Hi everybody!!

At last! And seems to work!...

I've written a modification of pdaxrom installer which allows to easily resize nand to have JUST THE ROOT PARTITION, WITH NO HOME.

No fragmentation. Full space to install everything you what (100 MB free after install rom on a Cx60!!). Of course, /home now is on Root partition.

This is mainly thanks to ikm, who is the author of the trick.

It has been designed to be very careful before patching your Nand, but you must consider this as a beta version. Please backup your data before doing anything (maintenance menu backup is recommended). Also, for the moment, it was just tested with my 760. Take even more cares if you have another model.

You can find it in http://ciberia.ya.com/ashley_s/

Contents of new.tar:
- updater.sh: to substitute pdaxrom updater.sh
- updater.decoded: decoded version of the last
- updater.decoded.cacko: decoded version of pdaxrom updater.sh
- mtdtweak & mtdparts: you must put these together with updater.sh and tools.tar and initrd.bin from pdaXrom
- encdesc: utility to encode and decode updater.sh files

Please try it with care and tell me bugs and succeeds in this topic :wink:
Go to the top of the page
 
+Quote Post
eviLjazz
post Apr 16 2004, 07:04 AM
Post #2





Group: Members
Posts: 116
Joined: 11-December 03
From: Oldenburg, Germany
Member No.: 1,155



Sorry, can't download the file with links or wget.
I've tried downloading the file with mozilla, but the file is corrupted. At least tar doesn't recognize it as valid tar archive...
Go to the top of the page
 
+Quote Post
ScottYelich
post Apr 16 2004, 07:07 AM
Post #3





Group: Members
Posts: 992
Joined: 9-October 03
From: NYC
Member No.: 609



I get 404

CODE
[779]> wget http://ciberia.ya.com/ashley_s/new.tar

--09:06:29--  http://ciberia.ya.com/ashley_s/new.tar

          => `new.tar'

Connecting to ciberia.ya.com:80... connected!

HTTP request sent, awaiting response... 404 Not Found

09:06:30 ERROR 404: Not Found.

                                                                               
Go to the top of the page
 
+Quote Post
eviLjazz
post Apr 16 2004, 07:45 AM
Post #4





Group: Members
Posts: 116
Joined: 11-December 03
From: Oldenburg, Germany
Member No.: 1,155



Okay, try downloading with referer.

wget --referer=http://ciberia.ya.com/ashley_s/index.html http://ciberia.ya.com/ashley_s/new.tar

This will work.
I hate referer rewrites........
Go to the top of the page
 
+Quote Post
zxerx
post Apr 16 2004, 07:31 PM
Post #5





Group: Members
Posts: 61
Joined: 11-April 04
From: Sydney
Member No.: 2,793



Success - I think this is a more preferable setup! Maybe I should've asked before trying it, but what's the worst that could happen if something went wrong?
Go to the top of the page
 
+Quote Post
dvdrw
post Apr 16 2004, 08:35 PM
Post #6





Group: Members
Posts: 32
Joined: 16-April 04
Member No.: 2,881



I have a SL-C750 (64MB). The mtdtweaks/mtdparts address in mtd1 is different, it is 0x20AA4 on my device. If I reflash "mtdtweaks" into /dev/mtd1 using nandlogical, it works OK. When I reboot, /proc/mtd shows mtd2 as "root" with a size of 0x3900000, and no mtd3 and "home" partition, which is correct.

I can eraseall -j /dev/mtd2 just fine, however no matter what I do the system refuses to mount the partition. If I use a smaller partition size (35MB for example) then I can eraseall -j /dev/mtd2 and mount it just fine. Something refuses to allow mounting of such a large jffs2 partition (57MB) on the C750. I've even manually created a jffs2 partition image using mkfs.jffs2 and dd'ed it into /dev/mtd2. But mount simply refuses to work. Perhaps there is some other limit in the C750's kernel that won't allow this to work? Do you have any suggestions as to anything to try? I would love to get rid of the "/home" partition!
Go to the top of the page
 
+Quote Post
sashz
post Apr 16 2004, 09:53 PM
Post #7





Group: Members
Posts: 388
Joined: 7-December 03
Member No.: 1,058



Hallo Ashley,
here correct fix for maximal size for root partition in SL-C kernel loader: http://www.pdaxrom.org/downloads/misc/slc-...artsize-fix.zip
unzip and copy updater.sh and mainte_fix.bin to CF and do flash update. It will rewrite kernel loader with new fixed version.

How it was hacked:
Bootloader was disassembled in ASM source source,
looking inside, we will see:

seg000:00020838 ADR R1, aConsoleTtys0Ro ; "console=ttyS0 root=/dev/mtdblock2"
seg000:0002083C MOV R2, #0x22 ; '"'
seg000:00020840 BL sub_313AC
seg000:00020844 CMP R7, #0x4000000
seg000:00020848 BCS loc_30888
seg000:0002084C MOV R0, R7,LSR#14
seg000:00020850 MOV R7, R0,LSL#4
seg000:00020854 MOV R2, R7
seg000:00020858 ADD R0, SP, #0xF0
seg000:0002085C ADR R1, off_309F4
seg000:00020860 BL sub_30FFC
seg000:00020864 MOV R0, R6
seg000:00020868 ADR R1, aMtdpartsSharps ; " mtdparts=sharpsl-nand:7168k@0k(smf),
"
seg000:0002086C BL sub_30FC8
seg000:00020870 MOV R0, R6
seg000:00020874 ADD R1, SP, #0xF0
seg000:00020878 BL sub_30FC8
seg000:0002087C MOV R0, R6
seg000:00020880 ADR R1, aK7168kRootHome ; "k@7168k(root),-(home)"
seg000:00020884 BL sub_30FC8
seg000:00020888
seg000:00020888 loc_30888 ; CODE XREF: sub_30768+E0?j


also the same code from address 0x20b7c

seg000:00020B7C ADR R1, aConsoleTtys0_0 ; "console=ttyS0 root=/dev/ram0"
seg000:00020B80 MOV R2, #0x1D
seg000:00020B84 BL sub_313AC
seg000:00020B88 CMP R6, #0x4000000
seg000:00020B8C BCS loc_30BCC


checking for max root size there:

seg000:00020844 CMP R6, #0x4000000
and
seg000:00020B88 CMP R6, #0x4000000

as we already know, 0x4000000 is max size for 64MB, multiple it to 2 for 128,
it will:
seg000:00020844 CMP R6, #0x8000000
and
seg000:00020B88 CMP R6, #0x8000000

fix new value from hexedit in extracted mainte.bin, and write it back to Z.
Now run pdaXrom installer and increase root partition to 80 MB and reflash pdaXrom. Rebooting... login as root,
df -h /
root size now 80.0M ! :-)
Go to the top of the page
 
+Quote Post
Ashley
post Apr 17 2004, 02:59 AM
Post #8





Group: Members
Posts: 46
Joined: 4-February 04
From: Castellón / Spain
Member No.: 1,677



Uuf!! I haven't been looking this for several hours and now it's plenty! (my first impression was nobody was interested!)

First thing: I'm so sorry for the downloading problems! When I putted it seemed me it worked, but that nasty server dislikes any non-html file. Very sad. I just made a quick account just for this.
Then, a first solution: if you want i can send it by mail; for this PM me or write me (vicra dot 3111 at cajarural dot com). A better solution: Kirk to Enterprise, Kirk to Enterprise... Scotty, can you help me? :wink: No more experiments, as your site is the best resource for z stuff, it would honor me if you wish to make a little room for me smile.gif

QUOTE
Success - I think this is a more preferable setup! Maybe I should've asked before trying it, but what's the worst that could happen if something went wrong?


Thanks. The worse: installation fails always and then have to restore a maintenance menu backup.

QUOTE
I have a SL-C750 (64MB).  The mtdtweaks/mtdparts address in mtd1 is different, it is 0x20AA4 on my device.  If I reflash "mtdtweaks" into /dev/mtd1 using nandlogical, it works OK.  When I reboot, /proc/mtd shows mtd2 as "root" with a size of 0x3900000, and no mtd3 and "home" partition, which is correct.


Nice. That sort of thing is what i expected when the model is diferent. Both ikm and me have a 760. Can any other 750 user confirm this? If so, we can do a simple mod to installer to do things right.

QUOTE
I can eraseall -j /dev/mtd2 just fine, however no matter what I do the system refuses to mount the partition.  If I use a smaller partition size (35MB for example) then I can eraseall -j /dev/mtd2 and mount it just fine.  Something refuses to allow mounting of such a large jffs2 partition (57MB) on the C750.  I've even manually created a jffs2 partition image using mkfs.jffs2 and dd'ed it into /dev/mtd2.  But mount simply refuses to work.  Perhaps there is some other limit in the C750's kernel that won't allow this to work?  Do you have any suggestions as to anything to try?  I would love to get rid of the "/home" partition!


I dislike very much hearing that. I think this tweak is even more needed by 700/750 users. You have tried the same things I would, so I can't give you a solution. I would like to see dmesg command line output and a nand dump of tweaked mtdparts, can you post them? May be this surpasses me, then sashz could be your only hope...


And sashz,

You found it!! You are a genius!! Boot loader disassebly!
It seems to be an old code from 700/750 that Sharp did not updated for 760. Things that happen. If we have had source code...

This is more useful for x60 users than having just 50 or 63 megs root partition, but the thing is that I prefer not to have any home partition, but mount /home to Root one. I like to install as many things as possible. I use my z for my daily work ohmy.gif (I mainly use gnumeric) but I don't use /home to keep any work file, I store they on my CF card always (too many reflashes). Then, home space is useless for me. I think it maked much more sense in qtopia since root was ro. I have many linux boxes installed on my home computers, but no home partition, it is something i don't like for a desktop computer. And there is another drawback: as /home is used many times as a temp dir (installing, for exaple; you can change this, but sometimes you don't realize) you can't shorten too much it. The more you fragment, the more space you loose.

Well, enough.

Sashz, I hope you rewrite installer to automate your fix in next releases, but i think many people agree with me and would be more happy if the installer also gives the chance to have just one partition :wink:

I'm afraid when i post this there will be dozens of new posts... let's see...
Go to the top of the page
 
+Quote Post
zxerx
post Apr 17 2004, 03:19 AM
Post #9





Group: Members
Posts: 61
Joined: 11-April 04
From: Sydney
Member No.: 2,793



After using Ashley's modified update.sh, I went to reflash cacko 1.21. Problem - /dev/mtdblock3 no longer exists, hence no /home partition - but the installers are assuming it is there. I don't posess the skills to modify the partition table yet and was just about to do a nand restore when Sashz posted his partition size fix. Great timing for me!
Go to the top of the page
 
+Quote Post
Ashley
post Apr 17 2004, 03:30 AM
Post #10





Group: Members
Posts: 46
Joined: 4-February 04
From: Castellón / Spain
Member No.: 1,677



QUOTE
After using Ashley's modified update.sh, I went to reflash cacko 1.21. Problem - /dev/mtdblock3 no longer exists, hence no /home partition - but the installers are assuming it is there. I don't posess the skills to modify the partition table yet and was just about to do a nand restore when Sashz posted his partition size fix. Great timing for me!


I wrote an option to restore original partition scheme in my installer. Isn't it working? After that restoration you should be able to install pdaxrom with its original installer or any other rom.

Ash
Go to the top of the page
 
+Quote Post
Ashley
post Apr 17 2004, 03:34 AM
Post #11





Group: Members
Posts: 46
Joined: 4-February 04
From: Castellón / Spain
Member No.: 1,677



I'm sending installer as an attachment. Tell me if it works.
Go to the top of the page
 
+Quote Post
zxerx
post Apr 17 2004, 07:02 AM
Post #12





Group: Members
Posts: 61
Joined: 11-April 04
From: Sydney
Member No.: 2,793



QUOTE
I wrote an option to restore original partition scheme in my installer


You certainly did! I should pay more attention ;-) Thanks, it works well and is slightly cleaner than having a zero size mtdblock3 partition.
Go to the top of the page
 
+Quote Post
dvdrw
post Apr 17 2004, 07:40 AM
Post #13





Group: Members
Posts: 32
Joined: 16-April 04
Member No.: 2,881



QUOTE
I dislike very much hearing that. I think this tweak is even more needed by 700/750 users. You have tried the same things I would, so I can't give you a solution. I would like to see dmesg command line output and a nand dump of tweaked mtdparts, can you post them? May be this surpasses me, then sashz could be your only hope...


I reverted my work all late last night but I will try to get a chance to try this again today. I do remember dmesg looked fine. An interesting thing is that if I formatted the 57MB partition as ext2 it would mount just fine - no errors and full 57MB partition available. So it appears to be just a problem with jffs2 (!?). I verified the eraseall worked, however, so the partition was getting formatted properly.

When I reverted everything back to original pdaXrom 1.0.5, I tried another test - simply making root partition 55MB (leaving the rest for the home partition.) Cacko installer properly did this, but the partition was no longer mountable then. I then tried 50MB and it also failed; when I tried 45MB root size it worked OK (?! i.e., 45MB root, 12MB home.)

I have two SL-C750's and will replace Qtopia on the other one and see if it behaves the same.

Thanks!
Go to the top of the page
 
+Quote Post
Ashley
post Apr 17 2004, 08:19 AM
Post #14





Group: Members
Posts: 46
Joined: 4-February 04
From: Castellón / Spain
Member No.: 1,677



dvdrw, that sounds disconcerting. As your test show, the problem is not concerned with tweaking mtdparts. I think some people reported problems to this forum when tried to make big root partitions on 700/760 with early pdaxrom versions, just like happens to you. I didn't pay attention since it is a different problem from the x60 one, as sashz in his wisdom has showed. May be you should search that.
If it mounts ext2 but not jffs2, it sounds like a 750's kernel bug. But I understand you can't mount with either maintenance or pdaxrom kernel (am I wrong?). If so, don't know, maybe the bug is present in both kernels?! Or you just tried to mount with maintenance?
Go to the top of the page
 
+Quote Post
dvdrw
post Apr 17 2004, 08:20 AM
Post #15





Group: Members
Posts: 32
Joined: 16-April 04
Member No.: 2,881



QUOTE
I have two SL-C750's and will replace Qtopia on the other one and see if it behaves the same.


I just tried a simple test on my second SL-C750, I tried installing normal unmodified pdaXrom 1.0.5 and resized NAND with 56MB for the root partition size (leaving 1MB for home), and the same problem occurs.

Here are the relevant entries from dmesg:

Linux version 2.4.18-rmk7-pxa3-embedix-021129 (zaurus@sharplinux) (gcc version 2.95.2 19991024 (release)) #1 Sat, 10 May 2003 14:51:36 +0900
CPU: Intel XScale-PXA255 revision 6
Machine: SHARP Shepherd
Converting old-style param struct to taglist
Memory clock: 99.53MHz (*27)
Run Mode clock: 199.07MHz (*2)
Turbo Mode clock: 398.13MHz (*2.0, active)
Security risk: creating user accessible mapping for 0x08000000 at 0xf1000000
On node 0 totalpages: 16384
zone(0): 16384 pages.
zone(1): 0 pages.
zone(2): 0 pages.
Kernel command line: console=ttyS0 root=/dev/ram0 mtdparts=sharpsl-nand:7168k@0k(smf),57344k@7168k(root),-(home) ZAURUS_UPDATE=/etc/update/update_sd
Console: colour dummy device 80x30
Calibrating delay loop... 397.31 BogoMIPS
Memory: 64MB = 64MB total
Memory: 53820KB available (1824K code, 520K data, 108K init)
...
Starting kswapd
JFFS2 version 2.1. © 2001, 2002 Red Hat, Inc., designed by Axis Communications AB.
reset resolution unkown => 480x640
...
Corgi audio driver initialize
Sharp SL series flash device: 1000000 at 0
Using static partision definition
Creating 1 MTD partitions on "sharpsl-flash":
0x00120000-0x007f0000 : "Filesystem"
NAND device: Manufacture ID: 0x98, Chip ID: 0x76 (Toshiba TH58512FT)
Creating 3 MTD partitions on "Toshiba TH58512FT":
0x00000000-0x00700000 : "smf"
0x00700000-0x03f00000 : "root"
0x03f00000-0x04000000 : "home"
Linux Kernel Card Services 3.1.22
options: [pm]
...


And here's /proc/mtd:

# cat /proc/mtd
dev: size erasesize name
mtd0: 006d0000 00020000 "Filesystem"
mtd1: 00700000 00004000 "smf"
mtd2: 03800000 00004000 "root"
mtd3: 00100000 00004000 "home"
#


So mtd2 formats fine with "eraseall -j", but when I try mounting it I get this error:

# cd /tmp1
# mkdir foo
# mount -t jffs2 /dev/mtdblock2 /tmp1/foo
mount: Mounting /dev/mtdblock2 on /tmp1/foo failed: Invalid argument
#


If I reduce the size of mtd2 to 46MB then it mounts fine - at 47MB and above it fails. Here's /proc/mtd for the largest mtd2 I can create and still have it mount OK:

# cat /proc/mtd
dev: size erasesize name
mtd0: 006d0000 00020000 "Filesystem"
mtd1: 00700000 00004000 "smf"
mtd2: 02e00000 00004000 "root"
mtd3: 00b00000 00004000 "home"
#


Sashz, do you have any ideas as to what might be going on? This is certainly strange!

Thanks!!
Go to the top of the page
 
+Quote Post

8 Pages V   1 2 3 > » 
Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 21st January 2020 - 02:51 PM