aboutsummaryrefslogtreecommitdiffstats
path: root/com32/hdt
Commit message (Collapse)AuthorAgeFilesLines
* hdt: fix sizeof(char *) misuseJonathan Boeing2015-05-031-3/+2
| | | | | | | | | | | | The code was passing sizeof(const char *) - not the length of the string or the size of the buffer - as the length to strncmp(). These two cases don't need the length, so switch to strcmp. Fixes the warning: argument to 'sizeof' in 'strncmp' call is the same expression as the second source; did you mean to provide an explicit length? Signed-off-by: Jonathan Boeing <jonathan.n.boeing@gmail.com>
* hdt: fix sizeof(char *) misuseJonathan Boeing2015-05-031-89/+89
| | | | | | | | | | | | The code was passing sizeof(char *) - not the length of the buffer - to memset. Change the function to take the length of the buffer as a parameter. Fixes the warning: argument to 'sizeof' in 'memset' call is the same expression as the destination; did you mean to provide an explicit length? Signed-off-by: Jonathan Boeing <jonathan.n.boeing@gmail.com>
* hdt: fix sizeof(char *) misuseJonathan Boeing2015-05-031-89/+89
| | | | | | | | | | | | The code was passing sizeof(char *) - not the length of the buffer - to memset. Change the function to take the length of the buffer as a parameter. Fixes the warning: argument to 'sizeof' in 'memset' call is the same expression as the destination; did you mean to provide an explicit length? Signed-off-by: Jonathan Boeing <jonathan.n.boeing@gmail.com>
* 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>
* com32: change '%llx' to use PRIx64Martin Str|mberg2015-01-053-10/+10
| | | | | | | | | | | | Get rid of printf format warning format ‘%llx’ expects type ‘long long unsigned int’, but argument 2 has type ‘uint64_t’ Use <inttypes.h> PRIx64 instead of llx to get rid of gcc warning format ‘%llx’ expects type ‘long long unsigned int’, but argument 2 has type ‘uint64_t’ Author: Martin Str|mberg <ams@ludd.ltu.se> Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
* hdt: Fixing memory leak in cliFelipe Pena2014-01-291-0/+2
| | | | | | | The dynamically alloc'd string to protect from strtok modification has not been free'd on start_auto_mode() function. This patch insure the free is done properly.
* 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
* Merge tag 'syslinux-5.01' into firmwaresyslinux-6.00-pre4Matt Fleming2013-01-292-2/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: Makefile NEWS com32/cmenu/Makefile com32/elflink/ldlinux/Makefile com32/gfxboot/Makefile com32/gpllib/Makefile com32/include/sys/module.h com32/lib/Makefile com32/lib/sys/module/elf_module.c com32/menu/Makefile com32/rosh/Makefile com32/samples/Makefile core/init.c mk/elf.mk Signed-off-by: Matt Fleming <matt.fleming@intel.com>
| * hdt: Move ~162K byte data object from the stack to the bssMatt Fleming2013-01-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | A struct s_hardware is far too large to be placed onto the stack and was causing us run past the end of the allocated stack and overwrite the diskcache, which resulted in apparent file system corruption. Move this hefty object into the bss. Cc: Erwan Velu <erwanaliasr1@gmail.com> Signed-off-by: Matt Fleming <matt.fleming@intel.com>
| * Always strip all the modulesH. Peter Anvin2013-01-171-1/+1
| | | | | | | | | | | | | | | | Always strip the modules; they are too big unstripped. Specifically, we generate unstripped *.elf files, and then convert them to stripped *.c32 files. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* | Merge tag 'syslinux-5.00' into firmwaresyslinux-6.00-pre3Matt Fleming2012-12-071-1/+1
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: Makefile com32/elflink/ldlinux/Makefile com32/lib/sys/module/elf_module.c core/cleanup.c core/comboot.inc core/conio.c core/fs/fs.c core/init.c core/mem/free.c core/mem/malloc.c core/timer.inc diag/geodsp/Makefile extlinux/main.c mk/embedded.mk modules/Makefile Signed-off-by: Matt Fleming <matt.fleming@intel.com>
| * hdt-cli: Correct malloc() size argumentMatt Fleming2012-11-271-1/+1
| | | | | | | | | | | | | | | | We need to be allocating sizeof(char *) (4) not sizeof(char) (1) for 'new_argv'. Cc: Erwan Velu <erwanaliasr1@gmail.com> Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* | Merge tag 'syslinux-5.00-pre9' into for-hpa/elflink/firmwareMatt Fleming2012-11-0512-52/+91
|\| | | | | | | | | | | | | | | | | | | | | This merge also includes the Syslinux-4.06 release. Conflicts: Makefile com32/hdt/Makefile com32/modules/Makefile com32/samples/hello.c mtools/Makefile
| * Merge branch 'master' into elflinkMatt Fleming2012-10-2412-48/+90
| |\ | | | | | | | | | | | | | | | | | | | | | | | | The following conflict is a result of the fact comapi_chainboot was only stubbed out on the 'elflink' branch but was properly marked as obsolete in 'master'. Conflicts: core/comboot.inc
| | * hdt: Release 0.5.2hdt/0.5.2Erwan Velu2012-09-101-1/+1
| | | | | | | | | | | | New release with codename Manon
| | * hdt: Adding Silent modeErwan Velu2012-09-103-9/+19
| | | | | | | | | | | | | | | | | | | | | By using the "silent" option at the cmdline, HDT tries not displaying any boring message. This is particulary interesting with the "display" option.
| | * hdt: Removing remaining printf()Erwan Velu2012-09-105-22/+22
| | | | | | | | | | | | Using more_printf allow to manage more easily several pages printing.
| | * hdt: Removing builting sleep support in sayErwan Velu2012-05-292-19/+1
| | | | | | | | | | | | | | | If people want to sleep while saying message, they now have to use the sleep command instead of the previous specific %x syntax.
| | * hdt: 0.5.2-pre3 releasehdt/0.5.2-pre3Erwan Velu2012-05-291-1/+1
| | |
| | * hdt: Adding sleep commandErwan Velu2012-05-295-1/+21
| | | | | | | | | | | | | | | | | | | | | This command will help users getting some delay between two automatic commands. As an example, it can be used to show a serie of pictures.
| | * hdt: Adding display command to change backgroundErwan Velu2012-05-295-0/+30
| | | | | | | | | | | | | | | | | | | | | This command allow switching the background image. This could be used for example to give more explicit message to users. Idea is coming from the FGTC project
| * | Clean up $(GPLLIB) leakMatt Fleming2012-10-191-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Modules were linking against com32/gpllib/libcom32gpl.c32 even when NOGPL was set, so remove it from various modules Makefiles and use $(C_LIBS) in mk/elf.mk which already has the conditional-magic for $(GPLLIB). Also, the object files in com32/gpllib/ are not distributed in the release tarballs, which means that if a user does a 'make netinstall' they hit the following install error, install: cannot stat `com32/gpllib/*.c32': No such file or directory Add a $(INSTALLABLE_MODULES) variable to separate the list of build and install modules. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* | | Add per-firmware object directory supportMatt Fleming2012-10-161-7/+7
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | com32: Per-object file LDFLAGSMatt Fleming2012-06-201-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | Some object files need to link against the ELF libraries. Allow them to be specified with the following syntax in the Makefiles, LDFLAGS_$(object_file) = $(LIBS) By adding libraries in this way DT_NEEDED entries are created in the ELF modules and the required library dependencies are automatically loaded before running the module. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* | Delete all references to __com32.cs_bounceMatt Fleming2012-06-081-5/+15
| | | | | | | | | | | | | | | | | | The COM32 cs_bounce buffer is not usable with ELF modules, as we're trying to move to an environment where memory is dynamically allocated. All users of __com32.cs_bounce have been converted to using lmalloc() to allocate low memory. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* | Merge remote-tracking branch 'zytor/master' into merge/elflink/masterMatt Fleming2012-05-3119-91/+353
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * hdt: 0.5.2-pre2 releasehdt/0.5.2-pre2Erwan Velu2012-05-271-1/+1
| |
| * hdt: Adding say & postexec demoErwan Velu2012-05-271-0/+9
| | | | | | | | When building official hdt image, let's add a say & postexec example.
| * hdt: Adding say commandErwan Velu2012-05-272-0/+62
| | | | | | | | | | | | | | | | | | | | This command is just for displaing a message to the cli during a defined period of time. Syntax is like the following : say `my message`%<number_of_seconds> An example : say `This is my text message to display during 5 seconds`%5
| * hdt: Adding nomodule support in cliErwan Velu2012-05-279-5/+84
| | | | | | | | | | | | | | | | | | | | Some new commands might need being able to manage the argv directly instead of the much more oriented scheme we had until now. This commit add a .nomodule option to cli object to explically tell they don't have a module as parameter but only arguments. This will be needed for the 'say' command.
| * hdt: Fixing argument mgmt in cliErwan Velu2012-05-271-2/+2
| | | | | | | | Sizeof(char *) is definetly wrong for getting the length of a string.
| * hdt: Adding more debug traces in cliErwan Velu2012-05-271-6/+8
| | | | | | | | | | Adding more debug traces in the cli management to ease debugging & feature adding.
| * hdt: Fixing chain32 target in makefileErwan Velu2012-05-251-1/+1
| | | | | | | | chain32 moved, let's adjust the "release" target.
| * hdt: Adding postexec= optionErwan Velu2011-12-173-4/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When HDT is exiting, you might need executing something else. This could be used in the following scenario : You start HDT, do an automatic command like 'dump; exit', but then after you might need to launch something else from syslinux. The postexec option will allow you to define what label you'd love running one HDT got terminated. Syntaxt is like the following: postexec='menu_label_to_run_once_hdt_got_exited' Note the quotes (') after the equal sign (=) This could looks like : APPEND auto='dump; exit' postexec='memtest'
| * hdt: On the road to 0.5.2Erwan Velu2011-12-171-2/+2
| |
| * hdt: Don't search HDDs when no HDD got detectedErwan Velu2011-09-221-1/+3
| |
| * hdt: Avoid memory corruption on menu summaryErwan Velu2011-09-221-2/+1
| | | | | | | | | | During CPU's capabilites computation, let's sure the buffer we manage is big enought....
| * hdt: Dumping disk failed when disk are presentErwan Velu2011-09-221-1/+1
| | | | | | | | | | | | | | When physical disks were present, the computed items were not flushed and so not present on the disk file. Thanks to pscheie for reporting this.
| * hdt: Fixing array sizeErwan Velu2011-07-111-1/+1
| | | | | | | | | | Bootable flags shall be 6 char to let one NULL terminating char. Thx Gerth for reporting this.
| * hdt: New release 0.5.1hdt/0.5.1Erwan Velu2011-06-061-2/+2
| | | | | | | | New release 0.5.1 to manage dynamic filenames based on "%" variables.
| * hdt: Ignoring checksums fileErwan Velu2011-06-061-0/+1
| | | | | | | | Checksums file are generated by release target. No need to track it.
| * hdt: Adding dump_filename= optionErwan Velu2011-04-283-66/+132
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This option allow the user to redefine the way filename is made-of. By default that's "mac_address+dmi_vendor_name+dmi_product_name" This can be overidded by the following syntax: dump_filename=your_filename Note that it's mandatory not to add "" or '' around your_filename. your_filename could be a regular filename but can also includes %{} directives as defined by : %{m} = mac address %{v} = vendor name of the machine %{p} = product name of the machine %{ba} = Asset tag of the base board %{bs} = Serial number of the base board %{ca} = Asset tag of the chassis %{cs} = Serial number of the chassis %{sk} = SKU number of the system %{ss} = Serial number of the system Here come a possible command line : APPEND nomenu auto='dump;' dump_path=hdt2 tftp_ip=192.168.1.254 dump_filename=%{m}+%{bs}+%{ba}+%{cs}+%{ca}+%{sk}+%{ss}+%{p}+%{v}
| * hdt: Adding hybrid iso image during releaseErwan Velu2011-04-261-1/+7
| | | | | | | | When we release hdt, generating an usb hybrid image could be useful.
| * hdt: dumping boot flag statusErwan Velu2011-04-261-2/+5
| | | | | | | | If the boot flag is set on a partition, let's dump this information.
| * Revert "hdt: remove set-but-unused variable"Erwan Velu2011-04-261-0/+3
| | | | | | | | | | | | | | This reverts commit 842d7e35ccd8cd89105faf0266497e838d96c8b3. In fact, you found a real bug. I missed at dumping some information. So I revert this commit and then add the missing code.
* | Mark unused function parameters as __unusedMatt Fleming2012-04-171-3/+0
| | | | | | | | | | | | | | | | | | | | | | Move the __unused tag from com32/hdt/ to com32/include/klibc/ so that it can be used by the entire code base, and mark unused function parameters as __unused to stop the following kind of build warning, elflink/load_env32.c: In function ‘load_env32’: elflink/load_env32.c:107:30: warning: unused parameter ‘regs’ Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* | hdt: libmenu.a no longer existsMatt Fleming2011-04-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | Don't link against libmenu.a, it no longer exists as it was removed in commit 74518b8b691c ("elflink: Make ELF the default object format"). This fixes the following build error, make[2]: *** No rule to make target `../cmenu/libmenu/libmenu.a', needed by `hdt.c32'. Stop. Signed-off-by: Matt Fleming <matt.fleming@linux.intel.com>
* | elflink: Make ELF the default object formatMatt Fleming2011-04-261-2/+2
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | com32/elflink/modules was originally created to house ELF modules and keep them separate from the COM32 modules as the elflink branch was being developed. However, this has inadvertently created a maintenance nightmare because code was copied from elsewhere in the tree into com32/elflink/modules, resulting in duplication. Bug fixes have been going into the original code but have not been merged onto the elflink branch, leaving the duplicate code in com32/elflink/modules buggy. So let's delete this directory. There really is no reason to keep ELF and COM32 modules separate because there's no reason to need both COM32 and ELF modules to coexist. ELF is a far superior object file format and all modules are not emitted as ELF objects. Now that we're outputting ELF modules we can use dynamic memory instead of the cs_bounce bounce buffer. This commit requires a certain amount of shuffling for some files. quicksort.c isn't a module and belongs as part of the util library. cli.h belongs in com32/include so that other modules can make use of the cli code in ldlinux.c32. All libraries are now ELF shared libraries which are only loaded to fixup unresolved symbols for executable modules and renamed from *.a to *.c32. This reduces the runtime memory footprint because libraries are only loaded when needed and because every executable no longer gets its own copy of code/data (as it would if linking with a static library). Also, remove MINLIBOBJS from libcom32.c32 because it is already part of libcom32min.a and we don't want to have any duplicate symbols between the core (which links with libcom32min.a) and libcom32.c32. Welcome to the New World Order of ELF modules! Signed-off-by: Matt Fleming <matt.fleming@linux.intel.com>
* hdt: add back -I$(com32)H. Peter Anvin2011-04-261-1/+1
| | | | | | | hdt picks up include files from outside the include directory and so needs an explicit -I$(com32). This probably should be fixed. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* Merge remote-tracking branch 'mfleming/for-hpa/makefile-cleanup'H. Peter Anvin2011-04-261-4/+4
|\ | | | | | | | | | | | | | | Resolved Conflicts: com32/hdt/Makefile com32/sysdump/Makefile Signed-off-by: H. Peter Anvin <hpa@zytor.com>