From 25797fe3cac257ba407e3395e6597ff35cd2dc48 Mon Sep 17 00:00:00 2001 From: Abbotware Date: Tue, 9 Jan 2018 20:15:26 -0500 Subject: [PATCH 1/2] add armhf on arm64 (aarch64) --- live-build/hooks/12-add-foreign-libc6.chroot | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/live-build/hooks/12-add-foreign-libc6.chroot b/live-build/hooks/12-add-foreign-libc6.chroot index 7fbb4bb..dccede8 100644 --- a/live-build/hooks/12-add-foreign-libc6.chroot +++ b/live-build/hooks/12-add-foreign-libc6.chroot @@ -19,3 +19,22 @@ if [ "$(dpkg --print-architecture)" = "amd64" ]; then echo "I: Removing /var/cache/apt/*.bin" rm -f /var/cache/apt/*.bin fi + +echo "I: Checking if we are arm64 and libc6:armhf should be installed" + +if [ "$(dpkg --print-architecture)" = "arm64" ]; then + echo "I: Enabling armhf multiarch support on arm64" + dpkg --add-architecture armhf + + apt-get -y update + + echo "I: Installing libc6:armhf in arm64 image" + apt-get -y install libc6:armhf + + echo "I: Removing /var/lib/apt/lists/*" + find /var/lib/apt/lists/ -print0 -type f | xargs -0 rm -f + + echo "I: Removing /var/cache/apt/*.bin" + rm -f /var/cache/apt/*.bin +fi + From bc161a73361e2f8edb1b93a7cc5136bfa5481c8a Mon Sep 17 00:00:00 2001 From: Abbotware Date: Thu, 11 Jan 2018 19:03:20 -0500 Subject: [PATCH 2/2] apply fix from master to similar code --- live-build/hooks/12-add-foreign-libc6.chroot | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/live-build/hooks/12-add-foreign-libc6.chroot b/live-build/hooks/12-add-foreign-libc6.chroot index 362e879..3c0aa2b 100644 --- a/live-build/hooks/12-add-foreign-libc6.chroot +++ b/live-build/hooks/12-add-foreign-libc6.chroot @@ -32,7 +32,7 @@ if [ "$(dpkg --print-architecture)" = "arm64" ]; then apt-get -y install libc6:armhf echo "I: Removing /var/lib/apt/lists/*" - find /var/lib/apt/lists/ -print0 -type f | xargs -0 rm -f + find /var/lib/apt/lists/ -type f -print0 | xargs -0 rm -f echo "I: Removing /var/cache/apt/*.bin" rm -f /var/cache/apt/*.bin