aboutsummaryrefslogtreecommitdiff
path: root/linaro_image_tools/media_create
diff options
context:
space:
mode:
authorFathi Boudra <fathi.boudra@linaro.org>2013-12-13 13:19:29 +0200
committerFathi Boudra <fathi.boudra@linaro.org>2013-12-14 00:44:19 +0200
commitb59e7a8198c011786d92cfb05e0c971a391db820 (patch)
tree627505ed8bb8fa7d50dde0a361580489cd65666a /linaro_image_tools/media_create
parentafe452a29514ae32503630095341172403256bd6 (diff)
downloadlinaro-image-tools-b59e7a8198c011786d92cfb05e0c971a391db820.tar.gz
Copy all QEMU ARM binaries (arm, armeb, arm64)
Change-Id: I3186b8005af801d74fe15e5fb0c8e6963f453fe8 Signed-off-by: Fathi Boudra <fathi.boudra@linaro.org>
Diffstat (limited to 'linaro_image_tools/media_create')
-rw-r--r--linaro_image_tools/media_create/chroot_utils.py9
-rw-r--r--linaro_image_tools/media_create/tests/test_media_create.py2
2 files changed, 9 insertions, 2 deletions
diff --git a/linaro_image_tools/media_create/chroot_utils.py b/linaro_image_tools/media_create/chroot_utils.py
index 780a1d4..cf8f3e1 100644
--- a/linaro_image_tools/media_create/chroot_utils.py
+++ b/linaro_image_tools/media_create/chroot_utils.py
@@ -44,8 +44,13 @@ def prepare_chroot(chroot_dir, tmp_dir):
temporarily_overwrite_file_on_dir('/etc/hosts', chroot_etc, tmp_dir)
if not is_arm_host():
- copy_file('/usr/bin/qemu-arm-static',
- os.path.join(chroot_dir, 'usr', 'bin'))
+ for root, dirs, files in os.walk('/usr/bin'):
+ for file in files:
+ # Copy all the QEMU ARM binaries
+ if file.startswith('qemu-arm'):
+ file_name = os.path.join(root, file)
+ copy_file(file_name,
+ os.path.join(chroot_dir, 'usr', 'bin'))
def install_hwpacks(
diff --git a/linaro_image_tools/media_create/tests/test_media_create.py b/linaro_image_tools/media_create/tests/test_media_create.py
index a83a993..9f546ff 100644
--- a/linaro_image_tools/media_create/tests/test_media_create.py
+++ b/linaro_image_tools/media_create/tests/test_media_create.py
@@ -4169,7 +4169,9 @@ class TestInstallHWPack(TestCaseWithFixtures):
'cp /etc/resolv.conf chroot/etc',
'cp /etc/hosts chroot/etc',
'cp /usr/bin/qemu-arm-static chroot/usr/bin',
+ 'cp /usr/bin/qemu-armeb-static chroot/usr/bin',
'rm -f chroot/usr/bin/qemu-arm-static',
+ 'rm -f chroot/usr/bin/qemu-armeb-static',
'rm -f chroot/etc/hosts',
'rm -f chroot/etc/resolv.conf']
expected = [