File tree Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -1796,6 +1796,14 @@ nvm_get_arch() {
1796
1796
aarch64) NVM_ARCH=" arm64" ;;
1797
1797
* ) NVM_ARCH=" ${HOST_ARCH} " ;;
1798
1798
esac
1799
+
1800
+ # If running a 64bit ARM kernel but a 32bit ARM userland, change ARCH to 32bit ARM (armv7l)
1801
+ L=$( ls -dl /sbin/init) # if /sbin/init is 32bit executable
1802
+ if [ " $( uname) " = " Linux" ] && [ " ${NVM_ARCH} " = arm64 ] && [ " $( od -An -t x1 -j 4 -N 1 " ${L#* -> } " ) " = ' 01' ]; then
1803
+ NVM_ARCH=armv7l
1804
+ HOST_ARCH=armv7l
1805
+ fi
1806
+
1799
1807
nvm_echo " ${NVM_ARCH} "
1800
1808
}
1801
1809
Original file line number Diff line number Diff line change @@ -79,4 +79,6 @@ run_test amd64 smartos x64 no_pkg_info
79
79
run_test x86 osx x86
80
80
run_test amd64 osx x64
81
81
82
+ run_test arm64 smartos x64
83
+
82
84
cleanup
You can’t perform that action at this time.
0 commit comments