FLAVOUR_SUPPORTED = root net-drivers cd-drivers boot boot-ofonly
MEDIA_TYPE = floppy
FLOPPY_SIZE = 1440
KERNELVERSION = $(BASEVERSION)-powerpc-miboot

# media where images may be written to (via dd).
WRITE_MEDIA += $(FLAVOUR_SUPPORTED)

$(TEMP_KERNEL).gz: $(TEMP_KERNEL)
	#mkvmlinuz -a miboot -r $(KERNELVERSION) -k $(TEMP_KERNEL) -n -d $(TEMP)/lib -o $(TEMP_KERNEL).gz
	# Let's do it the good old fashioned way.
	gzip -c -9 $(TEMP_KERNEL) >$(TEMP_KERNEL).gz

$(TEMP_BOOT).new: $(TEMP_KERNEL).gz
	dd if=/dev/zero of=$@ bs=1024 count=$(FLOPPY_SIZE)
	hformat -l $(DISK_LABEL) $@
	# miboot it not in the archive yet, but it makes no sense to build the
	# floppies when it is not, and cause a support nightmare, so better
	# not build boot and boot-ofonly for official debian-installer.
	echo DOING MIBOOT; \
	echo device $(TEMP_BOOT).new > $(TEMP)/miboot.conf;			\
	echo kernel $(TEMP_KERNEL).gz $(KERNEL_CMDL) >> $(TEMP)/miboot.conf;	\
	miboot -c $(TEMP)/miboot.conf;			\
	echo MIBOOT DONE;

arch_boot:
	mkdir -p $(dir $(TEMP_BOOT))
	HOME=$(TEMP) $(MAKE) $(TEMP_BOOT).new
	mv $(TEMP_BOOT).new $(TEMP_BOOT)
	rm -f $(TEMP)/.hcwd # clean up after hfsutils

arch_root:
	cp $(TEMP_INITRD) $(TEMP_ROOT)

arch_boot_screens:
