SMALL 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. Tips for a small system:
  2. If you only want server functionality (for example), compile with
  3. make PROGRAMS=dropbear
  4. rather than just
  5. make dropbear
  6. so that client functionality in shared portions of Dropbear won't be included.
  7. The same applies if you are compiling just a client.
  8. ---
  9. The following are set in localoptions.h:
  10. - If you're compiling statically, you can turn off host lookups
  11. - You can disable either password or public-key authentication, though note
  12. that the IETF draft states that pubkey authentication is required.
  13. - Similarly with DSS and RSA, you can disable one of these if you know that
  14. all clients will be able to support a particular one. The IETF draft
  15. states that DSS is required, however you may prefer to use RSA.
  16. DON'T disable either of these on systems where you aren't 100% sure about
  17. who will be connecting and what clients they will be using.
  18. - Disabling the MOTD code and SFTP-SERVER may save a small amount of codesize
  19. - You can disable x11, tcp and agent forwarding as desired. None of these are
  20. essential, although agent-forwarding is often useful even on firewall boxes.
  21. ---
  22. If you are compiling statically, you may want to disable zlib, as it will use
  23. a few tens of kB of binary-size (./configure --disable-zlib).
  24. You can create a combined binary, see the file MULTI, which will put all
  25. the functions into one binary, avoiding repeated code.
  26. If you're compiling with gcc, you might want to look at gcc's options for
  27. stripping unused code. The relevant vars to set before configure are:
  28. LDFLAGS=-Wl,--gc-sections
  29. CFLAGS="-ffunction-sections -fdata-sections"
  30. You can also experiment with optimisation flags such as -Os, note that in some
  31. cases these flags actually seem to increase size, so experiment before
  32. deciding.
  33. Of course using small C libraries such as uClibc and dietlibc can also help.
  34. If you have any queries, mail me and I'll see if I can help.