platform/upstream/syslinux.git
9 years agopackaging: workaround: x86: force CFLAGS to working setup 85/31885/1 accepted/tizen_3.0.m2_mobile accepted/tizen_3.0.m2_tv accepted/tizen_3.0.m2_wearable accepted/tizen_3.0_common accepted/tizen_3.0_ivi accepted/tizen_3.0_mobile accepted/tizen_3.0_tv accepted/tizen_3.0_wearable accepted/tizen_4.0_unified accepted/tizen_common accepted/tizen_ivi accepted/tizen_mobile accepted/tizen_tv accepted/tizen_unified accepted/tizen_wearable tizen tizen_3.0 tizen_3.0.2014.q4_common tizen_3.0.2015.q1_common tizen_3.0.2015.q2_common tizen_3.0.m1_mobile tizen_3.0.m1_tv tizen_3.0.m2 tizen_3.0_ivi tizen_3.0_tv tizen_4.0 accepted/tizen/3.0.m2/mobile/20170105.025454 accepted/tizen/3.0.m2/tv/20170105.025652 accepted/tizen/3.0.m2/wearable/20170105.025739 accepted/tizen/3.0/common/20161114.111900 accepted/tizen/3.0/ivi/20161011.065058 accepted/tizen/3.0/mobile/20161015.034101 accepted/tizen/3.0/tv/20161016.005615 accepted/tizen/3.0/wearable/20161015.084515 accepted/tizen/4.0/unified/20170816.013535 accepted/tizen/4.0/unified/20170828.221720 accepted/tizen/common/20141212.105311 accepted/tizen/ivi/20141218.232804 accepted/tizen/ivi/20160218.025812 accepted/tizen/mobile/20150105.022538 accepted/tizen/tv/20150105.022350 accepted/tizen/unified/20170309.040548 accepted/tizen/wearable/20150105.054710 submit/tizen_3.0.m2/20170104.093755 submit/tizen_3.0_common/20161104.104000 submit/tizen_3.0_ivi/20161010.000007 submit/tizen_3.0_mobile/20161015.000006 submit/tizen_3.0_tv/20161015.000005 submit/tizen_3.0_wearable/20161015.000006 submit/tizen_4.0/20170811.094300 submit/tizen_4.0/20170828.100007 submit/tizen_common/20141212.104200 submit/tizen_ivi/20141218.181818 submit/tizen_ivi/20160217.000000 submit/tizen_ivi/20160217.000007 submit/tizen_mobile/20141216.000000 submit/tizen_mobile/20141231.012840 submit/tizen_mobile/20151202.000001 submit/tizen_tv/20151202.000000 submit/tizen_unified/20170308.100417 submit/tizen_wearable/20150102.000000 tizen_3.0.m1_mobile_release tizen_3.0.m1_tv_release tizen_3.0.m2.a1_mobile_release tizen_3.0.m2.a1_tv_release tizen_3.0_ivi_release tizen_4.0.IoT.p1_release tizen_4.0.m1_release
Philippe Coval [Thu, 11 Dec 2014 11:26:52 +0000 (12:26 +0100)]
packaging: workaround: x86: force CFLAGS to working setup

Change-Id: I860e65f6cd0f6339f6a02e54674fbb62aa28a979
Bug-Tizen: TC-1873/related
Signed-off-by: Philippe Coval <philippe.coval@open.eurogiciel.org>
9 years agosort sources to make deterministic build log 28/31028/1 accepted/tizen/common/20141128.180233 accepted/tizen/ivi/20141208.070314 accepted/tizen/mobile/20141216.100139 submit/tizen_common/20141128.175357 submit/tizen_ivi/20141208.023015 submit/tizen_mobile/20141216.072630
Philippe Coval [Fri, 28 Nov 2014 14:04:44 +0000 (15:04 +0100)]
sort sources to make deterministic build log

Change-Id: Ie8eee7f336e6f1fa2863c4150d967afd15519f1d
Signed-off-by: Philippe Coval <philippe.coval@open.eurogiciel.org>
9 years agopackaging: fix default hexdate to zero 27/31027/1
Philippe Coval [Fri, 28 Nov 2014 09:37:57 +0000 (10:37 +0100)]
packaging: fix default hexdate to zero

Change-Id: Ice454fdc91df613317209068da7f66d78b7bea12
Signed-off-by: Philippe Coval <philippe.coval@open.eurogiciel.org>
9 years agopackaging: workaround: x86_64: use 32bits generated sources submit/accepted/tizen_common/20141127.125720 submit/tizen_common/20141127.132044
Philippe Coval [Wed, 19 Nov 2014 14:32:22 +0000 (15:32 +0100)]
packaging: workaround: x86_64: use 32bits generated sources

Improve previous patch, by avoid to ship 32bits binaries anymore.

Despite it worked for generating images in mic env
it will fail on device.
Since tizen x86_64 does not support 32bits binaries
(even with 32bits libs), it produces errors like :
  cannot execute binary file: Exec format error

Change-Id: I7942f836ed1dc12ce55d56efd9281a5cb63c6b93
Bug-Tizen: TC-1873/related
Signed-off-by: Philippe Coval <philippe.coval@open.eurogiciel.org>
9 years agopackaging: workaround: x86_64: build again using 32bit ABI
Philippe Coval [Sat, 15 Nov 2014 15:28:45 +0000 (16:28 +0100)]
packaging: workaround: x86_64: build again using 32bit ABI

