OESF | ELSI | pdaXrom | OpenZaurus | Zaurus Themes | Community Links | Ibiblio

IPB

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Flashing a new kernel from Japan into the SL-C760
qx773
post Feb 10 2004, 08:04 PM
Post #1





Group: Members
Posts: 219
Joined: 10-February 04
Member No.: 1,807



Do you have a need for speed? I don't know if you have already updated the kernel on your Zaurus SL-C760, but I successfully did it on mine after gathering information from various sites on the web. There is a fast kernel available for the Zaurus SL-C760 from a Japanese web site. It seems to make the video sample clip that is on my SL-C760 play smoother.

The latest kernel on that site is:

http://tetsu.homelinux.org/zaurus/kernel/v...e-v13d-C760.bin

This file has to be saved and renamed to

zImage

without any file name extension and placed on a Compact Flash card or SD or MMC card that has been formatted in Windows (DOS) format. The capitalization of the file name has to be exact.

You also need to save the

http://developer.ezaurus.com/sl_j/source/c...updater.sh.c760

file onto the same Compact Flash, SD, or MMC card and rename the file to

updater.sh

without the c760 extension. Once the two files

zImage
updater.sh

are on one of your memory cards, the steps to update your kernel are then:

1. Make sure that there is NO file named "initrd.bin" on the same card unless you deliberately want to erase your file system with whatever "initrd.bin" provides.
2. Unplug the AC adapter from the Zaurus SL-C760.
3. Flip the battery switch to the left position.
4. Remove the battery for 5 seconds or more.
5. Put the battery back in.
6. Flip the battery switch back to the right position.
7. Plug the AC adapter back into the Zaurus SL-C760.
8. Hold down the OK button on the bottom of the keyboard while turning the Zaurus SL-C760 on.
9. Select the fourth option on the bottom of the Japanese menu.
10. Select 2 or 3 for CF or SD depending on the card where the zImage and updater.sh files are located.
11. Select Y for Yes.

I got a message about a module named devinfo not being found, but that did not prevent the kernel from being updated. A row of dots will appear showing the progress of the kernel update. A message will then appear telling you to, "Please reset." Unplug the AC adapter from the Zaurus SL-C760. Flip the battery switch to the remove position. Remove the battery. Wait 5 seconds or more. Put the battery back in and flip the battery switch to the installed position. Power the Zaurus back up. The computer will display Linux start-up messages, pause, and then take about a minute or two to get back into the familiar windowing environment.

I think that you can reuse the

updater.sh

file for updating any kernel on the Zaurus SL-C760 as long as the kernel file is renamed to

zImage

first. For some reason, the "updater.sh" file is encrypted with a simple cipher. I guess that Sharp wanted to make it hard for people to update their systems.

In the future, if you want to get updates of the kernel from the same site, you can visit:

http://tetsu.homelinux.org/zaurus/kernel

The web page can be translated from Japanese to English by entering the address in:

http://babelfish.altavista.com

in the, "Translate a Web Page", section and selecting the Japanese to English translation.
Go to the top of the page
 
+Quote Post
fu-ga-zi
post Feb 12 2004, 06:26 AM
Post #2





Group: Members
Posts: 31
Joined: 30-January 04
From: Germany
Member No.: 1,616



What did this guy do to speed up the kernel? There is a possibility to make the Z faster (see other postings in this forum) but I would prefer non-hardware speedups to save battery and prolong CPU life.

Regards

Peter
Go to the top of the page
 
+Quote Post
qx773
post Feb 12 2004, 06:21 PM
Post #3





Group: Members
Posts: 219
Joined: 10-February 04
Member No.: 1,807



The English translation from the http://babelfish.altavista.com site is rough, but it seems to indicate that the kernel has had the cache errata workaround for the earlier model of the Xscale processor removed. It also seems to mention a buffer for the video. There are also options to overclock the video and system bus, but those are only options.
Go to the top of the page
 
+Quote Post
Richjn
post Feb 12 2004, 10:35 PM
Post #4





Group: Members
Posts: 121
Joined: 21-October 03
Member No.: 696



Just for the record the 760 doesn't have cache errata turned on in the default kernel as this is for the PXA-250 the 750/760 860 have a PXA-255 processor.

I've not used this kernel but I understand that it has pre-emptive and cpu overclock built in.

Richard
Go to the top of the page
 
+Quote Post
qx773
post Feb 13 2004, 07:29 PM
Post #5





Group: Members
Posts: 219
Joined: 10-February 04
Member No.: 1,807



