summaryrefslogtreecommitdiff
path: root/bootloader
diff options
context:
space:
mode:
Diffstat (limited to 'bootloader')
-rw-r--r--bootloader/SOURCES2
-rw-r--r--bootloader/common.c5
-rw-r--r--bootloader/main-pp.c4
-rw-r--r--bootloader/pb_vibe500.c83
4 files changed, 8 insertions, 86 deletions
diff --git a/bootloader/SOURCES b/bootloader/SOURCES
index b4d3b82a05..b7816c187c 100644
--- a/bootloader/SOURCES
+++ b/bootloader/SOURCES
@@ -61,6 +61,6 @@ show_logo.c
61mini2440.c 61mini2440.c
62show_logo.c 62show_logo.c
63#elif defined(PBELL_VIBE500) 63#elif defined(PBELL_VIBE500)
64pb_vibe500.c 64main-pp.c
65show_logo.c 65show_logo.c
66#endif 66#endif
diff --git a/bootloader/common.c b/bootloader/common.c
index 18d7dd4313..2a80f987ad 100644
--- a/bootloader/common.c
+++ b/bootloader/common.c
@@ -37,7 +37,7 @@
37#include "file.h" 37#include "file.h"
38 38
39/* TODO: Other bootloaders need to be adjusted to set this variable to true 39/* TODO: Other bootloaders need to be adjusted to set this variable to true
40 on a button press - currently only the ipod, H10 and Sansa versions do. */ 40 on a button press - currently only the ipod, H10, Vibe 500 and Sansa versions do. */
41#if defined(IPOD_ARCH) || defined(IRIVER_H10) || defined(IRIVER_H10_5GB) \ 41#if defined(IPOD_ARCH) || defined(IRIVER_H10) || defined(IRIVER_H10_5GB) \
42 || defined(SANSA_E200) || defined(SANSA_C200) || defined(GIGABEAT_F) \ 42 || defined(SANSA_E200) || defined(SANSA_C200) || defined(GIGABEAT_F) \
43 || (CONFIG_CPU == AS3525) || defined(COWON_D2) \ 43 || (CONFIG_CPU == AS3525) || defined(COWON_D2) \
@@ -45,7 +45,8 @@
45 || defined(SAMSUNG_YH925) || defined(SAMSUNG_YH920) \ 45 || defined(SAMSUNG_YH925) || defined(SAMSUNG_YH920) \
46 || defined(SAMSUNG_YH820) || defined(PHILIPS_SA9200) \ 46 || defined(SAMSUNG_YH820) || defined(PHILIPS_SA9200) \
47 || defined(PHILIPS_HDD1630) || defined(PHILIPS_HDD6330) \ 47 || defined(PHILIPS_HDD1630) || defined(PHILIPS_HDD6330) \
48 || defined(ONDA_VX747) || defined(SANSA_CLIPPLUS) 48 || defined(ONDA_VX747) || defined(SANSA_CLIPPLUS) \
49 || defined(PBELL_VIBE500)
49bool verbose = false; 50bool verbose = false;
50#else 51#else
51bool verbose = true; 52bool verbose = true;
diff --git a/bootloader/main-pp.c b/bootloader/main-pp.c
index fe93f14eaa..a2562f8a9d 100644
--- a/bootloader/main-pp.c
+++ b/bootloader/main-pp.c
@@ -84,6 +84,9 @@ extern int show_logo(void);
84#elif CONFIG_KEYPAD == SANSA_FUZE_PAD 84#elif CONFIG_KEYPAD == SANSA_FUZE_PAD
85#define BOOTLOADER_BOOT_OF BUTTON_LEFT 85#define BOOTLOADER_BOOT_OF BUTTON_LEFT
86 86
87#elif CONFIG_KEYPAD == PBELL_VIBE500_PAD
88#define BOOTLOADER_BOOT_OF BUTTON_OK
89
87#endif 90#endif
88 91
89/* Maximum allowed firmware image size. 10MB is more than enough */ 92/* Maximum allowed firmware image size. 10MB is more than enough */
@@ -170,6 +173,7 @@ struct tea_key tea_keytable[] = {
170 { "view", { 0x70e19bda, 0x0c69ea7d, 0x2b8b1ad1, 0xe9767ced } }, 173 { "view", { 0x70e19bda, 0x0c69ea7d, 0x2b8b1ad1, 0xe9767ced } },
171 { "sa9200", { 0x33ea0236, 0x9247bdc5, 0xdfaedf9f, 0xd67c9d30 } }, 174 { "sa9200", { 0x33ea0236, 0x9247bdc5, 0xdfaedf9f, 0xd67c9d30 } },
172 { "hdd1630", { 0x04543ced, 0xcebfdbad, 0xf7477872, 0x0d12342e } }, 175 { "hdd1630", { 0x04543ced, 0xcebfdbad, 0xf7477872, 0x0d12342e } },
176 { "vibe500", { 0xe3a66156, 0x77c6b67a, 0xe821dca5, 0xca8ca37c } },
173}; 177};
174 178
175/* 179/*
diff --git a/bootloader/pb_vibe500.c b/bootloader/pb_vibe500.c
deleted file mode 100644
index d9259d43cc..0000000000
--- a/bootloader/pb_vibe500.c
+++ /dev/null
@@ -1,83 +0,0 @@
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}