Skip to content
Snippets Groups Projects
Commit 6b6ac60d authored by Daniel Müller's avatar Daniel Müller :speech_balloon:
Browse files

Remove the patchelf hack

The arm-elf-insight depends on libncurses5 while libncurses6 is installed by default.
Previously the dependecy was patched to use version 6 which is pretty bad.
Now libncurses5 is simply installed instead. Yes that package exists -_-
This also removes the need for the checksum.
parent 681e3835
No related branches found
No related tags found
No related merge requests found
...@@ -13,22 +13,10 @@ ...@@ -13,22 +13,10 @@
name: name:
- git - git
- make - make
- patchelf - libncurses5
install_recommends: false install_recommends: false
force_apt_get: true force_apt_get: true
- name: Get current mpstools hash
set_fact:
mpstools_curr_hash: "{{ lookup('file', '/opt/mpstools/checksum', errors='ignore') }}"
- name: Get new mpstools hash
stat:
path: "{{ role_path }}/files/mpstools.tgz"
checksum_algorithm: sha1
get_checksum: true
delegate_to: localhost
register: mpstools_new
- name: Install toolchain - name: Install toolchain
become: true become: true
unarchive: unarchive:
...@@ -36,30 +24,6 @@ ...@@ -36,30 +24,6 @@
group: root group: root
src: mpstools.tgz src: mpstools.tgz
dest: /opt dest: /opt
keep_newer: true
when: mpstools_curr_hash != mpstools_new.stat.checksum
# This has worked while testing but it is not a good way to solve the issue.
# It basically forces the executables to use the newer version of libncurses
- name: Patch arm debugger binaries to use libncurses.so.6
become: true
shell: "ldd {{ item }} | grep libncurses.so.5 && patchelf --replace-needed libncurses.so.5 libncurses.so.6 {{ item }}; exit 0"
with_items:
- /opt/mpstools/bin/arm-v4t-eabi-insight
- /opt/mpstools/bin/arm-v4t-eabi-gdbtui
- /opt/mpstools/bin/arm-v4t-eabi-gdb
- /opt/mpstools/bin/arm-elf-insight
- /opt/mpstools/bin/arm-elf-eabi-insight
when: mpstools_curr_hash != mpstools_new.stat.checksum and patch_libncurses5_to_6
- name: Set toolchain checksum
become: true
copy:
owner: root
group: root
dest: /opt/mpstools/checksum
content: "{{ mpstools_new.stat.checksum }}"
when: mpstools_curr_hash != mpstools_new.stat.checksum
- name: Add toolchain to PATH (for bash only) - name: Add toolchain to PATH (for bash only)
become: true become: true
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment