Mercurial > ecos
changeset 886:a6c0f4a333e5
Make TFTP optional
| author | gthomas |
|---|---|
| date | Fri, 28 Mar 2003 13:49:32 +0000 |
| parents | 97738d936f29 |
| children | bcaf5c94f174 |
| files | packages/redboot/current/ChangeLog packages/redboot/current/cdl/redboot.cdl packages/redboot/current/src/load.c |
| diffstat | 3 files changed, 27 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/packages/redboot/current/ChangeLog +++ b/packages/redboot/current/ChangeLog @@ -1,3 +1,9 @@ +2003-03-28 Gary Thomas <gary@mlbassoc.com> inspired by +2003-03-28 Jani Monoses <jani@iv.ro> + + * src/load.c: + * cdl/redboot.cdl: Make TFTP download protocol optional. + 2003-03-20 Mark Salter <msalter@redhat.com> * include/flash_config.h (CONFIG_NETPORT): New config option.
--- a/packages/redboot/current/cdl/redboot.cdl +++ b/packages/redboot/current/cdl/redboot.cdl @@ -9,7 +9,7 @@ ## ------------------------------------------- ## This file is part of eCos, the Embedded Configurable Operating System. ## Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc. -## Copyright (C) 2002 Gary Thomas +## Copyright (C) 2002, 2003 Gary Thomas ## ## eCos is free software; you can redistribute it and/or modify it under ## the terms of the GNU General Public License as published by the Free @@ -214,7 +214,7 @@ cdl_package CYGPKG_REDBOOT { compile net/bootp.c net/udp.c net/ip.c net/pktbuf.c net/cksum.c compile net/enet.c net/icmp.c net/tcp.c net/timers.c net/arp.c compile net/net_io.c net/inet_addr.c - compile -library=libextras.a net/ping.c net/tftp_client.c + compile -library=libextras.a net/ping.c description "This option includes networking support in RedBoot." define_proc { puts $::cdl_system_header "#define CYGNUM_HAL_VIRTUAL_VECTOR_AUX_CHANNELS 1" @@ -228,6 +228,15 @@ cdl_package CYGPKG_REDBOOT { This option is overriden by the configuration stored in flash." } + cdl_option CYGSEM_REDBOOT_NET_TFTP_DOWNLOAD { + display "Support TFTP for download" + flavor bool + default_value 1 + compile -library=libextras.a net/tftp_client.c + description " + This option enables the use of the TFTP protocol for download" + } + cdl_option CYGSEM_REDBOOT_NET_HTTP_DOWNLOAD { display "Support HTTP for download" flavor bool
--- a/packages/redboot/current/src/load.c +++ b/packages/redboot/current/src/load.c @@ -9,7 +9,7 @@ // ------------------------------------------- // This file is part of eCos, the Embedded Configurable Operating System. // Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc. -// Copyright (C) 2002 Gary Thomas +// Copyright (C) 2002, 2003 Gary Thomas // // eCos is free software; you can redistribute it and/or modify it under // the terms of the GNU General Public License as published by the Free @@ -60,7 +60,9 @@ #include <fs/disk.h> #endif #ifdef CYGPKG_REDBOOT_NETWORKING +#ifdef CYGSEM_REDBOOT_NET_TFTP_DOWNLOAD #include <net/tftp_support.h> +#endif #ifdef CYGSEM_REDBOOT_NET_HTTP_DOWNLOAD #include <net/http.h> #endif @@ -679,7 +681,14 @@ do_load(int argc, char *argv[]) } else { io_tab = (struct load_io_entry *)NULL; // Default #ifdef CYGPKG_REDBOOT_NETWORKING +#ifdef CYGSEM_REDBOOT_NET_TFTP_DOWNLOAD io = &tftp_io; +#elif CYGSEM_REDBOOT_NET_HTTP_DOWNLOAD + io = &http_io; +#else + io = &xyzModem_io; + verbose = false; +#endif #else io = &xyzModem_io; verbose = false;
