4 * Mikrotik's RouterBOOT definitions
6 * Copyright (C) 2007 OpenWrt.org
7 * Copyright (C) 2007 Gabor Juhos <juhosg at openwrt.org>
9 * This program is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public License
11 * as published by the Free Software Foundation; either version 2
12 * of the License, or (at your option) any later version.
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the
21 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
22 * Boston, MA 02110-1301, USA.
29 #define RB_MAX_MAC_COUNT 6
31 struct rb_bios_settings
{
32 u32 hs_offs
; /* hard settings offset */
33 u32 hs_size
; /* hard settings size */
34 u32 fw_offs
; /* firmware offset */
35 u32 ss_offs
; /* soft settings offset */
36 u32 ss_size
; /* soft settings size */
39 struct rb_hard_settings
{
40 char *name
; /* board name */
41 char *bios_ver
; /* BIOS version */
42 u32 mem_size
; /* memory size in bytes */
43 u32 mac_count
; /* number of mac addresses */
44 u8 macs
[RB_MAC_SIZE
][RB_MAX_MAC_COUNT
]; /* mac addresses */
50 #define RB_MAGIC_HARD 0x64726148 /* "Hard" */
51 #define RB_MAGIC_SOFT 0x74666F53 /* "Soft" */
52 #define RB_MAGIC_DAWN 0x6E776144 /* "Dawn" */
54 #define RB_ID_TERMINATOR 0
57 * ID values for Hardware settings
59 #define RB_ID_HARD_01 1
60 #define RB_ID_HARD_02 2
61 #define RB_ID_FLASH_INFO 3
62 #define RB_ID_MAC_ADDRESS_PACK 4
63 #define RB_ID_BOARD_NAME 5
64 #define RB_ID_BIOS_VERSION 6
65 #define RB_ID_HARD_07 7
66 #define RB_ID_SDRAM_TIMINGS 8
67 #define RB_ID_DEVICE_TIMINGS 9
68 #define RB_ID_SOFTWARE_ID 10
69 #define RB_ID_SERIAL_NUMBER 11
70 #define RB_ID_HARD_12 12
71 #define RB_ID_MEMORY_SIZE 13
72 #define RB_ID_MAC_ADDRESS_COUNT 14
75 * ID values for Software settings
77 #define RB_ID_UART_SPEED 1
78 #define RB_ID_BOOT_DELAY 2
79 #define RB_ID_BOOT_DEVICE 3
80 #define RB_ID_BOOT_KEY 4
81 #define RB_ID_CPU_MODE 5
82 #define RB_ID_FW_VERSION 6
83 #define RB_ID_SOFT_07 7
84 #define RB_ID_SOFT_08 8
85 #define RB_ID_BOOT_PROTOCOL 9
86 #define RB_ID_SOFT_10 10
87 #define RB_ID_SOFT_11 11
92 #define RB_UART_SPEED_115200 0
93 #define RB_UART_SPEED_57600 1
94 #define RB_UART_SPEED_38400 2
95 #define RB_UART_SPEED_19200 3
96 #define RB_UART_SPEED_9600 4
97 #define RB_UART_SPEED_4800 5
98 #define RB_UART_SPEED_2400 6
99 #define RB_UART_SPEED_1200 7
104 #define RB_BOOT_DELAY_0SEC 0
105 #define RB_BOOT_DELAY_1SEC 1
106 #define RB_BOOT_DELAY_2SEC 2
111 #define RB_BOOT_DEVICE_ETHER 0
112 #define RB_BOOT_DEVICE_NANDETH 1
113 #define RB_BOOT_DEVICE_ETHONCE 2
114 #define RB_BOOT_DEVICE_NANDONLY 3
119 #define RB_BOOT_KEY_ANY 0
120 #define RB_BOOT_KEY_DEL 1
125 #define RB_CPU_MODE_POWERSAVE 0
126 #define RB_CPU_MODE_REGULAR 1
129 * BOOT_PROTOCOL values
131 #define RB_BOOT_PROTOCOL_BOOTP 0
132 #define RB_BOOT_PROTOCOL_DHCP 1
134 extern int routerboot_present(void) __init
;
135 extern char *routerboot_get_boardname(void);
137 #endif /* _ROUTERBOOT_H */
This page took 0.050853 seconds and 5 git commands to generate.