diff options
author | Marcin Juszkiewicz <hrw@openembedded.org> | 2007-10-30 18:45:18 +0000 |
---|---|---|
committer | Marcin Juszkiewicz <hrw@openembedded.org> | 2007-10-30 18:45:18 +0000 |
commit | 705363284fd907087a0a4ca02f323971950422e0 (patch) | |
tree | 8404b34b5f07c3fd325aa6c1a156f715e608d998 /packages/altboot/files/sd-dynamic-fix.patch | |
parent | 767c48edffe2b87c6bba03638d4bb210465f7aad (diff) | |
parent | a201e5776350262f0af509ccb81fb974a6b038b5 (diff) |
merge of '9d487e0e820ff337d6de3af6ade625bea99a13f0'
and 'f4f4fd93a0ba107d720385c50418ba1e95de7e91'
Diffstat (limited to 'packages/altboot/files/sd-dynamic-fix.patch')
-rw-r--r-- | packages/altboot/files/sd-dynamic-fix.patch | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/packages/altboot/files/sd-dynamic-fix.patch b/packages/altboot/files/sd-dynamic-fix.patch new file mode 100644 index 0000000000..f31c6b8dc7 --- /dev/null +++ b/packages/altboot/files/sd-dynamic-fix.patch @@ -0,0 +1,44 @@ +Index: trunk/altboot.func +=================================================================== +--- trunk.orig/altboot.func 2007-10-30 15:48:16.000000000 +0000 ++++ trunk/altboot.func 2007-10-30 15:48:21.000000000 +0000 +@@ -499,17 +499,6 @@ + then + echo "Note: $SD_MOUNTPOINT is already mounted" + else +- # We can't trust that the SD device file is there when running kernel 2.6 w/ udev +- # and starting udev at this point may not be the best idea... +- if `uname -r | grep -q "2.6"` +- then +- #Let's just assume the device file name never changes... +- dev_no="`echo "$SD_DEVICE" | sed -n "s/\/dev\/mmcblk\(.*\)p\(.*\)/\1/p"`" +- part_no="`echo "$SD_DEVICE" | sed -n "s/\/dev\/mmcblk\(.*\)p\(.*\)/\2/p"`" +- ! test -e /dev/mmcblk${dev_no} && mknod /dev/mmcblk${dev_no} b 254 0 +- ! test -e /dev/mmcblk${dev_no}p${part_no} && mknod /dev/mmcblk${dev_no}p${part_no} b 254 $part_no +- fi +- + # Kernel 2.6 has the SD driver compiled into the kernel + if test -n "$SD_KERNEL_MODULE" + then +@@ -544,6 +533,21 @@ + fi + fi + ++ # We can't trust that the SD device file is there when running kernel 2.6 w/ udev ++ # and starting udev at this point may not be the best idea... ++ if `uname -r | grep -q "2.6"` ++ then ++ #Let's just assume the device file name never changes... ++ dev_no="`echo "$SD_DEVICE" | sed -n "s/\/dev\/mmcblk\(.*\)p\(.*\)/\1/p"`" ++ part_no="`echo "$SD_DEVICE" | sed -n "s/\/dev\/mmcblk\(.*\)p\(.*\)/\2/p"`" ++ if [ -f /sys/block/mmcblk${dev_no}/mmcblk${dev_no}p${part_no}/dev ] ++ then ++ rm -f /dev/mmcblk${dev_no}p${part_no} || true ++ mknod /dev/mmcblk${dev_no}p${part_no} b `cat /sys/block/mmcblk${dev_no}/mmcblk${dev_no}p${part_no}/dev|sed 's/:/ /' ` ++ fi ++ ++ fi ++ + sleep 3 + + check_fs "$SD_DEVICE" |