diff --git a/Makefile b/Makefile index b664f86..87f5e00 100644 --- a/Makefile +++ b/Makefile @@ -8,7 +8,7 @@ endif CC = gcc TARGET = jzboot -SOURCES = debug.c devmgr.c ingenic.c main.c shell_lex.c usbdev.c shell.c config.c spl_cmdset.c +SOURCES = debug.c devmgr.c ingenic.c main.c shell_lex.c usbdev.c shell.c config.c spl_cmdset.c usbboot_cmdset.c CFLAGS = --std=gnu99 -Wall -Werror -O2 $(shell pkg-config libusb-1.0 --cflags) LIBS += $(shell pkg-config libusb-1.0 --libs) diff --git a/shell.c b/shell.c index 05c9101..80fe6ec 100644 --- a/shell.c +++ b/shell.c @@ -394,7 +394,8 @@ static const struct { const char *name; const shell_command_t *commands; } cmdsets[] = { - { CMDSET_SPL, "SPL", spl_cmdset }, + { CMDSET_SPL, "SPL", spl_cmdset }, + { CMDSET_USBBOOT, "USBBoot", usbboot_cmdset }, { 0, NULL, NULL } }; diff --git a/shell.h b/shell.h index 6a7b429..0f11518 100644 --- a/shell.h +++ b/shell.h @@ -45,5 +45,6 @@ extern char *strval; int shell_pull(char *buf, int maxlen); extern const shell_command_t spl_cmdset[]; +extern const shell_command_t usbboot_cmdset[]; #endif diff --git a/usbboot_cmdset.c b/usbboot_cmdset.c new file mode 100644 index 0000000..221c73c --- /dev/null +++ b/usbboot_cmdset.c @@ -0,0 +1,28 @@ +/* + * JzBoot: an USB bootloader for JZ series of Ingenic(R) microprocessors. + * Copyright (C) 2010 Peter Zotov + * + * 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 . + */ + +#include +#include + +#include "shell.h" +#include "config.h" +#include "ingenic.h" + +const shell_command_t usbboot_cmdset[] = { + { NULL, NULL, NULL } +};