Cross compile openssh use imx6ul toolchain

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Cross compile openssh use imx6ul toolchain

2,971 Views
gaoyuan
Contributor II


I've built standalone toolchian for imx6ul, and install it.

When I  compiled openssh using the toolchain and running it on target board, then I got “Segmentation fault” error.

I think it caused by CFLAGS or LDFLAGS but I don't know how to modify it.

So should someone help me, thank you!

followed is my cross-compile flowchart:

$ git branch

* V_7_2

  master

$ autoconf

$ autoheader

$ export CFLAGS="$CFLAGS -I/data/lib/openssl-1.0.2f/include/ -fPIC"

$  export LDFLAGS="-L/data/lib/openssl-1.0.2f/"

$ ./configure --with-ssl-dir=/data/modules/c0402.git/lib/openssl-1.0.2f --with-zlib=../zlib.git/ --host=arm-poky-linux-gnueabi

OpenSSH has been configured with the following options:

                     User binaries: /usr/local/bin

                   System binaries: /usr/local/sbin

               Configuration files: /usr/local/etc

                   Askpass program: /usr/local/libexec/ssh-askpass

                      Manual pages: /usr/local/share/man/manX

                          PID file: /var/run

  Privilege separation chroot path: /var/empty

            sshd default user PATH: /usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin

                    Manpage format: doc

                       PAM support: no

                   OSF SIA support: no

                 KerberosV support: no

                   SELinux support: no

                 Smartcard support:

                     S/KEY support: no

              MD5 password support: no

                   libedit support: no

  Solaris process contract support: no

           Solaris project support: no

         Solaris privilege support: no

       IP address in $DISPLAY hack: no

           Translate v4 in v6 hack: yes

                  BSD Auth support: no

              Random number source: OpenSSL internal ONLY

             Privsep sandbox style: seccomp_filter

              Host: arm-poky-linux-gnueabi

          Compiler: arm-poky-linux-gnueabi-gcc  -march=armv7-a -mfloat-abi=hard -mfpu=neon -mtune=cortex-a7 --sysroot=/data/toolchain/imx-a7/sysroots/cortexa7hf-vfp-neon-poky-linux-gnueabi

    Compiler flags:  -O2 -pipe -g -feliminate-unused-debug-types -I/data/lib/openssl-1.0.2f/include/ -Wall -Wpointer-arith -Wuninitialized -Wsign-compare -Wformat-security -Wsizeof-pointer-memaccess -Wno-pointer-sign -Wno-unused-result -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -ftrapv -fno-builtin-memset -fstack-protector-strong -fPIE

Preprocessor flags: -I../zlib.git/

      Linker flags: -L../zlib.git/ -L/data/lib/openssl-1.0.2f/ -Wl,-z,relro -Wl,-z,now -Wl,-z,noexecstack -fstack-protector-strong -pie

         Libraries: -lcrypto -ldl -lutil -lz  -lcrypt -lresolv

and modify LDFLAGS in Makefile to:

"LDFLAGS=-L. -Lopenbsd-compat/ -L../zlib.git/ -L/data/lib/openssl-1.0.2f/ -shared"

$ make

Labels (1)
Tags (2)
0 Kudos
Reply
1 Reply

1,421 Views
igorpadykov
NXP Employee
NXP Employee

Hi gaoyuan

regarding “segmentation fault” error please check

that caam driver and Linux Crypto API are enabled in build.

Please follow

iMX6 (CAAM, TrustZone) Hardware Security Blocks Use.

I.MX6 Cryptographic Acceleration

Best regards

igor

-----------------------------------------------------------------------------------------------------------------------

Note: If this post answers your question, please click the Correct Answer button. Thank you!

-----------------------------------------------------------------------------------------------------------------------

0 Kudos
Reply