aboutsummaryrefslogtreecommitdiffstats
path: root/com32/libupload
Commit message (Collapse)AuthorAgeFilesLines
* libupload: Use new TFTP OK status definitionGene Cumm2016-04-231-2/+2
| | | | | | | FTBFS: com32/hdt/hdt-dump.c:227:39: error: ‘TFTP_OK’ undeclared (first use in this function) Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
* libupload: use url_set_ip()H. Peter Anvin2016-04-061-32/+18
| | | | | | | | We already have a core function for setting the IP address of an URL object based on network lookup or the server default. Export and use it instead of open-coding the equivalent logic in upload_tftp.c. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* pxe_dns: remove obsolete pxe_dns.c wrapperH. Peter Anvin2016-04-061-1/+1
| | | | | | | | | We used to need a wrapper around the core function dns_resolv() to implement pxe_dns(), because the former function required its argument to live in low memory. This is no longer the case and hasn't been for a while, so remove this unnecessary level of indirection. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* libupload: don't error out because the tftp functions are unavailableH. Peter Anvin2016-04-062-16/+74
| | | | | | | | Provide weak stubs for the case where the tftp functions aren't available. This prevents link failures for the case of running on top of non-network cores. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* libupload: Reworking tftp support to use core functionsErwan Velu2015-09-041-147/+32
| | | | | | | | | | | | | | | The libupload was using the pxe_call() directly for doing the tftp uploading stuff. This was only working with pxelinux. Since we do have lpxelinux, the libupload should use the core functions to get rid of thoses direct PXE calls. This patch does - add a tftp_put() function which supports core functions. - implement the call from libupload making the code much more simplier As a result {l}pxelinux can upload data to a tftp server is a similar way. HDT is getting the benefit of such code.
* build: sort sources to build in a more deterministic wayPhilippe Coval2015-01-051-1/+1
| | | | | | | | | | | | | | | | | It has been observed that binaries contents are depending on the order of linked objects. This order is caused by GNU make's wildcard function and the position of sources on filesystem. This change tries to prevent this kind of randomness. Also consider building using -j1 flag to make it even more reproductible. Change-Id: Ie8eee7f336e6f1fa2863c4150d967afd15519f1d Bug: http://bugzilla.syslinux.org/show_bug.cgi?id=57#related Signed-off-by: Philippe Coval <philippe.coval at open.eurogiciel.org>
* com32sys_t inreg shall be zeroified prior intcallErwan Velu2014-01-221-0/+2
| | | | | | | | | | | As per commit f775e740a3a817a4ff5ba26bea99dbfd735456b3, inreg parameters of intcall() shall be zeroified. Having unclean inreg could trigger bad behaviors on some hosts. This patch is about adding memset() calls prior any intcall() : - some intcall didn't had any memset at all - some successive intcall() calls didn't memset inreg in between calls
* Add per-firmware object directory supportMatt Fleming2012-10-161-6/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now that we have multiple firmware backends it no longer makes sense to write object files to the same directory as their source. A better solution is to write the object files to a per-firmware directory under a top-level object directory. The top-level object directory can be specified on the command-line with the O= variable, e.g. make O=/tmp/obj. If no top-level object directory is specified an 'obj' directory is created in the top-level of the Syslinux source repository. All the existing make targets continue to work as before, however now they apply to all firmware backends, e.g. 'make installer' will build the BIOS, 32-bit EFI and 64-bit EFI installers and place them under $(OBJ)/bios, $(OBJ)/efi32 and $(OBJ)/efi64 respectively. Note unlike every other bit of Syslinux, the gpxe objects are still kept in the src directory, e.g. gpxe/src, since gpxe is only required by the BIOS backend. It is possible to specify a make target for a specific firmware or list of firmware with the following syntax, make [firmware[,firmware]] [target[,target]] To clean the object directory for just the BIOS firmware type, 'make bios clean' To build both the 32-bit and 64-bit EFI installers type, 'make efi32 efi64 installer' Since the Syslinux make infrastructure is now more complex a new file doc/building.txt has been created to explain how to build Syslinux. The top-level Makefile now exports some make variables for use in module Makefiles, - topdir - the top-level source directory of the Syslinux repository, e.g. /usr/src/syslinux - objdir - the top-level object directory for the firmware backend currently being built, e.g. /obj/syslinux/bios - SRC - the source directory in the Syslinux repository for the module currently being built, e.g. /usr/src/syslinux/com32/libupload - OBJ - the object directory for the module currently being built, e.g. /obj/syslinux/bios/com32/libupload Since we're rewriting the Makefile infrastructure anyway it seemed like a good idea to add parallel support. By writing subdirectories as prequisites for make targets the objects in those subdirectories can be built in parallel. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* Use pxe_call() instead of COMBOOT APIMatt Fleming2012-07-201-15/+3
| | | | | | | | | | | | This involved some other changes, such as passing flags to unload_pxe() now that we only call it from C code, and hence don't need to update KeepPXE. We also needed to move some of the pxe function prototypes to com32/include/syslinux/pxe_api.h because they are now referenced outside of the core. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* Revert "pxe: resolve names via DNS from protected-mode code"Matt Fleming2012-06-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | This reverts commit 6aba981cd9310bae94587d3e51106261bf0e27b9. dns_resolv() is only implemented for PXELINUX, meaning that if we try to execute any module that references it under SYSLINUX, EXTLINUX or ISOLINUX it fails to run because it cannot resolve the symbol. We need a way to implement DNS resolution so that it works for PXELINUX but returns an error for SYSLINUX/EXTLINUX or ISOLINUX, without introducing undefined symbols. The old COMBOOT API method worked splendidly for this, so revert until someone provides a better solution. Conflicts: com32/lib/Makefile com32/modules/host.c mk/elf.mk Cc: Paulo Alcantara <pcacjr@zytor.com> Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* Merge remote-tracking branch 'zytor/master' into merge/elflink/masterMatt Fleming2012-05-311-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A lot of development has gone on in the 'master' branch since the last time we merged; new features, bug fixes, etc, etc. Conflicts: Makefile com32/Makefile com32/lib/Makefile com32/lib/syslinux/load_linux.c com32/modules/Makefile com32/modules/chain.c core/bootsect.inc core/init.inc version
| * libupload: use %zx to print a size_t argumentH. Peter Anvin2011-06-201-1/+1
| | | | | | | | | | | | | | To print an argument of type size_t we should use the %z size modifier. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | pxe: resolve names via DNS from protected-mode codePaulo Alcantara2012-05-121-1/+1
|/ | | | | | | | | | | Syslinux used to call __intcall() for calling routines of the old COMBOOT API to resolve names via DNS (INT 22h, AX=0x0010) that seemed pointless, since INT 22h, AX=0x0010 does call the protected-mode function pm_pxe_resolv_dns() when calling INT 22h, AX=0x0010. So, for resolving names via DNS we must call pxe_dns_resolv() (a protected-mode function) instead for now. Signed-off-by: Paulo Alcantara <pcacjr@zytor.com>
* Merge remote-tracking branch 'mfleming/for-hpa/makefile-cleanup'H. Peter Anvin2011-04-261-1/+2
| | | | | | | | Resolved Conflicts: com32/hdt/Makefile com32/sysdump/Makefile Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* libupload: Adding tftp.h missing fileErwan Velu2011-04-201-0/+22
| | | | Oups, this while wasn't commited :/
* libupload: Fixing tftp return valueErwan Velu2011-04-201-2/+2
| | | | | The default return value for the tftp mode. This made the tftp to return error even if the upload was succesful.
* libupload: Implementing error code on tftpErwan Velu2011-04-183-17/+45
| | | | | When using the tftp backend, let's return the errors we got on the server.
* libupload: Fixing memset callErwan Velu2011-04-181-2/+2
| | | | We have to use the size of the element, not the size of the pointer.
* libupload: New library to manage uploadsErwan Velu2011-03-1514-0/+3097
This commit creates a library to upload content via 3 backends (srec/ymodem/tftp). Code came from sysdump and got librarized for being used more easily by more other com32 modules.