diff --git a/Makefile b/Makefile index 4c5fa9c..3ff696a 100644 --- a/Makefile +++ b/Makefile @@ -41,10 +41,6 @@ sudo losetup -d $$loop0 &&\ sudo losetup -d $$loop1 -rootfs/initrd.tar: $(USER_PROGRAM_FILES) - @echo "packing files into rootfs/initrd.tar" - @tar cf rootfs/initrd.tar initrd/ - rootfs/boot/kernel: $(OBJS) link.ld @echo "linking" @$(LD) $(LD_FLAGS) -o $@ $(OBJS) diff --git a/Makefile b/Makefile index 4c5fa9c..3ff696a 100644 --- a/Makefile +++ b/Makefile @@ -41,10 +41,6 @@ sudo losetup -d $$loop0 &&\ sudo losetup -d $$loop1 -rootfs/initrd.tar: $(USER_PROGRAM_FILES) - @echo "packing files into rootfs/initrd.tar" - @tar cf rootfs/initrd.tar initrd/ - rootfs/boot/kernel: $(OBJS) link.ld @echo "linking" @$(LD) $(LD_FLAGS) -o $@ $(OBJS) diff --git a/src/userland/Makefile b/src/userland/Makefile index 24e4916..d4f368e 100644 --- a/src/userland/Makefile +++ b/src/userland/Makefile @@ -11,6 +11,10 @@ PROGRAM_NAMES := $(shell ls -d */ | sed "s/\/$$//" | sed "s|build||") PROGRAMS := $(PROGRAM_NAMES:%=../../initrd/%) +../../rootfs/initrd.tar: all + @echo "packing files into rootfs/initrd.tar" + @tar cf ../../rootfs/initrd.tar ../../initrd/ + all: $(PROGRAMS) .SUFFIXES: @@ -29,13 +33,3 @@ endef $(foreach NAME, $(PROGRAM_NAMES), $(eval $(call MAKE_PROGRAM,$(NAME),$(shell find $(NAME) -name "*.c" | sed "s|$$|.o|" | sed "s|^|build/|")))) - - -# $(shell find $(subst user/,,$@) -name "*.c" | sed "s?/\([^/]*\)?/build/\1?") -#user/%: $$(shell echo "test") -# NAME=$$(echo $@ | sed "s?user/??"); \ -# SOURCES=$$(find $$NAME -name "*.c"); \ -# OBJS=$$(echo $$SOURCES | sed "s|$$|.o|" | sed "s|^|build/|"); \ -# make $$OBJS;\ -# echo "linking $@ $<";\ -# $(LD) $(LD_FLAGS) -I include$$NAME -o ../../initrd/$$NAME diff --git a/Makefile b/Makefile index 4c5fa9c..3ff696a 100644 --- a/Makefile +++ b/Makefile @@ -41,10 +41,6 @@ sudo losetup -d $$loop0 &&\ sudo losetup -d $$loop1 -rootfs/initrd.tar: $(USER_PROGRAM_FILES) - @echo "packing files into rootfs/initrd.tar" - @tar cf rootfs/initrd.tar initrd/ - rootfs/boot/kernel: $(OBJS) link.ld @echo "linking" @$(LD) $(LD_FLAGS) -o $@ $(OBJS) diff --git a/src/userland/Makefile b/src/userland/Makefile index 24e4916..d4f368e 100644 --- a/src/userland/Makefile +++ b/src/userland/Makefile @@ -11,6 +11,10 @@ PROGRAM_NAMES := $(shell ls -d */ | sed "s/\/$$//" | sed "s|build||") PROGRAMS := $(PROGRAM_NAMES:%=../../initrd/%) +../../rootfs/initrd.tar: all + @echo "packing files into rootfs/initrd.tar" + @tar cf ../../rootfs/initrd.tar ../../initrd/ + all: $(PROGRAMS) .SUFFIXES: @@ -29,13 +33,3 @@ endef $(foreach NAME, $(PROGRAM_NAMES), $(eval $(call MAKE_PROGRAM,$(NAME),$(shell find $(NAME) -name "*.c" | sed "s|$$|.o|" | sed "s|^|build/|")))) - - -# $(shell find $(subst user/,,$@) -name "*.c" | sed "s?/\([^/]*\)?/build/\1?") -#user/%: $$(shell echo "test") -# NAME=$$(echo $@ | sed "s?user/??"); \ -# SOURCES=$$(find $$NAME -name "*.c"); \ -# OBJS=$$(echo $$SOURCES | sed "s|$$|.o|" | sed "s|^|build/|"); \ -# make $$OBJS;\ -# echo "linking $@ $<";\ -# $(LD) $(LD_FLAGS) -I include$$NAME -o ../../initrd/$$NAME diff --git a/src/userland/hid/main.c b/src/userland/hid/main.c index 3ede05d..5647c74 100644 --- a/src/userland/hid/main.c +++ b/src/userland/hid/main.c @@ -283,8 +283,9 @@ device->buffer = malloc(0x1000); device->normalFunction = getFunction(serviceId, "hid_normal"); device->inputGroups = NULL; - printf("registered a new HID device, dumping report descriptor:\n"); + printf("registered a new HID device, dumping report descriptor here:\n"); uint32_t totalBits = parseReportDescriptor(report, &device->inputGroups); + printf("start waiting\n"); uint32_t getIntervalFunction = getFunction(serviceId, "hid_interval"); device->interval = request(serviceId, getIntervalFunction, usbDevice, 0); fork(hidListening, device, 0, 0);