construct the "sysresources.zip" datablock to be bound into the executable

This commit is contained in:
Amy G. Bowersox 2021-08-29 16:56:38 -06:00
parent 6b62d0e4f1
commit 758af85d84
2 changed files with 10 additions and 2 deletions

View File

@ -21,7 +21,7 @@ all:
make output make output
output: output:
mkdir output mkdir -p output
cp src/upiwin output cp src/upiwin output
cp scripts/*.py output cp scripts/*.py output

View File

@ -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 \ 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 \ 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 \ 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 LIBS=-lpython3.7m -lcrypt -lfreetype -lbcm2835 -lpthread -ldl -lutil -lm
CFLAGS=-I/usr/include/python3.7m -I/usr/include/freetype2 -I/usr/include/libpng16 \ 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 -Wall -Werror -fstack-protector -fwrapv -fno-PIE -g -O3 -DDEBUG_ASSERT
@ -37,6 +37,14 @@ upiwin: $(OBJS)
.c.o: .c.o:
gcc -c $(CFLAGS) $< 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 %.o: %.bin
objcopy -I binary -O elf32-littlearm -B arm --rename-section \ objcopy -I binary -O elf32-littlearm -B arm --rename-section \
.data=.rodata,alloc,load,readonly,data,contents $< $@ .data=.rodata,alloc,load,readonly,data,contents $< $@