From patchwork Wed Dec 16 22:03:42 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Kozub X-Patchwork-Id: 41368 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id AA50CB6F09 for ; Fri, 18 Dec 2009 12:49:11 +1100 (EST) Received: from localhost ([127.0.0.1]:53637 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NLRxr-00075s-Ot for incoming@patchwork.ozlabs.org; Thu, 17 Dec 2009 20:49:07 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NL1yW-0006NP-RP for qemu-devel@nongnu.org; Wed, 16 Dec 2009 17:04:04 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NL1yS-0006Km-1D for qemu-devel@nongnu.org; Wed, 16 Dec 2009 17:04:04 -0500 Received: from [199.232.76.173] (port=53468 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NL1yR-0006KQ-Ro for qemu-devel@nongnu.org; Wed, 16 Dec 2009 17:03:59 -0500 Received: from mailgw1.fjfi.cvut.cz ([147.32.9.3]:54471) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NL1yQ-0006cG-NE for qemu-devel@nongnu.org; Wed, 16 Dec 2009 17:03:59 -0500 Received: from localhost (localhost.localdomain [127.0.0.1]) by mailgw1.fjfi.cvut.cz (Postfix) with ESMTP id 9CFE743C21 for ; Wed, 16 Dec 2009 23:03:52 +0100 (CET) X-DKIM: Sendmail DKIM Filter v2.8.2 mailgw1.fjfi.cvut.cz 9CFE743C21 DKIM-Signature: v=1; a=rsa-sha1; c=simple/simple; d=fjfi.cvut.cz; s=beta512; t=1261001032; i=@fjfi.cvut.cz; bh=LshEro0Dlp6bUD4CYlRYLrBgrzk=; h=Date:From:To:Subject:Message-ID:MIME-Version:Content-Type; b=HHVJj02PFuSJFz12Aadb58Gi4uXzNmIzomQ7vdbtqLVm9/0tP+KOGM0G7gxRTnKuz aYMAQm5riJ28Z77NM3Rdg== X-CTU-FNSPE-Virus-Scanned: amavisd-new at fjfi.cvut.cz X-CTU-FNSPE: this_is_mailgw_for_ctu_fnspe_header X-CTU-FNSPE-Helo: linux.fjfi.cvut.cz X-CTU-FNSPE-Client-Address: 147.32.5.111 X-CTU-FNSPE-Client-Name: linux.fjfi.cvut.cz X-CTU-FNSPE-Sender: zub@linux.fjfi.cvut.cz X-CTU-FNSPE-Recip: qemu-devel@nongnu.org Received: from mailgw1.fjfi.cvut.cz ([127.0.0.1]) by localhost (mailgw1.fjfi.cvut.cz [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id RVbQkdmMv2Df for ; Wed, 16 Dec 2009 23:03:44 +0100 (CET) Received: from linux.fjfi.cvut.cz (linux.fjfi.cvut.cz [147.32.5.111]) by mailgw1.fjfi.cvut.cz (Postfix) with ESMTP id D4E2643C14 for ; Wed, 16 Dec 2009 23:03:42 +0100 (CET) X-DKIM: Sendmail DKIM Filter v2.8.2 mailgw1.fjfi.cvut.cz D4E2643C14 X-DomainKeys: Sendmail DomainKeys Filter v1.0.2 mailgw1.fjfi.cvut.cz D4E2643C14 Received: by linux.fjfi.cvut.cz (Postfix, from userid 1001) id A6E4946774; Wed, 16 Dec 2009 23:03:42 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by linux.fjfi.cvut.cz (Postfix) with ESMTP id 9FB2446773 for ; Wed, 16 Dec 2009 23:03:42 +0100 (CET) Date: Wed, 16 Dec 2009 23:03:42 +0100 (CET) From: David Kozub To: qemu-devel@nongnu.org Message-ID: User-Agent: Alpine 2.00 (LRH 1167 2008-08-23) MIME-Version: 1.0 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Mailman-Approved-At: Thu, 17 Dec 2009 20:30:12 -0500 Subject: [Qemu-devel] [PATCH] Add SH4 ELF magic into qemu-binfmt-conf.sh. X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Signed-off-by: David Kozub --- qemu-binfmt-conf.sh | 9 ++++++++- 1 files changed, 8 insertions(+), 1 deletions(-) diff --git a/qemu-binfmt-conf.sh b/qemu-binfmt-conf.sh index ba916ac..9c65c9a 100644 --- a/qemu-binfmt-conf.sh +++ b/qemu-binfmt-conf.sh @@ -1,5 +1,5 @@ #!/bin/sh -# enable automatic i386/ARM/M68K/MIPS/SPARC/PPC program execution by the kernel +# enable automatic i386/ARM/M68K/MIPS/SPARC/PPC/SH4 program execution by the kernel # load the binfmt_misc module if [ ! -d /proc/sys/fs/binfmt_misc ]; then @@ -27,6 +27,9 @@ case "$cpu" in armv4l) cpu="arm" ;; + sh4) + cpu="sh4" + ;; esac # register the interpreter for each cpu except for the native one @@ -60,3 +63,7 @@ if [ $cpu != "mips" ] ; then echo ':mips64:M::\x7fELF\x02\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x08:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/local/bin/qemu-mips64:' > /proc/sys/fs/binfmt_misc/register echo ':mips64el:M::\x7fELF\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x08\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/local/bin/qemu-mips64el:' > /proc/sys/fs/binfmt_misc/register fi +if [ $cpu != "sh4" ] ; then + echo ':sh4:M::\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x2a\x00:\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/local/bin/qemu-sh4:' > /proc/sys/fs/binfmt_misc/register + echo ':sh4eb:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x2a:\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/local/bin/qemu-sh4eb:' > /proc/sys/fs/binfmt_misc/register +fi