| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
| |
gcc 4.6 warns on variables set but not used, so remove them.
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>
|
| |
|
|
|
|
| |
no need to keep several versions of it.
|
|
|
|
|
| |
This removable was introduced by commit
bfcd7b7305c5465eb33acca86109ca96cb37403a
|
|
|
|
| |
Taken from http://www.lua.org/ftp/patch-lua-5.1.4-2
|
|
|
|
|
|
| |
Updating base code to 5.1.4
Adding -DSYSLINUX build flag
Moving #if 0 to ifndef SYSLINUX
|
|
|
|
|
| |
This code was static and unused. At least, if we need it let's reuse the
code from the vesa lib.
|
| |
|
|
|
|
| |
Simple patch to make gcc happy during build in -Wall -Werror
|
|
|
|
|
| |
This patch adds some correction of the dmi structures but also add the
support of the cpu cores/threads.
|
|
|
|
|
| |
Remove an obsolete FIXME comment; the problem was caused by a stale
library.
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
| |
Remove obsolete header used for old sleep function.
Signed-off-by: Gert Hulselmans <gerth@zytor.com>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
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 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>
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| | |
Added some comments
Fixed cmdline parsing
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| |
| |
| | |
Need header files for functions we invoke.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
|/
|
|
| |
Update the lua code to work with Syslinux 4.
|
| |
|
| |
|
| |
|
|
|
|
| |
Signed-off-by: Alexey Zaytsev <zaytsev.a@protei.ru>
|
|
|
|
| |
Signed-off-by: Alexey Zaytsev <zaytsev.a@protei.ru>
|
|
|
|
| |
Signed-off-by: Alexey Zaytsev <zaytsev.a@protei.ru>
|
|
|
|
| |
Signed-off-by: Alexey Zaytsev <zaytsev.a@protei.ru>
|
|
|
|
| |
Signed-off-by: Alexey Zaytsev <zaytsev.a@protei.ru>
|
|
|
|
|
|
| |
from http://lua-users.org/wiki/LuaPowerPatches
Signed-off-by: Alexey Zaytsev <zaytsev.a@protei.ru>
|