extlinux will work again to the price of pulling glib2-32bit

Bug: http://bugzilla.syslinux.org/show_bug.cgi?id=57
Bug-Tizen: TC-1873/related
Change-Id: Ie78c04a1f4f179d771d0f8910516bcbce551f268
Signed-off-by: Philippe Coval <philippe.coval@open.eurogiciel.org>
9 years agopackaging: workaround by disabling some optimisations
Philippe Coval [Fri, 14 Nov 2014 17:01:25 +0000 (18:01 +0100)]
packaging: workaround by disabling some optimisations

gcc-4.9.1 broke syslinux-6.03

It was tested on ia32 using single ext4 partion on gpt disk

Change-Id: I51f740bce252cb265862894a95cb94ba16a2412d
Bug: http://bugzilla.syslinux.org/show_bug.cgi?id=57
Bug-Tizen: TC-1873/related
Signed-off-by: Philippe Coval <philippe.coval@open.eurogiciel.org>
9 years agoAdd "install-all target" to top side of HAVE_FIRMWARE.
Peter Jones [Tue, 8 Apr 2014 19:28:12 +0000 (15:28 -0400)]
Add "install-all target" to top side of HAVE_FIRMWARE.

Change-Id: I70343d3dfafd052fbd049aa73c1c6b142e45a110
Bug-Tizen: TC-1873/related

9 years agopackaging: gitmodules refresh
Philippe Coval [Wed, 5 Nov 2014 17:48:57 +0000 (18:48 +0100)]
packaging: gitmodules refresh

Bug-Tizen: TC-1873/related
Change-Id: I0d6e88bceacbda44f7bbce8e816a7c725447760b
Signed-off-by: Philippe Coval <philippe.coval@open.eurogiciel.org>
9 years agopackaging: Bump to 6.03
Philippe Coval [Wed, 5 Nov 2014 17:48:27 +0000 (18:48 +0100)]
packaging: Bump to 6.03

Bug-Tizen: TC-1873/related
Change-Id: Id9d333ae5d8df0bbea07777cc8515f83c46e340c
Signed-off-by: Philippe Coval <philippe.coval@open.eurogiciel.org>
9 years agopackaging: add gitmodules helper
Philippe Coval [Wed, 5 Nov 2014 17:47:45 +0000 (18:47 +0100)]
packaging: add gitmodules helper

Bug-Tizen: TC-1873/related
Change-Id: Iaf3adaf39dd83e22dc1a1fb609931b74aa7412b0
Signed-off-by: Philippe Coval <philippe.coval@open.eurogiciel.org>
9 years agopackaging: Add .gbs.conf
Mikko Ylinen [Fri, 22 Aug 2014 11:48:04 +0000 (14:48 +0300)]
packaging: Add .gbs.conf

Change-Id: I8142ae6e12e12975e7ed71b53d0ea026a24065ac
Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
9 years agopackaging: Initial packaging on 4.07 for Tizen
Artem Bityutskiy [Thu, 4 Apr 2013 08:19:24 +0000 (11:19 +0300)]
packaging: Initial packaging on 4.07 for Tizen

Change-Id: I844265eb8e3fe4ed35490838dfecdaa8c32fba96
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
9 years agoNEWS: Update for 6.03 release upstream syslinux-6.03 upstream/6.03
H. Peter Anvin [Mon, 6 Oct 2014 16:27:44 +0000 (09:27 -0700)]
NEWS: Update for 6.03 release

Thanks to Ady <ady-sf@hotmail.com> for most of this writeup.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
9 years agodefine _DEFAULT_SOURCE for glibc-2.20
Chanho Park [Mon, 29 Sep 2014 15:46:42 +0000 (11:46 -0400)]
define _DEFAULT_SOURCE for glibc-2.20

_BSD_SOURCE was deprecated in favour of _DEFAULT_SOURCE since glibc
2.20[1]. To avoid build warning on glibc2.20, _DEFAULT_SOURCE should
also be defined.

[1]: https://sourceware.org/glibc/wiki/Release/2.20

Signed-off-by: Chanho Park <chanho61.park@samsung.com>
_BSD_SOURCE was fist used at 1769d57c94d7a965168b72b6fd8d48251710b452
Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
9 years agochain/partiter: correct gpt header checks
Michal Soltys [Sun, 29 Jun 2014 19:41:43 +0000 (21:41 +0200)]
chain/partiter: correct gpt header checks

In gpt header, lba_cur and lba_alt alternate depending on whether we
read primary or backup copy.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
9 years agochain: implement strict=<0|1|2>
Michal Soltys [Sun, 29 Jun 2014 19:41:42 +0000 (21:41 +0200)]
chain: implement strict=<0|1|2>

This provides more fine grained control than single relax flag. to cover
case with wrong disk sizes.

relax and nostrict are equivalent to strict=0
norelax and strict are equivalent to strict=2

strict=1 does the same as strict=2, but ignores checks against disk size

The current default is strict=1. Options: 'fixchs', '[un]hide[all]' and
'save' will forcibly enable strict=2 (can be overridden by the user).

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
9 years agochain: add missing pi_del() in find*() functions
Michal Soltys [Sun, 29 Jun 2014 19:41:41 +0000 (21:41 +0200)]
chain: add missing pi_del() in find*() functions

As partiter doesn't deallocate itself after finish (anymore), it should
be deleted after each loop iteration.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
9 years agochain/partiter: adjust error reporting
Michal Soltys [Sun, 29 Jun 2014 19:41:40 +0000 (21:41 +0200)]
chain/partiter: adjust error reporting

