The meta-toolchain of NXP(Freescale) i.MX6ULL BSP Package for Yocto can not build the openssl library, because of failing on running 'Configure'.
So, the below script is needed.
(sysroot-path must be adjusted to your directory structure.)
#!/bin/bash
export SDKTARGETSYSROOT=/opt/toolchains/fsl-imx-fb-4.1.15-2.0.1/sysroots/cortexa7hf-neon-poky-linux-gnueabi
export PKG_CONFIG_SYSROOT_DIR=$SDKTARGETSYSROOT
export PKG_CONFIG_PATH=$SDKTARGETSYSROOT/usr/lib/pkgconfig
export CONFIG_SITE=/opt/toolchains/fsl-imx-fb-4.1.15-2.0.1/site-config-cortexa7hf-neon-poky-linux-gnueabi
export OECORE_NATIVE_SYSROOT="/opt/toolchains/fsl-imx-fb-4.1.15-2.0.1/sysroots/x86_64-pokysdk-linux"
export OECORE_TARGET_SYSROOT="$SDKTARGETSYSROOT"
export OECORE_ACLOCAL_OPTS="-I /opt/toolchains/fsl-imx-fb-4.1.15-2.0.1/sysroots/x86_64-pokysdk-linux/usr/share/aclocal"
unset command_not_found_handle
export CC="arm-poky-linux-gnueabi-gcc -march=armv7ve -mfpu=neon -mfloat-abi=hard -mcpu=cortex-a7 --sysroot=$SDKTARGETSYSROOT"
export CXX="arm-poky-linux-gnueabi-g++ -march=armv7ve -mfpu=neon -mfloat-abi=hard -mcpu=cortex-a7 --sysroot=$SDKTARGETSYSROOT"
export CPP="arm-poky-linux-gnueabi-gcc -E -march=armv7ve -mfpu=neon -mfloat-abi=hard -mcpu=cortex-a7 --sysroot=$SDKTARGETSYSROOT"
export AS="arm-poky-linux-gnueabi-as "
export LD="arm-poky-linux-gnueabi-ld --sysroot=$SDKTARGETSYSROOT"
export GDB=arm-poky-linux-gnueabi-gdb
export STRIP=arm-poky-linux-gnueabi-strip
export RANLIB=arm-poky-linux-gnueabi-ranlib
export OBJCOPY=arm-poky-linux-gnueabi-objcopy
export OBJDUMP=arm-poky-linux-gnueabi-objdump
export AR=arm-poky-linux-gnueabi-ar
export NM=arm-poky-linux-gnueabi-nm
export M4=m4
#export TARGET_PREFIX=arm-poky-linux-gnueabi-
export CONFIGURE_FLAGS="--target=arm-poky-linux-gnueabi --host=arm-poky-linux-gnueabi --build=x86_64-linux --with-libtool-sysroot=$SDKTARGETSYSROOT"
export CFLAGS=" -O2 -pipe -g -feliminate-unused-debug-types -fdebug-prefix-map=/home/cmjo/gitLocal/fsl-release-bsp/imx6ull14x14evk-fb/tmp/work/x86_64-nativesdk-pokysdk-linux/meta-environment-imx6ull14x14evk/1.0-r8=/usr/src/debug/meta-environment-imx6ull14x14evk/1.0-r8 -fdebug-prefix-map=/home/cmjo/gitLocal/fsl-release-bsp/imx6ull14x14evk-fb/tmp/sysroots/x86_64-linux= -fdebug-prefix-map=/home/cmjo/gitLocal/fsl-release-bsp/imx6ull14x14evk-fb/tmp/sysroots/x86_64-nativesdk-pokysdk-linux= "
export CXXFLAGS=" -O2 -pipe -g -feliminate-unused-debug-types -fdebug-prefix-map=/home/cmjo/gitLocal/fsl-release-bsp/imx6ull14x14evk-fb/tmp/work/x86_64-nativesdk-pokysdk-linux/meta-environment-imx6ull14x14evk/1.0-r8=/usr/src/debug/meta-environment-imx6ull14x14evk/1.0-r8 -fdebug-prefix-map=/home/cmjo/gitLocal/fsl-release-bsp/imx6ull14x14evk-fb/tmp/sysroots/x86_64-linux= -fdebug-prefix-map=/home/cmjo/gitLocal/fsl-release-bsp/imx6ull14x14evk-fb/tmp/sysroots/x86_64-nativesdk-pokysdk-linux= "
export LDFLAGS="-Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed"
export CPPFLAGS=""
export KCFLAGS="--sysroot=$SDKTARGETSYSROOT"
export OECORE_DISTRO_VERSION="4.1.15-2.0.1"
export OECORE_SDK_VERSION="4.1.15-2.0.1"
export ARCH=arm
#export CROSS_COMPILE=arm-poky-linux-gnueabi-
./Configure linux-armv4 --prefix=/home/cmjo/build-pack-openssl zlib-dynamic shared
According to the manual, 'environment-setup-cortexa7hf-neon-poky-linux-gnueabi' must be loaded with 'source' or '.'.
But, after loading that script, the [perl] is not running properly for lack of dependent modules.
Above script must be executed directly on host shell.
(DO NOT load the Build-ENV script)
Then, you can compile the openssl successfully.
No comments:
Post a Comment