The main thing is if you use a HDD images (basically qemu or syslinux),
you'll want to compress the kernel before copying it around. New qemu
takes 10x longer to load a kernel that is only 3x bigger. Hardware
probably doesn't care as much, but having a smaller kernel will
transfer onto a USB stick faster.
To do so, change your Makelocal targets like so:
-$(OBJDIR)/kern/.kvm.touch: $(KERNEL_OBJ)
+$(OBJDIR)/kern/.kvm.touch: $(CMP_KERNEL_OBJ)
@echo " (KVM) Copying to mnt/hdd"
$(Q)cp $^ mnt/hdd/kernel
@sync
-$(OBJDIR)/kern/.usb.touch: $(KERNEL_OBJ)
+$(OBJDIR)/kern/.usb.touch: $(CMP_KERNEL_OBJ)
@echo " (USB) Copying to /dev/sdc4"
$(Q)mount /dev/sdc4
And if you start seeing annoying warnings from qemu about "raw" disk
formats and you *don't* run with -kernel, replace "mnt/hdd.img" with
"-drive file=mnt/hdd.img,index=0,media=disk,format=raw"
Barret
--
~Kevin
Hopefully that continues with newer versions of qemu. My machine used
to have no trouble with hdd.img either.
> Do you know if the "-kernel" option accepts compressed kernels as
> well? If it does, we could just make it the default.
Maybe not, this hangs for me:
qemu-system-x86_64 -s -enable-kvm -cpu kvm64 -smp 8 -m 4096 -nographic
-monitor /dev/pts/24 -net nic,model=e1000 -net
user,hostfwd=tcp::5555-:23 -net dump,file=/tmp/vm.pcap -kernel
obj/kern/akaros-kernel.gz
Also, I didn't want to get rid of the KERNEL_OBJ target in case someone
else (RISCV) wants it, but we could make akaros-kernel depend on the
CMP_KERNEL_OBJ if everyone wants it, since the uncompressed object is
still built. Not a big deal one way or another; it's O(seconds) to
compress the kernel.
Barret