Use <0 for errors, 0 for normal state, and >0 for clean completion.

In future this would be necessary if it's decided to make partiter
a generic lib (similar to disklib) - though it has to be quieted first
and provide strerr()-like functionality in place of its verbosity.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
9 years agochain/partiter: fix possible non-NULL value returned by pi_begin() on error
Michal Soltys [Sun, 29 Jun 2014 19:41:39 +0000 (21:41 +0200)]
chain/partiter: fix possible non-NULL value returned by pi_begin() on error

This patch fixes non-NULL value returned from pi_begin() in case of an
error (which resulted in further hang instead of proper exit). Probably
a leftover from pi_dealloc() times.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
9 years agochain/partiter: fix and improve gpt handling in buggy cases
Michal Soltys [Sun, 29 Jun 2014 19:41:38 +0000 (21:41 +0200)]
chain/partiter: fix and improve gpt handling in buggy cases

Previous version had some issues in case of error situations, among
those:

- backup gpt header was not read if reading of primary failed
- alternating nature of lba_cur and lba_alt was ignored

This patch fixes this and extends the gpt handling.
The current behavior is:

- try primary header; if unreadable or checksum fails (or sanity checks
  fail unless relax flag is set) - try secondary header

- try main partition table referenced in the header that was read; if
  it's unreadable or if its crc check fails - try alternative (so if we
  managed to read primary header, table at the end would be considered
  as alternative - if we managed to read secondary header, table at the
  beginning would be treated as such)

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
9 years agoPXE ISR: Force polling on select hardware #3 WORKAROUND
Gene Cumm [Sun, 27 Jul 2014 17:19:37 +0000 (13:19 -0400)]
PXE ISR: Force polling on select hardware #3 WORKAROUND

Like 2fe3a7bd, certain Dell machines (Latitude E6510) state interrupts
should work but effectively don't.  Force polling.

Reported-by:
Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
10 years agocore, pxe: Don't push on one stack and pop from the other in pxenv
H. Peter Anvin [Tue, 29 Jul 2014 15:47:32 +0000 (08:47 -0700)]
core, pxe: Don't push on one stack and pop from the other in pxenv

When saving/restoring the flags around the stack switch test, we
cannot leave live data on the stack *across* the stack switch that we
are going to use on the other side (unlike the "big" stack frame which
we only use once we are back on the original stack.)

Use register BP, which is not live at either point, as a temporary
holding place for the flags from the stack.

Reported-by: Frank Mehnert <frank.mehnert@googlemail.com>
Link: http://bugzilla.syslinux.org/show_bug.cgi?id=54
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
10 years agoPXE ISR: Force polling on select hardware WORKAROUND
Gene Cumm [Sun, 13 Jul 2014 15:18:50 +0000 (11:18 -0400)]
PXE ISR: Force polling on select hardware WORKAROUND

Like 2fe3a7bd, certain Dell machines (OptiPlex 990) state interrupts
should work but effectively don't.  Force polling.

Reported-by: Alexander Perlis <aperlis@math.lsu.edu>
Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
10 years agolzo: Upgrade to LZO 2.07
H. Peter Anvin [Fri, 27 Jun 2014 19:46:41 +0000 (12:46 -0700)]
lzo: Upgrade to LZO 2.07

Use version 2.07 of the LZO compression library.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
10 years agoTest for Watcom C presence
Lubomir Rintel [Tue, 24 Jun 2014 10:22:22 +0000 (12:22 +0200)]
Test for Watcom C presence

This adds checks for Watcom C DOS cross-compiler in a manner analogous to mingw
compiler for Windows. The compiler is not commonly present in Linux distributions
due to a non-free license.

Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
10 years agoutils/isohybrid.c: Enable promised options -u, -m, -b
Thomas Schmitt [Tue, 24 Jun 2014 08:21:44 +0000 (10:21 +0200)]
utils/isohybrid.c: Enable promised options -u, -m, -b

This change enables the single-letter options -u, -m, -b as promised
by the help text.

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
10 years agoefi: Tag __syslinux_adv* with __export
Matt Fleming [Sat, 21 Jun 2014 18:30:53 +0000 (19:30 +0100)]
efi: Tag __syslinux_adv* with __export

commit 415d571 ("adv: Remove double defintion") introduced a regression
for the EFI boot loader. The commit is correct, but should have tagged
the __syslinux_adv_ptr and __syslinux_adv_size data objects in the EFI
core as __export.

This change is required because symbols in the EFI code are not global
by default, and so, when ldlinux.{e32,e64} tries to bind to the adv
symbols it fails.

The following demonstrates the ELF symbol changes,

Before:
  659: 0000000000034f40     8 OBJECT  LOCAL  DEFAULT   16 __syslinux_adv_ptr

After:
  957: 0000000000036fe0     8 OBJECT  GLOBAL DEFAULT   16 __syslinux_adv_ptr

Signed-off-by: Matt Fleming <matt.fleming@intel.com>
10 years agoisohybrid: Function to write UTF-16LE strings
H. Peter Anvin [Tue, 24 Jun 2014 03:06:51 +0000 (20:06 -0700)]
isohybrid: Function to write UTF-16LE strings

