MEDIA_TYPE = netboot image
TARGET = $(TEMP_INITRD) $(TEMP_KERNEL) omap
EXTRANAME = $(MEDIUM)/
INITRD_FS = initramfs

MANIFEST-INITRD = "netboot initrd"
MANIFEST-KERNEL = "kernel image to netboot"

omap:
	mkdir -p $(SOME_DEST)/$(EXTRANAME)/omap
	echo "fatload mmc 0:1 0x80000000 uImage" >$(TEMP)/boot.script
	echo "fatload mmc 0:1 0x82000000 uInitrd" >>$(TEMP)/boot.script
	echo "setenv bootargs vram=12M omapfb.mode=dvi:1280x720MR-16@60" >>$(TEMP)/boot.script
	echo "bootm 0x80000000 0x82000000" >>$(TEMP)/boot.script
	mkimage -A arm -O linux -T kernel -C none -a 0x80008000 -e 0x80008000 -n "Ubuntu kernel" -d $(TEMP_KERNEL) $(SOME_DEST)/$(EXTRANAME)/omap/uImage
	mkimage -A arm -O linux -T ramdisk -C none -a 0x0 -e 0x0 -n "debian-installer ramdisk" -d $(TEMP_INITRD) $(SOME_DEST)/$(EXTRANAME)/omap/uInitrd
	mkimage -A arm -T script -C none -n "Ubuntu boot script" -d $(TEMP)/boot.script $(SOME_DEST)/$(EXTRANAME)/omap/boot.scr
	update-manifest $(SOME_DEST)/$(EXTRANAME)/omap/uImage "Linux kernel for OMAP Boards"
	update-manifest $(SOME_DEST)/$(EXTRANAME)/omap/uInitrd "initrd for OMAP Boards"
	update-manifest $(SOME_DEST)/$(EXTRANAME)/omap/boot.scr "Boot script for booting OMAP netinstall initrd and kernel from SD card"

