Shao Miller [Thu, 29 Oct 2009 23:14:57 +0000 (19:14 -0400)]
[chain] Run Nindent on chain.c
Gert Hulselmans [Thu, 29 Oct 2009 23:13:44 +0000 (19:13 -0400)]
[chain] Add support for chain-loading another isolinux.bin
Add 'isolinux=' option to chain.c32 for chain-loading
another isolinux.bin.
Erwan Velu [Thu, 29 Oct 2009 21:14:58 +0000 (22:14 +0100)]
hdt: Adding hdt.img.gz target
Impact: It's now possible to have a gzipped floppy image
'make hdt.img.gz' now generates a gzipped floppy image
Erwan Velu [Wed, 28 Oct 2009 19:51:11 +0000 (20:51 +0100)]
disklib: Adding new grub2 mbr magic
Impact: Detecting newer release of Grub2
Newer releases of grub2 have a eb63 signature
Erwan Velu [Wed, 28 Oct 2009 19:10:12 +0000 (20:10 +0100)]
disklib: Fixing Syslinux Detection
Impact: Syslinux is now detected as bootloader
A test wasn't correct and prevented the Syslinux mbr detection
Erwan Velu [Tue, 27 Oct 2009 22:33:12 +0000 (23:33 +0100)]
hdt: Fixing hdt.iso target, pci.ids was missing
Impact: Iso file is now having pci.ids
The makefile did forget to copy the pci.ids into the iso.
This stupid test is fixed.
Thx gert from reporting it.
Erwan Velu [Tue, 27 Oct 2009 20:10:26 +0000 (21:10 +0100)]
hdt: Adding Gert as contributor
Impact: none
Gert is contributing in hdt, he have to be in the contributor list
Pierre-Alexandre Meyer [Tue, 27 Oct 2009 20:04:31 +0000 (13:04 -0700)]
Merge commit 'erwan/master' into hdt-0.3.5
Gert Hulselmans [Tue, 27 Oct 2009 19:31:42 +0000 (20:31 +0100)]
Improving chain.c32 help message
Impact: Error message is more detailed
In case of syntax error, the message is far more detailed and provides
the same content as the documentation integrated in the source code.
Erwan Velu [Tue, 27 Oct 2009 15:32:30 +0000 (16:32 +0100)]
hdt: Removing useless Author Name
Impact: visual
Pierre do much work on it, no need to keep my name everywhere ;)
Erwan Velu [Tue, 27 Oct 2009 15:29:02 +0000 (16:29 +0100)]
Merge branch 'master' of ssh://terminus.zytor.com//pub/git/users/erwan/hdt
Erwan Velu [Wed, 21 Oct 2009 20:55:54 +0000 (22:55 +0200)]
hdt: Cleaning Makefile
Impact: none
We use more variables to have a clean makefile
Erwan Velu [Mon, 19 Oct 2009 13:26:20 +0000 (15:26 +0200)]
Merge commit 'hpa/master'
Erwan Velu [Mon, 19 Oct 2009 13:24:28 +0000 (15:24 +0200)]
hdt: Adding hdt.iso target
Impact: It's now possible to generate a bootable iso
make hdt.iso now generates a bootable iso
H. Peter Anvin [Mon, 12 Oct 2009 22:59:21 +0000 (15:59 -0700)]
mboot: correct the detection of the multiboot header
Correct the detection of the multiboot header. The logic for
when the header extends past the file was backwards, which broke
non-ELF multiboot kernels completely. Apparently they are few and far
between.
Reported-by: Klaus T. <nightos@gmail.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
H. Peter Anvin [Wed, 7 Oct 2009 20:36:26 +0000 (13:36 -0700)]
Merge commit 'hdt/master'
Erwan Velu [Wed, 7 Oct 2009 07:53:27 +0000 (09:53 +0200)]
hdt: Adding missing hdt.c32 in 'make hdt.img'
Impact: hdt.img is now complete and running
After several modification of the makefile, the copy of hdt.c32 had
disapeared from the makefile :(
This commit reintroduce this missing.
'make hdt.img' is now working again
H. Peter Anvin [Mon, 5 Oct 2009 22:06:06 +0000 (15:06 -0700)]
pxelinux: handle hardcoded options both "before" and "after" DHCP
Make it possible to specify hardcoded options both "before" and
"after" the processing of DHCP/PXE options.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Erwan Velu [Mon, 5 Oct 2009 08:08:43 +0000 (10:08 +0200)]
hdt: Removing pci.ids
Impact: Removing optional file
The pci.ids have to be taken on the system or downloaded from the pciids
website. Syslinux doesn't have to provide it.
Gert Hulselmans [Sun, 4 Oct 2009 20:17:41 +0000 (22:17 +0200)]
hdt: Adding hdt.img target
Impact: add a bootable floppy image
The 'make hdt.img' command generates a hdt.img file.
hdt.img is a 2.88MB floppy bootable image.
Erwan Velu [Sun, 4 Oct 2009 18:44:23 +0000 (20:44 +0200)]
Merge commit 'hpa/master'
H. Peter Anvin [Wed, 30 Sep 2009 04:46:21 +0000 (21:46 -0700)]
utils/Makefile: install pxelinux-options
Make sure the pxelinux-options script gets installed.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
H. Peter Anvin [Wed, 30 Sep 2009 04:45:36 +0000 (21:45 -0700)]
NEWS: document pxelinux-options
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
H. Peter Anvin [Wed, 30 Sep 2009 04:32:42 +0000 (21:32 -0700)]
Merge branch 'hdt'
H. Peter Anvin [Wed, 30 Sep 2009 04:29:59 +0000 (21:29 -0700)]
pxelinux-options: add help text
Add help text to pxelinux-options.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Gert Hulselmans [Tue, 29 Sep 2009 19:51:17 +0000 (21:51 +0200)]
chain: missing some \n in error messages
Impact: visual
Some \n where missing in some error() calls.
Signed-off-by: Gert Hulselmans <kimmik999999@yahoo.co.uk>
H. Peter Anvin [Tue, 29 Sep 2009 23:49:00 +0000 (16:49 -0700)]
pxelinux: support hardcoded options "before" or "after"; tool
Support hardcoded DHCP options both "before" or "after" the
PXE-provided options.
Add a tool to manipulate these hardcoded options.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Erwan Velu [Tue, 29 Sep 2009 19:51:17 +0000 (21:51 +0200)]
chain: missing some \n one error messages
Impact: visual
Some \n where missing in some error() calls
Signed-off-by: Gert Hulselmans <kimmik999999@yahoo.co.uk>
Erwan Velu [Tue, 29 Sep 2009 18:31:11 +0000 (20:31 +0200)]
Adding VMX & SVM cpu flags
Impact: Hardware virtualization is now detected
Minor update to detect vmx & svm cpu flags
H. Peter Anvin [Thu, 17 Sep 2009 07:03:53 +0000 (00:03 -0700)]
pxelinux: support "hard-coding" DHCP options into the binary
Make it possible to patch pxelinux.0 so that it includes specific
options. This isn't possible for gpxelinux.0, but there it is
possible to instead modify the embedded script.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
H. Peter Anvin [Sun, 13 Sep 2009 20:41:56 +0000 (13:41 -0700)]
int18: module for local booting using INT 18h
At least until we can get a better handle on return vs INT 18h,
provide a module so we can at least tell people how to test.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
H. Peter Anvin [Thu, 10 Sep 2009 21:25:14 +0000 (14:25 -0700)]
gpxecmd: module to send an arbitrary command to gPXE
Simple module to send an arbitrary command to gPXE, assuming the gPXE
CLI API is available.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Pierre-Alexandre Meyer [Mon, 7 Sep 2009 23:23:48 +0000 (16:23 -0700)]
Merge branch 'cmenu-video' into hdt-next
Conflicts:
com32/hdt/hdt-cli-disk.c
com32/hdt/hdt-common.c
Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
Pierre-Alexandre Meyer [Mon, 7 Sep 2009 23:12:59 +0000 (16:12 -0700)]
Merge branch 'bootloader-detection' into hdt-next
Conflicts:
com32/hdt/hdt-cli-disk.c
com32/hdt/hdt-common.h
com32/hdt/hdt-menu-disk.c
Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
Pierre-Alexandre Meyer [Mon, 7 Sep 2009 22:54:57 +0000 (15:54 -0700)]
cmenu: use ASCII characters for scrollbars
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>
Pierre-Alexandre Meyer [Mon, 7 Sep 2009 22:17:22 +0000 (15:17 -0700)]
cmenu: do not invoke help if helpid is 0xFFFF (complex.c)
0xFFFF is invalid (no help)
Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
Pierre-Alexandre Meyer [Mon, 7 Sep 2009 22:10:20 +0000 (15:10 -0700)]
hdt: do not invoke help if helpid is 0xFFFF
0xFFFF is invalid (no help).
Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
Pierre-Alexandre Meyer [Mon, 7 Sep 2009 22:03:28 +0000 (15:03 -0700)]
cmenu: redraw the current menu after exiting the keys_handler
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>
Pierre-Alexandre Meyer [Mon, 7 Sep 2009 21:50:52 +0000 (14:50 -0700)]
hdt: remove extra LF
In a few places, extra LFs cause the menu to scroll ('\n' in the status bar).
Remove them (they are not needed anyway).
Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
Pierre-Alexandre Meyer [Mon, 7 Sep 2009 21:48:03 +0000 (14:48 -0700)]
cmenu: optimize redraw to be faster
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>
Pierre-Alexandre Meyer [Mon, 7 Sep 2009 21:44:34 +0000 (14:44 -0700)]
cmenu: force refresh after checkbox_handler in complex.c
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>
Pierre-Alexandre Meyer [Mon, 7 Sep 2009 18:18:13 +0000 (11:18 -0700)]
cmenu: redraw menu when exiting keys_handler
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>
Pierre-Alexandre Meyer [Mon, 7 Sep 2009 18:00:34 +0000 (11:00 -0700)]
cmenu: pad help filename with 0 instead of spaces
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>
Pierre-Alexandre Meyer [Sun, 6 Sep 2009 07:49:27 +0000 (00:49 -0700)]
cmenu: remove obsolete com32io code
Remove legacy scrollupwindow definition and checkkbdbuf declaration.
Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
Pierre-Alexandre Meyer [Sun, 6 Sep 2009 07:48:14 +0000 (00:48 -0700)]
cmenu: make the help menu actually work
With the recent changes in cmenu, the help feature was completely broken.
Fix it.
Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
Pierre-Alexandre Meyer [Sun, 6 Sep 2009 07:46:55 +0000 (00:46 -0700)]
hdt: fix build due to cmenu keyboard changes
Sames changes as the ones needed on the cmenu examples.
Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
Pierre-Alexandre Meyer [Sun, 6 Sep 2009 05:59:00 +0000 (22:59 -0700)]
libansi: add function to scroll up multiple lines
Impact: API change. scrollup() has been renamed scrollup_once().
Use scrollup(nb_of_lines) to specify the number of lines the window needs
to scroll.
Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
Pierre-Alexandre Meyer [Sun, 6 Sep 2009 05:55:28 +0000 (22:55 -0700)]
cmenu: fix handlers signature in the examples
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>
Pierre-Alexandre Meyer [Sun, 6 Sep 2009 05:51:04 +0000 (22:51 -0700)]
cmenu: use get_key library for keyboard functions
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>
Pierre-Alexandre Meyer [Sat, 5 Sep 2009 18:42:29 +0000 (11:42 -0700)]
libansi: correctly reset attributes
When resetting the attributes, we were updating last_attr to the unknown value
0x300, which doesn't always work.
For instance, when requesting reset and normal attributes, i.e.
"\e[0;30;47m" with the previous attribute being "\e[1;30;47m", we where printing
"\e[0;47m", which behaves like "\e[0;39;47m". This is incorrect.
This patch adds a flag to explicitly set background and foreground colors after
a reset.
Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
Pierre-Alexandre Meyer [Sat, 5 Sep 2009 18:35:09 +0000 (11:35 -0700)]
libansi: reset_colors should use csprint
cprint_vga2ansi takes only a char, not a string.
Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
Pierre-Alexandre Meyer [Sat, 5 Sep 2009 18:22:36 +0000 (11:22 -0700)]
cmenu: fill backgorund with printable character
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>
Pierre-Alexandre Meyer [Sat, 5 Sep 2009 17:26:45 +0000 (10:26 -0700)]
cmenu: remove legacy CHABSATTR/CHRELATTR code
CHABSATTR and CHRELATTR have been replaced by SO/SI.
Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
Pierre-Alexandre Meyer [Sat, 5 Sep 2009 17:23:00 +0000 (10:23 -0700)]
cmenu: remove legacy box drawing code
Lines are now printed via the Line Drawing Character Set.
Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
Pierre-Alexandre Meyer [Sat, 5 Sep 2009 17:20:48 +0000 (10:20 -0700)]
cmenu: unify normal menu/radio menu handling
A lot of code was duplicated between regular and normal menus
(menu printing and selection handling). This patch unifies this logic
by adding an extra bool in printmenu() and getmenuoption() to distinguish
between the two types of menus.
Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
Pierre-Alexandre Meyer [Sat, 5 Sep 2009 17:15:35 +0000 (10:15 -0700)]
cmenu: fix Login/Password and Kernel Arguments lines (complex.c)
Update the cmenu example complex.c to use clear_line(): cprint behavior has
changed w.r.t. cursor positioning (it is automatically advanced now).
Note: need to reset the colors before clearing the line since the status bar is
printed just before the Kernel Arguments line and it changes the background
color.
Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
Pierre-Alexandre Meyer [Sat, 5 Sep 2009 17:14:24 +0000 (10:14 -0700)]
libansi: add reset_colors function
Purpose of reset_colors is to reset the attribute to VGA 0x07.
Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
Pierre-Alexandre Meyer [Sat, 5 Sep 2009 04:17:43 +0000 (21:17 -0700)]
cmenu: turn off auto wrap
Auto wrap made the menu scroll because of the status line (when printing
the last character of the bottom right of the screen, the ansicon scrolled
the whole menu).
Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
H. Peter Anvin [Fri, 14 Aug 2009 05:35:28 +0000 (22:35 -0700)]
ansi: add support for no-wrap mode, cleanups
Add support for nowrap mode CSI ? 7 l (unfortunately, on ANSI.SYS it
is CSI = 7 l; which means that the only way to support both is to
print both sequences and then erase the resulting garbage.)
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
H. Peter Anvin [Sat, 5 Sep 2009 00:26:51 +0000 (17:26 -0700)]
core: clean up SerialIRQPort when uninstalling the interrupt system
Make sure SerialIRQPort is zero when there is no active interrupt
system installed.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
H. Peter Anvin [Sat, 5 Sep 2009 00:19:09 +0000 (17:19 -0700)]
core: when enabling serial IRQs, unmask interrupts at the PIC
Some BIOSes only enable interrupts in active use by the BIOS at the
PIC, which presumably don't include the serial ports. As such, enable
the interrupt lines at the PIC and hope to $DEITY we don't hang due to
a stuck interrupt line.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Pierre-Alexandre Meyer [Fri, 4 Sep 2009 23:59:53 +0000 (16:59 -0700)]
Merge commit 'origin/libansi' into cmenu-video
Pierre-Alexandre Meyer [Fri, 4 Sep 2009 23:54:24 +0000 (16:54 -0700)]
Merge branch 'cmenu-video' of git://git.zytor.com/users/pam/hdt-pierre into cmenu-video
H. Peter Anvin [Fri, 4 Sep 2009 23:38:21 +0000 (16:38 -0700)]
core: remove overzealous calls to cleanup_hardware
cleanup_hardware is not needed in core/runkernel.inc: cleanup_hardware
is already invoked from replace_bootstrap. Furthermore,
cleanup_hardware is defined to preserve all registers, so there is no
need to push/pop ax around it.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
H. Peter Anvin [Fri, 4 Sep 2009 22:46:43 +0000 (15:46 -0700)]
core: add missing calls to cleanup_hardware
As we're starting to rely more and more on a modified hardware state,
it is really important to clean up on all exit paths.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
H. Peter Anvin [Fri, 4 Sep 2009 22:09:50 +0000 (15:09 -0700)]
pxelinux: workaround for EFI CSM bug - BEV stack overwrite on localboot
On at least some machines with an EFI-based BIOS, the Compatibility
Service Module (CSM) puts the BEV stack at an address where the boot
loader is likely to overwrite it. Implement a workaround which forces
INT 18h instead if an EFI signature is detected in memory.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Pierre-Alexandre Meyer [Thu, 3 Sep 2009 22:43:54 +0000 (15:43 -0700)]
cmenu: use printf instead of csprint with default attribute
We don't change the attribute in the help screen. Refactor the code
to simply use printf.
Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
Pierre-Alexandre Meyer [Thu, 3 Sep 2009 22:23:22 +0000 (15:23 -0700)]
cmenu: use putchar instead of putch when using default attribute
There is no real need to do putch('x', 0x07), 0x07 being the default
VGA attribute. Use putchar instead.
Note that showhelp will trigger a drawbox first with 0x07 as attribute.
Since we don't update the attribute, it is guaranteed to still be 0x07
when invoking putch.
Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
Pierre-Alexandre Meyer [Thu, 3 Sep 2009 21:31:27 +0000 (14:31 -0700)]
hdt: remove call to legacy getnumcols (menu)
Use getscreensize instead.
Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
Pierre-Alexandre Meyer [Thu, 3 Sep 2009 21:16:17 +0000 (14:16 -0700)]
cmenu: use getscreensize to access number of rows/columns
The simple menu system already uses getscreensize. Another step towards
unification.
Impact: exported getnumcols and getnumrows are now deprecated.
Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
Pierre-Alexandre Meyer [Thu, 3 Sep 2009 17:28:00 +0000 (10:28 -0700)]
gpllib: add const qualifier in cpu_dev (cpuid)
The Syslinux build turns on -Wwrite-strings, which gives string constants
the type const char[length].
Note: -Wall doesn't trigger this warning.
Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
Pierre-Alexandre Meyer [Thu, 3 Sep 2009 17:15:20 +0000 (10:15 -0700)]
gpllib: add missing header in ata.c
This fixes an implicit definition warning.
Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
Pierre-Alexandre Meyer [Thu, 3 Sep 2009 17:01:01 +0000 (10:01 -0700)]
hdt: fix signedness warnings
host_bus_type and interface_type are uint8_t. Force a cast when calling remove_spaces
on these fields.
Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
Pierre-Alexandre Meyer [Tue, 1 Sep 2009 23:02:30 +0000 (16:02 -0700)]
hdt: unify disk headers in hdt-common.h
Both cli and menu need to access disk functions. Include disk headers
in hdt-common.h, instead of duplicating code.
Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
Pierre-Alexandre Meyer [Tue, 1 Sep 2009 23:00:20 +0000 (16:00 -0700)]
gpllib: remove get_error declaration from disk/util.h
In
d1890409251949b80c2026557b9b12ca00d55144, it seems we
have forgotten to update util.h.
Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
Pierre-Alexandre Meyer [Tue, 1 Sep 2009 22:52:21 +0000 (15:52 -0700)]
gpllib: fix cpuid.h Once-Only Header wrapper
It seems that the cpuid.h had a misplaced #endif.
Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
Pierre-Alexandre Meyer [Tue, 1 Sep 2009 21:02:42 +0000 (14:02 -0700)]
gpllib: share PAGE_SIZE definition with cpuid.h
swsusp detection needs PAGE_SIZE. cpuid.h is actually already defining it.
Since both swsusp and cpuid are taken from the Linux kernel, it is a good idea to
share it (they really need to be equal).
We are going to rely on cpuid.h. Creating a page.h for this single definition seems
overkilling and the MMU is part of the CPU on x86 anyways.
Impact: fix compiler warning (redefinition).
Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
Pierre-Alexandre Meyer [Tue, 1 Sep 2009 20:41:35 +0000 (13:41 -0700)]
hdt: fix hdt-cli.c compilation warning
We are missing a const qualifier.
Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
Pierre-Alexandre Meyer [Tue, 1 Sep 2009 20:30:20 +0000 (13:30 -0700)]
libansi: fix compiler warnings
Fix "warning: function declaration isn't a prototype" warnings.
Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
Pierre-Alexandre Meyer [Tue, 1 Sep 2009 18:33:40 +0000 (11:33 -0700)]
hdt: switch to libansi
Make hdt use libansi.
Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
Pierre-Alexandre Meyer [Tue, 1 Sep 2009 18:32:44 +0000 (11:32 -0700)]
cmenu: switch to libansi
Make cmenu use libansi.
Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
Pierre-Alexandre Meyer [Tue, 1 Sep 2009 18:32:03 +0000 (11:32 -0700)]
libansi: add missing prototype in the header
clearwindow() was not presented in libansi.h.
Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
Pierre-Alexandre Meyer [Tue, 1 Sep 2009 18:30:32 +0000 (11:30 -0700)]
libansi: build libansi.o
Hook libansi.o into the lib/ build.
Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
Pierre-Alexandre Meyer [Tue, 1 Sep 2009 18:13:11 +0000 (11:13 -0700)]
libansi: move to lib directory, as it is MIT, not GPL licensed
gplinclude/gpllib should be used for external, GPL, libraries
only. libansi has been developed for Syslinux and is MIT licensed.
Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
Pierre-Alexandre Meyer [Tue, 1 Sep 2009 18:07:07 +0000 (11:07 -0700)]
gpllib: add more ANSI functions
Import the functions that I introduced in cmenu.
Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
Pierre-Alexandre Meyer [Mon, 31 Aug 2009 22:59:17 +0000 (15:59 -0700)]
gpllib: add a new ansi library
HDT and cmenu are currently duplicating code: they both define their
own mini ansi library.
This patch extracts the HDT ansi lib into gpllib as a first step towards
unification.
Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
Pierre-Alexandre Meyer [Mon, 31 Aug 2009 06:47:46 +0000 (23:47 -0700)]
cmenu: reset attributes instead of using ANSI sequence 22
hpa advised not to use ANSI sequence 22, as it may not work everywhere.
Instead, let's reset attributes and set last_attr to unknown. The next
background/foreground tests are then guaranteed to fire. We take a small
hit in terms of performance though.
Misc.: change initialization of last_attr to 0x300 (unknown) to trigger
properly the tests the first time.
Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
Pierre-Alexandre Meyer [Mon, 31 Aug 2009 06:37:01 +0000 (23:37 -0700)]
cmenu: fix background color
The menu highlights some characters to mark them as key shortcuts.
To switch the bold attribute off, we were printing the reset code,
resetting the background color in the same time.
Use ANSI sequence 22 instead.
Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
Pierre-Alexandre Meyer [Mon, 31 Aug 2009 00:14:02 +0000 (17:14 -0700)]
Revert "ansicon: allow to pass page # to write functions"
We shouldn't be using any pages, as there is no support on the
serial line.
This reverts commit
e9b317fd0dc87dc93a49bc40520f4bdd0264d746.
Pierre-Alexandre Meyer [Mon, 31 Aug 2009 00:11:33 +0000 (17:11 -0700)]
cmenu: use 80x25 as terminal size by default
Let's not rely on the geometry returned by the BIOS for the
terminal size - we don't know anything about the one used via serial.
We now default to 80x25, regardless of what the BIOS returns.
Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
Pierre-Alexandre Meyer [Mon, 31 Aug 2009 00:09:52 +0000 (17:09 -0700)]
cmenu: misc. cleanups
Fix a compiler warning and a header documentation.
Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
Pierre-Alexandre Meyer [Mon, 31 Aug 2009 00:06:30 +0000 (17:06 -0700)]
cmenu: remove multi pages support
The cmenu used to display the help on a separate page. Since we
can't have multi pages on the serial line, get rid of them completely.
This has a fairly big impact as the external cmenu API has changed.
adv_menu.tpl and HDT have been patched accordingly.
Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
Pierre-Alexandre Meyer [Sun, 30 Aug 2009 03:55:34 +0000 (20:55 -0700)]
cmenu: use < for menu exit character
Use plain '<' as the "back" symbol.
Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
Pierre-Alexandre Meyer [Sun, 30 Aug 2009 03:53:38 +0000 (20:53 -0700)]
cmenu: fix menu separators
Use the alternate character set to draw horizontal lines (menu
separator). Refactor the c*print functions in the same time as they
were severely broken.
Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
Pierre-Alexandre Meyer [Sat, 29 Aug 2009 18:26:17 +0000 (11:26 -0700)]
cmenu: use > instead of » for submenus
» doesn't exist in the alternate character set. Use plain
> instead.
Misc.: fix SO/SI invocation, putchar takes a char, fputs a string.
Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
Pierre-Alexandre Meyer [Sat, 29 Aug 2009 05:38:08 +0000 (22:38 -0700)]
cmenu: remove extra getboxchars call
getboxchars is not used anymore in drawbox. Let's get rid of it.
Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
Pierre-Alexandre Meyer [Sat, 29 Aug 2009 05:28:05 +0000 (22:28 -0700)]
cmenu: build cleanups
Fix build warnings and remove old cls declaration.
Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
Pierre-Alexandre Meyer [Sat, 29 Aug 2009 05:27:22 +0000 (22:27 -0700)]
cmenu: refactor cswprint function
Now that cprint is smarter, cswprint can be simplified.
Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
Pierre-Alexandre Meyer [Sat, 29 Aug 2009 05:21:00 +0000 (22:21 -0700)]
cmenu: refactor printmenuitem function
Simplify the printmenuitem function, now that putch is smarter.
Pierre-Alexandre Meyer [Sat, 29 Aug 2009 05:14:10 +0000 (22:14 -0700)]
cmenu: refactor beep function
Use \007 to make the system beep. Note "\007" works, but not '\007'.
Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>