PART=NF3H-PPS VER=00A0 TARGET=$(PART)-$(VER).dtbo SLOTS=/sys/devices/platform/bone_capemgr/slots all: $(TARGET) %.dtbo: %.dts dtc -O dtb -o $@ -b 0 -@ $^ install: $(TARGET) cp $^ /lib/firmware clean: rm -f $(TARGET) insert: echo $(PART):$(VER) >$(SLOTS) remove: if grep -q $(PART) $(SLOTS) ; then \ ROW=`grep $(PART) $(SLOTS) | \ cut -s -d : -f 1 | \ tr -d ' '`; \ echo -$$ROW >$(SLOTS) ; \ fi ls: cat $(SLOTS)