blob: be8f439e475d7abb7fe711b75464910d80585433 [file] [log] [blame]
b.liue9582032025-04-17 19:18:16 +08001/*
2 * (C) Copyright 2004
3 * Stefan Roese, esd gmbh germany, stefan.roese@esd-electronics.com
4 *
5 * SPDX-License-Identifier: GPL-2.0+
6 */
7
8#ifndef _AUTO_UPDATE_H_
9#define _AUTO_UPDATE_H_
10
11#define MBR_MAGIC 0x07081967
12#define MBR_MAGIC_ADDR 0x100 /* offset 0x100 should be free space */
13
14#define AU_MAGIC_FILE "__auto_update"
15
16#define AU_TYPEMASK 0x000000ff
17#define AU_FLAGMASK 0xffff0000
18
19#define AU_PROTECT 0x80000000
20
21#define AU_SCRIPT 0x01
22#define AU_FIRMWARE (0x02 | AU_PROTECT)
23#define AU_NOR 0x03
24#define AU_NAND 0x04
25
26struct au_image_s {
27 char name[80];
28 ulong start;
29 ulong size;
30 ulong type;
31};
32
33typedef struct au_image_s au_image_t;
34
35int do_auto_update(void);
36#ifdef CONFIG_AUTO_UPDATE_SHOW
37void board_auto_update_show(int au_active);
38#endif
39
40#endif /* #ifndef _AUTO_UPDATE_H_ */