changed the splash screen and added a test to make sure we run as root

This commit is contained in:
Amy Bowersox 2019-12-09 10:14:20 -07:00
parent fb42797d5a
commit cc00d7a5ef
4 changed files with 12 additions and 2 deletions

View File

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

BIN
resources/splash-vmwcblk.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.9 KiB

View File

@ -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 \ 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 log.o gpio.o msg_queue.o time_func.o config.o splash.o
LIBS=-lpython3.7m -lcrypt -lfreetype -lbcm2835 -lpthread -ldl -lutil -lm 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 \ objcopy -I binary -O elf32-littlearm -B arm --rename-section \
.data=.rodata,alloc,load,readonly,data,contents splash.bin splash.o .data=.rodata,alloc,load,readonly,data,contents splash.bin splash.o
splash.bin: splash.png ../buildutils/mksplash splash.bin: $(RESOURCES)/$(SPLASHSCREEN) $(BUILDUTILS)/mksplash
../buildutils/mksplash splash.png splash.bin $(BUILDUTILS)/mksplash $(RESOURCES)/$(SPLASHSCREEN) splash.bin
clean: clean:
rm -f upiwin *.o splash.bin *~ rm -f upiwin *.o splash.bin *~

View File

@ -187,6 +187,12 @@ HRESULT Config_setup(int argc, char *argv[])
HRESULT hr; HRESULT hr;
GLOBAL_CONFIG from_commandline; GLOBAL_CONFIG from_commandline;
if (geteuid() != 0)
{
Log(LFATAL, "upiwin must be run with root privileges");
return E_ACCESSDENIED;
}
if (atexit(run_exit_funcs)) if (atexit(run_exit_funcs))
{ {
Log(LFATAL, "Unable to set up exit function mechanism"); Log(LFATAL, "Unable to set up exit function mechanism");