Yes. The Japanese kernel is similar to the one that is available for download from the Zaurus Users Group download area. Some of the start-up messages in the Japanese kernel are odd, though. Some code somewhere in that kernel is detecting an attempt to set a block size smaller than 512 bytes for a FAT file system at start-up. Perhaps the Japanese programmers do not understand what that error message means.

As I mentioned, the Japanese kernel has the option to overclock the bus speed. The root user can do this by issuing the command:

echo 162 > /proc/cccr_change

However, this setting gets changed back to the factory 161 setting whenever the computer is allowed to automatically go into suspend mode. The Japanese kernel is still actively in development with yet another version mentioned on the web site but not yet available for download. I have switched to the pre-emptive kernel and 162 overclock kernel that is available from the Zaurus Users Group download area. Contrary to the HowTo instructions, you must rename the kernel to zImage without the ".bin" file name extension if you use the updater.sh for the C760 that I mentioned at the start of this thread.

For people who understand shell scripts, the decrypted updater.sh.c760 shell script reads as follows:

CODE
#!/bin/sh





DATAPATH=$1

TMPPATH=/tmp/update

TMPDATA=$TMPPATH/tmpdata.bin

TMPHEAD=$TMPPATH/tmphead.bin





RO_MTD_LINE=`cat /proc/mtd | grep "root" | tail -n 1`

if [ "$RO_MTD_LINE" = "" ]; then

   RO_MTD_LINE=`cat /proc/mtd | grep "<NAND>.*<2>" | tail -n 1`

fi

RO_MTD_NO=`echo $RO_MTD_LINE | cut -d: -f1 | cut -dd -f2`

RO_MTD_SIZE_HEX=`echo $RO_MTD_LINE | cut -d" " -f2`

RO_MTD=/dev/mtd$RO_MTD_NO

RO_MTDBLK=/dev/mtdblock$RO_MTD_NO

RO_MTD_SIZE=`dc 0x$RO_MTD_SIZE_HEX 1024 /`



RW_MTD_LINE=`cat /proc/mtd | grep "home" | tail -n 1`

if [ "$RW_MTD_LINE" = "" ]; then

   RW_MTD_LINE=`cat /proc/mtd | grep "<NAND>.*<2>" | tail -n 1`

fi

RW_MTD_NO=`echo $RW_MTD_LINE | cut -d: -f1 | cut -dd -f2`

RW_MTD_SIZE_HEX=`echo $RW_MTD_LINE | cut -d" " -f2`

RW_MTD=/dev/mtd$RW_MTD_NO

RW_MTDBLK=/dev/mtdblock$RW_MTD_NO

RW_MTD_SIZE=`dc 0x$RW_MTD_SIZE_HEX 1024 /`



LOGOCAL_MTD=/dev/mtd1



VERBLOCK=0x48000

MVRBLOCK=0x70000



RESULT=0



