# unpack the binary archive for the firwmawre update and extract the top level files
.PHONY
binaries:
	binwalk -e RAIDiator-arm-5.3.13

# this prerequisite is available in the extracted data directory using binwalk
# but it has been also provided in the repository to replicate attempts at this resurrections
# easily
uboot.kwb: uboot-NV+-1.0.05
	mkimage -n kwbimage.cfg -A arm -O linux -T kwbimage -d uboot-NV+-1.0.05 uboot.kwb 

# boot the damn thing over UARTBoot
boot: uboot.kwb
	kwboot -b uboot.kwb -t /dev/ttyUSB0

terminal:
	kwboot -t /dev/ttyUSB0
