Author Topic: Kernel source  (Read 6224 times)

Ashley

  • Newbie
  • *
  • Posts: 46
    • View Profile
Kernel source
« Reply #15 on: April 14, 2004, 10:47:00 am »
Quote
Strange... it worked like a charm half a year ago
Now I feel interested. Have you got the same \'mtdparts\' file as the one I attached when you read it from flash with the given \'nandlogical\' command from the given offset?

Yes.

Quote
What does \'dmesg\' say when you boot the maintenance kernel with the tweak applied? What kernel parameters are actually passed?

Quote
Kernel command line: console=ttyS0 root=/dev/ram0 mtdparts=sharpsl-nand:7168k@0k(smf),51200-(root) ZAURUS_UPDATE=/etc/update/update_sd

That\'s what I expected before try it, so I said it would be a wrong command line.

Quote
The whole idea of mine was very simple: as a kernel parameter, mtdparts is apparently built up concatenating the following strings:
    1) \"mtdparts=sharpsl-nand:7168k@0k(smf),\" +
    2) \"%d\" replaced by the root partition size +
    3) \"k@7168k(root),-(home)\"
      Now we put a zero instead of \"%d\" so the resulting string #2 is empty,
      and change the last string from \"k@7168k(root),-(home)\" to just \"-(root)\".
Hey, where is \"%d\"? I have three zeroes before \"k@7168k(root),-(home)\" even in the original state! How can you avoid bootloader to paste the root partition size?

Quote
As a result, new mtdparts parameter will look like
\"mtdparts=sharpsl-nand:7168k@0k(smf),-(root)\"

And it worked exactly as I expected. What do you think?

p.s. Thanks for the nand scheme!

p.p.s. I doubt it is correct to hexview \'systc760.dbk\' because, as I said, Sharp seem to have introduced some sort of wear leveling on \'mtd1\' (smf), so the physical offsets would drift when the data is changed. Not absolutely sure about this though, but it looks like this.

Yes, that caused my offset difference. Despite of that, seems to be a reliable snapshot.

Quote
p.p.p.s. I just tried to perform the command I suggested before:

/sbin/nandlogical /dev/mtd1 READ 0x209F4 80 mtdparts

And got exactly the same thing as I attached before. I use factory default SYSTC760.DBK I downloaded from conics.net + pdaxrom 1.0.5 with 50MB root. And I did the very same thing half a year ago with just factory default nand and nothing else, and it was there at the same precise offset too. It should just work, shouldn\'t it?

Have you domesticated your bootlader?
 

Ash
c760 pdaXrom & zdebian (on SD)
256MB SD, 16MB CF, Prism 2.5 Wifi CF
Athlon XP
Debian sarge, Gentoo 1.4, RedHat 9, FreeBSD 5.1, xp

ScottYelich

  • Hero Member
  • *****
  • Posts: 992
    • View Profile
    • http://www.zaurususergroup.com/modules.php?opmodload&namephpWiki&filei
Kernel source
« Reply #16 on: April 14, 2004, 11:01:43 am »
Quote
Hallo!

sources there:

http://212.192.116.30/pdaXrom/src/

latest builder (patches inside builder) there:

http://212.192.116.30/pdaXrom/src/builder/

sharp utils replacement for sltime and fsro_resize there:

http://212.192.116.30/pdaXrom/src/survive-...e-1.0.0.tar.bz2

qt x11 setting utils there:

http://212.192.116.30/pdaXrom/src/x11rom-s...s-1.0.0.tar.bz2

bye,
sashz

although the pdaXrom.org site is fast -- I am mirroring this to zaurus.spy.org/feeds/cacko/

Scott

ikm

  • Full Member
  • ***
  • Posts: 172
    • View Profile
    • http://
Kernel source
« Reply #17 on: April 14, 2004, 12:20:12 pm »
Quote
Quote

Now I feel interested. Have you got the same \'mtdparts\' file as the one I attached when you read it from flash with the given \'nandlogical\' command from the given offset?
Yes.

Good!

Quote
Quote
What does \'dmesg\' say when you boot the maintenance kernel with the tweak applied? What kernel parameters are actually passed?

Quote
Kernel command line: console=ttyS0 root=/dev/ram0 mtdparts=sharpsl-nand:7168k@0k(smf),51200-(root) ZAURUS_UPDATE=/etc/update/update_sd

That\'s what I expected before try it, so I said it would be a wrong command line.

