profile/ivi/syslinux.git
14 years agoMerge commit 'hdt-0.3.5-pre3' into hdt-0.3.5
Pierre-Alexandre Meyer [Thu, 5 Nov 2009 05:08:24 +0000 (21:08 -0800)]
Merge commit 'hdt-0.3.5-pre3' into hdt-0.3.5

14 years agohdt: Release 0.3.5-pre3
Erwan Velu [Wed, 4 Nov 2009 20:50:02 +0000 (21:50 +0100)]
hdt: Release 0.3.5-pre3

Impact: new pre-version

Releasing pre3 with reboot & auto= features

14 years agohdt: Setting up a flag to disable more_printf
Erwan Velu [Wed, 4 Nov 2009 20:03:44 +0000 (21:03 +0100)]
hdt: Setting up a flag to disable more_printf

Impact: None.

Some modes could requires disabling more_printf

14 years agohdt: Removing debugging message in auto mode
Erwan Velu [Wed, 4 Nov 2009 20:02:43 +0000 (21:02 +0100)]
hdt: Removing debugging message in auto mode

Impact: Visual

This debugging info isn't interesting

14 years agohdt: Improving readbility of auto mode
Erwan Velu [Wed, 4 Nov 2009 19:45:34 +0000 (20:45 +0100)]
hdt: Improving readbility of auto mode

Impact: Visual

This patch enhance the readibility of the auto mode

14 years agoMerge commit 'hdt-0.3.5-pre2' into hdt-0.3.5
Pierre-Alexandre Meyer [Wed, 4 Nov 2009 01:51:33 +0000 (17:51 -0800)]
Merge commit 'hdt-0.3.5-pre2' into hdt-0.3.5

14 years agoMerge branch 'master' into auto
Erwan Velu [Tue, 3 Nov 2009 22:13:10 +0000 (23:13 +0100)]
Merge branch 'master' into auto

14 years agohdt: Improving automatic code (memory mgmt)
Erwan Velu [Tue, 3 Nov 2009 22:07:59 +0000 (23:07 +0100)]
hdt: Improving automatic code (memory mgmt)

Impact: Freeing memory

We have to be more careful about the malloc & free. We also have to
remove spaces around commands

14 years agohdt: Adding automatic mode
Erwan Velu [Tue, 3 Nov 2009 21:41:30 +0000 (22:41 +0100)]
hdt: Adding automatic mode

Impact: HDT can be controlled via the cmdline

When the auto= parameter is set, HDT execute a set of commands and
return to the cli after.

i.e auto='show summary; show pci' will show the summary then the pci and
return to the cli.

Note that the auto= feature, requires a the "'" char to define the
complete set of commands and the ";" char to separate commands.

Some more examples:
auto='show syslinux; exit' -> this will show the syslinux release and
then exit to return to the bootloader

auto='show summary; reboot' -> this will show the summary and
then reboot the computer

14 years agoMerge remote branch 'pam/hdt-0.3.5'
Erwan Velu [Tue, 3 Nov 2009 08:51:28 +0000 (09:51 +0100)]
Merge remote branch 'pam/hdt-0.3.5'

14 years agolibansi: reset SGR parameters cache in cls()
Pierre-Alexandre Meyer [Tue, 3 Nov 2009 04:53:56 +0000 (20:53 -0800)]
libansi: reset SGR parameters cache in cls()

There was a bug in HDT when switching from the menu to the cli and
back to the menu: the background wasn't redrawn.

This was due to the fact that the cli bypasses the libansi library
and calls printf() directly. Unfortunately, the SGR attributes were
cached between menu initializations and the background wasn't properly
redrawn.

To fix it, invalidate the cache in the cls() routine. cls() does much
more than just erasing the screen already (e.g. initialize G1) - we
may want to rename the function at some point.

Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
14 years agohdt: Adding serial output when building HDT images
Erwan Velu [Mon, 2 Nov 2009 21:19:25 +0000 (22:19 +0100)]
hdt: Adding serial output when building HDT images

Impact: Serial output have to be activated

That's almost useful having the serial output when running HDT

14 years agoMerge branch 'master' of ssh://terminus.zytor.com//pub/git/users/erwan/hdt
Erwan Velu [Mon, 2 Nov 2009 18:53:12 +0000 (19:53 +0100)]
Merge branch 'master' of ssh://terminus.zytor.com//pub/git/users/erwan/hdt

14 years agohdt: Adding reboot.c32 in iso & floppy images
Erwan Velu [Mon, 2 Nov 2009 12:45:00 +0000 (13:45 +0100)]
hdt: Adding reboot.c32 in iso & floppy images

