From d4a9cb24df11deb286bb41192f412f402d20dc6c Mon Sep 17 00:00:00 2001 From: gbaconni Date: Wed, 3 Nov 2021 23:37:39 +0100 Subject: [PATCH] 2021-11-03 23:37:39 --- Makefile | 34 +++++++++++++++++++++++++++------- preseed.cfg | 4 ++-- 2 files changed, 29 insertions(+), 9 deletions(-) diff --git a/Makefile b/Makefile index e56194e..7d84e0e 100644 --- a/Makefile +++ b/Makefile @@ -6,7 +6,7 @@ # By: gbaconni@student.42lausanne.ch +#+ +:+ +#+ # # +#+#+#+#+#+ +#+ # # Created: 2021/11/02 17:47:57 by gbaconni #+# #+# # -# Updated: 2021/11/03 22:15:28 by gbaconni ### lausanne.ch # +# Updated: 2021/11/03 23:37:37 by gbaconni ### lausanne.ch # # # # **************************************************************************** # @@ -62,14 +62,35 @@ amd64: sda uefi -device virtio-scsi-pci,num_queues=4,id=scsi0 \ -device scsi-hd,drive=drive0,bus=scsi0.0,channel=0,scsi-id=0,lun=0,bootindex=0 \ -device scsi-cd,drive=cdrom0,bus=scsi0.0,channel=0,scsi-id=1,lun=0,bootindex=1 \ + -drive id=pflash0,unit=0,file=${PWD}/edk2-x86_64-code.fd,if=pflash,format=raw,readonly=on \ + -drive id=pflash1,unit=1,file=${PWD}/edk2-i386-vars.fd,if=pflash,format=raw \ -drive id=drive0,index=0,file=${PWD}/sda.raw,if=none,media=disk,format=raw,cache=writethrough,discard=unmap \ -drive id=cdrom0,index=1,file=${PWD}/debian-$(DVER)-amd64-netinst.iso,if=none,media=cdrom,readonly=on \ -nic user,model=virtio \ -monitor stdio \ - -boot menu=on \ -rtc base=localtime,clock=host -# -drive id=pflash0,unit=0,file=${PWD}/edk2-x86_64-code.fd,if=pflash,format=raw,readonly=on \ -# -drive id=pflash1,unit=1,file=${PWD}/edk2-i386-vars.fd,if=pflash,format=raw \ + +test: clean debian amd64 + @qemu-system-x86_64 \ + -name debian \ + -cpu qemu64-v1 \ + -smp $(CPU) \ + -machine q35,vmport=off \ + -accel tcg,tb-size=512 \ + -global ICH9-LPC.disable_s3=1 \ + -m $(RAM) \ + -usb \ + -device qemu-xhci \ + -device usb-kbd \ + -device usb-mouse \ + -device usb-tablet \ + -device virtio-gpu \ + -device virtio-scsi-pci,num_queues=4,id=scsi0 \ + -device scsi-hd,drive=drive0,bus=scsi0.0,channel=0,scsi-id=0,lun=0,bootindex=0 \ + -drive id=drive0,index=0,file=${PWD}/sda.raw,if=none,media=disk,format=raw,cache=writethrough,discard=unmap \ + -nic user,model=virtio \ + -monitor stdio \ + -rtc base=localtime,clock=host #arm64: clean sda debian uefi arm64: sda uefi @@ -97,7 +118,6 @@ arm64: sda uefi -drive id=cdrom0,index=1,file=${PWD}/debian-$(DVER)-arm64-netinst.iso,if=none,media=cdrom,readonly=on \ -nic user,model=virtio \ -monitor stdio \ - -boot menu=on \ -rtc base=localtime,clock=host clean: @@ -110,10 +130,10 @@ fclean: clean ps: @ps ax | grep qemu | sed 's/ -/ \\\n-/g; s/^[^\/]*//;' -sync: test update +sync: up update @git status | grep -q 'nothing to commit' || (git add -A && git commit -am "$$(date '+%F %T')" && git push) || true -test: +up: @dig +short vogsphere.baco.net A | grep -q '213\.5\.156\.25' || echo 'vogsphere.baco.net unreachable' update: diff --git a/preseed.cfg b/preseed.cfg index 3e76f94..5016e33 100644 --- a/preseed.cfg +++ b/preseed.cfg @@ -483,13 +483,13 @@ d-i finish-install/reboot_in_progress note # This will prevent the installer from ejecting the CD during the reboot, # which is useful in some situations. -#d-i cdrom-detect/eject boolean false +d-i cdrom-detect/eject boolean false # This is how to make the installer shutdown when finished, but not # reboot into the installed system. #d-i debian-installer/exit/halt boolean true # This will power off the machine instead of just halting it. -#d-i debian-installer/exit/poweroff boolean true +d-i debian-installer/exit/poweroff boolean true ### Preseeding other packages # Depending on what software you choose to install, or if things go wrong