Signed-off-by: Tadas Slotkus <[email protected]>
---
 flashrom.c |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/flashrom.c b/flashrom.c
index b145037..f66a85d 100644
--- a/flashrom.c
+++ b/flashrom.c
@@ -1291,6 +1291,12 @@ int write_buf_to_file(unsigned char *buf, unsigned long 
size, char *filename)
                         filename);
                return 1;
        }
+#else
+       unsigned long i;
+       serial_putcmd("\n\nRomStartMarker\n\n\0");
+       for (i = 0; i < size; i++)
+               serial_putchar(*(buf++));
+       serial_putcmd("\n\nRomEndMarker\n\n\0");
 #endif
        return 0;
 }
@@ -1800,6 +1806,14 @@ void check_chip_supported(const struct flashchip *flash)
 
 int main(int argc, char *argv[])
 {
+#ifdef __LIBPAYLOAD__
+       while (1) {
+               argc=3;
+               char *argt[3] = {"./flashrom\0", "-r\0", "out.txt\0"};
+               argt[1][1] = getchar();
+               cli_classic(argc, argt);
+       }
+#endif
        return cli_classic(argc, argv);
 }
 
-- 
1.7.0.4



_______________________________________________
flashrom mailing list
[email protected]
http://www.flashrom.org/mailman/listinfo/flashrom

Reply via email to