From: Andres Salomon Date: Thu, 16 Oct 2008 21:32:19 +0000 (-0400) Subject: olpc.fth: auto-detect boot device during boot X-Git-Tag: v0.2~15 X-Git-Url: https://spindle.queued.net/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=97a85aa96a97476f49c6caaa754d5144dbc903b9;p=xodist olpc.fth: auto-detect boot device during boot Rather than hardcoding nand:\ or disk:\ (which is incorrect in the case of sd:\), read the /chosen/bootpath device tree property to determine which device is being booting from, and use that variable. This fixes SD booting (which works now; tested!) Signed-off-by: Andres Salomon --- diff --git a/functions.sh b/functions.sh index 371a03b..29d4ae9 100644 --- a/functions.sh +++ b/functions.sh @@ -62,25 +62,34 @@ create_ofwboot() if [ "${fstype}" = "jffs2" ]; then r=mtd0 rfs="rootfstype=jffs2" - dev=nand else r="LABEL=${IMG_LABEL}" rfs="" - dev=disk fi cat >${mntpt}/boot/olpc.fth<