From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Christoph Egger" Subject: [PATCH][TOOLS] firmware: fix romimage generation Date: Tue, 25 Sep 2007 13:55:40 +0200 Message-ID: <200709251355.40816.Christoph.Egger@amd.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="Boundary-00=_8cP+GeFOtl/ksYX" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org --Boundary-00=_8cP+GeFOtl/ksYX Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hi! Attached patch makes the following changes: =2D portability fix in Makefile: mkhex is not bash specific =2D GNU od separates column with one blank, BSD od uses eight blanks. Change sed to deal with this. =2D Add a fourth sed to fix the following build error on NetBSD: gcc -I../../../tools/libxc -I. -m32 -march=3Di686 -DNDEBUG -fno-strict-alia= sing -std=3Dgnu99 -Wall -Wstrict-prototyp es -Wno-unused-value -Wdeclaration-after-statement -D__XEN_TOOLS__ -D_LAR= GEFILE_SOURCE -D_LARGEFILE64_SOURCE - mno-tls-direct-seg-refs -fno-stack-protector -fno-builtin -O2 -msoft-floa= t -c=20 hvmloader.c mp_tables.c util.c s mbios.c 32bitbios_support.c In file included from 32bitbios_support.c:33: =2E./rombios/32bit/32bitbios_flat.h:818:13: error: invalid suffix "x" on in= teger=20 constant =2D Add a fifth sed to eliminate the offset column (=3D 1st column) printed= in the=20 last line. Example: od -v -t x ../rombios/BIOS-bochs-latest | less 0177740 00000000 00000000 00000000 00000000 0177760 00e05bea 2f3630f0 392f3332 12fc0039 0200000 <-- Eliminate this Signed-off-by: Christoph Egger P.S.: Is there a reason for having mkhex twice? =2D-=20 AMD Saxony, Dresden, Germany Operating System Research Center Legal Information: AMD Saxony Limited Liability Company & Co. KG Sitz (Gesch=E4ftsanschrift): Wilschdorfer Landstr. 101, 01109 Dresden, Deutschland Registergericht Dresden: HRA 4896 vertretungsberechtigter Komplement=E4r: AMD Saxony LLC (Sitz Wilmington, Delaware, USA) Gesch=E4ftsf=FChrer der AMD Saxony LLC: Dr. Hans-R. Deppe, Thomas McCoy --Boundary-00=_8cP+GeFOtl/ksYX Content-Type: text/plain; charset=us-ascii; name=tools_firmware.diff Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=tools_firmware.diff diff -r 974c00dec723 tools/firmware/hvmloader/mkhex --- a/tools/firmware/hvmloader/mkhex Tue Sep 25 10:21:07 2007 +0100 +++ b/tools/firmware/hvmloader/mkhex Tue Sep 25 13:40:47 2007 +0000 @@ -21,6 +21,6 @@ # echo "unsigned $1[] = {" -od -v -t x $2 | sed 's/^[0-9]* /0x/' | sed 's/ /, 0x/g' | sed 's/$/,/' +od -v -t x $2 | sed 's/^[0-9]* */0x/' | sed 's/ */, 0x/g' | sed 's/$/,/' | sed 's/0x,//' | sed 's/^[0-9]*,//' echo "};" diff -r 974c00dec723 tools/firmware/rombios/32bit/Makefile --- a/tools/firmware/rombios/32bit/Makefile Tue Sep 25 10:21:07 2007 +0100 +++ b/tools/firmware/rombios/32bit/Makefile Tue Sep 25 13:40:47 2007 +0000 @@ -39,4 +39,4 @@ clean: nm -u 32bitbios_all.o; \ exit 11; \ } || : - bash mkhex highbios_array 32bitbios_all.o > $@ + sh mkhex highbios_array 32bitbios_all.o > $@ diff -r 974c00dec723 tools/firmware/rombios/32bit/mkhex --- a/tools/firmware/rombios/32bit/mkhex Tue Sep 25 10:21:07 2007 +0100 +++ b/tools/firmware/rombios/32bit/mkhex Tue Sep 25 13:40:47 2007 +0000 @@ -21,6 +21,6 @@ # echo "unsigned $1[] = {" -od -v -t x $2 | sed 's/^[0-9]* /0x/' | sed 's/ /, 0x/g' | sed 's/$/,/' +od -v -t x $2 | sed 's/^[0-9]* */0x/' | sed 's/ */, 0x/g' | sed 's/$/,/' | sed 's/0x,//' | sed 's/^[0-9]*,//' echo "};" --Boundary-00=_8cP+GeFOtl/ksYX Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --Boundary-00=_8cP+GeFOtl/ksYX--