parent
70d801241f
commit
fa37bfdf15
|
@ -80,144 +80,144 @@ MAKE_IMAGE = ARCHITECTURE=$(ARCHITECTURE) MACHINE=$(MACHINE) SOURCE=$(SOURCE) \
|
|||
|
||||
# build Beaglebone SD card image
|
||||
beaglebone: prep
|
||||
$(eval ARCHITECTURE = armhf)
|
||||
$(eval MACHINE = beaglebone)
|
||||
$(MAKE_IMAGE)
|
||||
$(TAR) $(ARCHIVE) $(IMAGE)
|
||||
@echo ""
|
||||
$(SIGN)
|
||||
@echo "Build complete."
|
||||
$(eval ARCHITECTURE = armhf)
|
||||
$(eval MACHINE = beaglebone)
|
||||
$(MAKE_IMAGE)
|
||||
$(TAR) $(ARCHIVE) $(IMAGE)
|
||||
@echo ""
|
||||
$(SIGN)
|
||||
@echo "Build complete."
|
||||
|
||||
# build Cubieboard2 SD card image
|
||||
cubieboard2: prep
|
||||
$(eval ARCHITECTURE = armhf)
|
||||
$(eval MACHINE = cubieboard2)
|
||||
$(MAKE_IMAGE)
|
||||
$(TAR) $(ARCHIVE) $(IMAGE)
|
||||
@echo ""
|
||||
$(SIGN)
|
||||
@echo "Build complete."
|
||||
$(eval ARCHITECTURE = armhf)
|
||||
$(eval MACHINE = cubieboard2)
|
||||
$(MAKE_IMAGE)
|
||||
$(TAR) $(ARCHIVE) $(IMAGE)
|
||||
@echo ""
|
||||
$(SIGN)
|
||||
@echo "Build complete."
|
||||
|
||||
# build CubieTruck SD card image
|
||||
cubietruck: prep
|
||||
$(eval ARCHITECTURE = armhf)
|
||||
$(eval MACHINE = cubietruck)
|
||||
$(MAKE_IMAGE)
|
||||
$(TAR) $(ARCHIVE) $(IMAGE)
|
||||
@echo ""
|
||||
$(SIGN)
|
||||
@echo "Build complete."
|
||||
$(eval ARCHITECTURE = armhf)
|
||||
$(eval MACHINE = cubietruck)
|
||||
$(MAKE_IMAGE)
|
||||
$(TAR) $(ARCHIVE) $(IMAGE)
|
||||
@echo ""
|
||||
$(SIGN)
|
||||
@echo "Build complete."
|
||||
|
||||
# build A20 OLinuXino Lime2 SD card image
|
||||
a20-olinuxino-lime2: prep
|
||||
$(eval ARCHITECTURE = armhf)
|
||||
$(eval MACHINE = a20-olinuxino-lime2)
|
||||
$(MAKE_IMAGE)
|
||||
$(TAR) $(ARCHIVE) $(IMAGE)
|
||||
@echo ""
|
||||
$(SIGN)
|
||||
@echo "Build complete."
|
||||
$(eval ARCHITECTURE = armhf)
|
||||
$(eval MACHINE = a20-olinuxino-lime2)
|
||||
$(MAKE_IMAGE)
|
||||
$(TAR) $(ARCHIVE) $(IMAGE)
|
||||
@echo ""
|
||||
$(SIGN)
|
||||
@echo "Build complete."
|
||||
|
||||
# build an i386 image
|
||||
i386: prep
|
||||
$(eval ARCHITECTURE = i386)
|
||||
$(eval MACHINE = all)
|
||||
$(MAKE_IMAGE)
|
||||
$(TAR) $(ARCHIVE) $(IMAGE)
|
||||
@echo ""
|
||||
$(SIGN)
|
||||
@echo "Build complete."
|
||||
$(eval ARCHITECTURE = i386)
|
||||
$(eval MACHINE = all)
|
||||
$(MAKE_IMAGE)
|
||||
$(TAR) $(ARCHIVE) $(IMAGE)
|
||||
@echo ""
|
||||
$(SIGN)
|
||||
@echo "Build complete."
|
||||
|
||||
# build an amd64 image
|
||||
amd64: prep
|
||||
$(eval ARCHITECTURE = amd64)
|
||||
$(eval MACHINE = all)
|
||||
$(MAKE_IMAGE)
|
||||
$(TAR) $(ARCHIVE) $(IMAGE)
|
||||
@echo ""
|
||||
$(SIGN)
|
||||
@echo "Build complete."
|
||||
$(eval ARCHITECTURE = amd64)
|
||||
$(eval MACHINE = all)
|
||||
$(MAKE_IMAGE)
|
||||
$(TAR) $(ARCHIVE) $(IMAGE)
|
||||
@echo ""
|
||||
$(SIGN)
|
||||
@echo "Build complete."
|
||||
|
||||
# build a virtualbox image
|
||||
virtualbox: virtualbox-i386
|
||||
|
||||
virtualbox-i386: prep
|
||||
$(eval ARCHITECTURE = i386)
|
||||
$(eval MACHINE = virtualbox)
|
||||
$(MAKE_IMAGE)
|
||||
# Convert image to vdi hard drive
|
||||
VBoxManage convertdd $(NAME).img $(NAME).vdi
|
||||
$(TAR) $(ARCHIVE) $(NAME).vdi
|
||||
@echo ""
|
||||
$(SIGN)
|
||||
@echo "Build complete."
|
||||
$(eval ARCHITECTURE = i386)
|
||||
$(eval MACHINE = virtualbox)
|
||||
$(MAKE_IMAGE)
|
||||
# Convert image to vdi hard drive
|
||||
VBoxManage convertdd $(NAME).img $(NAME).vdi
|
||||
$(TAR) $(ARCHIVE) $(NAME).vdi
|
||||
@echo ""
|
||||
$(SIGN)
|
||||
@echo "Build complete."
|
||||
|
||||
virtualbox-amd64: prep
|
||||
$(eval ARCHITECTURE = amd64)
|
||||
$(eval MACHINE = virtualbox)
|
||||
$(MAKE_IMAGE)
|
||||
# Convert image to vdi hard drive
|
||||
VBoxManage convertdd $(NAME).img $(NAME).vdi
|
||||
$(TAR) $(ARCHIVE) $(NAME).vdi
|
||||
@echo ""
|
||||
$(SIGN)
|
||||
@echo "Build complete."
|
||||
$(eval ARCHITECTURE = amd64)
|
||||
$(eval MACHINE = virtualbox)
|
||||
$(MAKE_IMAGE)
|
||||
# Convert image to vdi hard drive
|
||||
VBoxManage convertdd $(NAME).img $(NAME).vdi
|
||||
$(TAR) $(ARCHIVE) $(NAME).vdi
|
||||
@echo ""
|
||||
$(SIGN)
|
||||
@echo "Build complete."
|
||||
|
||||
test: test-virtualbox
|
||||
|
||||
test-virtualbox: virtualbox
|
||||
$(eval VM_NAME = $(PROJECT_NAME)-test)
|
||||
VBoxManage createvm --name $(VM_NAME) --ostype "Debian" --register
|
||||
VBoxManage storagectl $(VM_NAME) --name "SATA Controller" --add sata \
|
||||
--controller IntelAHCI
|
||||
VBoxManage storageattach $(VM_NAME) --storagectl "SATA Controller" \
|
||||
--port 0 --device 0 --type hdd --medium $(NAME).vdi
|
||||
VBoxManage modifyvm $(VM_NAME) --pae on --memory 1024 --vram 128 \
|
||||
--nic1 nat --natpf1 ,tcp,,$(TEST_SSH_PORT),,22
|
||||
VBoxManage startvm $(VM_NAME) --type headless
|
||||
sleep $(TEST_FIRSTRUN_WAIT_TIME) # wait for first-run to complete
|
||||
echo frdm |sshpass -p frdm ssh -o UserKnownHostsFile=/dev/null \
|
||||
-o StrictHostKeyChecking=no -t -t \
|
||||
-p $(TEST_SSH_PORT) fbx@127.0.0.1 \
|
||||
"sudo plinth --diagnose" \
|
||||
|tee build/$(VM_NAME)-results_$(TODAY).log
|
||||
VBoxManage controlvm $(VM_NAME) poweroff
|
||||
VBoxManage modifyvm $(VM_NAME) --hda none
|
||||
VBoxManage unregistervm $(VM_NAME) --delete
|
||||
$(eval VM_NAME = $(PROJECT_NAME)-test)
|
||||
VBoxManage createvm --name $(VM_NAME) --ostype "Debian" --register
|
||||
VBoxManage storagectl $(VM_NAME) --name "SATA Controller" --add sata \
|
||||
--controller IntelAHCI
|
||||
VBoxManage storageattach $(VM_NAME) --storagectl "SATA Controller" \
|
||||
--port 0 --device 0 --type hdd --medium $(NAME).vdi
|
||||
VBoxManage modifyvm $(VM_NAME) --pae on --memory 1024 --vram 128 \
|
||||
--nic1 nat --natpf1 ,tcp,,$(TEST_SSH_PORT),,22
|
||||
VBoxManage startvm $(VM_NAME) --type headless
|
||||
sleep $(TEST_FIRSTRUN_WAIT_TIME) # wait for first-run to complete
|
||||
echo frdm |sshpass -p frdm ssh -o UserKnownHostsFile=/dev/null \
|
||||
-o StrictHostKeyChecking=no -t -t \
|
||||
-p $(TEST_SSH_PORT) fbx@127.0.0.1 \
|
||||
"sudo plinth --diagnose" \
|
||||
|tee build/$(VM_NAME)-results_$(TODAY).log
|
||||
VBoxManage controlvm $(VM_NAME) poweroff
|
||||
VBoxManage modifyvm $(VM_NAME) --hda none
|
||||
VBoxManage unregistervm $(VM_NAME) --delete
|
||||
|
||||
# build a qemu image
|
||||
qemu: qemu-i386
|
||||
|
||||
qemu-i386: prep
|
||||
$(eval ARCHITECTURE = i386)
|
||||
$(eval MACHINE = qemu)
|
||||
$(MAKE_IMAGE)
|
||||
# Convert image to qemu format
|
||||
qemu-img convert -O qcow2 $(NAME).img $(NAME).qcow2
|
||||
$(TAR) $(ARCHIVE) $(NAME).qcow2
|
||||
@echo ""
|
||||
$(SIGN)
|
||||
@echo "Build complete."
|
||||
$(eval ARCHITECTURE = i386)
|
||||
$(eval MACHINE = qemu)
|
||||
$(MAKE_IMAGE)
|
||||
# Convert image to qemu format
|
||||
qemu-img convert -O qcow2 $(NAME).img $(NAME).qcow2
|
||||
$(TAR) $(ARCHIVE) $(NAME).qcow2
|
||||
@echo ""
|
||||
$(SIGN)
|
||||
@echo "Build complete."
|
||||
|
||||
qemu-x86_64: prep
|
||||
$(eval ARCHITECTURE = x86_64)
|
||||
$(eval MACHINE = qemu)
|
||||
$(MAKE_IMAGE)
|
||||
# Convert image to qemu format
|
||||
qemu-img convert -O qcow2 $(NAME).img $(NAME).qcow2
|
||||
$(TAR) $(ARCHIVE) $(NAME).qcow2
|
||||
@echo ""
|
||||
$(SIGN)
|
||||
@echo "Build complete."
|
||||
$(eval ARCHITECTURE = x86_64)
|
||||
$(eval MACHINE = qemu)
|
||||
$(MAKE_IMAGE)
|
||||
# Convert image to qemu format
|
||||
qemu-img convert -O qcow2 $(NAME).img $(NAME).qcow2
|
||||
$(TAR) $(ARCHIVE) $(NAME).qcow2
|
||||
@echo ""
|
||||
$(SIGN)
|
||||
@echo "Build complete."
|
||||
|
||||
vendor/vmdebootstrap/vmdebootstrap: vendor-patches/vmdebootstrap/*.patch
|
||||
freedombone-image-vmdebootstrap
|
||||
freedombone-image-vmdebootstrap
|
||||
|
||||
prep: vendor/vmdebootstrap/vmdebootstrap
|
||||
mkdir -p build
|
||||
mkdir -p build
|
||||
|
||||
clean:
|
||||
-rm -f build/$(PROJECT_NAME).log
|
||||
-rm -f build/$(PROJECT_NAME).log
|
||||
|
||||
distclean: clean
|
||||
sudo rm -rf build
|
||||
sudo rm -rf build
|
||||
|
|
Loading…
Reference in New Issue