PLATFORM?=linux/arm/v6

all:
	mkdir -p rootfs
	docker buildx build --platform ${PLATFORM} -o type=tar,dest=tmp.tar .
	tar xf tmp.tar -C rootfs/
	tar cf iowrt.tar rootfs config.json
	rm -rf tmp.tar rootfs

lxc:
	mkdir -p rootfs
	docker buildx build --platform ${PLATFORM} -o type=tar,dest=tmp.tar .
	tar xf tmp.tar -C rootfs/
	tar cf iowrt.tar rootfs config
	rm -rf tmp.tar rootfs

clean:
	- rm -rf tmp.tar rootfs iowrt.tar