Impact: reboot is now working in floppy & iso images

The reboot features requires the reboot.c32 file to be copied in our
floppy & iso images

14 years agoMerge remote branch 'pam/hdt-0.3.5'
Erwan Velu [Mon, 2 Nov 2009 12:40:51 +0000 (13:40 +0100)]
Merge remote branch 'pam/hdt-0.3.5'

14 years agohdt: add reboot command in HDT mode (CLI)
Pierre-Alexandre Meyer [Mon, 2 Nov 2009 00:19:47 +0000 (16:19 -0800)]
hdt: add reboot command in HDT mode (CLI)

Reboot the system via the 'reboot' command in the CLI.

Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
14 years agohdt: add reboot entry (MENU)
Pierre-Alexandre Meyer [Sun, 1 Nov 2009 23:55:11 +0000 (15:55 -0800)]
hdt: add reboot entry (MENU)

Add a reboot entry to reboot the system. Uses reboot.c32 behind the scenes.

Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
14 years agohdt: 0.3.5-pre2
Erwan Velu [Sun, 1 Nov 2009 12:19:59 +0000 (13:19 +0100)]
hdt: 0.3.5-pre2

Impact: new pre-release

Releasing 0.3.5-pre2. Adding codename for 0.3.5

14 years agohdt: Adding core developper role
Erwan Velu [Sun, 1 Nov 2009 12:10:27 +0000 (13:10 +0100)]
hdt: Adding core developper role

Impact: Visual

Pierre is more than a contributor ;)

14 years agoMerge remote branch 'pam/hdt-0.3.5'
Erwan Velu [Sun, 1 Nov 2009 12:06:13 +0000 (13:06 +0100)]
Merge remote branch 'pam/hdt-0.3.5'

14 years agohdt: use plain printf for help, not more_printf (CLI)
Pierre-Alexandre Meyer [Sun, 1 Nov 2009 07:12:16 +0000 (00:12 -0700)]
hdt: use plain printf for help, not more_printf (CLI)

The help prints several elements on the same line. This can't
work with more_printf() as the macro assumes each call contains
one and only one \n.

Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
14 years agohdt: change remaining printf to more_printf (CLI)
Pierre-Alexandre Meyer [Sun, 1 Nov 2009 05:32:26 +0000 (22:32 -0700)]
hdt: change remaining printf to more_printf (CLI)

A lot of places still had printf() instead of more_printf().
This patch does a bulk update and add missing reset_more_printf(),
used to reset the pager counter between each command call.

This also changes the more_printf() routine to delete the "--More--"
line while scrolling.

Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
14 years agoRevert "hdt: Adding core developper role"
Erwan Velu [Sun, 1 Nov 2009 12:04:05 +0000 (13:04 +0100)]
Revert "hdt: Adding core developper role"

This reverts commit 57689f219c5155e186ced1c9f5f972d5d0b340ed.

14 years agohdt: Adding core developper role
Erwan Velu [Sun, 1 Nov 2009 11:46:48 +0000 (12:46 +0100)]
hdt: Adding core developper role

Impact: Visual

Pierre is more than a contributor ;)

14 years agodmi: enhance SMBIOS/DMI detection
Pierre-Alexandre Meyer [Sun, 1 Nov 2009 02:45:30 +0000 (19:45 -0700)]
dmi: enhance SMBIOS/DMI detection

Add missing sanity checks when parsing the SMBIOS table entry point.

Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
14 years agohdt: fix printf typo (CLI)
Pierre-Alexandre Meyer [Sun, 1 Nov 2009 02:48:20 +0000 (19:48 -0700)]
hdt: fix printf typo (CLI)

Correction of an English grammar mistake:

  doesn't exists -> doesn't exist

Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
14 years agohdt: reset position of the cursor at startup (CLI)
Pierre-Alexandre Meyer [Sun, 1 Nov 2009 07:12:41 +0000 (00:12 -0700)]
hdt: reset position of the cursor at startup (CLI)

When starting HDT in cli mode (nomenu), reset the cursor to be at the
top left corner.

Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
14 years agodmi: fix a strcpy (typo)
Pierre-Alexandre Meyer [Sun, 1 Nov 2009 02:46:21 +0000 (19:46 -0700)]
dmi: fix a strcpy (typo)

Not sure why sprintf is being called here. It's probably strcpy that was meant.

Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
14 years agohdt: change inactive attributes (MENU)
Pierre-Alexandre Meyer [Sun, 1 Nov 2009 04:13:51 +0000 (21:13 -0700)]
hdt: change inactive attributes (MENU)