Rather than open-coding the content of UTF-16LE strings, just add a
simple function to convert ASCII (only) strings to UTF-16LE.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
10 years agoutils/isohybrid.c: Introduce option --mbr and make isohybrid.c compilable standalone
Thomas Schmitt [Sun, 22 Jun 2014 20:24:22 +0000 (22:24 +0200)]
utils/isohybrid.c: Introduce option --mbr and make isohybrid.c compilable standalone

Although isohybrid.c is supposed to be a companion of the local SYSLINUX
installation, there may be situations where the file isolinux.bin and the
matching MBR template do not stem directly from such an installation.

This change adds an option --mbr, which allows to load an MBR template
file. This may be an isohdp[fp]x*.bin MBR template from the local SYSLINUX
installation, or the first 512 bytes of the isohybrid-capable ISO image
from which isolinux.bin and the other ISOLINUX files are taken.

If macro ISOHYBRID_C_STANDALONE is defined, then the hardcoded MBR templates
are not accessible and isohdpfx.o is not needed at compile time. In this
case, option --mbr becomes mandatory.
I used this for testing my changes with Fedora-Live-Desktop-x86_64-20-1.iso.

isohybrid.c is then compilable without further components of ISOLINUX by:

  cc -DISOHYBRID_C_STANDALONE -Wall -o isohybrid isohybrid.c -luuid

Test run:

  cp Fedora-Live-Desktop-x86_64-20-1.iso \
     Fedora-Live-Desktop-x86_64-20-1-rehybrid.iso

  valgrind ./isohybrid --uefi --mac \
           --mbr Fedora-Live-Desktop-x86_64-20-1.mbr \
           Fedora-Live-Desktop-x86_64-20-1-rehybrid.iso

yields:

  ==13828== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 2 from 1)
  ...
  ==13828== LEAK SUMMARY:
  ==13828==    definitely lost: 2,048 bytes in 1 blocks.

(Not that valgrind would have detected the memcpy() abuse of patch 001.
 But at least i seem to have not introduced more obvious sins.)

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
10 years agoutils/isohybrid.c: Change all fseek(3) to fseeko(3)
Thomas Schmitt [Sun, 22 Jun 2014 20:24:21 +0000 (22:24 +0200)]
utils/isohybrid.c: Change all fseek(3) to fseeko(3)

It seems unwise to offer future programmers fseek(3) calls for copy+paste.
They are simply insufficient for large image files.

This change switches all calls of fseek(3) to fseeko(3) and takes care
that the offset value if of type off_t.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
10 years agoutils/isohybrid.c: Write GPT backup to the very end of the image
Thomas Schmitt [Sun, 22 Jun 2014 20:24:20 +0000 (22:24 +0200)]
utils/isohybrid.c: Write GPT backup to the very end of the image

The GPT backup header block should start 512 bytes before the end of the
image file (resp. end of the disk device). This block and the backup GPT
array were wrongly written 512 bytes too early.

This change brings the backup GPT at its correct position.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
10 years agoutils/isohybrid.c: Correct end block address of first GPT partition
Thomas Schmitt [Sun, 22 Jun 2014 20:24:19 +0000 (22:24 +0200)]
utils/isohybrid.c: Correct end block address of first GPT partition

The GPT partition 1 covers the whole ISO filesystem size. GPT specs
demand that the partition end block number shall be the last valid
block in the partition. isohybrid.c rather wrote the number of the
first block after the partition end.

This change reduces the number by 1.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
10 years agoutils/isohybrid.c: Correct blocking factor in APM partition block counts
Thomas Schmitt [Sun, 22 Jun 2014 20:24:18 +0000 (22:24 +0200)]
utils/isohybrid.c: Correct blocking factor in APM partition block counts

The block counts in the APM partitions assumed 512 bytes per block,
whereas the start block numbers assume 2048 as announced in the APM header.

This change divides the affected block counts by 4 to correct the assumption.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
10 years agoutils/isohybrid.c: Encode GPT partition names as UTF-16LE
Thomas Schmitt [Sun, 22 Jun 2014 20:24:17 +0000 (22:24 +0200)]
utils/isohybrid.c: Encode GPT partition names as UTF-16LE

The worst sin of isohybrid.c was to compose GPT partition names by
8-bit characters and to memcpy() them as if they were 16 bit wide.
GPT names are encoded as UTF-16LE. It is trivial to create this encoding
from 7-bit ASCII.

This change introduces two byte arrays with the desired UTF-16LE names
which replace the string constants "ISOHybrid ISO" and "ISOHybrid".

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
10 years agoisohybrid: define _FILE_OFFSET_BITS in the file itself
H. Peter Anvin [Fri, 20 Jun 2014 03:52:47 +0000 (20:52 -0700)]
isohybrid: define _FILE_OFFSET_BITS in the file itself

On general principles, define _FILE_OFFSET_BITS in the file itself
(even though it is also in the Makefile.)

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
10 years agoisohybrid: fix overflow on 32 bit system
Kai Kang [Fri, 20 Jun 2014 03:32:11 +0000 (11:32 +0800)]
isohybrid: fix overflow on 32 bit system

When call isohybrid with option '-u', it overflows on a 32 bits host. It
seeks to 512 bytes before the end of the image to install gpt header. If
the size of image is larger than LONG_MAX, it overflows fseek() and
cause error:

isohybrid: image-x86-64-20140505110100.iso: seek error - 8: Invalid argument

Replace fseek with fseeko to fix this issue.

Signed-off-by: Kai Kang <kai.kang@windriver.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
10 years agopxelinux-options: Fix data corruption bug
H. Peter Anvin [Tue, 17 Jun 2014 04:01:11 +0000 (21:01 -0700)]
pxelinux-options: Fix data corruption bug

