compile openssl for Arm A9 & VxWorks

Neil Horman nhorman at openssl.org
Wed Jul 24 13:55:08 UTC 2024


If you're trying to build on windows, you don't want to inherit from
BASE_unix, you want to inherit from BASE_Windows

On Tue, Jul 23, 2024 at 8:40 PM Damodhar Boddukuri <
damodhar.boddukuri at non.se.com> wrote:

>
>
> Hi,
>
>
>
> Thank you for the support.
>
>
>
> I am trying to compile “openSSL cross compilation for target
> "vxworks-armv7a" in Windows platform”:
>
>
>
> The target compiler is *ccarm.exe*
>
>
>
> *Approach-1:*
>
> In Linux platform, Added the following target details in * 10-main.conf *file
> and ran the *./config <appropriate options>. *It generated* the
> configdata.pm <http://configdata.pm>, configdata.pm <http://configdata.pm>,
> Makefile.in, Makefile, include/openssl/configuration.h *files for the
> target "vxworks-armv7a". When I run the make, it generating the required
> files with perl script, But its unable to invoke the compiler *ccarm.exe *because
> it’s a .exe file.
>
>
>
> When I move entire source-code to windows platform try to run the make,
> its giving errors in the perl script.
>
>
>
>
>
>     "vxworks-armv7a" => {
>
>         inherit_from     => [ "BASE_unix" ],
>
>                              CC               => "ccarm",
>
>         CFLAGS           => '-g -fno-builtin -t7 -mfpu=vfp
> -mfloat-abi=softfp -ansi -fno-zero-initialized-in-bss -Wall
> -I$(TGT_DIR)/config/all -I$(TGT_DIR)/h
> -I$(WIND_HOME)/components/windml-5.3/h
> -I$(WIND_HOME)/components/webservices-1.8/h
> -I$(WIND_HOME)/components/webcli-4.9/target/h
> -I$(WIND_HOME)/components/tcf_agent-1.4/agent
> -I$(WIND_HOME)/components/stacktrace-1.0/include
> -I$(WIND_HOME)/components/opc-3.2/h -I$(WIND_HOME)/components/dcom-2.3/h
> -I$(WIND_HOME)/components/cafe-0.1/hpc/include
> -I$(WIND_HOME)/components/cafe-0.1/cafe/include
> -I$(WIND_HOME)/components/ip_net2-6.9/ipcom/config
> -I$(WIND_HOME)/components/cafe-0.1/vxworks/include
> -I$(WIND_HOME)/components/windml-5.3/osconfig/vxworks/src
> -I$(WIND_HOME)/components/tcf_agent-1.4/osconfig/vxworks/src
> -I$(WIND_HOME)/components/stacktrace-1.0/osconfig/vxworks/src
> -I$(WIND_HOME)/components/ip_net2-6.9/osconfig/vxworks/src
> -I$(WIND_HOME)/components/cafe-0.1/osconfig/vxworks/src
> -I$(WIND_HOME)/components/windml-5.3/osconfig/vxworks/h
> -I$(WIND_HOME)/components/tcf_agent-1.4/osconfig/vxworks/h
> -I$(WIND_HOME)/components/stacktrace-1.0/osconfig/vxworks/h
> -I$(WIND_HOME)/components/ip_net2-6.9/osconfig/vxworks/h
> -I$(WIND_HOME)/components/cafe-0.1/osconfig/vxworks/h -I$(TGT_DIR)/src/hwif
> -I$(TGT_DIR)/src/hwif/h -I $(TGT_DIR)/3rdparty/pbcl/h -I.
> -I$(TGT_DIR)/h/wrn/coreip -I$(TGT_DIR)/src/config
> -I$(TGT_DIR)/config/comps/src -I$(TGT_DIR)/config/comps/src/dosfs2
> -I$(TGT_DIR)/src/drv -I$(TGT_DIR)/src/hwif/h -DCPU=_VX_ARMARCH7
> -DTOOL_FAMILY=gnu -DTOOL=gnu -D_WRS_KERNEL -DARMEL -DCPU_CORTEXA8
> -DARMMMU=ARMMMU_CORTEXA8 -DARMCACHE=ARMCACHE_CORTEXA8 -DIP_PORT_VXWORKS=69
> -DINET -D_WRS_VX_SMP -D_VSB_CONFIG_FILE=\"$(VSB_CONFIG_FILE)\"
> -I$(VSB_INCLUDE_DIR)',
>
>         cflags           => '-g -fno-builtin -t7 -mfpu=vfp
> -mfloat-abi=softfp -ansi -fno-zero-initialized-in-bss -Wall
> -I$(TGT_DIR)/config/all -I$(TGT_DIR)/h
> -I$(WIND_HOME)/components/windml-5.3/h
> -I$(WIND_HOME)/components/webservices-1.8/h
> -I$(WIND_HOME)/components/webcli-4.9/target/h
> -I$(WIND_HOME)/components/tcf_agent-1.4/agent
> -I$(WIND_HOME)/components/stacktrace-1.0/include
> -I$(WIND_HOME)/components/opc-3.2/h -I$(WIND_HOME)/components/dcom-2.3/h
> -I$(WIND_HOME)/components/cafe-0.1/hpc/include
> -I$(WIND_HOME)/components/cafe-0.1/cafe/include
> -I$(WIND_HOME)/components/ip_net2-6.9/ipcom/config
> -I$(WIND_HOME)/components/cafe-0.1/vxworks/include
> -I$(WIND_HOME)/components/windml-5.3/osconfig/vxworks/src
> -I$(WIND_HOME)/components/tcf_agent-1.4/osconfig/vxworks/src
> -I$(WIND_HOME)/components/stacktrace-1.0/osconfig/vxworks/src
> -I$(WIND_HOME)/components/ip_net2-6.9/osconfig/vxworks/src
> -I$(WIND_HOME)/components/cafe-0.1/osconfig/vxworks/src
> -I$(WIND_HOME)/components/windml-5.3/osconfig/vxworks/h
> -I$(WIND_HOME)/components/tcf_agent-1.4/osconfig/vxworks/h
> -I$(WIND_HOME)/components/stacktrace-1.0/osconfig/vxworks/h
> -I$(WIND_HOME)/components/ip_net2-6.9/osconfig/vxworks/h
> -I$(WIND_HOME)/components/cafe-0.1/osconfig/vxworks/h -I$(TGT_DIR)/src/hwif
> -I$(TGT_DIR)/src/hwif/h -I $(TGT_DIR)/3rdparty/pbcl/h -I.
> -I$(TGT_DIR)/h/wrn/coreip -I$(TGT_DIR)/src/config
> -I$(TGT_DIR)/config/comps/src -I$(TGT_DIR)/config/comps/src/dosfs2
> -I$(TGT_DIR)/src/drv -I$(TGT_DIR)/src/hwif/h -DCPU=_VX_ARMARCH7
> -DTOOL_FAMILY=gnu -DTOOL=gnu -D_WRS_KERNEL -DARMEL -DCPU_CORTEXA8
> -DARMMMU=ARMMMU_CORTEXA8 -DARMCACHE=ARMCACHE_CORTEXA8 -DIP_PORT_VXWORKS=69
> -DINET -D_WRS_VX_SMP -D_VSB_CONFIG_FILE=\"$(VSB_CONFIG_FILE)\"
> -I$(VSB_INCLUDE_DIR)',
>
>         cppflags         => combine('-g -fno-builtin -t7 -mfpu=vfp
> -mfloat-abi=softfp -ansi -fno-zero-initialized-in-bss -Wall
> -I$(TGT_DIR)/config/all -I$(TGT_DIR)/h
> -I$(WIND_HOME)/components/windml-5.3/h
> -I$(WIND_HOME)/components/webservices-1.8/h
> -I$(WIND_HOME)/components/webcli-4.9/target/h
> -I$(WIND_HOME)/components/tcf_agent-1.4/agent
> -I$(WIND_HOME)/components/stacktrace-1.0/include
> -I$(WIND_HOME)/components/opc-3.2/h -I$(WIND_HOME)/components/dcom-2.3/h
> -I$(WIND_HOME)/components/cafe-0.1/hpc/include
> -I$(WIND_HOME)/components/cafe-0.1/cafe/include
> -I$(WIND_HOME)/components/ip_net2-6.9/ipcom/config
> -I$(WIND_HOME)/components/cafe-0.1/vxworks/include
> -I$(WIND_HOME)/components/windml-5.3/osconfig/vxworks/src
> -I$(WIND_HOME)/components/tcf_agent-1.4/osconfig/vxworks/src
> -I$(WIND_HOME)/components/stacktrace-1.0/osconfig/vxworks/src
> -I$(WIND_HOME)/components/ip_net2-6.9/osconfig/vxworks/src
> -I$(WIND_HOME)/components/cafe-0.1/osconfig/vxworks/src
> -I$(WIND_HOME)/components/windml-5.3/osconfig/vxworks/h
> -I$(WIND_HOME)/components/tcf_agent-1.4/osconfig/vxworks/h
> -I$(WIND_HOME)/components/stacktrace-1.0/osconfig/vxworks/h
> -I$(WIND_HOME)/components/ip_net2-6.9/osconfig/vxworks/h
> -I$(WIND_HOME)/components/cafe-0.1/osconfig/vxworks/h -I$(TGT_DIR)/src/hwif
> -I$(TGT_DIR)/src/hwif/h -I $(TGT_DIR)/3rdparty/pbcl/h -I.
> -I$(TGT_DIR)/h/wrn/coreip -I$(TGT_DIR)/src/config
> -I$(TGT_DIR)/config/comps/src -I$(TGT_DIR)/config/comps/src/dosfs2
> -I$(TGT_DIR)/src/drv -I$(TGT_DIR)/src/hwif/h -DCPU=_VX_ARMARCH7
> -DTOOL_FAMILY=gnu -DTOOL=gnu -D_WRS_KERNEL -DARMEL -DCPU_CORTEXA8
> -DARMMMU=ARMMMU_CORTEXA8 -DARMCACHE=ARMCACHE_CORTEXA8 -DIP_PORT_VXWORKS=69
> -DINET -D_WRS_VX_SMP -D_VSB_CONFIG_FILE=\"$(VSB_CONFIG_FILE)\"
> -I$(VSB_INCLUDE_DIR)'),
>
>         sys_id           => "VXWORKS",
>
>         lflags           => add('-L$(VSB_DIR)/arm/ARMARCH7/gnu_standard
> -L$(VSB_DIR)/arm/ARMARCH7/gnu -L$(VSB_DIR)/arm/ARMARCH7/common
> -L$(VSB_DIR)/arm/ARMARCH7/gnu -L$(VSB_DIR)/arm/ARMARCH7/common
> -L$(WS_ROOT_DIR)/obj/vxworks-6.9/krnl/lib_smp/arm/ARMARCH7/gnu
> -L$(WS_ROOT_DIR)/obj/vxworks-6.9/krnl/lib_smp/arm/ARMARCH7/common
> -L$(WIND_HOME)/components/obj/vxworks-6.9/krnl/lib_smp/arm/ARMARCH7/gnu
> -L$(WIND_HOME)/components/obj/vxworks-6.9/krnl/lib_smp/arm/ARMARCH7/common'),
>
>         ex_libs          => add("-Wl,--defsym,__wrs_rtp_base=0xe0000000"),
>
>     },
>
>
>
>
>
>
>
> *Approach-2:*
>
> In windows platform, Added the following target details in * 10-main.conf
> *file and ran the *./config <appropriate options>. *It generated* the
> configdata.pm <http://configdata.pm>, configdata.pm <http://configdata.pm>,
> Makefile.in, Makefile, include/openssl/configuration.h *files for the
> target "vxworks-armv7a". When I run the make, it generating the required
> files with perl script, Its invoking  the compiler *ccarm.exe.*
>
>
>
> But its adding unwanted CFLAGS like *"ccarm"  /Zi /Fdossl_static.pdb /MT
> /Zl*. Also observed that it’s trying to create .lib libraries, But wanted
> .a libraries.
>
>
>
>               "vxworks-armv7a" => {
>
>     inherit_from     => [ "VC-WIN64-common" ],
>
>               CC               => "ccarm",
>
>     CFLAGS           => '-g -fno-builtin -t7 -mfpu=vfp -mfloat-abi=softfp
> -ansi -fno-zero-initialized-in-bss -Wall -I$(TGT_DIR)\config\all
> -I$(TGT_DIR)\h -I$(WIND_HOME)\components\windml-5.3\h
> -I$(WIND_HOME)\components\webservices-1.8\h
> -I$(WIND_HOME)\components\webcli-4.9\target\h
> -I$(WIND_HOME)\components\tcf_agent-1.4\agent
> -I$(WIND_HOME)\components\stacktrace-1.0\include
> -I$(WIND_HOME)\components\opc-3.2\h -I$(WIND_HOME)\components\dcom-2.3\h
> -I$(WIND_HOME)\components\cafe-0.1\hpc\include
> -I$(WIND_HOME)\components\cafe-0.1\cafe\include
> -I$(WIND_HOME)\components\ip_net2-6.9\ipcom\config
> -I$(WIND_HOME)\components\cafe-0.1\vxworks\include
> -I$(WIND_HOME)\components\windml-5.3\osconfig\vxworks\src
> -I$(WIND_HOME)\components\tcf_agent-1.4\osconfig\vxworks\src
> -I$(WIND_HOME)\components\stacktrace-1.0\osconfig\vxworks\src
> -I$(WIND_HOME)\components\ip_net2-6.9\osconfig\vxworks\src
> -I$(WIND_HOME)\components\cafe-0.1\osconfig\vxworks\src
> -I$(WIND_HOME)\components\windml-5.3\osconfig\vxworks\h
> -I$(WIND_HOME)\components\tcf_agent-1.4\osconfig\vxworks\h
> -I$(WIND_HOME)\components\stacktrace-1.0\osconfig\vxworks\h
> -I$(WIND_HOME)\components\ip_net2-6.9\osconfig\vxworks\h
> -I$(WIND_HOME)\components\cafe-0.1\osconfig\vxworks\h -I$(TGT_DIR)\src\hwif
> -I$(TGT_DIR)\src\hwif\h -I $(TGT_DIR)\3rdparty\pbcl\h -I.
> -I$(TGT_DIR)\h\wrn\coreip -I$(TGT_DIR)\src\config
> -I$(TGT_DIR)\config\comps\src -I$(TGT_DIR)\config\comps\src\dosfs2
> -I$(TGT_DIR)\src\drv -I$(TGT_DIR)\src\hwif\h -DCPU=_VX_ARMARCH7
> -DTOOL_FAMILY=gnu -DTOOL=gnu -D_WRS_KERNEL -DARMEL -DCPU_CORTEXA8
> -DARMMMU=ARMMMU_CORTEXA8 -DARMCACHE=ARMCACHE_CORTEXA8 -DIP_PORT_VXWORKS=69
> -DINET -D_WRS_VX_SMP -D_VSB_CONFIG_FILE=\"$(VSB_CONFIG_FILE)\"
> -I$(VSB_INCLUDE_DIR)',
>
>     cflags           => '-g -fno-builtin -t7 -mfpu=vfp -mfloat-abi=softfp
> -ansi -fno-zero-initialized-in-bss -Wall -I$(TGT_DIR)\config\all
> -I$(TGT_DIR)\h -I$(WIND_HOME)\components\windml-5.3\h
> -I$(WIND_HOME)\components\webservices-1.8\h
> -I$(WIND_HOME)\components\webcli-4.9\target\h
> -I$(WIND_HOME)\components\tcf_agent-1.4\agent
> -I$(WIND_HOME)\components\stacktrace-1.0\include
> -I$(WIND_HOME)\components\opc-3.2\h -I$(WIND_HOME)\components\dcom-2.3\h
> -I$(WIND_HOME)\components\cafe-0.1\hpc\include
> -I$(WIND_HOME)\components\cafe-0.1\cafe\include
> -I$(WIND_HOME)\components\ip_net2-6.9\ipcom\config
> -I$(WIND_HOME)\components\cafe-0.1\vxworks\include
> -I$(WIND_HOME)\components\windml-5.3\osconfig\vxworks\src
> -I$(WIND_HOME)\components\tcf_agent-1.4\osconfig\vxworks\src
> -I$(WIND_HOME)\components\stacktrace-1.0\osconfig\vxworks\src
> -I$(WIND_HOME)\components\ip_net2-6.9\osconfig\vxworks\src
> -I$(WIND_HOME)\components\cafe-0.1\osconfig\vxworks\src
> -I$(WIND_HOME)\components\windml-5.3\osconfig\vxworks\h
> -I$(WIND_HOME)\components\tcf_agent-1.4\osconfig\vxworks\h
> -I$(WIND_HOME)\components\stacktrace-1.0\osconfig\vxworks\h
> -I$(WIND_HOME)\components\ip_net2-6.9\osconfig\vxworks\h
> -I$(WIND_HOME)\components\cafe-0.1\osconfig\vxworks\h -I$(TGT_DIR)\src\hwif
> -I$(TGT_DIR)\src\hwif\h -I $(TGT_DIR)\3rdparty\pbcl\h -I.
> -I$(TGT_DIR)\h\wrn\coreip -I$(TGT_DIR)\src\config
> -I$(TGT_DIR)\config\comps\src -I$(TGT_DIR)\config\comps\src\dosfs2
> -I$(TGT_DIR)\src\drv -I$(TGT_DIR)\src\hwif\h -DCPU=_VX_ARMARCH7
> -DTOOL_FAMILY=gnu -DTOOL=gnu -D_WRS_KERNEL -DARMEL -DCPU_CORTEXA8
> -DARMMMU=ARMMMU_CORTEXA8 -DARMCACHE=ARMCACHE_CORTEXA8 -DIP_PORT_VXWORKS=69
> -DINET -D_WRS_VX_SMP -D_VSB_CONFIG_FILE=\"$(VSB_CONFIG_FILE)\"
> -I$(VSB_INCLUDE_DIR)',
>
>     cppflags         => combine('-g -fno-builtin -t7 -mfpu=vfp
> -mfloat-abi=softfp -ansi -fno-zero-initialized-in-bss -Wall
> -I$(TGT_DIR)\config\all -I$(TGT_DIR)\h
> -I$(WIND_HOME)\components\windml-5.3\h
> -I$(WIND_HOME)\components\webservices-1.8\h
> -I$(WIND_HOME)\components\webcli-4.9\target\h
> -I$(WIND_HOME)\components\tcf_agent-1.4\agent
> -I$(WIND_HOME)\components\stacktrace-1.0\include
> -I$(WIND_HOME)\components\opc-3.2\h -I$(WIND_HOME)\components\dcom-2.3\h
> -I$(WIND_HOME)\components\cafe-0.1\hpc\include
> -I$(WIND_HOME)\components\cafe-0.1\cafe\include
> -I$(WIND_HOME)\components\ip_net2-6.9\ipcom\config
> -I$(WIND_HOME)\components\cafe-0.1\vxworks\include
> -I$(WIND_HOME)\components\windml-5.3\osconfig\vxworks\src
> -I$(WIND_HOME)\components\tcf_agent-1.4\osconfig\vxworks\src
> -I$(WIND_HOME)\components\stacktrace-1.0\osconfig\vxworks\src
> -I$(WIND_HOME)\components\ip_net2-6.9\osconfig\vxworks\src
> -I$(WIND_HOME)\components\cafe-0.1\osconfig\vxworks\src
> -I$(WIND_HOME)\components\windml-5.3\osconfig\vxworks\h
> -I$(WIND_HOME)\components\tcf_agent-1.4\osconfig\vxworks\h
> -I$(WIND_HOME)\components\stacktrace-1.0\osconfig\vxworks\h
> -I$(WIND_HOME)\components\ip_net2-6.9\osconfig\vxworks\h
> -I$(WIND_HOME)\components\cafe-0.1\osconfig\vxworks\h -I$(TGT_DIR)\src\hwif
> -I$(TGT_DIR)\src\hwif\h -I $(TGT_DIR)\3rdparty\pbcl\h -I.
> -I$(TGT_DIR)\h\wrn\coreip -I$(TGT_DIR)\src\config
> -I$(TGT_DIR)\config\comps\src -I$(TGT_DIR)\config\comps\src\dosfs2
> -I$(TGT_DIR)\src\drv -I$(TGT_DIR)\src\hwif\h -DCPU=_VX_ARMARCH7
> -DTOOL_FAMILY=gnu -DTOOL=gnu -D_WRS_KERNEL -DARMEL -DCPU_CORTEXA8
> -DARMMMU=ARMMMU_CORTEXA8 -DARMCACHE=ARMCACHE_CORTEXA8 -DIP_PORT_VXWORKS=69
> -DINET -D_WRS_VX_SMP -D_VSB_CONFIG_FILE=\"$(VSB_CONFIG_FILE)\"
> -I$(VSB_INCLUDE_DIR)'),
>
>     sys_id           => "VXWORKS",
>
>     lflags           => add('-L$(VSB_DIR)\arm\ARMARCH7\gnu_standard
> -L$(VSB_DIR)\arm\ARMARCH7\gnu -L$(VSB_DIR)\arm\ARMARCH7\common
> -L$(VSB_DIR)\arm\ARMARCH7\gnu -L$(VSB_DIR)\arm\ARMARCH7\common
> -L$(WS_ROOT_DIR)\obj\vxworks-6.9\krnl\lib_smp\arm\ARMARCH7\gnu
> -L$(WS_ROOT_DIR)\obj\vxworks-6.9\krnl\lib_smp\arm\ARMARCH7\common
> -L$(WIND_HOME)\components\obj\vxworks-6.9\krnl\lib_smp\arm\ARMARCH7\gnu
> -L$(WIND_HOME)\components\obj\vxworks-6.9\krnl\lib_smp\arm\ARMARCH7\common'),
>
>     ex_libs          => add("-Wl,--defsym,__wrs_rtp_base=0xe0000000"),
>
>     },
>
>
>
>
>
> Please suggest best way to go forward with our requirement.
>
>
>
> Thanks in advance.
>
>
>
>
>
> Thanks & Regards,
>
> Damodhar.
>
> +91-7702191212
>
>
>
>
> General
> From: Neil Horman <nhorman at openssl.org>
> *Sent:* Thursday, July 18, 2024 12:16 AM
> *To:* Damodhar Boddukuri <damodhar.boddukuri at non.se.com>
> *Cc:* openssl-users at openssl.org
> *Subject:* Re: compile openssl for Arm A9 & VxWorks
>
>
>
> [External email: Use caution with links and attachments]
> ------------------------------
>
>
>
> There are already several targets defined for vxworks.  First step I would
> think would be cloning one of those targets in Configurations/10-main.conf
> for your purposes and adjusting the settings accordingly:
>
>
>
> "vxworks-ppc60x" => {        <= Change this to "vxworks-arm9' or some such
>         inherit_from     => [ "BASE_unix" ],    <= Leave this alone I
> imagine
>         CC               => "ccppc", <= set the appropriate compiler
> command here
>         CFLAGS           => "-O2 -Wall -fstrength-reduce", <= For this and
> below, adjust as needed
>         cflags           => "-mrtp -mhard-float -mstrict-align
> -fno-implicit-fp -fno-builtin -fno-strict-aliasing",
>         cppflags         => combine("-D_REENTRANT -DPPC32_fp60x
> -DCPU=PPC32",
>                                     "_DTOOL_FAMILY=gnu -DTOOL=gnu",
>                                     "-I\$(WIND_BASE)/target/usr/h",
>
> "-I\$(WIND_BASE)/target/usr/h/wrn/coreip"),
>         sys_id           => "VXWORKS", <= leave this alone
>         lflags           => add("-L
> \$(WIND_BASE)/target/usr/lib/ppc/PPC32/common"), <= Set this to your
> vxworks library path
>         ex_libs          => add("-Wl,--defsym,__wrs_rtp_base=0xe0000000"),
> <= Probably leave this alone too
>     },
>
>
>
> On Wed, Jul 17, 2024 at 12:42 PM Damodhar Boddukuri via openssl-users <
> openssl-users at openssl.org> wrote:
>
> Hi openSSL users,
>
>
>
> I would like to port openssl for Arm A9 & VxWorks Target. If someone can
> share the details, Its really helpful for me.
>
>
>
> Thanks in advance.
>
>
>
>
>
> Thanks & Regards,
>
> Damodhar.
>
> +91-7702191212
>
>
>
>
>
> General
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mta.openssl.org/pipermail/openssl-users/attachments/20240724/2014b915/attachment-0001.htm>


More information about the openssl-users mailing list