From 758af85d84e98b54dfc41298b7737263c2211fd6 Mon Sep 17 00:00:00 2001 From: Amy Gale Ruth Bowersox Date: Sun, 29 Aug 2021 16:56:38 -0600 Subject: [PATCH] construct the "sysresources.zip" datablock to be bound into the executable --- Makefile | 2 +- src/Makefile | 10 +++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index a8c321b..2612a02 100644 --- a/Makefile +++ b/Makefile @@ -21,7 +21,7 @@ all: make output output: - mkdir output + mkdir -p output cp src/upiwin output cp scripts/*.py output diff --git a/src/Makefile b/src/Makefile index 7de780d..a068e19 100644 --- a/src/Makefile +++ b/src/Makefile @@ -22,7 +22,7 @@ SPLASHSCREEN=splash-erbosoft.png OBJS=main.o sysinput.o ep_init.o ep_upiwin.o ep_backlight.o ep_msg.o ep_graphics.o ep_devctxt.o ep_bitmap.o \ ep_upiwin_tmp.o ep_util.o fbinit.o rect.o gfxobj.o devctxt.o dc_screen.o fontengine.o \ bitmap.o stockobj.o fbprimitive.o log.o gpio.o msg_queue.o time_func.o config.o \ - i_freehand.o i_line.o i_rect.o i_fillrect.o i_undo.o i_clear.o splash.o + i_freehand.o i_line.o i_rect.o i_fillrect.o i_undo.o i_clear.o splash.o sysresources.o LIBS=-lpython3.7m -lcrypt -lfreetype -lbcm2835 -lpthread -ldl -lutil -lm CFLAGS=-I/usr/include/python3.7m -I/usr/include/freetype2 -I/usr/include/libpng16 \ -Wall -Werror -fstack-protector -fwrapv -fno-PIE -g -O3 -DDEBUG_ASSERT @@ -37,6 +37,14 @@ upiwin: $(OBJS) .c.o: gcc -c $(CFLAGS) $< +sysresources.o: sysresources.zip + objcopy -I binary -O elf32-littlearm -B arm --rename-section \ + .data=.rodata,alloc,load,readonly,data,contents sysresources.zip sysresources.o + +sysresources.zip: splash.bin + -rm sysresources.zip + zip sysresources.zip splash.bin + %.o: %.bin objcopy -I binary -O elf32-littlearm -B arm --rename-section \ .data=.rodata,alloc,load,readonly,data,contents $< $@