summaryrefslogtreecommitdiff
path: root/packages/altboot/files/altboot-menu/15-bootSD
diff options
context:
space:
mode:
authorRod Whitby <rod@whitby.id.au>2006-01-30 23:31:55 +0000
committerOpenEmbedded Project <openembedded-devel@lists.openembedded.org>2006-01-30 23:31:55 +0000
commitfdba45cea1cc5644c003b5598350563f0d690a7f (patch)
treef77c31cd36af02b67809d5774ce93dcd5edce955 /packages/altboot/files/altboot-menu/15-bootSD
parent6a5fc4fe77b973acc7259d54960b7f0e73b73280 (diff)
parent1eb8f416a72dd98faea8018e4934bb4420a6ae99 (diff)
merge of 0bbfeca4a5e914b371359c7f066b9731f637102a
and cd257fc3be2c2b6a6d43881ec1ebc7fd3b1608ff
Diffstat (limited to 'packages/altboot/files/altboot-menu/15-bootSD')
-rw-r--r--packages/altboot/files/altboot-menu/15-bootSD22
1 files changed, 19 insertions, 3 deletions
diff --git a/packages/altboot/files/altboot-menu/15-bootSD b/packages/altboot/files/altboot-menu/15-bootSD
index 60d9da4339..6ce0cdc9b3 100644
--- a/packages/altboot/files/altboot-menu/15-bootSD
+++ b/packages/altboot/files/altboot-menu/15-bootSD
@@ -23,9 +23,25 @@ run_module() {
echo -n "Generating device files..." >/dev/tty0
/etc/init.d/devices start && echo ok >/dev/tty0|| die "FAILED"
-
- echo -n "Loading SD kernel module..."
- /sbin/insmod $SD_KERNEL_MODULE >/dev/null 2>&1 && echo ok || die "insmod failed"
+ # We can't trust that the SD device file is there when running kernel 2.6 w/ udev
+ # Starting udev at this point may not be the best idea...
+# echo "*1*"
+ if `uname -r | grep -q "2.6"`
+ then
+ #echo "***"
+ dev_no="`echo "$SD_DEVICE" | sed -n "s/\/dev\/mmcblk\(.*\)p\(.*\)/\1/p"`"
+ part_no="`echo "/dev/mmcblk0p1" | 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
+
+ #echo "[mknod /dev/mmcblk${dev_no}p${part_no}]"
+ fi
+
+ if test -n "$SD_KERNEL_MODULE"
+ then
+ echo -n "Loading SD kernel module..."
+ /sbin/insmod $SD_KERNEL_MODULE >/dev/null 2>&1 && echo ok || die "insmod failed"
+ fi
echo -n "Mounting $SD_MOUNTPOINT..." >/dev/tty0
/bin/mount -t auto -o defaults,noatime $SD_DEVICE $SD_MOUNTPOINT >/dev/null 2>&1 && echo ok >/dev/tty0|| die "/bin/mount -t auto -o defaults,noatime $SD_DEVICE $SD_MOUNTPOINT failed"