Add qemu-binfmt-arm

This commit is contained in:
Martchus 2018-10-18 20:18:54 +02:00
parent 1b83decb74
commit ca5b760b2d
1 changed files with 26 additions and 0 deletions

View File

@ -0,0 +1,26 @@
# Maintainer: Martchus <martchus@gmx.net>
# All my PKGBUILDs are managed at https://github.com/Martchus/PKGBUILDs where
# you also find the URL of a binary repository.
pkgname=qemu-binfmt-arm
pkgver=1
pkgrel=1
arch=('any')
pkgdesc='binfmt configuration to run ARM binaries transparently with qemu'
depends=('qemu-arch-extra')
license=('GPL')
url='https://github.com/Martchus/PKGBUILDs'
source=()
build() {
echo ':qemu-aarch64:M::\x7fELF\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\xb7\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-aarch64:OCF' > qemu-aarch64.conf
echo ':qemu-arm:M::\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x28\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-arm:OCF' > qemu-arm.conf
}
package() {
install -d "${pkgdir}"/usr/lib/binfmt.d
for config_file in "${srcdir}"/qemu-*.conf; do
install -m 644 "${config_file}" "${pkgdir}"/usr/lib/binfmt.d
done
}