From 0e9b693e7a23c3fb8dae253c16a3aa0765459e7e Mon Sep 17 00:00:00 2001 From: weissms Date: Thu, 22 Nov 2012 00:11:12 +0000 Subject: [PATCH] Trust uboot's device list only if it does not look suspicious. 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 | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/arch/ppc-sam440/boot/parthenope/src/context.c b/arch/ppc-sam440/boot/parthenope/src/context.c index d0fe275058..d322b1c08b 100644 --- a/arch/ppc-sam440/boot/parthenope/src/context.c +++ b/arch/ppc-sam440/boot/parthenope/src/context.c @@ -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; } -- 2.11.4.GIT