Makefile 422 B

1234567891011121314151617181920
  1. .POSIX:
  2. .PHONY: clean run
  3. BZIMAGE := iso/boot/bzImage
  4. main.img: $(BZIMAGE)
  5. grub-mkrescue -o '$@' iso
  6. $(BZIMAGE):
  7. wget https://github.com/cirosantilli/linux-kernel-module-cheat/releases/download/uploads/images-ab21ef58deed8536bc159c2afd680a4fabd68510.zip
  8. unzip images-*.zip
  9. cp out/x86_64/buildroot/images/bzImage '$@'
  10. clean:
  11. rm -f iso/boot/*.img *.img
  12. run: main.img
  13. qemu-system-i386 -drive 'file=$<,format=raw'