1 local sl = require "syslinux"
2 local vesa = require "vesa"
3 local dmi = require "dmi"
4 local pci = require "pci"
6 vesa.setmode("800x600")
7 --vesa.load_background "sample2.jpg"
9 for c in string.gmatch ("Hello World! - VESA mode", ".") do
17 -- cmdline(ix) = concatenates the command line arguments from
18 -- the index ix and up, with space separation
22 line = line .. " " .. arg[ix]
25 return string.sub(line,2) -- drop the initial space
28 -- dumptable(tbl) = print table entries
29 function dumptable(name, tbl,vtype)
30 print("== begin "..name)
32 for k,v in pairs(tbl) do
33 if vtype == nill or type(v) == vtype then
40 print( "== end " .. name )
44 -- dump_G(k) = print the value of _G[k]
46 dumptable(k,_G[k],nil)
51 dumptable("tables",_G,"table")
52 dumptable("package.loaded",_G["package"]["loaded"], nil)
53 dumptable("pci.getidlist",pci.getidlist("/pci.ids"), nil)
57 dmitable = dmi.gettable()
58 dumptable("dmitable",dmitable,nil)
59 --dumptable("dmitable.dmi_info",dmitable["dmi_info"],nil)
63 -- dumptable("dmitable.system",dmitable.system,nil)
64 -- dumptable("dmitable.bios",dmitable.bios,nil)
65 --dumptable("dmitable.chassis",dmitable.chassis,nil)
68 print(arg[1].." "..cmdline(2))
69 x = sl.get_key(600000)
71 sl.boot_linux(arg[1],cmdline(2))
74 sl.run_command("vesamenu")