| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Unresolved symbols in an object file cannot be resolved from shared
libraries that are listed earlier in $(LIBMENU). We need to put the
shared libraries at the end of $(LIBMENU).
commit 1408e6ca ("Add per-firmware object directory support") appears to
have broken this rule, which resulted in hdt.c32 (among other modules)
failing to load with,
"Undef symbol FAIL: symbol console_ansi_raw"
Add a simple regression test that loads hdt.c32.
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
|
|
|
|
|
|
|
|
|
| |
Use the one from syslinux/video.h. This makes it easier to write unit
tests for syslinux/load_linux.c without pulling in loads of core
definitions from core/include/graphics.h. It can also be argued that
syslinux_* symbols should have prototypes in syslinux/*.h files.
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If distribution package maintainers follow the advice in
doc/distrib.txt for rebuilding the installers, they'll currently hit the
following error when executing 'make install'
install: cannot stat ‘com32/cmenu/libmenu/*.c32’: No such file or directory
Follow what every other module does and only delete .c32 files for the
spotless target.
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| |
| |
| | |
Conform to 8.3 filenames for essential files.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| |
| | |
Signed-off-by: Paulo Alcantara <pcacjr@zytor.com>
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
|
|\ \
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| |
| |
| |
| |
| | |
We can dynamically resolve our symbols and so we don't need to jump
through __intcall(), which is deprecated anyway in favour of dynamic
resolution.
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
|
|\ \
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This extends commit 4678fd92a21e ("elflink: fix dependency problem in
cmenu/Makefile") and basically reverts commit fb543aa635ff ("com32:
Per-object file LDFLAGS"). By using the --as-needed ld argument we can
specify all the required shared libraries for a directory, even if not
all of the libraries are needed by every .c32 file. --as-needed takes
care of only creating DT_NEEDED entries for the shared libraries that
are actually required to resolve undefined symbols in a given module.
Furthermore, by using $(LIBS) we create a dependency between .c32
files and their shared libraries, which allows multiple make jobs to
run in parallel.
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
|
|
|
|
|
|
|
|
| |
There's no reason to use the COMBOOT API at all now that we can have
any undefined symbols resolved at runtime - we can just access
functions directly.
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Instead of adding library dependencies implicitly, make them explicit
and use --as-needed to avoid bogus DT_NEEDED entries from being
generated.
The other Makefiles should be adjusted accordingly as well.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Cc: Matt Fleming <matt.fleming@intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
In preparation for moving com32/menu/menu.h to com32/include/ let's
rename com32/cmenu/menu.h. This stops us having two header files named
menu.h which would mean that we'd have to be super careful with our
include paths to ensure we included the correct header.
Signed-off-by: Matt Fleming <matt.fleming@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Move the MCONFIG files into a mk/ directory and give them more
descriptive names.
This is purely a cosmetic change to make the 'include' directives a
bit more coherent by making it obvious exactly which MCONFIG file
we're including. For example, in com32/lua/src/Makefile we exchange
the line,
include ../../MCONFIG
for the much more comprehensible,
include $(MAKEDIR)/com32.mk
Signed-off-by: Matt Fleming <matt.fleming@linux.intel.com>
|
|
|
|
|
|
|
|
| |
If x is NULL, we're supposed to pass 0 for ipappend; this was
incorrect in the template and the gcc 4.6 unused variable warning
caught it.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
|
|
|
|
|
| |
gcc 4.6 warns on variables set but not used, so remove them.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
|
|
|
|
|
|
|
|
|
| |
This fixes the issue in hdt.c32 that Kent Robotti noticed where
exiting directly from Menu Mode caused the cursor to not be displayed.
This same issue also affects com32/cmenu/simple.c32 and probably
others using showmenus().
Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
|
|
|
|
|
|
| |
Add proper sleep() and msleep() functions, which among other things
call syslinux_idle(), and make Lua use them.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
|
|
|
|
|
|
| |
Remove Makefile rules which were both redundant (../MCONFIG contains
the rules in a central manner) and just plain wrong.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
|
|
|
|
|
| |
Fix the type of the login_handler() function.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
|
|
|
|
|
| |
Clean up warnings, even though this is sample code.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
|
|
|
|
|
|
| |
Fix a signedness error, which in turn was caused by needlessly
complicated code.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
|
|
|
|
|
| |
Make it a prototype
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
|
|
|
|
|
| |
Is this really correct?!
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
|
|
|
|
| |
login_handler have to follow the (t_menusystem * ms, t_menuitem * mi)
prototype defined by t_handler_return
|
|
|
|
|
|
|
| |
() is not a prototype, and means (...) not (void) in C.
Replace with (void).
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
|
|
|
|
|
|
|
| |
() means the same as (...) in C, not the same as (void) as it does in
C++. It is generally misused to mean (void), though. Actually write
what we mean... this is C, after all.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
|
|
|
|
|
|
| |
Impact: avoid memory corruption with hdt
Some users reported systems with 89 pci devices. This case requires to
increase theses values
|
|
|
|
|
|
|
|
|
|
| |
Reset the cursor at the top left corner of the screen when exiting the
menu. This fixes odd behaviors when switching back and forth between CLI
and menu in HDT.
Closes: #14
Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
|
|
|
|
|
|
|
|
|
|
| |
Use ^ and v as hints for scrolling. Use \141 from the Special Characters and
Line Drawing Character Set as the scrollbox.
Note: printf "\016\141\017" doesn't seem to work well on xterm, although
it does work on the vga console.
Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
|
|
|
|
|
|
| |
0xFFFF is invalid (no help)
Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
After exiting the keys_handler, reset_ui() is not enough since it
only resets the status line and title. The current menu needs to be redrawn.
Note: only a submenu will be redrawn, not its parents. This means that not
all the UI will be displayed after exiting the handler if invoked from whithin a
submenu. We have already this problem nowadays when exiting a submenu
of a submenu. The root parent is not redrawn, leading to some ugly states
(the background color overrides part of the root menu).
This will be fixed when we implement a real hierarchy (each submenu having
access to its parents).
Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
|
|
|
|
|
|
|
|
|
|
| |
cmenu currently redraws everything after each key press. This doesn't scale
well, especially over serial. Instead, redraw only the previous/current selected
entries. A full redraw is still needed when scrolling though.
Misc.: add CTRL-L combo to force a redraw of the current menu.
Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
|
|
|
|
|
|
|
|
| |
complex.c has a special checkbox_handler that disables mutual exclusive
entries. This works today because each key press triggers a redraw of the whole
menu. We can't rely on this if we want to optimize the redraw.
Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
|
|
|
|
|
|
|
| |
The keys_handler can change the UI (e.g. the help system draws a black
background by default). We need to redraw the background and title on exit.
Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
|
|
|
|
|
|
|
|
|
|
| |
The manual states that the help filename format is hlp<NNNNN>.txt where
<NNNNN> is the helpid.
If the helpid contains less than 5 digits, pad with zero, not spaces,
i.e. look for hlp00023.txt, not hlp 23.txt.
Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
|
|
|
|
|
|
| |
Remove legacy scrollupwindow definition and checkkbdbuf declaration.
Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
|
|
|
|
|
|
|
| |
With the recent changes in cmenu, the help feature was completely broken.
Fix it.
Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
|
|
|
|
|
|
|
|
|
| |
The keys handler accepts three arguments: the current menu system, the current
menu entry and the key pressed.
Misc: fix timeout in complex.c to actually be 10 seconds.
Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
|
|
|
|
|
|
|
| |
Syslinux already uses a get_key library to handle stdin. Let's leverage it.
cmenu now works over serial completely.
Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
|
|
|
|
|
|
|
| |
To have a blue background on the console (serial), we need to fill
the screen with a printable character (e.g. space).
Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
|
|
|
|
|
|
| |
CHABSATTR and CHRELATTR have been replaced by SO/SI.
Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
|