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

IPB

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Sd Card Mount Problem + Workaround, awk {print $4} sucks up all CPU
ironstorm
post Jun 15 2005, 09:52 PM
Post #1





Group: Members
Posts: 86
Joined: 10-August 03
Member No.: 331



I just did a build of OZ the other night:
Linux collie 2.4.18-rmk7-pxa3-embedix #1 Tue, 14 Jun 2005 03:05:30 +0000 armv4l unknown

And when I do a cat /proc/partitions I get:
QUOTE
major minor  #blocks  name

  60    0    999424 mmcda
  60    1    999392 mmcda1
  60    0    999424 mmcda
  60    1    999392 mmcda1
  60    0    999424 mmcda
.....

Into infinity... this is a kernel bug...

I'm not a kernel developer so I hacked a fix into the /etc/sdcontrol script instead....

At line 104 of /etc/sdcontrol edit as follows:
CODE
       # Read available partitions from /proc/partitions.
       PROC_PARTITIONS=`cat /proc/partitions | head -$(expr $(cat /proc/partitions | head -10 | grep -n " 0 " | head -2 | tail -1 |  cut -d: -f1) - 1)`
       # OK_PARTS="`cat /proc/partitions |awk '{print $4}'| grep mmcd`"
       OK_PARTS="`echo $PROC_PARTITIONS |awk '{print $4}'| grep mmcd`"

       echo $PROC_PARTITIONS |awk '{print $4}'| grep mmcd > "$LOGFILE-part"


Cheers,

-G
Go to the top of the page
 
+Quote Post
Hrw
post Jun 16 2005, 12:14 AM
Post #2





Group: Members
Posts: 1,376
Joined: 11-January 04
From: Poznań, Poland
Member No.: 1,413



Do you know that posting bugfixes to forum does not gwarant that it will be in next OZ releases? We have bugtracker for distro bugs.
Go to the top of the page
 
+Quote Post
ironstorm
post Jun 16 2005, 04:12 AM
Post #3





Group: Members
Posts: 86
Joined: 10-August 03
Member No.: 331



QUOTE(Hrw @ Jun 16 2005, 12:14 AM)
Do you know that posting bugfixes to forum does not gwarant that it will be in next OZ releases? We have bugtracker for distro bugs.
*


Yes, however this bugfix should not be in the next OZ release... It's not the right level to be addressing the problem as there are other areas of the distro that may depend on the kernel's behaviour being non-buggy.
Go to the top of the page
 
+Quote Post
CoreDump
post Jun 25 2005, 04:49 AM
Post #4





Group: Members
Posts: 715
Joined: 25-July 04
From: .de
Member No.: 4,094



Work-around applied with modifications:

CODE
    OK_PARTS=` head -20 /proc/partitions |grep mmcda | sort| uniq | awk '{print $4}'`
 
    echo $OK_PARTS > "$LOGFILE-part"


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

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: 22nd September 2014 - 08:20 PM