packge/boot/rbcfg: add new boot constants found in the recent Mikrotik devices
[openwrt/staging/wigyori.git] / package / boot / rbcfg / src / rbcfg.h
1 /*
2 * Mikrotik's RouterBOOT configuration defines
3 *
4 * Copyright (C) 2010 Gabor Juhos <juhosg@openwrt.org>
5 *
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License version 2 as published
8 * by the Free Software Foundation.
9 *
10 */
11
12 #ifndef _RBCFG_H
13 #define _RBCFG_H
14
15 /*
16 * Magic numbers
17 */
18 #define RB_MAGIC_SOFT 0x74666f53 /* 'Soft' */
19
20 /*
21 * ID values for Software settings
22 */
23 #define RB_ID_TERMINATOR 0
24 #define RB_ID_UART_SPEED 1
25 #define RB_ID_BOOT_DELAY 2
26 #define RB_ID_BOOT_DEVICE 3
27 #define RB_ID_BOOT_KEY 4
28 #define RB_ID_CPU_MODE 5
29 #define RB_ID_FW_VERSION 6
30 #define RB_ID_SOFT_07 7
31 #define RB_ID_SOFT_08 8
32 #define RB_ID_BOOT_PROTOCOL 9
33 #define RB_ID_SOFT_10 10
34 #define RB_ID_SOFT_11 11
35 #define RB_ID_BOOTER 13
36
37 #define RB_UART_SPEED_115200 0
38 #define RB_UART_SPEED_57600 1
39 #define RB_UART_SPEED_38400 2
40 #define RB_UART_SPEED_19200 3
41 #define RB_UART_SPEED_9600 4
42 #define RB_UART_SPEED_4800 5
43 #define RB_UART_SPEED_2400 6
44 #define RB_UART_SPEED_1200 7
45 #define RB_UART_SPEED_OFF 8
46
47 #define RB_BOOT_DELAY_1SEC 1
48 #define RB_BOOT_DELAY_2SEC 2
49 #define RB_BOOT_DELAY_3SEC 3
50 #define RB_BOOT_DELAY_4SEC 4
51 #define RB_BOOT_DELAY_5SEC 5
52 #define RB_BOOT_DELAY_6SEC 6
53 #define RB_BOOT_DELAY_7SEC 7
54 #define RB_BOOT_DELAY_8SEC 8
55 #define RB_BOOT_DELAY_9SEC 9
56
57 #define RB_BOOT_DEVICE_ETHER 0
58 #define RB_BOOT_DEVICE_NANDETH 1
59 #define RB_BOOT_DEVICE_CFCARD 2
60 #define RB_BOOT_DEVICE_ETHONCE 3
61 #define RB_BOOT_DEVICE_NANDONLY 5
62 #define RB_BOOT_DEVICE_FLASHCFG 7
63 #define RB_BOOT_DEVICE_FLSHONCE 8
64
65 #define RB_BOOT_KEY_ANY 0
66 #define RB_BOOT_KEY_DEL 1
67
68 #define RB_CPU_MODE_POWERSAVE 0
69 #define RB_CPU_MODE_REGULAR 1
70
71 #define RB_BOOT_PROTOCOL_BOOTP 0
72 #define RB_BOOT_PROTOCOL_DHCP 1
73
74 #define RB_BOOTER_REGULAR 0
75 #define RB_BOOTER_BACKUP 1
76
77 #endif /* _RBCFG_H */