MEDIA_TYPE = netboot image

TARGET = $(TEMP_INITRD) $(TEMP_KERNEL) openrd t5325

TYPE = netboot/gtk
EXTRANAME = netboot/gtk/

KEEP_GI_LANGS = 1

# All images that include cdebconf should include symbols needed by these
# plugins.
EXTRAUDEBS += cdebconf-gtk-entropy

# OpenRD
openrd:
	mkdir -p $(SOME_DEST)/$(EXTRANAME)/marvell/openrd
	mkimage -A arm -O linux -T kernel -C none -a 0x00008000 -e 0x00008000 -n "Debian kernel" -d $(TEMP_KERNEL) $(SOME_DEST)/$(EXTRANAME)/marvell/openrd/uImage
	mkimage -A arm -O linux -T ramdisk -C gzip -a 0x0 -e 0x0 -n "debian-installer ramdisk" -d $(TEMP_INITRD) $(SOME_DEST)/$(EXTRANAME)/marvell/openrd/uInitrd
	update-manifest $(SOME_DEST)/$(EXTRANAME)/marvell/openrd/uImage "Linux kernel for OpenRD"
	update-manifest $(SOME_DEST)/$(EXTRANAME)/marvell/openrd/uInitrd "initrd for OpenRD"

# HP t5325 Thin Client
t5325:
	mkdir -p $(SOME_DEST)/$(EXTRANAME)/hp/t5325
	mkdir -p $(TEMP)/t5325
	# Set machine id 2846 (0x0b1e)
	devio > $(TEMP)/t5325/kernel 'wl 0xe3a01c0b,4' 'wl 0xe381101e,4'
	cat $(TEMP_KERNEL) >> $(TEMP)/t5325/kernel
	mkimage -A arm -O linux -T kernel -C none -a 0x00008000 -e 0x00008000 -n "Debian kernel" -d $(TEMP)/t5325/kernel $(SOME_DEST)/$(EXTRANAME)/hp/t5325/uImage.usb
	mkimage -A arm -O linux -T ramdisk -C gzip -a 0x0 -e 0x0 -n "debian-installer ramdisk" -d $(TEMP_INITRD) $(SOME_DEST)/$(EXTRANAME)/hp/t5325/uInitrd.usb
	update-manifest $(SOME_DEST)/$(EXTRANAME)/hp/t5325/uImage.usb "Linux kernel for HP t5325"
	update-manifest $(SOME_DEST)/$(EXTRANAME)/hp/t5325/uInitrd.usb "initrd for HP t5325"

