diff --git a/firmware/.gitignore b/firmware/.gitignore
index f89a21fffbf1c268d355fc526c4635a0a015a3cc..d9c69017bc9affb03b2519d1dbb1e5cc88abfcdc 100644
--- a/firmware/.gitignore
+++ b/firmware/.gitignore
@@ -3,3 +3,4 @@
 *.bin
 *.csp
 *.dsp
+ihex2fw
diff --git a/firmware/Makefile b/firmware/Makefile
index 14fdd073c798e058b7a807c2671d57942fca7486..185c8dc0bcb2fa43086a742e81cb7b2213e29ea5 100644
--- a/firmware/Makefile
+++ b/firmware/Makefile
@@ -118,10 +118,10 @@ quiet_cmd_ihex  = IHEX    $@
       cmd_ihex  = $(OBJCOPY) -Iihex -Obinary $< $@
 
 quiet_cmd_ihex2fw  = IHEX2FW $@
-      cmd_ihex2fw  = $(objtree)/scripts/ihex2fw $< $@
+      cmd_ihex2fw  = $(objtree)/$(obj)/ihex2fw $< $@
 
 quiet_cmd_h16tofw  = H16TOFW $@
-      cmd_h16tofw  = $(objtree)/scripts/ihex2fw -w $< $@
+      cmd_h16tofw  = $(objtree)/$(obj)/ihex2fw -w $< $@
 
 quiet_cmd_fwbin = MK_FW   $@
       cmd_fwbin = FWNAME="$(patsubst firmware/%.gen.S,%,$@)";		     \
@@ -184,11 +184,11 @@ $(obj)/%: $(obj)/%.ihex | $(objtree)/$(obj)/$$(dir %)
 # is actually meaningful, because the firmware has to be loaded in a certain
 # order rather than as a single binary blob. Thus, we convert them into our
 # more compact binary representation of ihex records (<linux/ihex.h>)
-$(obj)/%.fw: $(obj)/%.HEX  | $(objtree)/$(obj)/$$(dir %)
+$(obj)/%.fw: $(obj)/%.HEX $(obj)/ihex2fw | $(objtree)/$(obj)/$$(dir %)
 	$(call cmd,ihex2fw)
 
 # .H16 is our own modified form of Intel HEX, with 16-bit length for records.
-$(obj)/%.fw: $(obj)/%.H16 | $(objtree)/$(obj)/$$(dir %)
+$(obj)/%.fw: $(obj)/%.H16 $(obj)/ihex2fw | $(objtree)/$(obj)/$$(dir %)
 	$(call cmd,h16tofw)
 
 $(firmware-dirs):
@@ -205,3 +205,5 @@ targets := $(fw-shipped-) $(patsubst $(obj)/%,%, \
 # Without this, built-in.o won't be created when it's empty, and the
 # final vmlinux link will fail.
 obj-n := dummy
+
+hostprogs-y := ihex2fw
diff --git a/scripts/ihex2fw.c b/firmware/ihex2fw.c
similarity index 100%
rename from scripts/ihex2fw.c
rename to firmware/ihex2fw.c
diff --git a/scripts/.gitignore b/scripts/.gitignore
index 09e2406f3b78eeb78be3fe99c712f3e19d08f0e2..b939fbd0119539f38b6c4f34e211223d9d8b4a45 100644
--- a/scripts/.gitignore
+++ b/scripts/.gitignore
@@ -1,7 +1,6 @@
 #
 # Generated files
 #
-ihex2fw
 conmakehash
 kallsyms
 pnmtologo
diff --git a/scripts/Makefile b/scripts/Makefile
index 035182e16afb732d40b05c5a55df4ac79e6d2a96..aafdf064feefdf49bc98d66c72199907e30ca921 100644
--- a/scripts/Makefile
+++ b/scripts/Makefile
@@ -2,12 +2,11 @@
 # scripts contains sources for various helper programs used throughout
 # the kernel for the build process.
 # ---------------------------------------------------------------------------
-# ihex2fw:       Parser/loader for IHEX formatted data
 # kallsyms:      Find all symbols in vmlinux
 # pnmttologo:    Convert pnm files to logo files
+# conmakehash:   Create chartable
 # conmakehash:	 Create arrays for initializing the kernel console tables
 
-hostprogs-y                      := ihex2fw
 hostprogs-$(CONFIG_KALLSYMS)     += kallsyms
 hostprogs-$(CONFIG_LOGO)         += pnmtologo
 hostprogs-$(CONFIG_VT)           += conmakehash