Mender client cross compile for ARM - openssl dependency

hello @oleorhagen ,

I was able to successfully cross compile . Here’s a sample script which does everything

git clone https://github.com/mendersoftware/mender.git
cd mender/
git clone https://github.com/raspberrypi/tools.git
export PATH="$PATH:$(pwd)/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin"
export CC=arm-linux-gnueabihf-gcc
export CROSS=arm-linux-gnueabihf
wget -q https://www.openssl.org/source/openssl-1.1.1k.tar.gz
tar -xzf openssl-1.1.1k.tar.gz
cd openssl-1.1.1k
./Configure linux-armv4 --prefix=$(pwd)/install
make
make install
export LIBSSL_INSTALL_PATH=$(pwd)/install
cd ../
make CGO_CFLAGS="-I${LIBSSL_INSTALL_PATH}/include" CGO_LDFLAGS="-L${LIBSSL_INSTALL_PATH}/lib" CGO_ENABLED=1 GOOS=linux GOARCH=arm TAGS="nodbus nolzma"

I’ve also raised a PR to get this into README Add libssl cross compilation steps to README by prashanthjbabu · Pull Request #752 · mendersoftware/mender · GitHub

1 Like