adding SSH into uClinux for ColdFire

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

adding SSH into uClinux for ColdFire

Mendoza Juan-R61690
Message
Hello Everyone,
 
I'm trying to come up to speed on uClinux for ColdFire.  I've hit a small bump and am hoping that someone can help me out.  I downloaded the newest release of uClinux for ColdFire from here: http://www.uclinux.org/ports/coldfire/source.html.  Now I'm trying to add SSH support which means I need openssl. Is there a version of openssl with patches that will work with the newest release of uclinux?  Or should all versions work?  What library is recommended for use uClib or uc-lib?
 
Thanks,
Juan
Reply | Threaded
Open this post in threaded view
|

Re: adding SSH into uClinux for ColdFire

David McCullough

Jivin Mendoza Juan-R61690 lays it down ...
> Hello Everyone,
>  
> I'm trying to come up to speed on uClinux for ColdFire.  I've hit a small
> bump and am hoping that someone can help me out.  I downloaded the newest
> release of uClinux for ColdFire from here:
>    http://www.uclinux.org/ports/coldfire/source.html
> Now I'm trying to add SSH support which means I need openssl. Is there a
> version of openssl with patches that will work with the newest release of

        http://www.ucdot.org/article.pl?sid=03/10/23/2249235

There are patches in the SnapGear pub directory for a newer openssl as
well.

> uclinux?  Or should all versions work?  What library is recommended for use
> uClibc or uc-lib?

uC-libc has been the traditional coldfire libc,  but both uClibc and
libc work fine.  If you have the space for openssl,  you probably should
go with uClibc.  Checkout:

        http://www.ucdot.org/article.pl?sid=02/08/21/1124218

Might help you decide.  uClibc is actively developed and maintained,
uC-libc is not,

Cheers,
Davidm

--
David McCullough, [hidden email]  Ph:+61 7 34352815 http://www.SnapGear.com
Custom Embedded Solutions + Security   Fx:+61 7 38913630 http://www.uCdot.org
--------------------------------------------------------------------
To Subscribe send a message to:      [hidden email]
To Unsubscribe send a message to:    [hidden email]
For further information, visit:      <http://www.WildRice.com/ColdFire/>


Reply | Threaded
Open this post in threaded view
|

RE: adding SSH into uClinux for ColdFire

Mendoza Juan-R61690
In reply to this post by Mendoza Juan-R61690
Davidm,

Thanks you for your reply. I followed the steps on the website link you sent and here is what happened.  Any idea on what I did wrong?

[root@contact libssl]# patch -p1 < /proj/openssl-0.9.7c.diff
patching file apps/apps.h
patching file apps/openssl.c
patching file CHANGES
patching file Configure
patching file crypto/cryptlib.h
patching file crypto/des/fcrypt.c
patching file crypto/Makefile
patching file crypto/Makefile.ssl
patching file crypto/objects/obj_dat.c
patching file crypto/opensslconf.h
patching file crypto/x509/Makefile
patching file crypto/x509/Makefile.ssl
patching file Makefile
patching file Makefile.org
patching file Makefile.ssl
patching file ssl/s3_enc.c
patching file ssl/s3_pkt.c

[root@contact openssl]# patch -p0 < /proj/openssl-0.9.7c_linux_include.diff
patching file opensslconf.h
Reversed (or previously applied) patch detected!  Assume -R? [n] y
patching file opensslv.h
Reversed (or previously applied) patch detected!  Assume -R? [n] y
patching file rc4.h
Reversed (or previously applied) patch detected!  Assume -R? [n] y
patching file sha.h
Reversed (or previously applied) patch detected!  Assume -R? [n] y

Reversed (or previously applied) patch detected!  Assume -R? [n] y
Hunk #3 FAILED at 38.
Hunk #4 FAILED at 54.
2 out of 10 hunks FAILED -- saving rejects to file Makefile.rej

