summaryrefslogtreecommitdiffstats
path: root/bootloader
diff options
context:
space:
mode:
authorFrank Gevaerts <frank@gevaerts.be>2010-01-18 19:05:20 +0000
committerFrank Gevaerts <frank@gevaerts.be>2010-01-18 19:05:20 +0000
commit553626a9582a266f99134f735759e63da0a44714 (patch)
tree7b336d379e61c632ad0ff775bca2f5d37a80775d /bootloader
parent39e51cc66e0f9d2afc82515958c1719fdac43332 (diff)
downloadrockbox-553626a9582a266f99134f735759e63da0a44714.tar.gz
rockbox-553626a9582a266f99134f735759e63da0a44714.tar.bz2
rockbox-553626a9582a266f99134f735759e63da0a44714.zip
Add initial Packard Bell Vibe 500 port, by Szymon Dziok
Author: Szymon Dziok Flyspray: FS#10912 git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24276 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'bootloader')
-rw-r--r--bootloader/SOURCES3
-rw-r--r--bootloader/pb_vibe500.c83
2 files changed, 86 insertions, 0 deletions
diff --git a/bootloader/SOURCES b/bootloader/SOURCES
index 04b48f8471..b4d3b82a05 100644
--- a/bootloader/SOURCES
+++ b/bootloader/SOURCES
@@ -60,4 +60,7 @@ show_logo.c
#elif defined(MINI2440)
mini2440.c
show_logo.c
+#elif defined(PBELL_VIBE500)
+pb_vibe500.c
+show_logo.c
#endif
diff --git a/bootloader/pb_vibe500.c b/bootloader/pb_vibe500.c
new file mode 100644
index 0000000000..70da0d32cc
--- /dev/null
+++ b/bootloader/pb_vibe500.c
@@ -0,0 +1,83 @@
+/***************************************************************************
+ * __________ __ ___.
+ * Open \______ \ ____ ____ | | _\_ |__ _______ ___
+ * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
+ * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
+ * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
+ * \/ \/ \/ \/ \/
+ * $Id$
+ *
+ * Copyright (C) 2009 by Szymon Dziok
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ ****************************************************************************/
+
+/*
+The bootloader does nothing and it's not needed (it was used to test different
+stuff only), because the original bootloader stored in the flash has ability to
+boot three different images in the SYSTEM directory:
+jukebox.mi4 - when Power is pressed,
+blupd.mi4 - when Power+C combo is used,
+tester.mi4 - when Power+OK combo is used.
+
+So we can use it to dual boot (for example renaming original jukebox.mi4 to
+tester.mi4 and the rockbox.mi4 to jukebox.mi4).
+*/
+
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <stdarg.h>
+#include <string.h>
+
+#include "config.h"
+
+#include "inttypes.h"
+#include "cpu.h"
+#include "system.h"
+#include "lcd.h"
+#include "kernel.h"
+#include "thread.h"
+#include "storage.h"
+#include "fat.h"
+#include "disk.h"
+#include "font.h"
+#include "backlight.h"
+#include "backlight-target.h"
+#include "button.h"
+#include "panic.h"
+#include "power.h"
+#include "file.h"
+#include "common.h"
+#include "i2c.h"
+
+/* #define UNK_01 (*(volatile unsigned long*)(0x7000a010)) */
+
+char version[] = APPSVERSION;
+
+extern int show_logo(void);
+
+void main(void)
+{
+ system_init();
+ kernel_init();
+ disable_irq();
+ lcd_init();
+
+ show_logo();
+ sleep(HZ*2);
+
+ while(1)
+ {
+ /* Power off bit */
+ if ((button_read_device()&BUTTON_POWER)!=0)
+ GPIO_CLEAR_BITWISE(GPIOB_OUTPUT_VAL,0x80);
+ }
+}