The default inactive attributes in cmenu make little sense in HDT.
They actually make the menus hard to read.

Instead, use the same attributes as the active entries for the inactive
ones.

Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
14 years agocmenu: reset the cursor position on shutdown
Pierre-Alexandre Meyer [Sun, 1 Nov 2009 03:09:11 +0000 (20:09 -0700)]
cmenu: reset the cursor position on shutdown

Reset the cursor at the top left corner of the screen when exiting the
menu. This fixes odd behaviors when switching back and forth between CLI
and menu in HDT.

Closes: #14

Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
14 years agohdt: reset position of the cursor at startup (CLI)
Pierre-Alexandre Meyer [Sun, 1 Nov 2009 07:12:41 +0000 (00:12 -0700)]
hdt: reset position of the cursor at startup (CLI)

When starting HDT in cli mode (nomenu), reset the cursor to be at the
top left corner.

Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
14 years agohdt: use plain printf for help, not more_printf (CLI)
Pierre-Alexandre Meyer [Sun, 1 Nov 2009 07:12:16 +0000 (00:12 -0700)]
hdt: use plain printf for help, not more_printf (CLI)

The help prints several elements on the same line. This can't
work with more_printf() as the macro assumes each call contains
one and only one \n.

Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
14 years agohdt: change remaining printf to more_printf (CLI)
Pierre-Alexandre Meyer [Sun, 1 Nov 2009 05:32:26 +0000 (22:32 -0700)]
hdt: change remaining printf to more_printf (CLI)

A lot of places still had printf() instead of more_printf().
This patch does a bulk update and add missing reset_more_printf(),
used to reset the pager counter between each command call.

This also changes the more_printf() routine to delete the "--More--"
line while scrolling.

Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
14 years agohdt: change inactive attributes (MENU)
Pierre-Alexandre Meyer [Sun, 1 Nov 2009 04:13:51 +0000 (21:13 -0700)]
hdt: change inactive attributes (MENU)

The default inactive attributes in cmenu make little sense in HDT.
They actually make the menus hard to read.

Instead, use the same attributes as the active entries for the inactive
ones.

Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
14 years agocmenu: reset the cursor position on shutdown
Pierre-Alexandre Meyer [Sun, 1 Nov 2009 03:09:11 +0000 (20:09 -0700)]
cmenu: reset the cursor position on shutdown

Reset the cursor at the top left corner of the screen when exiting the
menu. This fixes odd behaviors when switching back and forth between CLI
and menu in HDT.

Closes: #14

Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
14 years agohdt: fix printf typo (CLI)
Pierre-Alexandre Meyer [Sun, 1 Nov 2009 02:48:20 +0000 (19:48 -0700)]
hdt: fix printf typo (CLI)

Correction of an English grammar mistake:

  doesn't exists -> doesn't exist

Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
14 years agodmi: fix a strcpy (typo)
Pierre-Alexandre Meyer [Sun, 1 Nov 2009 02:46:21 +0000 (19:46 -0700)]
dmi: fix a strcpy (typo)

Not sure why sprintf is being called here. It's probably strcpy that was meant.

Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
14 years agodmi: enhance SMBIOS/DMI detection
Pierre-Alexandre Meyer [Sun, 1 Nov 2009 02:45:30 +0000 (19:45 -0700)]
dmi: enhance SMBIOS/DMI detection

Add missing sanity checks when parsing the SMBIOS table entry point.

Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
14 years agohdt: Fixing DMI version display
Erwan Velu [Fri, 30 Oct 2009 21:05:48 +0000 (22:05 +0100)]
hdt: Fixing DMI version display

Impact: none

Version is unsigned, so using %u is prefered ;)

14 years agodmi: Adding smbios detection
Erwan Velu [Fri, 30 Oct 2009 21:00:09 +0000 (22:00 +0100)]
dmi: Adding smbios detection

Impact: Avoid misdetection of dmi version

On some hosts, the legacy DMI version is reported as 0.0.
We can use SMBIOS to get the real version.
Solves HDT's ticket #8

14 years agohdt: Fixing {s}printf typo
Erwan Velu [Fri, 30 Oct 2009 19:15:53 +0000 (20:15 +0100)]
hdt: Fixing {s}printf typo

Impact: Avoid some unwanted printf

Some dmi calls were using printf instead of sprintf.
This solves ticket #11

14 years agohdt: Adding hdt.img.gz target
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

14 years agodisklib: Adding new grub2 mbr magic
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

