summaryrefslogtreecommitdiff
path: root/com32/lua/src
Commit message (Collapse)AuthorAgeFilesLines
* lua: return the modified object from the initramfs methodsFerenc Wágner2014-10-131-2/+4
| | | | Signed-off-by: Ferenc Wágner <wferi@niif.hu>
* lua: initramfs: enable adding nonempty filesFerenc Wágner2014-10-131-4/+11
| | | | Signed-off-by: Ferenc Wágner <wferi@niif.hu>
* lua: don't do a local boot when asked to final_cleanupFerenc Wágner2014-10-131-2/+1
| | | | Signed-off-by: Ferenc Wágner <wferi@niif.hu>
* lua: do not leak initramfs data chunks on garbage collectionFerenc Wágner2014-10-131-0/+16
| | | | Signed-off-by: Ferenc Wágner <wferi@niif.hu>
* lua: make initramfs structures full userdata objects with methodsFerenc Wágner2014-10-131-25/+43
| | | | Signed-off-by: Ferenc Wágner <wferi@niif.hu>
* lua: unused optional arguments can goFerenc Wágner2014-10-121-10/+0
| | | | | | Not expecting them does not cause any problems, they are ignored by Lua anyway. Signed-off-by: Ferenc Wágner <wferi@niif.hu>
* lua: make the file operations methodsFerenc Wágner2014-10-121-2/+7
| | | | | | This also enables manual unloading of files by callig f:__gc(). Signed-off-by: Ferenc Wágner <wferi@niif.hu>
* lua: garbage collect file objectsFerenc Wágner2014-10-121-0/+15
| | | | Signed-off-by: Ferenc Wágner <wferi@niif.hu>
* lua: represent syslinux files as full userdataFerenc Wágner2014-10-121-21/+13
| | | | | | | | | Light userdata don't have individual metatables, thus they aren't suitable for type checking. Also, a200ad6d replaced relying on reused memory (from luaL_checkstring) with writing to uninitialized pointers; copy the filename instead into freshly allocated memory. Signed-off-by: Ferenc Wágner <wferi@niif.hu>
* lua: Remove even more cruft from syslinux.cFerenc Wágner2014-10-121-44/+2
| | | | Signed-off-by: Ferenc Wágner <wferi@niif.hu>
* lua: vesa: delete stray would-be-debug outputFerenc Wágner2014-10-111-2/+0
| | | | Signed-off-by: Ferenc Wágner <wferi@niif.hu>
* lua: share the export macro (CPP only change)Ferenc Wágner2014-10-111-39/+39
| | | | Signed-off-by: Ferenc Wágner <wferi@niif.hu>
* lua: add the IMAGE_TYPE table to the syslinux moduleFerenc Wágner2014-10-111-0/+13
| | | | Signed-off-by: Ferenc Wágner <wferi@niif.hu>
* lua: make kernel and initrd progress output match in sl_boot_linuxFerenc Wágner2014-10-111-4/+4
| | | | Signed-off-by: Ferenc Wágner <wferi@niif.hu>
* lua: Remove additional old cruft from sl_boot_linux()syslinux-6.03-pre9H. Peter Anvin2014-03-131-4/+0
| | | | | | More obsolete cruft... Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* lua: Remove obsolete crap from sl_boot_linux()syslinux-6.03-pre8H. Peter Anvin2014-03-131-29/+0
| | | | | | sl_boot_linux() contained a bunch of random obsolete garbage. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* lua: In sl_initramfs_add_file(), actually use the real file nameH. Peter Anvin2014-03-131-3/+3
| | | | | | Instead of "/testfile1", actually use the real file name... Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* lua: base the package load paths on the Syslinux pathFerenc Wágner2014-03-022-2/+35
|
* lua: upgrade to 5.2.3Ferenc Wágner2014-03-0258-89/+127
|
* lua: start of a binding module for libmenu.c32Ferenc Wágner2014-03-022-0/+94
|
* lua: make the dmi module standaloneFerenc Wágner2014-03-012-4/+14
| | | | | | By copying two short functions from the cpu module. They do not warrant a separate module. Also make those functions static in both modules.
* lua: also reactivate the cpu, dhcp, dmi, pci and vesa extension modulesFerenc Wágner2014-03-016-8/+13
| | | | And document the change in usage.
* lua: bind get_key() in the syslinux moduleFerenc Wágner2014-03-011-0/+49
|
* lua: reactivate the syslinux extension moduleFerenc Wágner2014-03-012-2/+3
| | | | | Under Lua 5.2 modules are not expected to set global variables to reduce namespace pollution. Explicit require() is preferred.
* lua: add the LuaFileSystem libraryFerenc Wágner2014-03-012-0/+297
|
* lua: enable dynamic module loadingFerenc Wágner2014-03-012-0/+48
|
* lua: the COM32 API does not support freopen()Ferenc Wágner2014-03-011-0/+2
| | | | Nor the concept of text vs. binary open mode, so it does not matter.
* lua: the COM32 API does not support time()Ferenc Wágner2014-03-011-0/+5
|
* lua: the COM32 API actually supports exit() of oslibFerenc Wágner2014-03-012-1/+11
|
* lua: the COM32 API supports only part of iolibFerenc Wágner2014-03-012-0/+25
|
* lua: the COM32 API does not provide strcoll()Ferenc Wágner2014-03-011-0/+3
|
* lua: use integer arithmeticFerenc Wágner2014-03-016-11/+94
|
* lua: the COM32 API does not provide locale.hFerenc Wágner2014-03-011-0/+4
|
* lua: explicitly put the console in standard modeFerenc Wágner2014-03-011-0/+4
|
* lua: the COM32 API does not provide signal.hFerenc Wágner2014-03-011-0/+6
|
* lua: replace src/Makefile to build Lua as a Syslinux COM32 moduleFerenc Wágner2014-03-011-172/+49
| | | | | | | | Start with the src/Makefile in Syslinux before importing Lua 5.2.2. Refresh the core Lua object list based on the original Makefile. Add the new builtin library objects. Temporarily remove the Syslinux extension library objects, as they need adjustments for the new API.
* lua: import Lua 5.2.2Ferenc Wágner2014-03-0162-6434/+9453
| | | | | | Source downloaded from http://www.lua.org/ftp/lua-5.2.2.tar.gz. The com32/lua directory now matches exactly the source distribution, plus the various Syslinux extension modules and their documentation.
* com32sys_t inreg shall be zeroified prior intcallErwan Velu2014-01-221-1/+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-291-3/+4
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * Always strip all the modulesH. Peter Anvin2013-01-171-3/+4
| | | | | | | | | | | | | | | | 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-pre9' into for-hpa/elflink/firmwareMatt Fleming2012-11-054-219/+482
|\ \ | |/ | | | | | | | | | | | | | | | | | | 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-244-219/+482
| |\ | | | | | | | | | | | | | | | | | | | | | | | | 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
| | * In the current Lua.c32 DMI implementation, it is a flat table with dotted ↵Hung-chi Lihn2012-09-222-208/+420
| | | | | | | | | | | | | | | | | | | | | | | | | | | names in table entries. It also misses a number DMI sub-tables. This patch, cleans up the DMI table structure using Lua's nested table structure and adds all missing DMI sub-tables. If a DMI sub-table is not supported by the hardware (not filled), then the corresponding sub-table will not be generated. This helps to make the table structure cleaner and reflects the actual DMI information. Signed-off-by: Hung-chi Lihn <hlihn@google.com> Signed-off-by: Erwan Velu <erwanaliasr1@gmail.com>
| | * Added the native syslinux functions config_file(), ipappend_strs(), and ↵Hung-chi Lihn2012-09-221-0/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | reboot() to Lua.c32. This allows the Lua script to query the config file name and the ipappend strings (pxelinux only), as well as to perform reboot (warm and cold) to the system. In Lua.c32, the extension will be used as the following: 1. syslinux.config_file() will return the config file string. 2. syslinux.ipappend_strs() will return a table of IPAPPEND strings with numerical indices. 3. syslinux.reboot() will perform cold reboot, while syslinux.reboot(1) will perform warm reboot. Signed-off-by: Hung-chi Lihn <hlihn@google.com> Signed-off-by: Erwan Velu <erwanaliasr1@gmail.com>
| | * The current Lua.c32 does not enable io.read() due to some missing library ↵Hung-chi Lihn2012-09-221-11/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | functions. However, this strongly limits the Lua script from getting user inputs and reading files (even in pxelinux via TFTP). This patch enables io.read() in Lua.c32 with some restrictions: 1. the io.read("*line") is fully supported. 2. the io.read("*number") is not supported due to the missing buffering in underlying file I/Os. However, the user can read a line using io.read() and convert the string to numbers using the built in pattern matching and number conversion features. 3. io.read(bytes) is supported. However, io.read(0) will not be a valid test for EOF due to the missing I/O buffering. io.read() will return nil if EOF is encountered. This offers an alternative way to handle EOF. Signed-off-by: Hung-chi Lihn <hlihn@google.com> Signed-off-by: Erwan Velu <erwanaliasr1@gmail.com>
* | | Add per-firmware object directory supportMatt Fleming2012-10-161-2/+1
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Merge branch 'master' into elflinkMatt Fleming2012-07-191-2/+2
|\ \ | |/ | | | | | | | | | | | | | | | | | | The reason for this merge is that we need the fix to core/fs/cache.c without which we can potentially dereference an invalid pointer. The below conflict is a result of the new setup_data blob code being merged from the master branch. Conflicts: com32/lib/Makefile
| * com32: Add device tree supportThierry Reding2012-06-291-2/+2
| | | | | | | | | | | | | | | | This commit adds support for passing a Flattened Device Tree (FDT) blob to the Linux kernel. Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de> Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* | Delete all references to __com32.cs_bounceMatt Fleming2012-06-081-9/+22
| | | | | | | | | | | | | | | | | | 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-315-0/+412
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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