Fix bug where the data would invariably be incorrectly written.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
10 years agopxe: Add support for embedded options in EFI
H. Peter Anvin [Tue, 17 Jun 2014 03:25:02 +0000 (20:25 -0700)]
pxe: Add support for embedded options in EFI

For EFI, rather than mucking with the PECOFF or ELF headers (we have
both!) just use a fixed-size buffer embedded in the image with a large
magic number that can be scanned for safely.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
10 years agopxe: Re-add support for embedded DHCP options
H. Peter Anvin [Tue, 17 Jun 2014 00:39:24 +0000 (17:39 -0700)]
pxe: Re-add support for embedded DHCP options

Fix the support for embedded DHCP options.  Although we were
diligently saving them away, we never actually parsed them.

This fixes embedded options for BIOS only -- for EFI we need to modify
the encoding scheme so that it can fit inside an EFI PECOFF image.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
10 years agoRevert "ldlinux: Allow a held shift key to override UI as well as DEFAULT"
H. Peter Anvin [Tue, 10 Jun 2014 20:14:03 +0000 (13:14 -0700)]
Revert "ldlinux: Allow a held shift key to override UI as well as DEFAULT"

This reverts commit 7e7139788c8ac6ffbf474976ad4d1727e0677b9f.

Requested by Ady <ady-sf@hotmail.com> who also requested the original
patch:

After some tests with MENU SHIFTKEY with different versions of
Syslinux, I came to the conclusion that, at least for now, it would
be better to undo commit 7e7139788c8ac6ffbf474976ad4d1727e0677b9f:

 "ldlinux: Allow a held shift key to override UI as well as DEFAULT"
committed on Thu, 22 May 2014.

Although the aforementioned commit makes the current 6.03 branch
behave as version 4.xx, my tests show that the behavior is
effectively inadequate and inconsistent.

Although I had been previously nagging you in irc about maintaining
backward compatibility of the "force-prompt" keys, I have to ask you
to undo the aforementioned commit before the final release of 6.03
stable. The behavior of Syslinux 6.03 without this particular commit
will slightly "break" with the prior "force-prompt" behavior as seen
in 4.xx when using [vesa]menu.c32, but it will be more consistent and
clean.

Without this commit, the user can still avoid the automatic launch of
the default label by the same means (the "escape" "shift" keys),
which is the most important characteristic of MENU SHIFTKEY.

Please consider this request before the release of 6.03 stable.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
10 years agocom32: Fixing lua's dependencies
Erwan Velu [Tue, 10 Jun 2014 19:05:33 +0000 (21:05 +0200)]
com32: Fixing lua's dependencies

Lua shall be one of the latest module to build as it requires some other
components to be built before.

Prior this patch, it was impossible to make a parallel build when "j"
was greater than 26.

This patch fix the ordering and allow a "make -j"  of com32 directory.

10 years agomemdump: Remove old obsolete COM16 binary
H. Peter Anvin [Tue, 10 Jun 2014 16:39:55 +0000 (09:39 -0700)]
memdump: Remove old obsolete COM16 binary

memdump was a com16 binary.  If still useful, it should be replaced
with a com32 library using libupload, but it has largely been replaced
by sysdump anyway.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
10 years agosysdump: Remove README that was for memdump, not sysdump
H. Peter Anvin [Tue, 10 Jun 2014 16:36:45 +0000 (09:36 -0700)]
sysdump: Remove README that was for memdump, not sysdump

Sysdump was forked from memdump, but the README was never fixed.  It
should be updated, but until then, delete it.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
10 years agoMake symbols defined in linker script HIDDEN
H. Peter Anvin [Tue, 10 Jun 2014 15:49:33 +0000 (08:49 -0700)]
Make symbols defined in linker script HIDDEN

This makes symbols defined in com32.ld and syslinux.ld HIDDEN, to
avoid collisions.  Additional linker scripts should have this done, too.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
10 years agoadv: Remove double defintion
H. Peter Anvin [Mon, 9 Jun 2014 22:04:04 +0000 (15:04 -0700)]
adv: Remove double defintion

__syslinux_adv_* symbols are now part of the core, so don't export
them again elsewhere.  This broke all uses of the ADV, including
--once.

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
10 years agocore/fs: Add support to Unix File system 1/2.
Raphael S. Carvalho [Thu, 29 May 2014 23:35:16 +0000 (20:35 -0300)]
core/fs: Add support to Unix File system 1/2.

It's already loading modules successfully, booting Linux, and both
UFS version 1 and 2 seem to be working correctly.

Signed-off-by: Raphael S. Carvalho <raphael.scarv@gmail.com>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
10 years agoinstaller: Add UFS1/2 support for Extlinux installer
Raphael S. Carvalho [Thu, 29 May 2014 23:35:15 +0000 (20:35 -0300)]
installer: Add UFS1/2 support for Extlinux installer

It's needed to enumerate both UFS1 and UFS2 as they have different magic numbers
and super block offsets.

Neither UFS1 nor UFS2 move files around, therefore, ldlinux.sys can be
installed as a regular file.

Signed-off-by: Raphael S. Carvalho <raphael.scarv@gmail.com>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
10 years agontfs: fix incorrect file->offset usage in ntfs_readdir
Andy Alex [Mon, 2 Jun 2014 17:28:22 +0000 (20:28 +0300)]
ntfs: fix incorrect file->offset usage in ntfs_readdir

