Rename flash.c to nolo.c
This commit is contained in:
1 parent
70c09fb5b7
commit
01a7da1d95
4 files changed
+44
-14
No files matched your search
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
include ../config.mk
|
include ../config.mk
|
||||||
OBJ=main.o hexdump.o dump.o flash.o serial.o qmode.o
|
OBJ=main.o hexdump.o dump.o nolo.o serial.o qmode.o
|
||||||
OBJ+=query.o utils.o console.o
|
OBJ+=query.o utils.o console.o
|
||||||
OBJ+=squeue/squeue.o
|
OBJ+=squeue/squeue.o
|
||||||
OBJ+=image.o fiasco.o device.o usb-device.o cold-flash.o
|
OBJ+=image.o fiasco.o device.o usb-device.o cold-flash.o
|
||||||
|
|||||||
+3
-7
@@ -21,7 +21,6 @@ struct image;
|
|||||||
int queue_mode();
|
int queue_mode();
|
||||||
int reverse_extract_pieces(char *dir);
|
int reverse_extract_pieces(char *dir);
|
||||||
//void flash_image(const char *filename, const char *piece, const char *device, const char *hwrevs, const char *version);
|
//void flash_image(const char *filename, const char *piece, const char *device, const char *hwrevs, const char *version);
|
||||||
void flash_image(struct image * image);
|
|
||||||
int fiasco_read_image(char *file);
|
int fiasco_read_image(char *file);
|
||||||
//void check_nolo_order();
|
//void check_nolo_order();
|
||||||
extern struct usb_dev_handle *dev;
|
extern struct usb_dev_handle *dev;
|
||||||
@@ -39,7 +38,7 @@ void eprintf(const char *format, ...);
|
|||||||
#if HAVE_USB
|
#if HAVE_USB
|
||||||
#include <usb.h>
|
#include <usb.h>
|
||||||
|
|
||||||
int fiasco_flash(const char *file);
|
//int fiasco_flash(const char *file);
|
||||||
extern struct usb_device *device;
|
extern struct usb_device *device;
|
||||||
extern struct usb_dev_handle *dev;
|
extern struct usb_dev_handle *dev;
|
||||||
int is_valid_device(struct usb_device_descriptor *udd);
|
int is_valid_device(struct usb_device_descriptor *udd);
|
||||||
@@ -59,9 +58,6 @@ int dump_config();
|
|||||||
extern int verbose;
|
extern int verbose;
|
||||||
#define D if (verbose)
|
#define D if (verbose)
|
||||||
|
|
||||||
#define CMD_WRITE 64
|
|
||||||
#define CMD_QUERY 192
|
|
||||||
|
|
||||||
/*struct piece_t {
|
/*struct piece_t {
|
||||||
char *name;
|
char *name;
|
||||||
char *type;
|
char *type;
|
||||||
@@ -70,12 +66,12 @@ extern int verbose;
|
|||||||
char *version;
|
char *version;
|
||||||
};*/
|
};*/
|
||||||
|
|
||||||
enum flash_mode {
|
/*enum flash_mode {
|
||||||
FLASH_COLD,
|
FLASH_COLD,
|
||||||
FLASH_NORMAL,
|
FLASH_NORMAL,
|
||||||
FLASH_MKII,
|
FLASH_MKII,
|
||||||
FLASH_DISK,
|
FLASH_DISK,
|
||||||
};
|
};*/
|
||||||
|
|
||||||
/*struct devices {
|
/*struct devices {
|
||||||
char *name;
|
char *name;
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* 0xFFFF - Open Free Fiasco Firmware Flasher
|
* 0xFFFF - Open Free Fiasco Firmware Flasher
|
||||||
* Copyright (C) 2007 pancake <pancake@youterm.com>
|
* Copyright (C) 2007 pancake <pancake@youterm.com>
|
||||||
|
* Copyright (C) 2012 Pali Rohár <pali.rohar@gmail.com>
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -16,15 +17,22 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if HAVE_USB
|
|
||||||
#include "main.h"
|
|
||||||
#include "hexdump.h"
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
|
#include <usb.h>
|
||||||
|
|
||||||
|
#include "nolo.h"
|
||||||
#include "image.h"
|
#include "image.h"
|
||||||
|
|
||||||
|
#include "hexdump.h"
|
||||||
|
|
||||||
|
#define CMD_WRITE 64
|
||||||
|
#define CMD_QUERY 192
|
||||||
|
|
||||||
|
extern struct usb_dev_handle *dev;
|
||||||
|
|
||||||
/*void check_nolo_order_failed()
|
/*void check_nolo_order_failed()
|
||||||
{
|
{
|
||||||
fprintf(stderr, "\nERROR: Provide xloader before the secondary. NOLO disagrees anything else.\n");
|
fprintf(stderr, "\nERROR: Provide xloader before the secondary. NOLO disagrees anything else.\n");
|
||||||
@@ -32,7 +40,7 @@
|
|||||||
exit(1);
|
exit(1);
|
||||||
}*/
|
}*/
|
||||||
|
|
||||||
void query_error_message()
|
static void query_error_message()
|
||||||
{
|
{
|
||||||
/* query error message */
|
/* query error message */
|
||||||
int len = 0;
|
int len = 0;
|
||||||
@@ -75,7 +83,7 @@ void query_error_message()
|
|||||||
check_nolo_order_failed();
|
check_nolo_order_failed();
|
||||||
}*/
|
}*/
|
||||||
|
|
||||||
void flash_image(struct image * image)
|
void nolo_flash_image(struct image * image)
|
||||||
{
|
{
|
||||||
// FILE *fd;
|
// FILE *fd;
|
||||||
int vlen = 0;
|
int vlen = 0;
|
||||||
@@ -219,4 +227,3 @@ void flash_image(struct image * image)
|
|||||||
}
|
}
|
||||||
printf("Flash done succesfully.\n");
|
printf("Flash done succesfully.\n");
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
+27
@@ -1,3 +1,28 @@
|
|||||||
|
/*
|
||||||
|
* 0xFFFF - Open Free Fiasco Firmware Flasher
|
||||||
|
* Copyright (C) 2007 pancake <pancake@youterm.com>
|
||||||
|
* Copyright (C) 2012 Pali Rohár <pali.rohar@gmail.com>
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef NOLO_H
|
||||||
|
#define NOLO_H
|
||||||
|
|
||||||
|
#include "image.h"
|
||||||
|
|
||||||
|
void nolo_flash_image(struct image * image);
|
||||||
|
|
||||||
#define NOLO_GET_STATUS 1
|
#define NOLO_GET_STATUS 1
|
||||||
#define NOLO_GET_BOARD_ID 2
|
#define NOLO_GET_BOARD_ID 2
|
||||||
@@ -5,3 +30,5 @@
|
|||||||
#define NOLO_GET_HWVERSION 4
|
#define NOLO_GET_HWVERSION 4
|
||||||
#define NOLO_SET_RDFLAGS 16
|
#define NOLO_SET_RDFLAGS 16
|
||||||
#define NOLO_GET_RDFLAGS 17
|
#define NOLO_GET_RDFLAGS 17
|
||||||
|
|
||||||
|
#endif
|
||||||
Reference in new issue
Block a user