mirror of
https://github.com/hanwckf/immortalwrt-mt798x.git
synced 2025-01-10 11:09:57 +08:00
8cc2c1d901
Rename libwolfssl-cpu-crypto to libwolfsslcpu-crypto so that the regular libwolfssl version comes first when running: opkg install libwolfssl Normally, if the package name matches the opkg parameter, that package is preferred. However, for libraries, the ABI version string is appended to the package official name, and the short name won't match. Failing a name match, the candidate packages are sorted in alphabetical order, and a dash will come before any number. So in order to prefer the original library, the dash should be removed from the alternative library. Fixes: c3e7d86d2b (wolfssl: add libwolfssl-cpu-crypto package) Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com> (cherry picked from commit d08c9da43cf364712e947d5faa3ab84d995dd0ec)
26 lines
923 B
Bash
26 lines
923 B
Bash
#!/bin/sh
|
|
exec >&2
|
|
printf "[libwolfsslcpu-crypto] Checking for Arm v8-A Cryptographic Extension support: "
|
|
if [ -n "${IPKG_INSTROOT}" ]; then
|
|
printf "...[offline]... "
|
|
eval "$(grep '^DISTRIB_TARGET=' "${IPKG_INSTROOT}/etc/openwrt_release")"
|
|
### @@WOLFSSL_NOASM_REGEX@@ is expanded from WOLFSSL_NOASM_REGEX in the Makefile
|
|
echo "${DISTRIB_TARGET}" | grep '@@WOLFSSL_NOASM_REGEX@@' > /dev/null && {
|
|
echo "not supported"
|
|
echo "Error: Target ${DISTRIB_TARGET} does not support Arm Cryptographic Extension."
|
|
echo "Install the regular libwolfssl package instead of libwolfsslcpu-crypto."
|
|
exit 1
|
|
}
|
|
else
|
|
grep -q '^Features.*\baes\b' /proc/cpuinfo || {
|
|
echo "not supported"
|
|
echo "Error: Arm v8-A Cryptographic Extension not supported."
|
|
echo "Install the regular libwolfssl package instead of libwolfsslcpu-crypto."
|
|
echo "Contents of /proc/cpuinfo:"
|
|
cat /proc/cpuinfo
|
|
exit 1
|
|
}
|
|
fi
|
|
echo OK
|
|
exit 0
|