file->offset is used to store position in index root between
ntfs_readdir calls.  Previously, pointer to buffer was stored in this
field. However this buffer is reallocated and read each ntfs_readdir
call so the pointer may become incorrect.  Now offset in index root
rather than pointer is stored in this field.

[ hpa: applied patch manually as it arrived whitespace-corrupted ]

Signed-off-by: Andy Alex <andy at r-tt.com>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
10 years agocache, btrfs: Provide a general cached read routine
H. Peter Anvin [Tue, 27 May 2014 06:26:53 +0000 (23:26 -0700)]
cache, btrfs: Provide a general cached read routine

btrfs_read() was really just a function to read data linearly while
using the metadata cache.  Move it to cache.c and rename it
cache_read() so other filesystems can make use of it as well.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
10 years agobtrfs: Remove static variables
H. Peter Anvin [Tue, 27 May 2014 04:34:52 +0000 (21:34 -0700)]
btrfs: Remove static variables

Remove the use of static variables and replace them with per-instance
allocations that can be found from the fs_info structure.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
10 years agobtrfs: Fix stack smash with node size > 4K
H. Peter Anvin [Tue, 27 May 2014 00:30:30 +0000 (17:30 -0700)]
btrfs: Fix stack smash with node size > 4K

Newer btrfs has a node size of more than 4K.  Make sure we have a
buffer big enough to hold a node -- instead of allocating it on the
stack, allocate it at startup time.

While changing this code, remove a completely unnecessary arbitrary
64-bit divide.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
10 years agoldlinux: Allow a held shift key to override UI as well as DEFAULT
H. Peter Anvin [Thu, 22 May 2014 04:32:32 +0000 (21:32 -0700)]
ldlinux: Allow a held shift key to override UI as well as DEFAULT

For compatibility with 4.xx, make a held shift escape to override UI
as well as DEFAULT.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
10 years agobtrfs: fix typo in definition of BTRFS_ADV_OFFSET
H. Peter Anvin [Tue, 20 May 2014 23:55:10 +0000 (16:55 -0700)]
btrfs: fix typo in definition of BTRFS_ADV_OFFSET

Correct the macros used in BTRFS_ADV_OFFSET.

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
10 years agobtrfs: Move ldlinux.sys to Boot Area B
H. Peter Anvin [Tue, 20 May 2014 23:47:59 +0000 (16:47 -0700)]
btrfs: Move ldlinux.sys to Boot Area B

ldlinux.sys is frequently too big to fit into Boot Area A (64K).  Per
a recent ruling by Chris Mason, we have a 768K Boot Area B at offset
256K, so use that to store ldlinux.sys.  In theory we could split it
up and make it slightly larger, however, ldlinux.sys is loaded below
the 640K mark so it has to be smaller than that size anyway.

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
10 years agoCentralize shift_is_held(), make it work to force the command line
H. Peter Anvin [Sun, 20 Apr 2014 18:35:47 +0000 (11:35 -0700)]
Centralize shift_is_held(), make it work to force the command line

Holding down shift is supposed to force a command line unless noescape
is provided; make it behave that way.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
10 years agokbd: Use the extended keyboard state query for bios_shiftflags()
H. Peter Anvin [Sun, 20 Apr 2014 18:23:13 +0000 (11:23 -0700)]
kbd: Use the extended keyboard state query for bios_shiftflags()

Mixing extended and non-extended keyboard functions can be a bad idea.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
10 years agokbd: Make getting the keyboard shift state a firmware method
H. Peter Anvin [Sun, 20 Apr 2014 18:17:32 +0000 (11:17 -0700)]
kbd: Make getting the keyboard shift state a firmware method

Getting the keyboard shift state is a firmware method.  It is
unfortunately unclear if it is even possible on EFI.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
10 years agobios: Use int 0x16, ah=0x02 to probe for shift flags
H. Peter Anvin [Fri, 18 Apr 2014 03:38:11 +0000 (20:38 -0700)]
bios: Use int 0x16, ah=0x02 to probe for shift flags

At least one USB keyboard BIOS has been reported to not properly
handle the keyboard flags in memory.  See if actually using INT 16h
works better.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
10 years agoNTFS: Fragmented $MFT file was not handled
Andy Alex [Thu, 20 Feb 2014 15:56:47 +0000 (19:56 +0400)]
NTFS: Fragmented $MFT file was not handled

NTFS $MFT file may be fragmented by itself (and actually is in most
cases).  However, such a situation was not handled.  This patch adds
support for a fragmented $MFT file.

Signed-off-by: Andy Alex <andy at r-tt.com>
Fixed-by: Ady <ady-sf@hotmail.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
10 years agocore: Avoid initializing the cache more than once
Raphael S. Carvalho [Wed, 5 Feb 2014 22:21:37 +0000 (17:21 -0500)]
core: Avoid initializing the cache more than once

Most of file system drivers initialize the cache themselves.
The problem is that the same cache could be again initialized later,
then invalidating the previous one. This patch fixes this.

Problem found while auditing the code.

Signed-off-by: Raphael S. Carvalho <raphael.scarv@gmail.com>
10 years agolua: Remove additional old cruft from sl_boot_linux()
H. Peter Anvin [Fri, 14 Mar 2014 03:13:43 +0000 (20:13 -0700)]
lua: Remove additional old cruft from sl_boot_linux()

