mirror of
https://github.com/brain-hackers/u-boot-brain
synced 2024-08-01 15:53:46 +09:00
ppc4xx: update esd's common auto_update code for 405 boards
- Coding style cleanup (long lines) - improve handling of protected flash regions - remove dead code Signed-off-by: Matthias Fuchs <matthias.fuchs@esd-electronics.com>
This commit is contained in:
parent
b9233fe5d5
commit
83975d02e2
@ -44,29 +44,16 @@
|
|||||||
extern au_image_t au_image[];
|
extern au_image_t au_image[];
|
||||||
extern int N_AU_IMAGES;
|
extern int N_AU_IMAGES;
|
||||||
|
|
||||||
#define AU_DEBUG
|
/* where to load files into memory */
|
||||||
#undef AU_DEBUG
|
#define LOAD_ADDR ((unsigned char *)0x100000)
|
||||||
|
#define MAX_LOADSZ 0x1c00000
|
||||||
#undef debug
|
|
||||||
#ifdef AU_DEBUG
|
|
||||||
#define debug(fmt,args...) printf (fmt ,##args)
|
|
||||||
#else
|
|
||||||
#define debug(fmt,args...)
|
|
||||||
#endif /* AU_DEBUG */
|
|
||||||
|
|
||||||
|
|
||||||
#define LOAD_ADDR ((unsigned char *)0x100000) /* where to load files into memory */
|
|
||||||
#define MAX_LOADSZ 0x1e00000
|
|
||||||
|
|
||||||
/* externals */
|
/* externals */
|
||||||
extern int fat_register_device(block_dev_desc_t *, int);
|
extern int fat_register_device(block_dev_desc_t *, int);
|
||||||
extern int file_fat_detectfs(void);
|
extern int file_fat_detectfs(void);
|
||||||
extern long file_fat_read(const char *, void *, unsigned long);
|
extern long file_fat_read(const char *, void *, unsigned long);
|
||||||
long do_fat_read (const char *filename, void *buffer, unsigned long maxsize, int dols);
|
long do_fat_read (const char *filename, void *buffer,
|
||||||
#ifdef CONFIG_VFD
|
unsigned long maxsize, int dols);
|
||||||
extern int trab_vfd (ulong);
|
|
||||||
extern int transfer_pic(unsigned char, unsigned char *, int, int);
|
|
||||||
#endif
|
|
||||||
extern int flash_sect_erase(ulong, ulong);
|
extern int flash_sect_erase(ulong, ulong);
|
||||||
extern int flash_sect_protect (int, ulong, ulong);
|
extern int flash_sect_protect (int, ulong, ulong);
|
||||||
extern int flash_write (char *, ulong, ulong);
|
extern int flash_write (char *, ulong, ulong);
|
||||||
@ -78,14 +65,15 @@ extern int flash_write (char *, ulong, ulong);
|
|||||||
#define NANDRW_JFFS2 0x02
|
#define NANDRW_JFFS2 0x02
|
||||||
#define NANDRW_JFFS2_SKIP 0x04
|
#define NANDRW_JFFS2_SKIP 0x04
|
||||||
extern struct nand_chip nand_dev_desc[];
|
extern struct nand_chip nand_dev_desc[];
|
||||||
extern int nand_legacy_rw(struct nand_chip* nand, int cmd, size_t start, size_t len,
|
extern int nand_legacy_rw(struct nand_chip* nand, int cmd,
|
||||||
|
size_t start, size_t len,
|
||||||
size_t * retlen, u_char * buf);
|
size_t * retlen, u_char * buf);
|
||||||
extern int nand_legacy_erase(struct nand_chip* nand, size_t ofs, size_t len, int clean);
|
extern int nand_legacy_erase(struct nand_chip* nand, size_t ofs,
|
||||||
|
size_t len, int clean);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
extern block_dev_desc_t ide_dev_desc[CFG_IDE_MAXDEVICE];
|
extern block_dev_desc_t ide_dev_desc[CFG_IDE_MAXDEVICE];
|
||||||
|
|
||||||
|
|
||||||
int au_check_cksum_valid(int i, long nbytes)
|
int au_check_cksum_valid(int i, long nbytes)
|
||||||
{
|
{
|
||||||
image_header_t *hdr;
|
image_header_t *hdr;
|
||||||
@ -117,7 +105,6 @@ int au_check_cksum_valid(int i, long nbytes)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int au_check_header_valid(int i, long nbytes)
|
int au_check_header_valid(int i, long nbytes)
|
||||||
{
|
{
|
||||||
image_header_t *hdr;
|
image_header_t *hdr;
|
||||||
@ -132,20 +119,11 @@ int au_check_header_valid(int i, long nbytes)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* check the easy ones first */
|
/* check the easy ones first */
|
||||||
#undef CHECK_VALID_DEBUG
|
if (nbytes < image_get_header_size ()) {
|
||||||
#ifdef CHECK_VALID_DEBUG
|
|
||||||
printf("magic %#x %#x ", image_get_magic (hdr), IH_MAGIC);
|
|
||||||
printf("arch %#x %#x ", image_get_arch (hdr), IH_ARCH_PPC);
|
|
||||||
printf("size %#x %#lx ", image_get_data_size (hdr), nbytes);
|
|
||||||
printf("type %#x %#x ", image_get_type (hdr), IH_TYPE_KERNEL);
|
|
||||||
#endif
|
|
||||||
if (nbytes < image_get_header_size ())
|
|
||||||
{
|
|
||||||
printf ("Image %s bad header SIZE\n", au_image[i].name);
|
printf ("Image %s bad header SIZE\n", au_image[i].name);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
if (!image_check_magic (hdr) || !image_check_arch (hdr, IH_ARCH_PPC))
|
if (!image_check_magic (hdr) || !image_check_arch (hdr, IH_ARCH_PPC)) {
|
||||||
{
|
|
||||||
printf ("Image %s bad MAGIC or ARCH\n", au_image[i].name);
|
printf ("Image %s bad MAGIC or ARCH\n", au_image[i].name);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
@ -155,11 +133,13 @@ int au_check_header_valid(int i, long nbytes)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* check the type - could do this all in one gigantic if() */
|
/* check the type - could do this all in one gigantic if() */
|
||||||
if ((au_image[i].type == AU_FIRMWARE) && !image_check_type (hdr, IH_TYPE_FIRMWARE)) {
|
if (((au_image[i].type & AU_TYPEMASK) == AU_FIRMWARE) &&
|
||||||
|
!image_check_type (hdr, IH_TYPE_FIRMWARE)) {
|
||||||
printf ("Image %s wrong type\n", au_image[i].name);
|
printf ("Image %s wrong type\n", au_image[i].name);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
if ((au_image[i].type == AU_SCRIPT) && !image_check_type (hdr, IH_TYPE_SCRIPT)) {
|
if (((au_image[i].type & AU_TYPEMASK) == AU_SCRIPT) &&
|
||||||
|
!image_check_type (hdr, IH_TYPE_SCRIPT)) {
|
||||||
printf ("Image %s wrong type\n", au_image[i].name);
|
printf ("Image %s wrong type\n", au_image[i].name);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
@ -167,22 +147,9 @@ int au_check_header_valid(int i, long nbytes)
|
|||||||
/* recycle checksum */
|
/* recycle checksum */
|
||||||
checksum = image_get_data_size (hdr);
|
checksum = image_get_data_size (hdr);
|
||||||
|
|
||||||
#if 0 /* test-only */
|
|
||||||
/* for kernel and app the image header must also fit into flash */
|
|
||||||
if (idx != IDX_DISK)
|
|
||||||
checksum += image_get_header_size ();
|
|
||||||
/* check the size does not exceed space in flash. HUSH scripts */
|
|
||||||
/* all have ausize[] set to 0 */
|
|
||||||
if ((ausize[idx] != 0) && (ausize[idx] < checksum)) {
|
|
||||||
printf ("Image %s is bigger than FLASH\n", au_image[i].name);
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int au_do_update(int i, long sz)
|
int au_do_update(int i, long sz)
|
||||||
{
|
{
|
||||||
image_header_t *hdr;
|
image_header_t *hdr;
|
||||||
@ -203,7 +170,7 @@ int au_do_update(int i, long sz)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
switch (au_image[i].type) {
|
switch (au_image[i].type & AU_TYPEMASK) {
|
||||||
case AU_SCRIPT:
|
case AU_SCRIPT:
|
||||||
printf("Executing script %s\n", au_image[i].name);
|
printf("Executing script %s\n", au_image[i].name);
|
||||||
|
|
||||||
@ -243,7 +210,8 @@ int au_do_update(int i, long sz)
|
|||||||
*/
|
*/
|
||||||
if (au_image[i].type == AU_FIRMWARE) {
|
if (au_image[i].type == AU_FIRMWARE) {
|
||||||
char *orig = (char*)start;
|
char *orig = (char*)start;
|
||||||
char *new = (char *)((char *)hdr + image_get_header_size ());
|
char *new = (char *)((char *)hdr +
|
||||||
|
image_get_header_size ());
|
||||||
nbytes = image_get_data_size (hdr);
|
nbytes = image_get_data_size (hdr);
|
||||||
|
|
||||||
while (--nbytes) {
|
while (--nbytes) {
|
||||||
@ -252,14 +220,15 @@ int au_do_update(int i, long sz)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!nbytes) {
|
if (!nbytes) {
|
||||||
printf("Skipping firmware update - images are identical\n");
|
printf ("Skipping firmware update - "
|
||||||
|
"images are identical\n");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* unprotect the address range */
|
/* unprotect the address range */
|
||||||
/* this assumes that ONLY the firmware is protected! */
|
if (((au_image[i].type & AU_FLAGMASK) == AU_PROTECT) ||
|
||||||
if (au_image[i].type == AU_FIRMWARE) {
|
(au_image[i].type == AU_FIRMWARE)) {
|
||||||
flash_sect_protect (0, start, end);
|
flash_sect_protect (0, start, end);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -267,14 +236,17 @@ int au_do_update(int i, long sz)
|
|||||||
* erase the address range.
|
* erase the address range.
|
||||||
*/
|
*/
|
||||||
if (au_image[i].type != AU_NAND) {
|
if (au_image[i].type != AU_NAND) {
|
||||||
printf("Updating NOR FLASH with image %s\n", au_image[i].name);
|
printf ("Updating NOR FLASH with image %s\n",
|
||||||
|
au_image[i].name);
|
||||||
debug ("flash_sect_erase(%lx, %lx);\n", start, end);
|
debug ("flash_sect_erase(%lx, %lx);\n", start, end);
|
||||||
flash_sect_erase (start, end);
|
flash_sect_erase (start, end);
|
||||||
} else {
|
} else {
|
||||||
#if defined(CONFIG_CMD_NAND) && defined(CFG_NAND_LEGACY)
|
#if defined(CONFIG_CMD_NAND) && defined(CFG_NAND_LEGACY)
|
||||||
printf("Updating NAND FLASH with image %s\n", au_image[i].name);
|
printf ("Updating NAND FLASH with image %s\n",
|
||||||
|
au_image[i].name);
|
||||||
debug ("nand_legacy_erase(%lx, %lx);\n", start, end);
|
debug ("nand_legacy_erase(%lx, %lx);\n", start, end);
|
||||||
rc = nand_legacy_erase (nand_dev_desc, start, end - start + 1, 0);
|
rc = nand_legacy_erase (nand_dev_desc, start,
|
||||||
|
end - start + 1, 0);
|
||||||
debug ("nand_legacy_erase returned %x\n", rc);
|
debug ("nand_legacy_erase returned %x\n", rc);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
@ -296,14 +268,20 @@ int au_do_update(int i, long sz)
|
|||||||
* copy the data from RAM to FLASH
|
* copy the data from RAM to FLASH
|
||||||
*/
|
*/
|
||||||
if (au_image[i].type != AU_NAND) {
|
if (au_image[i].type != AU_NAND) {
|
||||||
debug ("flash_write(%p, %lx %x)\n", addr, start, nbytes);
|
debug ("flash_write(%p, %lx, %x)\n",
|
||||||
rc = flash_write((char *)addr, start, nbytes);
|
addr, start, nbytes);
|
||||||
|
rc = flash_write ((char *)addr, start,
|
||||||
|
(nbytes + 1) & ~1);
|
||||||
} else {
|
} else {
|
||||||
#if defined(CONFIG_CMD_NAND) && defined(CFG_NAND_LEGACY)
|
#if defined(CONFIG_CMD_NAND) && defined(CFG_NAND_LEGACY)
|
||||||
debug ("nand_legacy_rw(%p, %lx %x)\n", addr, start, nbytes);
|
debug ("nand_legacy_rw(%p, %lx, %x)\n",
|
||||||
rc = nand_legacy_rw(nand_dev_desc, NANDRW_WRITE | NANDRW_JFFS2,
|
addr, start, nbytes);
|
||||||
start, nbytes, (size_t *)&total, (uchar *)addr);
|
rc = nand_legacy_rw (nand_dev_desc,
|
||||||
debug ("nand_legacy_rw: ret=%x total=%d nbytes=%d\n", rc, total, nbytes);
|
NANDRW_WRITE | NANDRW_JFFS2,
|
||||||
|
start, nbytes, (size_t *)&total,
|
||||||
|
(uchar *)addr);
|
||||||
|
debug ("nand_legacy_rw: ret=%x total=%d nbytes=%d\n",
|
||||||
|
rc, total, nbytes);
|
||||||
#else
|
#else
|
||||||
rc = -1;
|
rc = -1;
|
||||||
#endif
|
#endif
|
||||||
@ -317,22 +295,29 @@ int au_do_update(int i, long sz)
|
|||||||
* check the dcrc of the copy
|
* check the dcrc of the copy
|
||||||
*/
|
*/
|
||||||
if (au_image[i].type != AU_NAND) {
|
if (au_image[i].type != AU_NAND) {
|
||||||
rc = crc32 (0, (uchar *)(start + off), image_get_data_size (hdr));
|
rc = crc32 (0, (uchar *)(start + off),
|
||||||
|
image_get_data_size (hdr));
|
||||||
} else {
|
} else {
|
||||||
#if defined(CONFIG_CMD_NAND) && defined(CFG_NAND_LEGACY)
|
#if defined(CONFIG_CMD_NAND) && defined(CFG_NAND_LEGACY)
|
||||||
rc = nand_legacy_rw(nand_dev_desc, NANDRW_READ | NANDRW_JFFS2 | NANDRW_JFFS2_SKIP,
|
rc = nand_legacy_rw (nand_dev_desc,
|
||||||
start, nbytes, (size_t *)&total, (uchar *)addr);
|
NANDRW_READ | NANDRW_JFFS2 |
|
||||||
rc = crc32 (0, (uchar *)(addr + off), image_get_data_size (hdr));
|
NANDRW_JFFS2_SKIP,
|
||||||
|
start, nbytes, (size_t *)&total,
|
||||||
|
(uchar *)addr);
|
||||||
|
rc = crc32 (0, (uchar *)(addr + off),
|
||||||
|
image_get_data_size (hdr));
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
if (rc != image_get_dcrc (hdr)) {
|
if (rc != image_get_dcrc (hdr)) {
|
||||||
printf ("Image %s Bad Data Checksum After COPY\n", au_image[i].name);
|
printf ("Image %s Bad Data Checksum After COPY\n",
|
||||||
|
au_image[i].name);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* protect the address range */
|
/* protect the address range */
|
||||||
/* this assumes that ONLY the firmware is protected! */
|
/* this assumes that ONLY the firmware is protected! */
|
||||||
if (au_image[i].type == AU_FIRMWARE) {
|
if (((au_image[i].type & AU_FLAGMASK) == AU_PROTECT) ||
|
||||||
|
(au_image[i].type == AU_FIRMWARE)) {
|
||||||
flash_sect_protect (1, start, end);
|
flash_sect_protect (1, start, end);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -345,7 +330,6 @@ int au_do_update(int i, long sz)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void process_macros (const char *input, char *output)
|
static void process_macros (const char *input, char *output)
|
||||||
{
|
{
|
||||||
char c, prev;
|
char c, prev;
|
||||||
@ -359,7 +343,8 @@ static void process_macros (const char *input, char *output)
|
|||||||
#ifdef DEBUG_PARSER
|
#ifdef DEBUG_PARSER
|
||||||
char *output_start = output;
|
char *output_start = output;
|
||||||
|
|
||||||
printf ("[PROCESS_MACROS] INPUT len %d: \"%s\"\n", strlen(input), input);
|
printf ("[PROCESS_MACROS] INPUT len %d: \"%s\"\n",
|
||||||
|
strlen(input), input);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
prev = '\0'; /* previous character */
|
prev = '\0'; /* previous character */
|
||||||
@ -410,7 +395,8 @@ static void process_macros (const char *input, char *output)
|
|||||||
if (c == ')' || c == '}') {
|
if (c == ')' || c == '}') {
|
||||||
int i;
|
int i;
|
||||||
char envname[CFG_CBSIZE], *envval;
|
char envname[CFG_CBSIZE], *envval;
|
||||||
int envcnt = input-varname_start-1; /* Varname # of chars */
|
/* Varname # of chars */
|
||||||
|
int envcnt = input - varname_start - 1;
|
||||||
|
|
||||||
/* Get the varname */
|
/* Get the varname */
|
||||||
for (i = 0; i < envcnt; i++) {
|
for (i = 0; i < envcnt; i++) {
|
||||||
@ -452,7 +438,6 @@ static void process_macros (const char *input, char *output)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* this is called from board_init() after the hardware has been set up
|
* this is called from board_init() after the hardware has been set up
|
||||||
* and is usable. That seems like a good time to do this.
|
* and is usable. That seems like a good time to do this.
|
||||||
@ -460,34 +445,32 @@ static void process_macros (const char *input, char *output)
|
|||||||
*/
|
*/
|
||||||
int do_auto_update(void)
|
int do_auto_update(void)
|
||||||
{
|
{
|
||||||
block_dev_desc_t *stor_dev;
|
block_dev_desc_t *stor_dev = NULL;
|
||||||
long sz;
|
long sz;
|
||||||
int i, res, cnt, old_ctrlc, got_ctrlc;
|
int i, res, cnt, old_ctrlc, got_ctrlc;
|
||||||
char buffer[32];
|
char buffer[32];
|
||||||
char str[80];
|
char str[80];
|
||||||
|
int n;
|
||||||
|
|
||||||
/*
|
if (ide_dev_desc[0].type != DEV_TYPE_UNKNOWN) {
|
||||||
* Check whether a CompactFlash is inserted
|
|
||||||
*/
|
|
||||||
if (ide_dev_desc[0].type == DEV_TYPE_UNKNOWN) {
|
|
||||||
return -1; /* no disk detected! */
|
|
||||||
}
|
|
||||||
|
|
||||||
/* check whether it has a partition table */
|
|
||||||
stor_dev = get_dev ("ide", 0);
|
stor_dev = get_dev ("ide", 0);
|
||||||
if (stor_dev == NULL) {
|
if (stor_dev == NULL) {
|
||||||
debug ("Uknown device type\n");
|
debug ("ide: unknown device\n");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (fat_register_device (stor_dev, 1) != 0) {
|
if (fat_register_device (stor_dev, 1) != 0) {
|
||||||
debug ("Unable to register ide disk 0:1 for fatls\n");
|
debug ("Unable to register ide disk 0:1\n");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Check if magic file is present
|
* Check if magic file is present
|
||||||
*/
|
*/
|
||||||
if (do_fat_read(AU_MAGIC_FILE, buffer, sizeof(buffer), LS_NO) <= 0) {
|
if ((n = do_fat_read (AU_MAGIC_FILE, buffer,
|
||||||
|
sizeof(buffer), LS_NO)) <= 0) {
|
||||||
|
debug ("No auto_update magic file (n=%d)\n", n);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -509,7 +492,8 @@ int do_auto_update(void)
|
|||||||
|
|
||||||
printf("Reading %s ...", au_image[i].name);
|
printf("Reading %s ...", au_image[i].name);
|
||||||
/* just read the header */
|
/* just read the header */
|
||||||
sz = do_fat_read(au_image[i].name, LOAD_ADDR, image_get_header_size (), LS_NO);
|
sz = do_fat_read (au_image[i].name, LOAD_ADDR,
|
||||||
|
image_get_header_size (), LS_NO);
|
||||||
debug ("read %s sz %ld hdr %d\n",
|
debug ("read %s sz %ld hdr %d\n",
|
||||||
au_image[i].name, sz, image_get_header_size ());
|
au_image[i].name, sz, image_get_header_size ());
|
||||||
if (sz <= 0 || sz < image_get_header_size ()) {
|
if (sz <= 0 || sz < image_get_header_size ()) {
|
||||||
@ -520,7 +504,8 @@ int do_auto_update(void)
|
|||||||
puts(" header not valid\n");
|
puts(" header not valid\n");
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
sz = do_fat_read(au_image[i].name, LOAD_ADDR, MAX_LOADSZ, LS_NO);
|
sz = do_fat_read (au_image[i].name, LOAD_ADDR,
|
||||||
|
MAX_LOADSZ, LS_NO);
|
||||||
debug ("read %s sz %ld hdr %d\n",
|
debug ("read %s sz %ld hdr %d\n",
|
||||||
au_image[i].name, sz, image_get_header_size ());
|
au_image[i].name, sz, image_get_header_size ());
|
||||||
if (sz <= 0 || sz <= image_get_header_size ()) {
|
if (sz <= 0 || sz <= image_get_header_size ()) {
|
||||||
@ -557,7 +542,6 @@ int do_auto_update(void)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int auto_update(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
|
int auto_update(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
|
||||||
{
|
{
|
||||||
do_auto_update();
|
do_auto_update();
|
||||||
|
@ -29,16 +29,21 @@
|
|||||||
|
|
||||||
#define AU_MAGIC_FILE "__auto_update"
|
#define AU_MAGIC_FILE "__auto_update"
|
||||||
|
|
||||||
#define AU_SCRIPT 1
|
#define AU_TYPEMASK 0x000000ff
|
||||||
#define AU_FIRMWARE 2
|
#define AU_FLAGMASK 0xffff0000
|
||||||
#define AU_NOR 3
|
|
||||||
#define AU_NAND 4
|
#define AU_PROTECT 0x80000000
|
||||||
|
|
||||||
|
#define AU_SCRIPT 0x01
|
||||||
|
#define AU_FIRMWARE (0x02 | AU_PROTECT)
|
||||||
|
#define AU_NOR 0x03
|
||||||
|
#define AU_NAND 0x04
|
||||||
|
|
||||||
struct au_image_s {
|
struct au_image_s {
|
||||||
char name[80];
|
char name[80];
|
||||||
ulong start;
|
ulong start;
|
||||||
ulong size;
|
ulong size;
|
||||||
int type;
|
ulong type;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct au_image_s au_image_t;
|
typedef struct au_image_s au_image_t;
|
||||||
|
Loading…
Reference in New Issue
Block a user