Then I do make menuconfig select Motorola, M5275EVB, uClibc, 2.4.x, ssh
Do a make dep, then make and I get the following:

   -Dlinux -D__linux__ -Dunix -D__uClinux__ -DEMBED -nostdinc -I/home/jmendoza/uClinux-dist/include -I/home/jmendoza/uClinux-dist/include/include -fno-builtin -msep-data -Wl,-elf2flt -Wl,-move-rodata -nostartfiles /home/jmendoza/uClinux-dist/lib/crt0.o -L/home/jmendoza/uClinux-dist/lib -L. -Lopenbsd-compat -o sshd sshd.o auth.o auth1.o auth2.o auth2-hostbased.o auth2-kbdint.o auth2-none.o auth2-passwd.o auth2-pubkey.o auth-chall.o auth2-chall.o auth-rhosts.o auth-options.o auth-krb5.o auth-pam.o auth-passwd.o auth-rsa.o auth-rh-rsa.o auth-sia.o sshpty.o sshlogin.o loginrec.o servconf.o serverloop.o md5crypt.o session.o groupaccess.o auth-skey.o auth-bsdauth.o monitor_mm.o monitor.o -lssh -lopenbsd-compat -lutil -lcrypto -lz -lc
/usr/local/m68k-elf/bin/ld.real: cannot find -lz
collect2: ld returned 1 exit status
make[2]: *** [sshd] Error 1
make[2]: Leaving directory `/home/jmendoza/uClinux-dist/user/ssh'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/home/jmendoza/uClinux-dist/user'
make: *** [subdirs] Error 1

Any ideas?


-Juan


-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of David McCullough
Sent: Thursday, June 09, 2005 5:29 PM
To: Mendoza Juan-R61690
Subject: Re: [ColdFire] adding SSH into uClinux for ColdFire



Jivin Mendoza Juan-R61690 lays it down ...
> Hello Everyone,
>  
> I'm trying to come up to speed on uClinux for ColdFire.  I've hit a
> small bump and am hoping that someone can help me out.  I downloaded
> the newest release of uClinux for ColdFire from here:
>    http://www.uclinux.org/ports/coldfire/source.html
> Now I'm trying to add SSH support which means I need openssl. Is there
> a version of openssl with patches that will work with the newest
> release of

        http://www.ucdot.org/article.pl?sid=03/10/23/2249235

There are patches in the SnapGear pub directory for a newer openssl as well.

> uclinux?  Or should all versions work?  What library is recommended
> for use uClibc or uc-lib?

uC-libc has been the traditional coldfire libc,  but both uClibc and libc work fine.  If you have the space for openssl,  you probably should go with uClibc.  Checkout:

        http://www.ucdot.org/article.pl?sid=02/08/21/1124218

Might help you decide.  uClibc is actively developed and maintained, uC-libc is not,

Cheers,
Davidm

--
David McCullough, [hidden email]  Ph:+61 7 34352815 http://www.SnapGear.com
Custom Embedded Solutions + Security   Fx:+61 7 38913630 http://www.uCdot.org
--------------------------------------------------------------------
To Subscribe send a message to:      [hidden email]
To Unsubscribe send a message to:    [hidden email]
For further information, visit:      <http://www.WildRice.com/ColdFire/>
--------------------------------------------------------------------
To Subscribe send a message to:      [hidden email]
To Unsubscribe send a message to:    [hidden email]
For further information, visit:      <http://www.WildRice.com/ColdFire/>


Reply | Threaded
Open this post in threaded view
|

Re: adding SSH into uClinux for ColdFire

David McCullough

Jivin Mendoza Juan-R61690 lays it down ...

> Davidm,
>
> Thanks you for your reply. I followed the steps on the website link you sent and here is what happened.  Any idea on what I did wrong?
>
> [root@contact libssl]# patch -p1 < /proj/openssl-0.9.7c.diff
> patching file apps/apps.h
> patching file apps/openssl.c
> patching file CHANGES
> patching file Configure
> patching file crypto/cryptlib.h
> patching file crypto/des/fcrypt.c
> patching file crypto/Makefile
> patching file crypto/Makefile.ssl
> patching file crypto/objects/obj_dat.c
> patching file crypto/opensslconf.h
> patching file crypto/x509/Makefile
> patching file crypto/x509/Makefile.ssl
> patching file Makefile
> patching file Makefile.org
> patching file Makefile.ssl
> patching file ssl/s3_enc.c
> patching file ssl/s3_pkt.c
>
> [root@contact openssl]# patch -p0 < /proj/openssl-0.9.7c_linux_include.diff
> patching file opensslconf.h
> Reversed (or previously applied) patch detected!  Assume -R? [n] y
> patching file opensslv.h
> Reversed (or previously applied) patch detected!  Assume -R? [n] y
> patching file rc4.h
> Reversed (or previously applied) patch detected!  Assume -R? [n] y
> patching file sha.h
> Reversed (or previously applied) patch detected!  Assume -R? [n] y
>
> Reversed (or previously applied) patch detected!  Assume -R? [n] y
> Hunk #3 FAILED at 38.
> Hunk #4 FAILED at 54.
> 2 out of 10 hunks FAILED -- saving rejects to file Makefile.rej

You probably do not want to assume '-R'.
You may need to reapply this patch.

> Then I do make menuconfig select Motorola, M5275EVB, uClibc, 2.4.x, ssh
> Do a make dep, then make and I get the following:
>
>    -Dlinux -D__linux__ -Dunix -D__uClinux__ -DEMBED -nostdinc -I/home/jmendoza/uClinux-dist/include -I/home/jmendoza/uClinux-dist/include/include -fno-builtin -msep-data -Wl,-elf2flt -Wl,-move-rodata -nostartfiles /home/jmendoza/uClinux-dist/lib/crt0.o -L/home/jmendoza/uClinux-dist/lib -L. -Lopenbsd-compat -o sshd sshd.o auth.o auth1.o auth2.o auth2-hostbased.o auth2-kbdint.o auth2-none.o auth2-passwd.o auth2-pubkey.o auth-chall.o auth2-chall.o auth-rhosts.o auth-options.o auth-krb5.o auth-pam.o auth-passwd.o auth-rsa.o auth-rh-rsa.o auth-sia.o sshpty.o sshlogin.o loginrec.o servconf.o serverloop.o md5crypt.o session.o groupaccess.o auth-skey.o auth-bsdauth.o monitor_mm.o monitor.o -lssh -lopenbsd-compat -lutil -lcrypto -lz -lc
> /usr/local/m68k-elf/bin/ld.real: cannot find -lz
> collect2: ld returned 1 exit status
> make[2]: *** [sshd] Error 1
> make[2]: Leaving directory `/home/jmendoza/uClinux-dist/user/ssh'
> make[1]: *** [all] Error 2
> make[1]: Leaving directory `/home/jmendoza/uClinux-dist/user'
> make: *** [subdirs] Error 1
>
> Any ideas?

Sounds like it didn't build libz,  try forcing it in the lib config
under "menuconfig".

Cheers,
Davidm


> From: [hidden email] [mailto:[hidden email]] On Behalf Of David McCullough
> Sent: Thursday, June 09, 2005 5:29 PM
> To: Mendoza Juan-R61690
> Subject: Re: [ColdFire] adding SSH into uClinux for ColdFire
>
>
>
> Jivin Mendoza Juan-R61690 lays it down ...
> > Hello Everyone,
> >  
> > I'm trying to come up to speed on uClinux for ColdFire.  I've hit a
> > small bump and am hoping that someone can help me out.  I downloaded
> > the newest release of uClinux for ColdFire from here:
> >    http://www.uclinux.org/ports/coldfire/source.html
> > Now I'm trying to add SSH support which means I need openssl. Is there
> > a version of openssl with patches that will work with the newest
> > release of
>
> http://www.ucdot.org/article.pl?sid=03/10/23/2249235
>
> There are patches in the SnapGear pub directory for a newer openssl as well.
>
> > uclinux?  Or should all versions work?  What library is recommended
> > for use uClibc or uc-lib?
>
> uC-libc has been the traditional coldfire libc,  but both uClibc and libc work fine.  If you have the space for openssl,  you probably should go with uClibc.  Checkout:
>
> http://www.ucdot.org/article.pl?sid=02/08/21/1124218
>
> Might help you decide.  uClibc is actively developed and maintained, uC-libc is not,
>
> Cheers,
> Davidm
>
> --
> David McCullough, [hidden email]  Ph:+61 7 34352815 http://www.SnapGear.com
> Custom Embedded Solutions + Security   Fx:+61 7 38913630 http://www.uCdot.org
> --------------------------------------------------------------------
> To Subscribe send a message to:      [hidden email]
> To Unsubscribe send a message to:    [hidden email]
> For further information, visit:      <http://www.WildRice.com/ColdFire/>
> --------------------------------------------------------------------
> To Subscribe send a message to:      [hidden email]
> To Unsubscribe send a message to:    [hidden email]
> For further information, visit:      <http://www.WildRice.com/ColdFire/>
>

--
David McCullough, [hidden email]  Ph:+61 7 34352815 http://www.SnapGear.com
Custom Embedded Solutions + Security   Fx:+61 7 38913630 http://www.uCdot.org
--------------------------------------------------------------------
To Subscribe send a message to:      [hidden email]
To Unsubscribe send a message to:    [hidden email]
For further information, visit:      <http://www.WildRice.com/ColdFire/>