[PATCH] olpcrd modular SD support

Deepak Saxena dsaxena at laptop.org
Fri Jun 20 14:16:40 EDT 2008


Following is a patch to allow us to boot from SD with the latest testing
and master kernels that modularize the SD stack. We don't need this for
power AFAIK, but it makes it much easier to test SD driver changes by 
just rebuilding the driver instead of the whole kernel.

Signed-off-by: Deepak Saxena <dsaxena at laptop.org>

diff --git a/src-olpc/initutil.py b/src-olpc/initutil.py
index 15d75cb..536ecf1 100644
--- a/src-olpc/initutil.py
+++ b/src-olpc/initutil.py
@@ -55,6 +55,8 @@ def root_mounted(xo, bootpath):
                     if first: time.sleep(5) # usb disks take a while to spin up
                     check_call(['/bin/mount','-n','-o',access,'/dev/sda1','/sysroot'])
                 elif bootpath.startswith('/pci/sd'):
+                    call(['/sbin/modprobe','-a', 'sdhci', 'mmc_block'])
+                    time.sleep(2) # CAFE takes a bit to wake up
                     check_call(['/bin/mount','-n','-o',access,'/dev/mmcblk0p1','/sysroot'])
                 else:
                     check_call(['/bin/mount','-n','-t','jffs2','-o',access,'mtd0','/sysroot'])


-- 
Deepak Saxena <dsaxena at laptop.org>



More information about the Devel mailing list