--- linux-2.6.28/Makefile.orig	2010-11-04 21:20:19.830823449 +0100
+++ linux-2.6.28/Makefile	2010-11-04 21:20:20.330823452 +0100
@@ -536,6 +536,25 @@
 # Defaults vmlinux but it is usually overridden in the arch makefile
 all: vmlinux
 
+DD		= dd
+
+vmlinux.bin: vmlinux
+	$(CROSS_COMPILE)objcopy -S -O binary $(TOPDIR)/vmlinux vmlinux.bin
+
+vmlinux.lzma: vmlinux.bin
+	$$FREETZ_BASE_DIR/tools/lzma e -lc1 -lp2 -pb2 \
+		vmlinux.bin vmlinux.lzma
+
+vmlinux.eva: vmlinux.lzma
+	loadaddr=$$($(AWK) '/A _text/ { print "0x"$$1; }' < System.map); \
+	entry=$$($(AWK) '/T kernel_entry/ { print "0x"$$1; }' < System.map); \
+	echo $$loadaddr $$entry; \
+	$$FREETZ_BASE_DIR/tools/lzma2eva $$loadaddr $$entry \
+		vmlinux.lzma vmlinux.eva
+
+vmlinux.eva_pad: vmlinux.eva
+	$(DD) if=vmlinux.eva of=vmlinux.eva_pad bs=256 conv=sync
+
 ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE
 KBUILD_CFLAGS	+= -Os
 else
@@ -1194,7 +1213,7 @@
 
 # Directories & files removed with 'make clean'
 CLEAN_DIRS  += $(MODVERDIR)
-CLEAN_FILES +=	vmlinux System.map \
+CLEAN_FILES +=	vmlinux vmlinux.bin vmlinux.lzma vmlinux.eva vmlinux.eva_pad System.map \
                 .tmp_kallsyms* .tmp_version .tmp_vmlinux* .tmp_System.map
 
 # Directories & files removed with 'make mrproper'
--- linux-2.6.28/arch/mips/Makefile.orig	2010-11-04 21:20:20.190823452 +0100
+++ linux-2.6.28/arch/mips/Makefile	2010-11-04 21:20:20.330823452 +0100
@@ -734,9 +734,6 @@
 
 all:	$(all-y)
 
-vmlinux.bin: $(vmlinux-32)
-	+@$(call makeboot,$@)
-
 vmlinux.ecoff: $(vmlinux-32)
 	+@$(call makeboot,$@)
 
