Author Topic: Sd Card Mount Problem + Workaround  (Read 2596 times)

ironstorm

  • Jr. Member
  • **
  • Posts: 86
    • View Profile
    • http://
Sd Card Mount Problem + Workaround
« on: June 16, 2005, 01:52:48 am »
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: [Select]
       # 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

Hrw

  • Hero Member
  • *****
  • Posts: 1366
    • View Profile
Sd Card Mount Problem + Workaround
« Reply #1 on: June 16, 2005, 04:14:27 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.
OpenZaurus 3.5.4x Release Manager
OpenEmbedded, Ångström, Poky developer
My website

Misc embedded hardware.

ironstorm

  • Jr. Member
  • **
  • Posts: 86
    • View Profile
    • http://
Sd Card Mount Problem + Workaround
« Reply #2 on: June 16, 2005, 08:12:46 am »
Quote
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.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=84479\"][{POST_SNAPBACK}][/a][/div]

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.

CoreDump

  • Hero Member
  • *****
  • Posts: 713
    • View Profile
    • http://www.hentges.net
Sd Card Mount Problem + Workaround
« Reply #3 on: June 25, 2005, 08:49:35 am »
Work-around applied with modifications:

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

Thanks!
Webmaster of hentges.net & Embedded Linux Developer.