summaryrefslogtreecommitdiff
path: root/com32/lua/src
Commit message (Collapse)AuthorAgeFilesLines
* lua: Adding dhcp supportTimm Gleason2012-01-075-0/+412
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds DHCPINFO functionality to the lua.c32 binary gettable() returns a table of the BOOTP message fields returned by the DHCP server for use in a Lua pxeboot script See http://tools.ietf.org/html/rfc1542 lua key value RFC key ----------------------------------------------------------------------- opcode op message opcode hardware.type htype Hardware address type hardware.length hlen Hardware address length hops hops Used by relay agents transaction.id xid transaction id elapsed.seconds secs Secs elapsed since client boot flags flags DHCP Flags field client.ip.addr ciaddr client IP addr your.ip.addr yiaddr 'Your' IP addr. (from server) server.ip.addr siaddr Boot server IP addr gateway.ip.addr giaddr Relay agent IP addr client.mac chaddr Client hardware addr server.hostname sname Optl. boot server hostname boot.file file boot file name (ascii path) magic.cookie cookie Magic cookie getoptions() returns a table of the DHCP Options field of the BOOTP message returned by the DHCP server for use in a Lua pxeboot script. Many of the options are reurned formatted in as strings in a standard, recognizable format, such as IP addresses. 1, 2, and 4 byte numerical options are returned as integers. Other Options with non-standard formats are returned as strings of the raw binary number that was returned by the DHCP server and must be decoded in a Lua script The Options table returns the Option code as the key except where there are multiple values returned. In those cases, an extra key increment number is added to allow individual access to each Option value. lua key value value Name ----------------------------------------------------------------------- 1 Subnet Mask 6.1 DNS Server [element 1] 6.2 DNS Server [element 2] 6.3 DNS Server [element 3] 209 PXE Configuration File 21.1 Policy Filter [element 1] 21.2 Policy Filter [element 2] Options that can have a list of values, but contain only one (like Option 6) will not return with .sub key values. Usage: t = dhcp.gettable() for k,v in pairs(t) do print(k.." : "..v) end
* lua: Delete superfluous $(LIBS) prerequisiteMatt Fleming2011-04-161-2/+1
| | | | | | | com32.mk already includes the necessary library in $(C_LIBS), we don't need to list them again in $(LIBS). Signed-off-by: Matt Fleming <matt.fleming@linux.intel.com>
* Makefile: Move Makefile fragments into mk/Matt Fleming2011-04-071-1/+2
| | | | | | | | | | | | | | | | | | 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>
* com32/lua/src/vesa.c: remove variables set but not usedH. Peter Anvin2011-03-161-4/+1
| | | | | | gcc 4.6 warns on variables set but not used, so remove them. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* com32/lua/src/syslinux.c: remove variables set but not usedH. Peter Anvin2011-03-161-6/+7
| | | | | | gcc 4.6 warns on variables set but not used, so remove them. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* lua: Adding CPU moduleErwan Velu2011-02-084-1/+163
|
* com32: single instance of skipspace()Erwan Velu2011-02-071-18/+10
| | | | no need to keep several versions of it.
* lua: Adding PCI initErwan Velu2011-02-071-0/+1
| | | | | This removable was introduced by commit bfcd7b7305c5465eb33acca86109ca96cb37403a
* lua: Updating to 5.1.4.2Erwan Velu2011-02-077-20/+37
| | | | Taken from http://www.lua.org/ftp/patch-lua-5.1.4-2
* lua: Updating to 5.1.4Erwan Velu2011-02-0718-90/+146
| | | | | | Updating base code to 5.1.4 Adding -DSYSLINUX build flag Moving #if 0 to ifndef SYSLINUX
* lua: removing duplicated code from vesa.cErwan Velu2011-02-061-22/+0
| | | | | This code was static and unused. At least, if we need it let's reuse the code from the vesa lib.
* lua: Preventing gcc warning on vesa.cErwan Velu2011-02-061-0/+2
|
* lua: Making lua building with no gcc errorErwan Velu2011-02-062-12/+15
| | | | Simple patch to make gcc happy during build in -Wall -Werror
* DMI: Adjusting structures size / Adding cpu coreLaurent Licour2011-01-301-0/+12
| | | | | This patch adds some correction of the dmi structures but also add the support of the cpu cores/threads.
* lua: remove obsolete FIXME commentGeert Stappers2010-07-201-2/+0
| | | | | Remove an obsolete FIXME comment; the problem was caused by a stale library.
* lua: Add .syslinux.derivative() and .syslinux.version()Gert Hulselmans2010-07-071-1/+39
| | | | | | | Add .syslinux.derivative() and .syslinux.version(). Add an example script which shows how you can use .syslinux.derivative(). Signed-off-by: Gert Hulselmans <gerth@zytor.com>
* lua: remove obsolete header used for old sleep functionGert Hulselmans2010-07-061-1/+0
| | | | | | Remove obsolete header used for old sleep function. Signed-off-by: Gert Hulselmans <gerth@zytor.com>
* lua: change syslinux.sleep() to seconds, syslinux.msleep() to msH. Peter Anvin2010-07-051-1/+10
| | | | | | | For consistency with just about everything else, make syslinux.sleep() count seconds, and syslinux.msleep() count milliseconds. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* com32: add proper sleep()/msleep() functions and make Lua use themH. Peter Anvin2010-07-052-5/+4
| | | | | | | 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>
* Merge remote branch 'marcel/luaext'H. Peter Anvin2010-07-056-11/+754
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Merge Marcel Ritter's work on the lua branch: The last time he wrote about the state of his lua branch: http://syslinux.zytor.com/archives/2009-October/013383.html The current state is: - VESA: - switching to vesa mode works - loading/displaying images works - display text works (s. com32/lua/test/vesa.lua) - PCI: - list PC devices + ID - get human-readable device name for device (s. com32/lua/test/pci.lua) - DMI: - get DMI info (BIOS, Hardware, etc). (s. com32/lua/test/dmi.lua) - syslinux: - loading files, kernel, initrd - start kernel, initrd, local boot ... just working on this, so no example lua file right now Most of the actual merging work was done by Gert Hulselmans <gerth@zytor.com>. Resolved Conflicts: com32/lib/sys/vesa/initvesa.c com32/lua/src/Makefile Signed-off-by: H. Peter Anvin <hpa@zytor.com>
| * Loading of kernel and ramdisk worksMarcel Ritter2009-10-161-0/+120
| |
| * More debugging removedMarcel Ritter2009-10-151-0/+2
| |
| * Disabled debug outputMarcel Ritter2009-10-151-3/+4
| |
| * Fixed vesa stuffMarcel Ritter2009-10-102-1/+22
| |
| * Added sleep()Marcel Ritter2009-10-092-39/+92
| | | | | | | | | | Added some comments Fixed cmdline parsing
| * Prepare for arg parsing supportMarcel Ritter2009-10-091-1/+229
| |
| * COM32: lua - add vesa functions (only mode listing right now)Marcel Ritter2008-12-154-0/+133
| |
| * COM32: lua - basic pci functions implementedMarcel Ritter2008-12-154-1/+190
| |
* | lua: quiet warnings about unused variables and functionssyslinux-4.01H. Peter Anvin2010-07-023-2/+5
| | | | | | | | | | | | | | Quiet gcc warnings about unused variables and functions -- things that are not used in the Syslinux environment at this time. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* | lua: add parents to luaconf.h to quiet a gcc warningH. Peter Anvin2010-07-021-2/+2
| | | | | | | | | | | | | | | | gcc warns about suspicious-looking code with a comparison inside ==. The code is correct, but add parens so that gcc know we know it is correct. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* | lua: add missing <syslinux/boot.h> to syslinux.cH. Peter Anvin2010-07-021-0/+1
| | | | | | | | | | | | Need header files for functions we invoke. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* | lua: Modernize the MakefileH. Peter Anvin2010-07-021-73/+27
| | | | | | | | | | | | | | | | | | | | | | Modernize the Makefile for lua to match the current style, in particular to have it pick up its configuration and rules from the central MCONFIG file. This also fixes the incorrect use of "clean" vs. "spotless" which was picked up from the Makefile style in use at that time. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* | lua: update for Syslinux 4Geert Stappers2010-07-012-6/+16
|/ | | | Update the lua code to work with Syslinux 4.
* COM32: lua - added dmi functionsMarcel Ritter2008-12-154-1/+303
|
* COM32: lua - added simple syslinux_run_command functionMarcel Ritter2008-12-154-0/+34
|
* COM32: lua - (re-)enable liolib to get printf like functionMarcel Ritter2008-12-153-9/+17
|
* Err.Alexey Zaytsev2008-07-181-1/+1
| | | | Signed-off-by: Alexey Zaytsev <zaytsev.a@protei.ru>
* Final touhes.Alexey Zaytsev2008-07-183-2/+9
| | | | Signed-off-by: Alexey Zaytsev <zaytsev.a@protei.ru>
* Don't load the io and os libs, we cant compile them right now.Alexey Zaytsev2008-07-181-2/+2
| | | | Signed-off-by: Alexey Zaytsev <zaytsev.a@protei.ru>
* Can't load precompiled binaries because if missing ungetcAlexey Zaytsev2008-07-181-0/+2
| | | | Signed-off-by: Alexey Zaytsev <zaytsev.a@protei.ru>
* Add some more lua libs to be compiled.Alexey Zaytsev2008-07-181-2/+5
| | | | Signed-off-by: Alexey Zaytsev <zaytsev.a@protei.ru>
* Applyed the Go Long Lua! patchAlexey Zaytsev2008-07-186-6/+89
| | | | | | from http://lua-users.org/wiki/LuaPowerPatches Signed-off-by: Alexey Zaytsev <zaytsev.a@protei.ru>
* Replace strcoll with strcmp, we don't have the locale stuff.Alexey Zaytsev2008-07-181-1/+2
| | | | Signed-off-by: Alexey Zaytsev <zaytsev.a@protei.ru>
* Remove the signal.h dependency from lua.cAlexey Zaytsev2008-07-181-5/+5
| | | | Signed-off-by: Alexey Zaytsev <zaytsev.a@protei.ru>
* Remove the locale.h dependency from llex.hAlexey Zaytsev2008-07-181-3/+3
| | | | Signed-off-by: Alexey Zaytsev <zaytsev.a@protei.ru>
* Compile liblua, lua.c32Alexey Zaytsev2008-07-181-10/+19
| | | | Signed-off-by: Alexey Zaytsev <zaytsev.a@protei.ru>
* Copy the Makefile from the samples dir.Alexey Zaytsev2008-07-181-0/+91
|
* Rename the Lua MakefilesAlexey Zaytsev2008-07-181-0/+0
| | | | Signed-off-by: Alexey Zaytsev <zaytsev.a@protei.ru>
* Import Lua 5.1.3Alexey Zaytsev2008-07-1856-0/+17108
Signed-off-by: Alexey Zaytsev <zaytsev.a@protei.ru>