# Test your system on real hardware NETBOOT_LOCAL="/ibr/adm/user-boot/" NETBOOT_HOST="y0080589@x1.ibr.cs.tu-bs.de" # The boot menu shows pairs of `vmlinuz-*` + `initrd-*.img` with owning user and timestamp. # We just need to choose a name that doesn't overlap with another user's. netboot: all $(VERBOSE) \ if [ ! "$$DEPLOY_LOCAL" ] && [ -e "${NETBOOT_LOCAL}" ] ; then DEPLOY_LOCAL=1 ; fi ; \ if [ "$$DEPLOY_LOCAL" = 1 ] ; then \ user=$$USER ; \ else \ user=$$( ssh -G ${NETBOOT_HOST} | grep -oPe '^user \K.*' ) ; \ fi ; \ \ mkdir -p $(BUILDDIR)/netboot ; \ ln -fT ${KERNEL} $(BUILDDIR)/netboot/vmlinuz-$$user ; \ initrd="$(INITRD)" ; if [ -s "$$initrd" ] ; then \ ln -fT $$initrd $(BUILDDIR)/netboot/initrd-$$user.img ; \ else \ echo "(none)" > $(BUILDDIR)/netboot/initrd-$$user.img ; \ fi ; \ \ if [ "$$DEPLOY_LOCAL" = 1 ] ; then \ echo "CP to locally as $$user" ; \ cp $(BUILDDIR)/netboot/vmlinuz-$$user $(BUILDDIR)/netboot/initrd-$$user.img ${NETBOOT_LOCAL} ; \ else \ echo "SCP to ${NETBOOT_HOST} as $$user" ; \ scp $(BUILDDIR)/netboot/vmlinuz-$$user $(BUILDDIR)/netboot/initrd-$$user.img ${NETBOOT_HOST}:${NETBOOT_LOCAL} ; \ fi # Documentation help:: @$(echo) "Netboot\n" \ " \e[3mnetboot\e[0m Copies $(PROJECT) to the network share, allowing the test infrastructure\n" \ " to boot your system"