summaryrefslogtreecommitdiff
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.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
60#elif defined(MINI2440) 60#elif defined(MINI2440)
61mini2440.c 61mini2440.c
62show_logo.c 62show_logo.c
63#elif defined(PBELL_VIBE500)
64pb_vibe500.c
65show_logo.c
63#endif 66#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 @@
1/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
9 *
10 * Copyright (C) 2009 by Szymon Dziok
11 *
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation; either version 2
15 * of the License, or (at your option) any later version.
16 *
17 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
18 * KIND, either express or implied.
19 *
20 ****************************************************************************/
21
22/*
23The bootloader does nothing and it's not needed (it was used to test different
24stuff only), because the original bootloader stored in the flash has ability to
25boot three different images in the SYSTEM directory:
26jukebox.mi4 - when Power is pressed,
27blupd.mi4 - when Power+C combo is used,
28tester.mi4 - when Power+OK combo is used.
29
30So we can use it to dual boot (for example renaming original jukebox.mi4 to
31tester.mi4 and the rockbox.mi4 to jukebox.mi4).
32*/
33
34
35#include <stdlib.h>
36#include <stdio.h>
37#include <stdarg.h>
38#include <string.h>
39
40#include "config.h"
41
42#include "inttypes.h"
43#include "cpu.h"
44#include "system.h"
45#include "lcd.h"
46#include "kernel.h"
47#include "thread.h"
48#include "storage.h"
49#include "fat.h"
50#include "disk.h"
51#include "font.h"
52#include "backlight.h"
53#include "backlight-target.h"
54#include "button.h"
55#include "panic.h"
56#include "power.h"
57#include "file.h"
58#include "common.h"
59#include "i2c.h"
60
61/* #define UNK_01 (*(volatile unsigned long*)(0x7000a010)) */
62
63char version[] = APPSVERSION;
64
65extern int show_logo(void);
66
67void main(void)
68{
69 system_init();
70 kernel_init();
71 disable_irq();
72 lcd_init();
73
74 show_logo();
75 sleep(HZ*2);
76
77 while(1)
78 {
79 /* Power off bit */
80 if ((button_read_device()&BUTTON_POWER)!=0)
81 GPIO_CLEAR_BITWISE(GPIOB_OUTPUT_VAL,0x80);
82 }
83}