From ff3e388607770eaa0a515097f674efcfcc2e8762 Mon Sep 17 00:00:00 2001
From: kaloz <kaloz@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Date: Wed, 13 May 2009 10:59:59 +0000
Subject: [PATCH] workaround a bootloader bug on the WBD111

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@15818 3c298f89-4303-0410-b956-a3cf2f4a3e73
---
 target/linux/gemini/image/Makefile | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/target/linux/gemini/image/Makefile b/target/linux/gemini/image/Makefile
index 6fb775064..fc69ffcc8 100644
--- a/target/linux/gemini/image/Makefile
+++ b/target/linux/gemini/image/Makefile
@@ -14,7 +14,9 @@ define Image/Prepare
 endef
 
 define Image/BuildKernel
-	cp $(KDIR)/openwrt-$(BOARD)-wbd111-zImage $(BIN_DIR)/openwrt-$(BOARD)-wbd111-zImage
+# workaround the bootloader's bug with extra nops
+	echo -en "\x00\x00\xa0\xe1\x00\x00\xa0\xe1\x00\x00\xa0\xe1\x00\x00\xa0\xe1" > $(BIN_DIR)/openwrt-$(BOARD)-wbd111-zImage
+	cat $(KDIR)/openwrt-$(BOARD)-wbd111-zImage >> $(BIN_DIR)/openwrt-$(BOARD)-wbd111-zImage
 endef
 
 define Image/Build/jffs2-64k
-- 
2.20.1