<div dir="ltr"><div><div><div>Hi Florin.<br><br></div>There is no (need of) filesystem on our SOC.<br><br>Our software-framework is all in bare-metal C, and we simply compile it using the Atmel-Studio.<br></div>We only are unable to obtain proper libcrypto.a and libssl.a, as a result of which we are unable to use openssl.<br><br></div><div>Actually, I am sorry if I am using toolchain in the wrong sense.<br><br></div><div>What we really need is to compile openssl for our processor, that's it (of course with a proper compiler that supports -mthumb), and generate libcrypto.a and libssl.a.<br></div><div>We will then simply statically-link these two libraries with our framework, and (only) the required .o files from these two libraries will then be linked in the singular-binary (which we then obviously flash onto the SOC through JTAG).<br><br><br></div><div>Thanks Florin for your quick help .... I am obliged ..<br><br><br><br></div><div>Thanks and Regards,<br></div><div>Ajay<br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Nov 9, 2017 at 4:55 PM, Florin <span dir="ltr"><<a href="mailto:floring2502@gmail.com" target="_blank">floring2502@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Ajay,<br>
<br>
There have been lots of discussions recently as OpenWrt is developing into LEDE, a linux for generic embedded systems, not only for routers.<br>
The Atmel Cortex M4 120Mhz will probably be very slow running my toolchain, especially if the RAM is only 512kB. My Cortex A9 is 800MHz and 128MB of RAM and runs pretty fast when setting 1GB of swap file o USB-3.0 HDD.<br>
First of all, which C library are you using, glibc or uclibc on your framework? I've built my toolchain specifically for glibc-2.20 with root filesystem residing on /opt. Since I've ported binutils-2.26.1 from Debian source, it will work with sysroots but gcc is not yet with sysroots enabled; I am going to enable it  while upgrading to the latest gcc-4.9.4 from Debian source (the last gcc-4.9 to be supported); this time will also have gcj and OpenJDK running, but it's still work in progress (I am debianizing it and couldn't find out why libphobos compilation is never run by dpkg-build, although it is configured and doesn't give any error; - any Debian exprt knows about it? - ).<br>
<br>
Openssl is already available for this kind of optware, there is a version in the link I've sent you (but it's dynamic and should reside in /opt/lib). I have a more recent version myself, including the dev package with statically linked library, but you need to make sure the toolchain will work for you.<br>
Also, does your platform run opkg?  If so, I can make a link for the essential packages for the toolchain to work and give them to you (they will install in /opt as stated above).<br>
<br>
Best wishes,<br>
Florin<br>
<br>
From: Ajay Garg [mailto:<a href="mailto:ajaygargnsit@gmail.com">ajaygargnsit@gmail.com</a><wbr>]<br>
Sent: Thursday, November 09, 2017 12:10 PM<br>
To: Florin<br>
Cc: Karl Palsson; openwrt-devel<br>
<div class="HOEnZb"><div class="h5">Subject: Re: [OpenWrt-Devel] Toolchain for armv7-ar?<br>
<br>
Thanks Karl and Florin for the replies.<br>
<br>
Ok, so the first thing I need to understand is OpenWRT is for building linux(-like) systems (only) for routers .. thanks guys for this clearance.<br>
<br>
Florin,<br>
I'll tell you my usecase in a bit of detail.<br>
* We have a framework, with openssl-client code written.<br>
* We port our framework to multiple platforms/devices, and then link libcrypto.a and libssl.a as and when required.<br>
<br>
For the SOC with processor <a href="https://www.digikey.com/product-detail/en/microchip-technology/ATSAM4E8CA-AUR/ATSAM4E8CA-AURCT-ND/4140758" rel="noreferrer" target="_blank">https://www.digikey.com/<wbr>product-detail/en/microchip-<wbr>technology/ATSAM4E8CA-AUR/<wbr>ATSAM4E8CA-AURCT-ND/4140758</a>, everything has been done, but we are stuck on integrating openssl due to being unable to build compatible libcrypto.a and libssl.a for the same.<br>
I almost got things done by tweaking things with the "Freescale i.MX 6" configuration, but failed when I added the -mthumb option.<br>
Since then, I have been trying all sorts of things, to firstly build a toolchain (in ubuntu-14.04 host) supporting -mthumb, and then compile libcrypto.a and libssl.a for the same.<br>
So, if there is a (existing/available) toolchain in openwrt that would compile for armv7-a with -mthumb, I think all I need to do is go into packages/libs/openssl, and fire "make -B". Kindly let know if something can be done for the same.<br>
<br>
Once again, thanks everyone for the help so far ... looking forward to learning more from you experts..<br>
<br>
Thanks and Regards,<br>
Ajay<br>
<br>
<br>
On Thu, Nov 9, 2017 at 2:32 PM, Florin <<a href="mailto:floring2502@gmail.com">floring2502@gmail.com</a>> wrote:<br>
I've got a toolchain (gcc-4.9.2 + binutils-2.26.1) running on armv7-a and<br>
ipk packages  compiled with/for it:<br>
<br>
floring@huawei:~$ gcc -v<br>
Using built-in specs.<br>
COLLECT_GCC=gcc<br>
COLLECT_LTO_WRAPPER=/opt/usr/<wbr>libexec/gcc/arm-linux-gnueabi/<wbr>4.9.2/lto-wrapper<br>
Target: arm-linux-gnueabi<br>
Configured with: ../configure --host=arm-linux-gnueabi<br>
--target=arm-linux-gnueabi --prefix=/opt/usr --with-gmp=/opt/usr<br>
--with-mpfr=/opt/usr --with-mpc=/opt/usr --with-isl=/opt/usr<br>
--with-cloog=/opt/usr --enable-languages=c,c++,go,<wbr>objc,obj-c++<br>
--disable-multilib<br>
LDFLAGS_FOR_TARGET=-Wl,--<wbr>dynamic-linker=/opt/lib/ld-<wbr>linux.so.3<br>
LDFLAGS_FOR_HOST=-Wl,--<wbr>dynamic-linker=/opt/lib/ld-<wbr>linux.so.3<br>
LDFLAGS=-Wl,--dynamic-linker=/<wbr>opt/lib/ld-linux.so.3<br>
Thread model: posix<br>
gcc version 4.9.2 (GCC)<br>
<br>
The architecture is a Huawei-ES880 (Cortex A9 without FPU) router running<br>
Zyxmon's DD-WRT mod for Northstar platforms. I've even been able to compile<br>
and run Xorg, GTK 2 and 3 and Qt 4.8.2 as optware on it, and I am  currently<br>
working on upgrading gcc and "debianize" it. So I kinda run a complete linux<br>
on this architecture.<br>
I've started it from cross-compiling glibc and gcc and installing them on<br>
scratch /opt filesystem, and to simplify things I used some of Zyxmon's<br>
Qnapware (<a href="http://qnapware.zyxmon.org/binaries-armv7/" rel="noreferrer" target="_blank">http://qnapware.zyxmon.org/<wbr>binaries-armv7/</a>); If you only need some<br>
essential packages, this link would be enough.<br>
<br>
I am doing it as a hobby, but my problem is that I don't have a large<br>
traffic subscription so I cannot make it largely public. If you need more<br>
than the packages in Qnapware, especially the native arm-v7a toolchain, then<br>
I could share my work. Keep in mind that these embedded systems have limited<br>
RAM so you need to setup at least 1GB of swap space and set TMPDIR variable<br>
on external HDD directory for making all these work.<br>
<br>
Florin<br>
<br>
> -----Original Message-----<br>
> From: openwrt-devel [mailto:<a href="mailto:openwrt-devel-bounces@lists.openwrt.org">openwrt-devel-bounces@<wbr>lists.openwrt.org</a>]<br>
> On Behalf Of Karl Palsson<br>
> Sent: Wednesday, November 08, 2017 10:54 PM<br>
> To: Ajay Garg<br>
> Cc: openwrt-devel<br>
> Subject: Re: [OpenWrt-Devel] Toolchain for armv7-ar?<br>
><br>
><br>
> That part is armv7-m (not -a, not -r). They don't generally run linux at<br>
all, so<br>
> don't have toolchains targetting linux, and don't generally have existing<br>
> targets in openwrt.<br>
><br>
> You _can_ run linux on them, but it's a farrrr bigger task than just,<br>
"which<br>
> toolchain do I need to select in menuconfig"<br>
><br>
> Cheers,<br>
> Karl P<br>
><br>
> Ajay Garg <<a href="mailto:ajaygargnsit@gmail.com">ajaygargnsit@gmail.com</a>> wrote:<br>
> > Experts,<br>
> ><br>
> > Waiting for your kind reply/replies.<br>
> ><br>
> ><br>
> > Thanks and Regards,<br>
> > Ajay<br>
> ><br>
> > On 7 Nov 2017 11:22 a.m., "Ajay Garg" <<a href="mailto:ajaygargnsit@gmail.com">ajaygargnsit@gmail.com</a>><br>
> > wrote:<br>
> ><br>
> > > Hi All.<br>
> > ><br>
> > > I have been trying to build the toolchain+packages (especially<br>
> > > openssl) using openwrt, but have been unable to do so for a armv7-ar<br>
> architecture.<br>
> > ><br>
> > > The processor on our SOC is<br>
> > > <a href="https://www.digikey.com/product-detail/en/microchip-" rel="noreferrer" target="_blank">https://www.digikey.com/<wbr>product-detail/en/microchip-</a><br>
> > > technology/ATSAM4E8CA-AUR/<wbr>ATSAM4E8CA-AURCT-ND/4140758<br>
> > ><br>
> > > So, is there an (already existing) configuration (in "make<br>
> > > menuconfig", or<br>
> > > otherwise) that builds everything (toolchain plus packages) for<br>
armv7-ar?<br>
> > ><br>
> > ><br>
> > > Will be grateful to listen from you experts.<br>
> > ><br>
> > ><br>
> > > Thanks and Regards,<br>
> > > Ajay<br>
> > ><br>
> > ______________________________<wbr>_________________<br>
> > openwrt-devel mailing list<br>
> > <a href="mailto:openwrt-devel@lists.openwrt.org">openwrt-devel@lists.openwrt.<wbr>org</a><br>
> > <a href="https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel" rel="noreferrer" target="_blank">https://lists.openwrt.org/cgi-<wbr>bin/mailman/listinfo/openwrt-<wbr>devel</a><br>
<br>
<br>
<br>
--<br>
Regards,<br>
Ajay<br>
<br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">Regards,<br>Ajay<br></div>
</div>