diff --git a/COPYING b/COPYING index 78d994c..e4cc176 100644 --- a/COPYING +++ b/COPYING @@ -1,4 +1,4 @@ -fw.bin, usb_boot.bin are (c) Ingenic Semiconductor Co.,Ltd. +firmware/spl_stage1.bin, firmware/spl_stage2_usb.bin are (c) Ingenic Semiconductor Co.,Ltd. ingenic.h is based on code by Ingenic Semiconductor Co.,Ltd. All other files have their authors and licenses described at their beginning. diff --git a/README b/README new file mode 100644 index 0000000..e16acdd --- /dev/null +++ b/README @@ -0,0 +1,5 @@ +Needs libusb-1.0 (not 0.1!) to work. Readline is optional. +To build: + make -C src +If you have readline (recommended): + make -C src READLINE=1 diff --git a/boot.cfg b/boot.cfg deleted file mode 100644 index 7696940..0000000 --- a/boot.cfg +++ /dev/null @@ -1,4 +0,0 @@ -source initial.cfg - -boot - diff --git a/config/boot.cfg b/config/boot.cfg new file mode 100644 index 0000000..e16f9b7 --- /dev/null +++ b/config/boot.cfg @@ -0,0 +1,4 @@ +source script/initial.cfg + +boot + diff --git a/initial.cfg b/config/initial.cfg similarity index 95% rename from initial.cfg rename to config/initial.cfg index 924d485..eb0c30c 100644 --- a/initial.cfg +++ b/config/initial.cfg @@ -1,8 +1,8 @@ # Configuration variables: # STAGE1_FILE, STAGE2_FILE -set STAGE1_FILE fw.bin -set STAGE2_FILE usb_boot.bin +set STAGE1_FILE firmware/spl_stage1.bin +set STAGE2_FILE firmware/spl_stage2_usb.bin set EXTCLK 12 # Define the external crystal in MHz set CPUSPEED 252 # Define the PLL output frequency diff --git a/fw.bin b/firmware/spl_stage1.bin similarity index 100% rename from fw.bin rename to firmware/spl_stage1.bin diff --git a/firmware/spl_stage2_usb.bin b/firmware/spl_stage2_usb.bin new file mode 100644 index 0000000..8f11c6f Binary files /dev/null and b/firmware/spl_stage2_usb.bin differ diff --git a/config.h b/include/config.h similarity index 100% rename from config.h rename to include/config.h diff --git a/debug.h b/include/debug.h similarity index 100% rename from debug.h rename to include/debug.h diff --git a/devmgr.h b/include/devmgr.h similarity index 100% rename from devmgr.h rename to include/devmgr.h diff --git a/ingenic.h b/include/ingenic.h similarity index 100% rename from ingenic.h rename to include/ingenic.h diff --git a/shell.h b/include/shell.h similarity index 100% rename from shell.h rename to include/shell.h diff --git a/shell_internal.h b/include/shell_internal.h similarity index 100% rename from shell_internal.h rename to include/shell_internal.h diff --git a/usbdev.h b/include/usbdev.h similarity index 100% rename from usbdev.h rename to include/usbdev.h diff --git a/dump.scr b/script/dump_minios.scr similarity index 100% rename from dump.scr rename to script/dump_minios.scr diff --git a/Makefile b/src/Makefile similarity index 80% rename from Makefile rename to src/Makefile index c201db8..b917479 100644 --- a/Makefile +++ b/src/Makefile @@ -7,9 +7,9 @@ ifneq (${READLINE},0) endif CC = gcc -TARGET = jzboot +TARGET = ../jzboot SOURCES = debug.c devmgr.c ingenic.c main.c shell_lex.c usbdev.c shell.c shell_builtins.c config.c spl_cmdset.c usbboot_cmdset.c -CFLAGS = --std=gnu99 -Wall -Werror -O2 $(shell pkg-config libusb-1.0 --cflags) -Wunused-result +CFLAGS = --std=gnu99 -Wall -Werror -I../include -O2 $(shell pkg-config libusb-1.0 --cflags) -Wunused-result LIBS += $(shell pkg-config libusb-1.0 --libs) OBJECTS = ${SOURCES:.c=.o} diff --git a/config.c b/src/config.c similarity index 100% rename from config.c rename to src/config.c diff --git a/debug.c b/src/debug.c similarity index 100% rename from debug.c rename to src/debug.c diff --git a/devmgr.c b/src/devmgr.c similarity index 100% rename from devmgr.c rename to src/devmgr.c diff --git a/ingenic.c b/src/ingenic.c similarity index 100% rename from ingenic.c rename to src/ingenic.c diff --git a/main.c b/src/main.c similarity index 100% rename from main.c rename to src/main.c diff --git a/shell.c b/src/shell.c similarity index 100% rename from shell.c rename to src/shell.c diff --git a/shell_builtins.c b/src/shell_builtins.c similarity index 100% rename from shell_builtins.c rename to src/shell_builtins.c diff --git a/shell_lex.c b/src/shell_lex.c similarity index 100% rename from shell_lex.c rename to src/shell_lex.c diff --git a/shell_lex.l b/src/shell_lex.l similarity index 100% rename from shell_lex.l rename to src/shell_lex.l diff --git a/spl_cmdset.c b/src/spl_cmdset.c similarity index 100% rename from spl_cmdset.c rename to src/spl_cmdset.c diff --git a/usbboot_cmdset.c b/src/usbboot_cmdset.c similarity index 100% rename from usbboot_cmdset.c rename to src/usbboot_cmdset.c diff --git a/usbdev.c b/src/usbdev.c similarity index 100% rename from usbdev.c rename to src/usbdev.c diff --git a/usb_boot.bin b/usb_boot.bin deleted file mode 100644 index b5d0ba4..0000000 Binary files a/usb_boot.bin and /dev/null differ