d492f25c54
At the moment, the script install_duaboot does the following: - rename SpiderApp to SpiderApp.of (unless it already exists) - install payload as SpiderApp - fixes permissions Since SpiderApp is the main app, it will execute instead of the OF. The current dualboot code (dualboot.c) is still a preliminary but the current version displays an "all tools" menu to choose for. When exitting the menu using BACK, it will run the OF. With the modifications made by the install script, it should not be possible to break the device. In the worst case scenario, the dualboot code crashes and it restarted by the sysmgrd, or hangs. A safe way to recover is to plug the USB cable and reset the device: the system manager will then start the USB app and one can reflash the device if necessary. Change-Id: Id9edab0347538ad2a8651a28aea7fd083feaa626
24 lines
677 B
Makefile
24 lines
677 B
Makefile
PREFIX?=arm-sony-linux-gnueabi-
|
|
CC=$(PREFIX)gcc
|
|
LD=$(PREFIX)gcc
|
|
CFLAGS=-std=gnu99 -Wall -O2
|
|
INCLUDES=-I.
|
|
|
|
LIB_FILES=nwz_lib.c nwz_lib_devlist.c
|
|
TOOL_FILES=dest_tool.c test_adc.c test_adc.c test_bl.c test_display.c \
|
|
test_keys.c test_power.c test_ts.c
|
|
ALL_ELF=$(patsubst %.c,%.elf,$(TOOL_FILES)) all_tools.elf dualboot.elf
|
|
|
|
all: $(ALL_ELF)
|
|
|
|
%.elf: %.c $(LIB_FILES)
|
|
$(CC) $(CFLAGS) $(INCLUDES) -o $@ $^
|
|
|
|
all_tools.elf: all_tools.c $(TOOL_FILES) $(LIB_FILES)
|
|
$(CC) $(CFLAGS) -DNWZ_EMBED_TOOLS $(INCLUDES) -o $@ $^
|
|
|
|
dualboot.elf: dualboot.c all_tools.c $(TOOL_FILES) $(LIB_FILES)
|
|
$(CC) $(CFLAGS) -DNWZ_DUALBOOT -DNWZ_EMBED_TOOLS $(INCLUDES) -o $@ $^
|
|
|
|
clean:
|
|
rm -rf $(ALL_ELF)
|