diff --git a/src/splash.png b/resources/splash-erbosoft.png similarity index 100% rename from src/splash.png rename to resources/splash-erbosoft.png diff --git a/resources/splash-vmwcblk.png b/resources/splash-vmwcblk.png new file mode 100755 index 0000000..1b33a4e Binary files /dev/null and b/resources/splash-vmwcblk.png differ diff --git a/src/Makefile b/src/Makefile index 835818e..16b5f0c 100644 --- a/src/Makefile +++ b/src/Makefile @@ -1,3 +1,7 @@ +BUILDUTILS=../buildutils +RESOURCES=../resources +SPLASHSCREEN=splash-vmwcblk.png + OBJS=main.o sysinput.o ep_init.o ep_upiwin.o ep_backlight.o ep_upiwin_tmp.o ep_util.o fbinit.o fontengine.o fbprimitive.o \ log.o gpio.o msg_queue.o time_func.o config.o splash.o LIBS=-lpython3.7m -lcrypt -lfreetype -lbcm2835 -lpthread -ldl -lutil -lm @@ -18,8 +22,8 @@ splash.o: splash.bin objcopy -I binary -O elf32-littlearm -B arm --rename-section \ .data=.rodata,alloc,load,readonly,data,contents splash.bin splash.o -splash.bin: splash.png ../buildutils/mksplash - ../buildutils/mksplash splash.png splash.bin +splash.bin: $(RESOURCES)/$(SPLASHSCREEN) $(BUILDUTILS)/mksplash + $(BUILDUTILS)/mksplash $(RESOURCES)/$(SPLASHSCREEN) splash.bin clean: rm -f upiwin *.o splash.bin *~ diff --git a/src/config.c b/src/config.c index 5345597..cc2b67f 100644 --- a/src/config.c +++ b/src/config.c @@ -187,6 +187,12 @@ HRESULT Config_setup(int argc, char *argv[]) HRESULT hr; GLOBAL_CONFIG from_commandline; + if (geteuid() != 0) + { + Log(LFATAL, "upiwin must be run with root privileges"); + return E_ACCESSDENIED; + } + if (atexit(run_exit_funcs)) { Log(LFATAL, "Unable to set up exit function mechanism");