14 years agodisklib: Fixing Syslinux Detection
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

14 years agohdt: Fixing hdt.iso target, pci.ids was missing
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.

14 years agohdt: Adding Gert as contributor
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

14 years agoMerge commit 'erwan/master' into hdt-0.3.5
Pierre-Alexandre Meyer [Tue, 27 Oct 2009 20:04:31 +0000 (13:04 -0700)]
Merge commit 'erwan/master' into hdt-0.3.5

14 years agoImproving chain.c32 help message
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.

14 years agohdt: Removing useless Author Name
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 ;)

14 years agoMerge branch 'master' of ssh://terminus.zytor.com//pub/git/users/erwan/hdt
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

14 years agohdt: Cleaning Makefile
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

14 years agoMerge commit 'hpa/master'
Erwan Velu [Mon, 19 Oct 2009 13:26:20 +0000 (15:26 +0200)]
Merge commit 'hpa/master'

14 years agohdt: Adding hdt.iso target
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

14 years agomboot: correct the detection of the multiboot header
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>
14 years agoMerge commit 'hdt/master'
H. Peter Anvin [Wed, 7 Oct 2009 20:36:26 +0000 (13:36 -0700)]
Merge commit 'hdt/master'

14 years agohdt: Adding missing hdt.c32 in 'make hdt.img'
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

14 years agopxelinux: handle hardcoded options both "before" and "after" DHCP syslinux-3.83
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>
14 years agohdt: Removing pci.ids
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.

14 years agohdt: Adding hdt.img target
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.

14 years agoMerge commit 'hpa/master'
Erwan Velu [Sun, 4 Oct 2009 18:44:23 +0000 (20:44 +0200)]
Merge commit 'hpa/master'

14 years agoutils/Makefile: install pxelinux-options
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>
14 years agoNEWS: document pxelinux-options
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>
14 years agoMerge branch 'hdt' syslinux-3.83-pre12
H. Peter Anvin [Wed, 30 Sep 2009 04:32:42 +0000 (21:32 -0700)]
Merge branch 'hdt'

14 years agopxelinux-options: add help text
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>
14 years agochain: missing some \n in error messages
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>
14 years agopxelinux: support hardcoded options "before" or "after"; tool
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>
14 years agochain: missing some \n one error messages
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>
14 years agoAdding VMX & SVM cpu flags
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

14 years agopxelinux: support "hard-coding" DHCP options into the binary
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>
14 years agoint18: module for local booting using INT 18h
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>
14 years agogpxecmd: module to send an arbitrary command to gPXE syslinux-3.83-pre11
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>
14 years agoMerge branch 'cmenu-video' into hdt-next
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>
14 years agoMerge branch 'bootloader-detection' into hdt-next
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>
14 years agocmenu: use ASCII characters for scrollbars
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>
14 years agocmenu: do not invoke help if helpid is 0xFFFF (complex.c)
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>
14 years agohdt: do not invoke help if helpid is 0xFFFF
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>
14 years agocmenu: redraw the current menu after exiting the keys_handler
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>
14 years agohdt: remove extra LF
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>
14 years agocmenu: optimize redraw to be faster
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>
14 years agocmenu: force refresh after checkbox_handler in complex.c
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>
14 years agocmenu: redraw menu when exiting keys_handler
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>
14 years agocmenu: pad help filename with 0 instead of spaces
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>
14 years agocmenu: remove obsolete com32io code
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>
14 years agocmenu: make the help menu actually work
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>
14 years agohdt: fix build due to cmenu keyboard changes
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>
14 years agolibansi: add function to scroll up multiple lines
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>
14 years agocmenu: fix handlers signature in the examples
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>
14 years agocmenu: use get_key library for keyboard functions
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>
14 years agolibansi: correctly reset attributes
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>
14 years agolibansi: reset_colors should use csprint
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>
14 years agocmenu: fill backgorund with printable character
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>
14 years agocmenu: remove legacy CHABSATTR/CHRELATTR code
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>
14 years agocmenu: remove legacy box drawing code
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>
14 years agocmenu: unify normal menu/radio menu handling
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>
14 years agocmenu: fix Login/Password and Kernel Arguments lines (complex.c)
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>
14 years agolibansi: add reset_colors function
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>
14 years agocmenu: turn off auto wrap
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>
14 years agoansi: add support for no-wrap mode, cleanups
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>
14 years agocore: clean up SerialIRQPort when uninstalling the interrupt system
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>
14 years agocore: when enabling serial IRQs, unmask interrupts at the PIC
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>