More obsolete cruft...

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
10 years agontfs: Make byte_shift a const
H. Peter Anvin [Fri, 14 Mar 2014 03:09:22 +0000 (20:09 -0700)]
ntfs: Make byte_shift a const

byte_shift is a constant, label it as such.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
10 years agoNTFS: Incorrect parsing of file runs
Andy Alex [Thu, 20 Feb 2014 15:49:58 +0000 (19:49 +0400)]
NTFS: Incorrect parsing of file runs

Length of some extents of NTFS files is parsed in wrong way.

Signed-off-by: Andy Alex <andy at r-tt.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
10 years agoFSUUID for ext2 filesystem
Serj Kalichev [Thu, 21 Nov 2013 06:44:15 +0000 (10:44 +0400)]
FSUUID for ext2 filesystem

The ext2 filesystem supports volume UUID now.
The FSUUID variable can be set to kernel command line.
Patch is based on FSUUID for FAT patch.

Signed-off-by: Serj Kalichev <serj.kalichev@gmail.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
10 years agoAdd filesystem UUID to SYSAPPEND for FAT
Serj Kalichev [Tue, 19 Nov 2013 12:30:06 +0000 (16:30 +0400)]
Add filesystem UUID to SYSAPPEND for FAT

Filesystem UUID shows the partition we boot kernel from.
The kernel parameter has format like FSUUID=DA1A-0B2E.
The SYSAPPEND bit is 0x40000. Now the FAT only supports FSUUID.
The patch is based on 67aaaeeb228.

Signed-off-by: Serj Kalichev <serj.kalichev@gmail.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
10 years agoMerge branch 'nocomapi'
H. Peter Anvin [Fri, 14 Mar 2014 02:57:01 +0000 (19:57 -0700)]
Merge branch 'nocomapi'

Trying again.

Tested-by: Gene Cumm <gene.cumm@gmail.com>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
10 years agobiosboot: This file is not for EFI
H. Peter Anvin [Thu, 13 Mar 2014 21:20:47 +0000 (14:20 -0700)]
biosboot: This file is not for EFI

This file causes dynamic link failures on EFI, and of course has
no use in the EFI environment.

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
10 years agolua: Remove obsolete crap from sl_boot_linux()
H. Peter Anvin [Thu, 13 Mar 2014 20:15:57 +0000 (13:15 -0700)]
lua: Remove obsolete crap from sl_boot_linux()

sl_boot_linux() contained a bunch of random obsolete garbage.

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
10 years agolua: In sl_initramfs_add_file(), actually use the real file name
H. Peter Anvin [Thu, 13 Mar 2014 20:01:32 +0000 (13:01 -0700)]
lua: In sl_initramfs_add_file(), actually use the real file name

Instead of "/testfile1", actually use the real file name...

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
10 years agoMerge branch 'nocomapi'
H. Peter Anvin [Mon, 3 Mar 2014 18:18:09 +0000 (10:18 -0800)]
Merge branch 'nocomapi'

10 years agolua: replace the syslinux module test with an automatic boot menu generator
Ferenc Wágner [Tue, 25 Feb 2014 18:18:27 +0000 (19:18 +0100)]
lua: replace the syslinux module test with an automatic boot menu generator

10 years agolua: base the package load paths on the Syslinux path
Ferenc Wágner [Tue, 17 Dec 2013 10:34:29 +0000 (11:34 +0100)]
lua: base the package load paths on the Syslinux path

10 years agolua: upgrade to 5.2.3
Ferenc Wágner [Thu, 12 Dec 2013 07:12:52 +0000 (08:12 +0100)]
lua: upgrade to 5.2.3

10 years agolua: add demo of the cmenu binding (the simple example)
Ferenc Wágner [Sun, 2 Mar 2014 08:11:46 +0000 (09:11 +0100)]
lua: add demo of the cmenu binding (the simple example)

10 years agolua: start of a binding module for libmenu.c32
Ferenc Wágner [Thu, 24 Oct 2013 12:27:56 +0000 (14:27 +0200)]
lua: start of a binding module for libmenu.c32

10 years agolua: make the dmi module standalone
Ferenc Wágner [Mon, 14 Oct 2013 17:57:57 +0000 (19:57 +0200)]
lua: make the dmi module standalone

By copying two short functions from the cpu module.
They do not warrant a separate module.
Also make those functions static in both modules.

10 years agolua: also reactivate the cpu, dhcp, dmi, pci and vesa extension modules
Ferenc Wágner [Mon, 14 Oct 2013 17:45:25 +0000 (19:45 +0200)]
lua: also reactivate the cpu, dhcp, dmi, pci and vesa extension modules

And document the change in usage.

10 years agolua: bind get_key() in the syslinux module
Ferenc Wágner [Mon, 7 Oct 2013 17:50:05 +0000 (19:50 +0200)]
lua: bind get_key() in the syslinux module

10 years agolua: reactivate the syslinux extension module
Ferenc Wágner [Sun, 13 Oct 2013 20:30:16 +0000 (22:30 +0200)]
lua: reactivate the syslinux extension module

Under Lua 5.2 modules are not expected to set global variables
to reduce namespace pollution. Explicit require() is preferred.

10 years agolua: add the LuaFileSystem library
Ferenc Wágner [Sun, 13 Oct 2013 20:21:55 +0000 (22:21 +0200)]
lua: add the LuaFileSystem library

10 years agolua: enable dynamic module loading
Ferenc Wágner [Sun, 13 Oct 2013 19:52:53 +0000 (21:52 +0200)]
lua: enable dynamic module loading

