Trust uboot's device list only if it does not look suspicious.
authorweissms <weissms@fb15a70f-31f2-0310-bbcc-cdcc74a49acc>
Thu, 22 Nov 2012 00:11:12 +0000 (22 00:11 +0000)
committerweissms <weissms@fb15a70f-31f2-0310-bbcc-cdcc74a49acc>
Thu, 22 Nov 2012 00:11:12 +0000 (22 00:11 +0000)
Fixes boot from cdrom for older uboot versions.

git-svn-id: https://svn.aros.org/svn/aros/trunk/AROS@46063 fb15a70f-31f2-0310-bbcc-cdcc74a49acc

arch/ppc-sam440/boot/parthenope/src/context.c

index d0fe275..d322b1c 100644 (file)
@@ -40,9 +40,22 @@ inline int getc(void)
        return context->c_getc();
 }
 
+/* bogus uboot */
+static char *scan_list[7] = {
+       "s4sii",
+       "s4siicdrom",
+       "net",
+       "ssii",
+       "ssiicdrom",
+       NULL,
+       NULL
+};
+
 /* devices functions */
 inline void *get_scan_list(void)
 {
+       if (strncmp(((char**)context->c_scan_list)[0], "boot2", 5) == 0)
+               return scan_list;
        return context->c_scan_list;
 }