BOOTLOADER
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros
bootpara.h
Go to the documentation of this file.
1 #ifndef BOOTPARAMS_H
2 #define BOOTPARAMS_H
3 
4 typedef struct {
5  char flags[12];
6  unsigned int val;
7 } ParamItem;
8 
9 typedef struct {
24 // ParamItem lcd;
26  char string[128];
27 } BootParams;
28 
29 typedef struct {
35  char string[128];
36 } VenderParams;
37 
38 int search_params(void);
39 int save_params(void);
40 int set_params(void);
41 
42 #define DEFAULT_USER_PARAMS "display=shp240"
43 
44 #ifdef GLOBAL_PARAMS
45 
46 //小于等于512个字节,最多保存24个ITEM和128字节用户定义的字符串
48  {"bootpara", 1}, //0=boot without parameters,1=boot with parameters
49  {"cpuclk", 2}, //0=200M, 1=300M, 2=400M, 3=440M
50  {"rundelay", 0}, //0 seconds
51  //{"serial", 1}, //0=serial port 0, 1=serial port 1
52  {"serial", 0},
53  {"baudrate", 115200},
54  {"machine", 193},
55  {"runAddr", 0x30400000},
56  {"rootfs", 0},
57  {"tty", 1},
58  {"initrdA", 0},
59  {"initrdL", 0},
60  {"memsize", 0x04000000},
61  {"devfs", 1},
62  {"ostore", 0}, //0=nand, 1=nor
63 // {"lcd", 0},
64  {"userpara", sizeof(DEFAULT_USER_PARAMS)},
66 };
67 
68 //小于等于256字节
70  {"VendID", 0x76543210},
71  {"ProdID", 0xfedcba98},
72  {"Serial_L", 0x01234567},
73  {"Serial_H", 0x89abcdef},
74  {"userpara", 1}, //0=data, 1=string
75  "www.ucdragon.com"
76 };
77 
78 #else
79 
80 extern BootParams boot_params;
81 extern VenderParams vend_params;
82 
83 #endif
84 
85 #endif