Patchwork [007/111] linux-user: define a script to set binfmt using debian flavored tools

login
register
mail settings
Submitter Bryce Lanham
Date Aug. 17, 2011, 8:46 p.m.
Message ID <1313614076-28878-8-git-send-email-blanham@gmail.com>
Download mbox | patch
Permalink /patch/110370/
State New
Headers show

Comments

Bryce Lanham - Aug. 17, 2011, 8:46 p.m.
From: Laurent Vivier <Laurent@Vivier.EU>

Signed-off-by: Laurent Vivier <Laurent@Vivier.EU>
---
 scripts/set_binfmt_m68k |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)
 create mode 100755 scripts/set_binfmt_m68k

Patch

diff --git a/scripts/set_binfmt_m68k b/scripts/set_binfmt_m68k
new file mode 100755
index 0000000..fb3d720
--- /dev/null
+++ b/scripts/set_binfmt_m68k
@@ -0,0 +1,8 @@ 
+#!/bin/bash
+
+name="m68k"
+magic="\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x04"
+mask="\xff\xff\xff\xff\xff\xff\xfe\xfe\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfb\xff\xff"
+
+update-binfmts --install $name /usr/bin/qemu-m68k \
+               --magic $magic --mask $mask