MEDIA_TYPE = generic

KERNEL = $(DEST)/kernel.ubuntu
INITRD = $(DEST)/initrd.ubuntu
TARGET = $(INITRD) $(KERNEL) $(DEST)/ubuntu.exec $(DEST)/parmfile.ubuntu $(DEST)/ubuntu.ins $(DEST)/initrd.off $(DEST)/initrd.siz
EXTRANAME = $(MEDIUM)/

MANIFEST-INITRD = "initrd"
MANIFEST-KERNEL = "kernel for vmreader ipl"

$(DEST)/ubuntu.exec: boot/s390x/exec
	install -m644 $^ $@
	update-manifest $@ "ipl script"

$(DEST)/ubuntu.ins: boot/s390x/ubuntu.ins
	install -m644 $^ $@
	update-manifest $@ "ubuntu.ins"

$(DEST)/initrd.off:
	perl -e "print pack('N', 0x1000000)" > $@
	update-manifest $@ "initrd.off"

$(DEST)/initrd.siz: $(INITRD)
	perl -e "print pack('N', -s '$^')" > $@
	update-manifest $@ "initrd.siz"

$(TEMP)/kernel.ubuntu: $(TEMP)/vmlinuz
	ln $+ $@
