mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 18:21:39 +01:00
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>
27 lines
908 B
Bash
Executable File
27 lines
908 B
Bash
Executable File
#!/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 "};"
|
|
|