From 97a85aa96a97476f49c6caaa754d5144dbc903b9 Mon Sep 17 00:00:00 2001 From: Andres Salomon Date: Thu, 16 Oct 2008 17:32:19 -0400 Subject: [PATCH] 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 --- functions.sh | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) 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<