mkhex: Move it to tools/misc
authorKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Mon, 18 Sep 2017 21:25:54 +0000 (17:25 -0400)
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Thu, 5 Oct 2017 13:27:32 +0000 (09:27 -0400)
It makes more sense to put a tool to be used by other subsystems
to be in 'tools/misc' along 'mkrpm','mkdeb', etc.

The patch titled "xen/livepatch/x86/arm32: Force .livepatch.depends
section to be uint32_t aligned" uses mkhex.

Acked-by: Wei Liu <wei.liu2@citrix.com>
Suggested-by: Julien Grall <julien.grall@arm.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
tools/firmware/hvmloader/Makefile
tools/firmware/hvmloader/mkhex [deleted file]
tools/misc/mkhex [new file with mode: 0755]

index 7c4c0ce535a220aad4ad83f6236d1233d0675640..a5b4c32c1a2f0be19c0d82fd6c51d9fbab992078 100644 (file)
@@ -91,23 +91,23 @@ roms.inc: $(ROMS)
 
 ifneq ($(ROMBIOS_ROM),)
        echo "#ifdef ROM_INCLUDE_ROMBIOS" >> $@.new
-       sh ./mkhex rombios $(ROMBIOS_ROM) >> $@.new
+       sh ../../misc/mkhex rombios $(ROMBIOS_ROM) >> $@.new
        echo "#endif" >> $@.new
 endif
 
 ifneq ($(STDVGA_ROM),)
        echo "#ifdef ROM_INCLUDE_VGABIOS" >> $@.new
-       sh ./mkhex vgabios_stdvga $(STDVGA_ROM) >> $@.new
+       sh ../../misc/mkhex vgabios_stdvga $(STDVGA_ROM) >> $@.new
        echo "#endif" >> $@.new
 endif
 ifneq ($(CIRRUSVGA_ROM),)
        echo "#ifdef ROM_INCLUDE_VGABIOS" >> $@.new
-       sh ./mkhex vgabios_cirrusvga $(CIRRUSVGA_ROM) >> $@.new
+       sh ../../misc/mkhex vgabios_cirrusvga $(CIRRUSVGA_ROM) >> $@.new
        echo "#endif" >> $@.new
 endif
 ifneq ($(ETHERBOOT_ROMS),)
        echo "#ifdef ROM_INCLUDE_ETHERBOOT" >> $@.new
-       sh ./mkhex etherboot $(ETHERBOOT_ROMS) >> $@.new
+       sh ../../misc/mkhex etherboot $(ETHERBOOT_ROMS) >> $@.new
        echo "#endif" >> $@.new
 endif
 
diff --git a/tools/firmware/hvmloader/mkhex b/tools/firmware/hvmloader/mkhex
deleted file mode 100755 (executable)
index d0982d5..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-#!/bin/sh
-
-#
-# mkhex: Generate C embeddable hexdumps
-#
-# Leendert van Doorn, leendert@watson.ibm.com
-# Copyright (c) 2005, International Business Machines Corporation.
-#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms and conditions of the GNU General Public License,
-# version 2, as published by the Free Software Foundation.
-#
-# This program is distributed in the hope it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
-# more details.
-#
-# You should have received a copy of the GNU General Public License along with
-# this program; If not, see <http://www.gnu.org/licenses/>.
-#
-
-echo "unsigned $1[] = {"
-shift
-od -v -t x $@ | sed 's/^[0-9]*  */0x/' | sed 's/  */, 0x/g' | sed 's/$/,/' | sed 's/0x,//' | sed 's/^[0-9]*,//'
-echo "};"
-
diff --git a/tools/misc/mkhex b/tools/misc/mkhex
new file mode 100755 (executable)
index 0000000..d0982d5
--- /dev/null
@@ -0,0 +1,26 @@
+#!/bin/sh
+
+#
+# mkhex: Generate C embeddable hexdumps
+#
+# Leendert van Doorn, leendert@watson.ibm.com
+# Copyright (c) 2005, International Business Machines Corporation.
+#
+# This program is free software; you can redistribute it and/or modify it
+# under the terms and conditions of the GNU General Public License,
+# version 2, as published by the Free Software Foundation.
+#
+# This program is distributed in the hope it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+# more details.
+#
+# You should have received a copy of the GNU General Public License along with
+# this program; If not, see <http://www.gnu.org/licenses/>.
+#
+
+echo "unsigned $1[] = {"
+shift
+od -v -t x $@ | sed 's/^[0-9]*  */0x/' | sed 's/  */, 0x/g' | sed 's/$/,/' | sed 's/0x,//' | sed 's/^[0-9]*,//'
+echo "};"
+