Quote
The whole idea of mine was very simple: as a kernel parameter, mtdparts is apparently built up concatenating the following strings:
    1) \"mtdparts=sharpsl-nand:7168k@0k(smf),\" +
    2) \"%d\" replaced by the root partition size +
    3) \"k@7168k(root),-(home)\"
      Now we put a zero instead of \"%d\" so the resulting string #2 is empty,
      and change the last string from \"k@7168k(root),-(home)\" to just \"-(root)\".
Hey, where is \"%d\"? I have three zeroes before \"k@7168k(root),-(home)\" even in the original state! How can you avoid bootloader to paste the root partition size?


It\'s not right there, it is slightly before. First two bytes of the resulting \'mtdparts\' snapshot. My mtdparts_tweaked have a zero instead of \'%\', and that\'s how it works. You must have overlooked it.

Quote
Quote
p.p.p.s. I just tried to perform the command I suggested before:

/sbin/nandlogical /dev/mtd1 READ 0x209F4 80 mtdparts

And got exactly the same thing as I attached before. I use factory default SYSTC760.DBK I downloaded from conics.net + pdaxrom 1.0.5 with 50MB root. And I did the very same thing half a year ago with just factory default nand and nothing else, and it was there at the same precise offset too. It should just work, shouldn\'t it?

Have you domesticated your bootlader?
 


Yep, that was fun. I just looked inside the original updater.sh and noticed that it should begin with \'#!/bin/sh\'. The obfuscation looked like a direct byte-to-byte mapping. Now you can just keep the first string intact, then add the same string with the first two symbols removed, and you get a nice script:

#!/bin/sh
/bin/sh

:-)

Ashley

  • Newbie
  • *
  • Posts: 46
    • View Profile
Kernel source
« Reply #18 on: April 14, 2004, 12:30:36 pm »
ikm, sorry me, I didn\'t realised about the trailind %d. Now I\'ve done things right and IT WORKS!!!!

ONLY THE ROOT PARTITION FILLING THE WHOLE NAND!!! At last!!

Thank you!!

Now, I must install the rom, but making /home to be on root. I can do this using just console, but I think I\'ll try to edit installer.sh, so more people can do that easily.

But before that I\'m going to try my own solution. I\'ll tell if it works.

I have been inspecting fsro_resize source and I think it does it good (sorry sashz, for doubting about you), so the bug must be in the boot loader. Now I understand how PartitionInfo1&2 store partitions. I just had an endianness problem. :evil:

Ash
c760 pdaXrom & zdebian (on SD)
256MB SD, 16MB CF, Prism 2.5 Wifi CF
Athlon XP
Debian sarge, Gentoo 1.4, RedHat 9, FreeBSD 5.1, xp

Ashley

  • Newbie
  • *
  • Posts: 46
    • View Profile
Kernel source
« Reply #19 on: April 14, 2004, 12:34:01 pm »
Hey! We have cross-replied!
c760 pdaXrom & zdebian (on SD)
256MB SD, 16MB CF, Prism 2.5 Wifi CF
Athlon XP
Debian sarge, Gentoo 1.4, RedHat 9, FreeBSD 5.1, xp

Ashley

  • Newbie
  • *
  • Posts: 46
    • View Profile
Kernel source
« Reply #20 on: April 14, 2004, 01:27:55 pm »
My solution does not work  

I have tried to specify the root partition size in MB instead of KB, hardcodding PastitionInfos ROFS size and editing mtdparts command line.

May be I mistaken something, may be anyone want to try it. In my tests, the bootloader fails the same way it does when you resize to more than 63MB with cacko installer: it does not generate any mtdparts= param !!!! Damn bootloader!!  :evil:

Hopefully, we have ikm\'s solution. It is perfect for me, is just what I looked for: no home partion at all, full space for root.

Now let\'s try to automate it...

Ash
c760 pdaXrom & zdebian (on SD)
256MB SD, 16MB CF, Prism 2.5 Wifi CF
Athlon XP
Debian sarge, Gentoo 1.4, RedHat 9, FreeBSD 5.1, xp

ikm

  • Full Member
  • ***
  • Posts: 172
    • View Profile
    • http://
Kernel source
« Reply #21 on: April 14, 2004, 01:47:14 pm »
Quote
 
Hopefully we have ikm solution. It is perfect for me, is just what I looked for: no home partion at all, full space for root.

Now let\'s try to automate it...

It\'s very easy to automate, one nandlogical call to get the block, one cmp to ensure the block is right, and another nandlogical call to put the modified version back -- and then reboot, reformat and install

Requires some work in the installation scripts though, if that is the question =)

Would be nice if the pdaxrom team embrace the idea and include the thing in their next version of rom