Cleanup(){

    rm -f $VTMPNAME > /dev/null 2>&1

    rm -f $MTMPNAME > /dev/null 2>&1

    rm $CTRLPATH/* > /dev/null 2>&1

    rm $DATAPATH/* > /dev/null 2>&1

    exit $1

}

trap 'Cleanup 1' 1 15

trap '' 2 3





### Check model ###

/sbin/writerominfo

MODEL=`cat /proc/deviceinfo/product`

if [ "$MODEL" != "SL-C760" ] > /dev/null 2>&1

then

    echo 'MODEL:'$MODEL

    echo 'ERROR:Invalid model!'

    echo 'Please reset'

    while true

    do

    done

fi



mkdir -p $TMPPATH > /dev/null 2>&1



cd $DATAPATH/



if [ -e consolescroll ]

then

    ./consolescroll

fi



for TARGETFILE in zImage initrd.bin mversion.bin

do

    if [ -e $TARGETFILE ]

    then

 rm -f $TMPPATH/*.bin > /dev/null 2>&1

 DATASIZE=`wc -c $TARGETFILE`

 DATASIZE=`echo $DATASIZE | cut -d' ' -f1`



 #echo $TARGETFILE':'$DATASIZE'bytes'

 case "$TARGETFILE" in

 zImage)

     echo 'kernel'

     ISLOGICAL=1

     MODULEID=5

     MODULESIZE=0x13C000

     ADDR=`dc 0xE0000`

     ISFORMATTED=1

     DATAPOS=0

     ONESIZE=524288

     HDTOP=`expr $DATASIZE - 16`

     /sbin/bcut -a $HDTOP -s 16 -o $TMPHEAD $TARGETFILE

 ;;

 initrd.bin)

     echo 'RO file system'

     ISLOGICAL=0

     MODULEID=6

     MODULESIZE=0x3500000

     ADDR=0

     ISFORMATTED=0

     TARGET_MTD=$RO_MTD

     DATAPOS=16

     ONESIZE=1048576

     /sbin/bcut -s 16 -o $TMPHEAD $TARGETFILE

 ;;

 mversion.bin)

     echo 'Maser version'

     MTMPNAME=$TMPPATH'/mtmp'`date '+%s'`'.tmp'

     /sbin/nandlogical $LOGOCAL_MTD READ $MVRBLOCK 0x4000 $MTMPNAME > /dev/null 2>&1

     /sbin/verchg -m $MTMPNAME $TARGETFILE 0 0 > /dev/null 2>&1

     /sbin/nandlogical $LOGOCAL_MTD WRITE $MVRBLOCK 0x4000 $MTMPNAME > /dev/null 2>&1

     rm -f $MTMPNAME > /dev/null 2>&1

     echo 'Success!'

     continue

 ;;

 *)

     continue;

 ;;

 esac



 #check version

 /sbin/bcut -s 6 -o $TMPDATA $TMPHEAD

 if [ `cat $TMPDATA` != "SHARP!" ] > /dev/null 2>&1

 then

     #no version info...

     rm -f $TMPHEAD > /dev/null 2>&1

     DATAPOS=0

 fi



 #format?

 if [ $ISFORMATTED = 0 ]

 then

     echo -n 'Flash erasing...'

     /sbin/eraseall $TARGET_MTD 2> /dev/null > /dev/null

     #/sbin/eraseall $TARGET_MTD 2

     echo 'done'

     ISFORMATTED=1

 fi



 echo ''

 echo '0%                                          100%'

 PROGSTEP=`expr $DATASIZE / $ONESIZE + 1`

 PROGSTEP=`expr 48 / $PROGSTEP`

 if [ $PROGSTEP = 0 ]

 then

     PROGSTEP=1

 fi



 #header information

 if [ -e $TMPHEAD ]

 then

     VTMPNAME=$TMPPATH'/vtmp'`date '+%s'`'.tmp'

     MTMPNAME=$TMPPATH'/mtmp'`date '+%s'`'.tmp'

     /sbin/nandlogical $LOGOCAL_MTD READ $VERBLOCK 0x4000 $VTMPNAME > /dev/null 2>&1

     /sbin/nandlogical $LOGOCAL_MTD READ $MVRBLOCK 0x4000 $MTMPNAME > /dev/null 2>&1



     #echo 'found header'

     /sbin/verchg -v $VTMPNAME $TMPHEAD $MODULEID $MODULESIZE > /dev/null 2>&1

     /sbin/verchg -m $MTMPNAME $TMPHEAD $MODULEID $MODULESIZE > /dev/null 2>&1

 fi



 #loop

 while [ $DATAPOS -lt $DATASIZE ]

 do

     #data create

     bcut -a $DATAPOS -s $ONESIZE -o $TMPDATA $TARGETFILE

     TMPSIZE=`wc -c $TMPDATA`

     TMPSIZE=`echo $TMPSIZE | cut -d' ' -f1`

     DATAPOS=`expr $DATAPOS + $TMPSIZE`



     #handle data file

     #echo 'ADDR='$ADDR

     #echo 'SIZE='$TMPSIZE

     if [ $ISLOGICAL = 0 ]

     then

   next_addr=`/sbin/nandcp -a $ADDR $TMPDATA $TARGET_MTD  2>/dev/null | fgrep "mtd address" | cut -d- -f2 | cut -d( -f1`

   if [ "$next_addr" = "" ]; then

       echo "ERROR:flash write"

       rm $TMPDATA > /dev/null 2>&1

       RESULT=3

       break;

   fi

   ADDR=$next_addr

     else

   /sbin/nandlogical $LOGOCAL_MTD WRITE $ADDR $DATASIZE $TMPDATA > /dev/null 2>&1

   ADDR=`expr $ADDR + $TMPSIZE`

     fi



     rm $TMPDATA > /dev/null 2>&1



     #progress

     SPNUM=0

     while [ $SPNUM -lt $PROGSTEP ]

     do

   echo -n '.'

   SPNUM=`expr $SPNUM + 1`

     done

 done



 echo ''



#finish

 rm -f $TMPPATH/*.bin > /dev/null 2>&1



 if [ $RESULT = 0 ]

 then

     if [ -e $VTMPNAME ]

     then

   /sbin/nandlogical $LOGOCAL_MTD WRITE $VERBLOCK 0x4000 $VTMPNAME > /dev/null 2>&1

   rm -f $VTMPNAME > /dev/null 2>&1

     fi

     if [ -e $MTMPNAME ]

     then

   /sbin/nandlogical $LOGOCAL_MTD WRITE $MVRBLOCK 0x4000 $MTMPNAME > /dev/null 2>&1

   rm -f $MTMPNAME > /dev/null 2>&1

     fi

     echo 'Success!'

 else

     echo 'Error!'

#      exit $RESULT

 fi

    fi

done



#exit 0



echo 'Please reset'

while true

do

done


This shell script looks for three files named

zImage
initrd.bin
mversion.bin

It ignores any files that are missing, so that you can update the kernel by itself. I do not know what mversion.bin is supposed to be.
Go to the top of the page
 
+Quote Post
vanstrien
post Aug 13 2004, 06:06 AM
Post #6





Group: Members
Posts: 58
Joined: 22-August 03
From: Houston / London
Member No.: 374



Any suggestions on flashing the kernel under the 860? I've used the same script that worked fine for me to flash Elena, but I always get the same "Invalid Model" error.

If I change the updater.sh posted above so that it does not check the version, is there something I need to do to 'reencrypt' it?
Go to the top of the page
 
+Quote Post
Stubear
post Aug 13 2004, 06:32 AM
Post #7





Group: Members
Posts: 1,164
Joined: 17-December 03
From: Melbourne, AUSTRALIA
Member No.: 1,219



QUOTE(vanstrien @ Aug 13 2004, 11:06 PM)
Any suggestions on flashing the kernel under the 860? I've used the same script that worked fine for me to flash Elena, but I always get the same "Invalid Model" error.

If I change the updater.sh posted above so that it does not check the version, is there something I need to do to 'reencrypt' it?

You'll have to go to the site and download the C860 version of the kernel - everything is the same except it has the model number as 860 instead of 760

Stu
Go to the top of the page
 
+Quote Post
qx773
post Aug 13 2004, 03:55 PM
Post #8





Group: Members
Posts: 219
Joined: 10-February 04
Member No.: 1,807



I used a program called tench to decode the updater.sh file. I am attaching the source code to this message. The same program can also be used to re-encode the updater.sh file.

If a kernel works on the c760, then it should work on the c860, since the hardware is identical.
Attached File(s)
Attached File  tench.c ( 2.41K ) Number of downloads: 14
 
Go to the top of the page
 
+Quote Post
qx773
post Aug 13 2004, 04:00 PM
Post #9





Group: Members
Posts: 219
Joined: 10-February 04
Member No.: 1,807



Here is a compiled version of the tench program for MSDOS or Windows.
Attached File(s)
Attached File  tench.exe ( 13.76K ) Number of downloads: 9
 
Go to the top of the page
 
+Quote Post
qx773
post Aug 13 2004, 04:04 PM
Post #10





Group: Members
Posts: 219
Joined: 10-February 04
Member No.: 1,807



Here is the updater.sh script in downloadable form, attached to this message.
Attached File(s)
Attached File  updater.sh ( 5.18K ) Number of downloads: 9
 
Go to the top of the page
 
+Quote Post
Stubear
post Aug 14 2004, 04:33 AM
Post #11





Group: Members
Posts: 1,164
Joined: 17-December 03
From: Melbourne, AUSTRALIA
Member No.: 1,219



QUOTE(qx773 @ Aug 14 2004, 08:55 AM)
If a kernel works on the c760, then it should work on the c860, since the hardware is identical.

Ah, my mistake it's not the kernel version that is being checked it's the updater.sh that's looking for a specific version

From updater.sh you linked too
CODE
### Check model ###
/sbin/writerominfo
MODEL=`cat /proc/deviceinfo/product`
if [ "$MODEL" != "SL-C760" ] > /dev/null 2>&1
then
    echo 'MODEL:'$MODEL
    echo 'ERROR:Invalid model!'
    echo 'Please reset'
    while true
    do
    done
fi


As you can see it's hard coded for installing only on the C760, you will have to edit it or get the C860 version of updater.sh

Stu
Go to the top of the page
 
+Quote Post
vanstrien
post Aug 15 2004, 12:45 AM
Post #12





Group: Members
Posts: 58
Joined: 22-August 03
From: Houston / London
Member No.: 374



My mistake--I had multiple copies of the updater.sh around. The one I was trying was similiar to the one posted here. I've just found one that specifically references the 860.

I'll give it a go this weekend.
Go to the top of the page
 
+Quote Post
vanstrien
post Aug 15 2004, 03:07 AM
Post #13





Group: Members
Posts: 58
Joined: 22-August 03
From: Houston / London
Member No.: 374



Oddly enought the updater.sh which comes with the latest Cacko installs the rom fine but if I try just the kernel it fails.

I took the updater.sh above and just removed the hardware check and it worked perfectly.
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
2 User(s) are reading this topic (2 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 25th July 2014 - 10:16 AM