10 years agosys/module.h: fix some typos in function documentations
Ferenc Wágner [Sun, 13 Oct 2013 19:34:17 +0000 (21:34 +0200)]
sys/module.h: fix some typos in function documentations

10 years agosys/module.h: remove the #ifdef DYNAMIC_MODULE condition
Ferenc Wágner [Sun, 13 Oct 2013 19:29:11 +0000 (21:29 +0200)]
sys/module.h: remove the #ifdef DYNAMIC_MODULE condition

This makes the module_* functions accessible to COM32 modules.
MODULE_INIT and MODULE_EXIT are not used anymore.

10 years agolua: the COM32 API does not support freopen()
Ferenc Wágner [Fri, 11 Oct 2013 14:09:11 +0000 (16:09 +0200)]
lua: the COM32 API does not support freopen()

Nor the concept of text vs. binary open mode, so it does not matter.

10 years agolua: the COM32 API does not support time()
Ferenc Wágner [Fri, 11 Oct 2013 12:34:47 +0000 (14:34 +0200)]
lua: the COM32 API does not support time()

10 years agolua: the COM32 API actually supports exit() of oslib
Ferenc Wágner [Fri, 11 Oct 2013 12:33:52 +0000 (14:33 +0200)]
lua: the COM32 API actually supports exit() of oslib

10 years agostdlib.h: provide a stub definition for getenv()
Ferenc Wágner [Fri, 11 Oct 2013 11:44:10 +0000 (13:44 +0200)]
stdlib.h: provide a stub definition for getenv()

Which always returns NULL, representing an empty environment.

10 years agolua: the COM32 API supports only part of iolib
Ferenc Wágner [Fri, 11 Oct 2013 10:40:21 +0000 (12:40 +0200)]
lua: the COM32 API supports only part of iolib

10 years agolua: the COM32 API does not provide strcoll()
Ferenc Wágner [Thu, 10 Oct 2013 22:30:32 +0000 (00:30 +0200)]
lua: the COM32 API does not provide strcoll()

10 years agolua: use integer arithmetic
Ferenc Wágner [Thu, 10 Oct 2013 22:28:57 +0000 (00:28 +0200)]
lua: use integer arithmetic

10 years agolua: the COM32 API does not provide locale.h
Ferenc Wágner [Thu, 10 Oct 2013 15:13:41 +0000 (17:13 +0200)]
lua: the COM32 API does not provide locale.h

10 years agolua: explicitly put the console in standard mode
Ferenc Wágner [Tue, 15 Oct 2013 13:18:39 +0000 (15:18 +0200)]
lua: explicitly put the console in standard mode

10 years agolua: the COM32 API does not provide signal.h
Ferenc Wágner [Thu, 10 Oct 2013 15:06:35 +0000 (17:06 +0200)]
lua: the COM32 API does not provide signal.h

10 years agodev.h: get size_t definition
Ferenc Wágner [Thu, 10 Oct 2013 15:03:48 +0000 (17:03 +0200)]
dev.h: get size_t definition

10 years agolua: replace src/Makefile to build Lua as a Syslinux COM32 module
Ferenc Wágner [Mon, 14 Oct 2013 18:23:54 +0000 (20:23 +0200)]
lua: replace src/Makefile to build Lua as a Syslinux COM32 module

Start with the src/Makefile in Syslinux before importing Lua 5.2.2.
Refresh the core Lua object list based on the original Makefile.
Add the new builtin library objects.
Temporarily remove the Syslinux extension library objects, as they
need adjustments for the new API.

10 years agolua: import Lua 5.2.2
Ferenc Wágner [Thu, 10 Oct 2013 14:48:04 +0000 (16:48 +0200)]
lua: import Lua 5.2.2

Source downloaded from http://www.lua.org/ftp/lua-5.2.2.tar.gz.
The com32/lua directory now matches exactly the source distribution,
plus the various Syslinux extension modules and their documentation.

10 years agocore, bios: Move __syslinux_shuffler_size to assembly
H. Peter Anvin [Fri, 28 Feb 2014 23:48:53 +0000 (15:48 -0800)]
core, bios: Move __syslinux_shuffler_size to assembly

Putting the __syslinux_shuffler_size in a C file by itself caused it
to not get included in the core, causing failures.  Put it in assembly
to make sure it really gets included there.

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
10 years agoshuffler: Actually get the shuffler size sanely
H. Peter Anvin [Fri, 28 Feb 2014 05:44:06 +0000 (21:44 -0800)]
shuffler: Actually get the shuffler size sanely

Actually get the shuffler size sanely.  At least for now, we are BIOS
only, so stub out the functions on EFI (they shouldn't even be
compiled for EFI; this stuff should be moved into some kind of
BIOS-only directory.)

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
10 years agoMakefiles: export the firmware type as a cpp variable
H. Peter Anvin [Fri, 28 Feb 2014 05:43:18 +0000 (21:43 -0800)]
Makefiles: export the firmware type as a cpp variable

Export the firmware type as a cpp variable so we can #ifdef.

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
10 years agocore, bios: Incorrect detection of EDD in /core/fs/diskio_bios.c
Andy Alex [Sun, 23 Feb 2014 19:16:52 +0000 (23:16 +0400)]
core, bios: Incorrect detection of EDD in /core/fs/diskio_bios.c

DL register is not set to drive number when detecting EDD for drive,
so detection may fail.

Signed-off-by: Andy Alex <andy at r-tt.com>