OpenWrt – Diff between revs 2 and 3
?pathlinks?
Rev 2 | Rev 3 | |||
---|---|---|---|---|
Line 31... | Line 31... | |||
31 | |
31 | |
|
32 | #define SCH2_SIZE 40 |
32 | #define SCH2_SIZE 40 |
|
33 | #define SCH2_MAGIC 0x2124 |
33 | #define SCH2_MAGIC 0x2124 |
|
Line 34... | Line -... | |||
34 | #define SCH2_VER 0x02 |
- | ||
35 | |
- | ||
36 | /* |
- | ||
37 | * compression type values in the header |
- | ||
38 | * so far onlysupport for LZMA is added |
34 | #define SCH2_VER 0x02 |
|
39 | */ |
35 | |
|
40 | #define FLAT 0 |
36 | #define FLAT 0 |
|
41 | #define JZ 1 |
37 | #define JZ 1 |
|
Line 51... | Line 47... | |||
51 | #define TIMESTAMP_MAGIC 0x35016f00L |
47 | #define TIMESTAMP_MAGIC 0x35016f00L |
|
Line 52... | Line 48... | |||
52 | |
48 | |
|
53 | #define FACTORY 0 |
49 | #define FACTORY 0 |
|
Line -... | Line 50... | |||
- | 50 | #define SYSUPGRADE 1 |
||
- | 51 | |
||
54 | #define SYSUPGRADE 1 |
52 | #define ALIGN(x, a) ({ typeof(a) __a = (a); (((x) + __a - 1) & ~(__a - 1)); }) |
|
55 | |
53 | |
|
56 | #define ERR(fmt, ...) do { \ |
54 | #define ERR(fmt, ...) do { \ |
|
57 | fflush(0); \ |
55 | fflush(0); \ |
|
58 | fprintf(stderr, "[%s] *** error: " fmt "\n", \ |
56 | fprintf(stderr, "[%s] *** error: " fmt "\n", \ |
|
Line 77... | Line 75... | |||
77 | |
75 | |
|
78 | uint32_t jboot_timestamp(void); |
76 | uint32_t jboot_timestamp(void); |
|
79 | uint16_t jboot_checksum(uint16_t start_val, uint16_t *data, int size); |
77 | uint16_t jboot_checksum(uint16_t start_val, uint16_t *data, int size); |
|
80 | int get_file_stat(struct file_info *fdata); |
78 | int get_file_stat(struct file_info *fdata); |
|
- | 79 | int read_to_buf(const struct file_info *fdata, char *buf); |
||
81 | int read_to_buf(const struct file_info *fdata, char *buf); |
80 | int pad_jffs2(char *buf, int currlen, int maxlen); |
|
Line 82... | Line 81... | |||
82 | int write_fw(const char *ofname, const char *data, int len); |
81 | int write_fw(const char *ofname, const char *data, int len); |