summaryrefslogtreecommitdiff
path: root/mk
Commit message (Collapse)AuthorAgeFilesLines
* Makefile: make the handling of firmware selection a little sanerH. Peter Anvin2016-02-094-6/+4
| | | | | | Clean up the handling of firmware selection inside the Makefiles. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* Delete unused filesH. Peter Anvin2016-02-091-1/+0
| | | | | | Remove several files which aren't used at all during the build. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* Partial Revert: Still use .*.d depsGene Cumm2015-12-101-2/+2
| | | | | | Previous commit changed the dependency filenames to not have a leading '.' Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
* Dont bypass compiler driver for Dependency generation optionsKhem Raj2015-12-101-2/+2
| | | | | | | | | | | We can let compiler driver pass the right options to preprocessor after processing -Mxy options, right now its bypassing the gcc driver and handing them straight to cpp This also helps in other compilers processing these options correctly for their preprocessors consumption Signed-off-by: Khem Raj <raj.khem@gmail.com>
* Makefile: Always use -mno-red-zone for EFISylvain Gault2015-11-274-7/+12
| | | | | | | | This option is mandatory when compiling for EFI as some event handlers may interupt the running code and use the space just above the reserved stack space. Signed-off-by: Sylvain Gault <sylvain.gault@gmail.com>
* libupload: Reworking tftp support to use core functionsErwan Velu2015-09-041-2/+6
| | | | | | | | | | | | | | | 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.
* debug: Adding -DDEBUG_THREADErwan Velu2015-09-041-0/+1
| | | | | | | | | When debugging some syslinux code with debugging enabled, the threading code is so verbose that it completly slow down syslinux but also is so verbose that any other trace is invisible in the flood. This commit aims at requesting people to explicitly enable the threading logs by using -DDEBUG_THREAD.
* Merge branch 'nocomapi'syslinux-6.03-pre7H. Peter Anvin2014-03-031-1/+1
|\
| * lib.mk: Add biosboot.oH. Peter Anvin2014-02-131-1/+1
| | | | | | | | | | | | We need biosboot.o for shuffle and boot now. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* | Makefiles: export the firmware type as a cpp variableH. Peter Anvin2014-02-275-8/+8
| | | | | | | | | | | | Export the firmware type as a cpp variable so we can #ifdef. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* | mk/efi.mk: Add libefi.a dependencyGene Cumm2014-02-221-2/+2
| | | | | | | | Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
* | efi: fix up gnu-efi buildGene Cumm2014-02-221-5/+6
| | | | | | | | | | | | | | | | | | | | This eliminates the forking and pushes the build under the efi32/ and efi64/ object directories eliminating a build race and preventing the build from breaking as gnu-efi takes a few seconds to complete. Depends on gnu-efi commit 52d88dd Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
* | efi: We need -m32/-m64 even when processing assemblyH. Peter Anvin2014-02-211-6/+4
| | | | | | | | | | | | We need to specify -m32/-m64 even when we are processing assembly. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* | mk/efi.mk: Disable stack protectorMagnus Granberg2014-02-211-1/+2
|/ | | | | | | | Disable the stack protector if on by default. Copied from https://bugs.gentoo.org/show_bug.cgi?id=495146. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* mk/efi.mk: Cancel old rulesGene Cumm2014-01-311-0/+4
| | | | | | | If a dependency is added to the newer rules, make will choose the easier rules instead of the preferred rules. Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
* efi: Make the gnu-efi build scripts more portableMatt Fleming2014-01-081-2/+1
| | | | | | | | | | | | | Not all distributions point /bin/sh at /bin/bash, so remove some bashisms (pushd/popd) and require that build-gnu-efi.sh be run from the Syslinux object directory. Also, swap realpath(1) for readlink(1) because the former isn't available on Debian. Reported-by: Ferenc Wagner <wferi@niif.hu> Reported-by: Celelibi <celelibi@gmail.com> Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* efi: Check the gnu-efi build succeededMatt Fleming2013-12-111-1/+5
| | | | | | | Guard against future changes by requiring that the gnu-efi build scripts exit with success. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* efi: Make gnu-efi build scripts more robustMatt Fleming2013-12-111-1/+1
| | | | | | | | | | | | | | | Modify the scripts to check that they're called with the correct number of arguments and error out otherwise after printing some helpful info. This change also stops relying on passing arguments through environment variables and instead passes them explicitly to the scripts, which is definitely more robust, and handles the case where the scripts are invoked directly. Of course, now that the scripts can be invoked directly we need to regard any input as hostile and exit immediately on error. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* efi: Add build scripts for gnu-efiMatt Fleming2013-12-101-15/+6
| | | | | | | | | | | Now that we have a gnu-efi git submodule we need some scripts to build and install it into architecture-specific build directories. This actually simplifies things a bit because we no longer need to account for the variations in distribution installation paths - we now control the paths. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* cmenu: Add libmenu.c32 to $(C_LIBS)syslinux-6.02-pre15Matt Fleming2013-07-291-1/+1
| | | | | | | | The menu modules, display, text, etc, require libmenu.c32 to be listed as a dependency. Append to $(C_LIBS) in mk/elf.mk so that module Makefiles can make use of the suffix rules. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* Merge branch 'elflink-undi-debug-for-mfleming' of ↵syslinux-6.02-pre13Matt Fleming2013-07-261-0/+4
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://github.com/geneC/syslinux into firmware Pull UNDIIF packet header debug patch series from Gene Cumm, * 'elflink-undi-debug-for-mfleming' of git://github.com/geneC/syslinux: Allow for UNDIIF_ID_DEBUG in 1 mk line core/lwip/undiif: dprint MAC/ARP/IP/ICMP/TCP/UDP headers; poll debug lwip/undiif: split arphdr._hwlen_protolen lwip: Allow LWIP_PLATFORM_* output to use dprintf lwip: undiif: Fix debug options to unique *_DEBUG macros Conflicts: core/kaboom.c
| * Allow for UNDIIF_ID_DEBUG in 1 mk linesyslinux-5.11-pre9Gene Cumm2013-07-201-0/+4
| | | | | | | | | | | | | | Add comments and 1 line to mk/devel.mk to debug headers of all packets sent/recieved through undiif.c. Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
* | Merge tag 'syslinux-5.11-pre8' into firmwaresyslinux-6.02-pre1Matt Fleming2013-07-083-1/+3
|\ \ | |/ | | | | | | | | | | | | | | | | | | syslinux-5.11-pre8 Conflicts: NEWS com32/lib/Makefile core/conio.c mk/devel.mk mk/elf.mk
| * mk: enable dynamic debug supportMatt Fleming2013-07-051-0/+1
| | | | | | | | | | | | | | This will probably be disabled for releases, but it's definitely worthwhile having enabled for all prereleases. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
| * mk: include $(GCCWARN) when building ELF objectsMatt Fleming2013-07-051-1/+1
| | | | | | | | | | | | | | It's currently impossible to turn on dprintf() statements in com32/modules because $(GCCWARN) isn't used as part of $(CFLAGS). Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* | mk: stop complaining about unused parametersMatt Fleming2013-06-201-1/+2
| | | | | | | | | | | | | | | | Now that we've got the firmware abstraction, many backend functions don't use all of their parameters, and it isn't necessarily something we want to warn about all the time. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* | efi: Turn on symbol export whitelistMatt Fleming2013-06-191-1/+2
| | | | | | | | | | | | | | Reduce the default visibility of objects in efi/ as was done for BIOS in commit e4b3ce2dd82c ("Symbol export whitelist"). Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* | mk: reinstate -mregparm for BIOSMatt Fleming2013-06-194-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | There's still a bunch of assembly code that assumes we're building our C objects with -mregparm=3. For example, the code to transition from 16-bit real-mode mode to 32-bit protected mode assumes this. Violating this assumption leads to various hangs, caused by garbage function arguments. Put back -mregparm into CFLAGS that was removed in commit 8789d2689564 ("mk/embedded.mk: Don't use -mregparm in core"). Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* | ldlinux: use platform filename extensionMatt Fleming2013-05-162-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Users are starting to package all Syslinux versions on one boot medium and are running into problems because all versions of ldlinux have the same filename, ldlinux.c32. The version of ldlinux.c32 compiled for bios will not work with efi32 or efi64, and vice versa. What we need is a way for the Syslinux core to know exactly which filename to load. Use the following extensions for the corresponding platforms, .c32 - bios .e32 - efi32 .e64 - efi64 Now all ldlinux variants can be kept in the same directory without causing any conflicts. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* | efi: Add network supportsyslinux-6.00-pre5Matt Fleming2013-04-232-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add TCP and UDP support to the EFI firmware backend. This necessitated moving all tcp functions to a core_tcp_* prefix so that they could be implemented differently for BIOS+lwip and EFI. Unfortunately, the tcp_* prefix is already in use by the lwip code. To maintain symmetry, the UDP functions were also moved from net_core_* to core_udp_*. The net_core API was introduced in 5.x to allow the legacy PXE and lwip stacks to live side by side, and the intention was that net_core_init() would take a protocol argument to build a protocol-specific object. It turned out to be easier to call either udp or tcp functions directly because the semantics of read/write differ between protocols. Booting an IPv4 EFI PXE stack using tftp and http has been tested. There are a couple of TODO items left, o dns resolve code is missing o ftp hasn't been tested Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* | Merge tag 'syslinux-5.10-pre2' into for-hpa/elflink/firmwareMatt Fleming2013-03-223-9/+14
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | syslinux-5.10-pre2 Conflicts: NEWS com32/include/netinet/in.h com32/include/sys/cpu.h com32/lib/Makefile core/Makefile core/fs/diskio.c core/fs/pxe/pxe.h core/init.c core/mem/free.c core/mem/malloc.c mk/devel.mk version
| * Merge branch 'lwip' into elflinkMatt Fleming2013-02-261-4/+7
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Welcome to Syslinux 5.10. Conflicts: NEWS com32/lib/Makefile com32/lib/sys/open.c com32/lib/syslinux/ipappend.c com32/modules/Makefile com32/modules/prdhcp.c core/Makefile core/cmdline.inc core/com32.inc core/comboot.inc core/configinit.inc core/fs/chdir.c core/fs/fs.c core/fs/pxe/dnsresolv.c core/fs/pxe/pxe.c core/fs/pxe/pxe.h core/idle.c core/include/ctype.h core/init.inc core/mem/init.c core/parseconfig.inc core/runkernel.inc core/syslinux.ld core/ui.inc doc/comboot.txt version
| | * core: Add "dprint" facility to assemblyH. Peter Anvin2011-06-271-4/+7
| | | | | | | | | | | | | | | | | | | | | Add a "dprint" facility to the assembly files, which simply calls dprintf if debugging is enabled. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
| * | mem: Add magic field to detect memory corruptionMatt Fleming2013-02-211-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Very little checking is performed on the validity of freelist metadata. Add a magic field to struct arena_header which can be used to detect memory corruption or whether a user tries to free something that isn't a malloc pointer. This feature can be enabled with -DDEBUG_MALLOC. Turn it on for development in mk/devel.mk. Cc: H. Peter Anvin <hpa@zytor.com> Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* | | Merge tag 'syslinux-5.01' into firmwaresyslinux-6.00-pre4Matt Fleming2013-01-292-4/+11
|\ \ \ | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | Rename libcom32gpl.c32 to libgpl.c32H. Peter Anvin2013-01-171-1/+1
| | | | | | | | | | | | | | | | | | Conform to 8.3 filenames for essential files. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
| * | Rename libutil_com.c32 to libutil.c32H. Peter Anvin2013-01-171-1/+1
| | | | | | | | | | | | | | | | | | Conform to 8.3 filenames for essential files. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
| * | Always strip all the modulesH. Peter Anvin2013-01-172-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | mk/embedded.mk: Don't use -mregparm in coreMatt Fleming2013-01-081-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Unfortunately commit 4eb06d95d882 ("mk: Add -fPIC for x86_64 to embedded.mk") left -mregparm enabled when compiling objects in core/, which means that when compiling for i386 those objects are compiled with a different ABI compared with everything else, leading to hangs when booting under 32-bit EFI. We should only enable -mregparm for code that absolutely requires it, such as dos/crt0.S which would need to be re-written to use another ABI. Signed-off-by: Matt Fleming <matt.fleming@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>
| * | Symbol export whitelistMatt Fleming2012-12-051-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before modules were dynamically loaded the boundary between GPL and non-GPL code was implicit because of the separate link domains for each module. With dynamic modules we need an explicit whitelist of core symbols that non-GPL code can link against at runtime without needing to be re-licensed under the GPL. Mark such symbols with __export, so that it is explicitly clear which symbols in the core can be linked against by non-GPL code. Reduce the visibility of symbols in both the core and ldlinux.c32 with -fvisibility=hidden. __export changes the visibility to 'default'. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* | | efi: Add -mno-red-zone to CFLAGSsyslinux-6.00-pre2Matt Fleming2012-11-211-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | The 'red zone' is a 128-byte area at the bottom of the stack frame and is defined as part of the SysV Application Binary Interface. However, UEFI firmware uses the Microsoft ABI, rather than the SysV ABI, and our red zone can become corrupt if we don't turn it off. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* | | efi: Add a simple script to find gnu-efi filesMatt Fleming2012-11-151-4/+9
| | | | | | | | | | | | | | | | | | | | | | | | The location of the installed gnu-efi libraries and header files varies wildly with different distributions. We need a way to find the correct location for a given architecture. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* | | mk: Add -fPIC for x86_64 to embedded.mkMatt Fleming2012-11-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Building for x86_64 requires that the object files be compiled with -fPIC, so delete the comment in embedded.mk. With this change we can remove lib.mk and efi.mk from core/Makefile. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* | | firmware: Make disk->private an opaque typeMatt Fleming2012-11-151-11/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We've currently got both the BIOS and EFI versions of struct disk_private in core/include/disk.h, which isn't ideal because this file shouldn't need to know about the inner-workings of the firmware's private disk info. Move the implementation of 'struct disk_private' into more suitable locations and use a void * for the 'private' member of struct disk. This change allows us to once and for all delete the gnu-efi header files from core/include/core.h and the gnu-efi include paths from mk/lib.mk. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* | | firmware: Move memory operations into firmwareMatt Fleming2012-11-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Instead of littering core/mem with #ifdef SYSLINUX_EFI move memory operations into the 'firmware' structure so that they can be implemented differently for BIOS and EFI. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* | | Merge tag 'syslinux-5.00-pre10' into for-hpa/elflink/firmwareMatt Fleming2012-11-142-1/+2
|\ \ \ | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | Pull in the latest prerelease that includes some bug fixes for ldlinux and a realloc() bug in core/. Conflicts: com32/cmenu/Makefile com32/elflink/ldlinux/Makefile com32/lib/Makefile core/pxelinux.asm
| * | mk: Add Makefile variable for pythonMatt Fleming2012-11-121-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of hard-coding the python executable name use a make variable like we do for all other executables used during the build. This has the added bonus of allowing $(PYTHON) to be overridden on the command line, e.g. make PYTHON=python2 which is particularly useful for distributions where /usr/bin/python is actually python3. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* | | Merge tag 'syslinux-5.00-pre9' into for-hpa/elflink/firmwareMatt Fleming2012-11-051-1/+1
|\ \ \ | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | This merge also includes the Syslinux-4.06 release. Conflicts: Makefile com32/hdt/Makefile com32/modules/Makefile com32/samples/hello.c mtools/Makefile
| * | Clean up $(GPLLIB) leakMatt Fleming2012-10-191-1/+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>