summaryrefslogtreecommitdiffstats
path: root/source/a/lilo
diff options
context:
space:
mode:
Diffstat (limited to 'source/a/lilo')
-rwxr-xr-xsource/a/lilo/lilo.SlackBuild10
-rw-r--r--source/a/lilo/lilo.ignore.usable.memory.above.4G.diff42
-rw-r--r--source/a/lilo/liloconfig2
3 files changed, 49 insertions, 5 deletions
diff --git a/source/a/lilo/lilo.SlackBuild b/source/a/lilo/lilo.SlackBuild
index c481b0159..ec4a3ba8c 100755
--- a/source/a/lilo/lilo.SlackBuild
+++ b/source/a/lilo/lilo.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright 2008, 2009, 2010, 2011, 2013 Patrick J. Volkerding, Sebeka, MN, USA
+# Copyright 2008, 2009, 2010, 2011, 2013, 2015, 2016 Patrick J. Volkerding, Sebeka, MN, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -21,13 +21,13 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-VERSION=${VERSION:-24.0}
-BUILD=${BUILD:-4}
+VERSION=${VERSION:-24.2}
+BUILD=${BUILD:-2}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) export ARCH=i486 ;;
+ i?86) export ARCH=i586 ;;
arm*) export ARCH=arm ;;
# Unless $ARCH is already set, use uname -m for all other archs:
*) export ARCH=$( uname -m ) ;;
@@ -47,6 +47,8 @@ tar xvf $CWD/lilo-$VERSION.tar.gz || exit 1
cd lilo-$VERSION
chown -R root:root .
+zcat $CWD/lilo.ignore.usable.memory.above.4G.diff.gz | patch -p1 --verbose || exit 1
+
make || exit 1
make -i install DESTDIR=$PKG || exit 1
diff --git a/source/a/lilo/lilo.ignore.usable.memory.above.4G.diff b/source/a/lilo/lilo.ignore.usable.memory.above.4G.diff
new file mode 100644
index 000000000..ee5ad8bca
--- /dev/null
+++ b/source/a/lilo/lilo.ignore.usable.memory.above.4G.diff
@@ -0,0 +1,42 @@
+From Sl4ck3ver on LQ:
+http://www.linuxquestions.org/questions/slackware-14/[patch]-found-a-nasty-lilo-bug-with-a-2-line-fix-for-14-2-a-4175577969/
+
+Every BIOS-e820 entry contains start and size of the area as 64-bit value
+and is shifted right 10 bits (1024) with "shrd" while searching for the
+largest "usable" memory range entry.
+
+
+Finally the found values are converted back into real addresses by shifting
+left 10 bits...
+
+BUT this is done the wrong only using a 32-bit register so the high dword is lost!!!
+
+0x000000027fffffff gets 0x000000007fffffff :-(
+
+Every EXISTING system which happens to work fine just happens to
+have an entry which just contains "usable" memory at that address.
+Often in the form of an entry like:
+
+BIOS-e820: [mem 0x0000000000100000-0x00000000fxxxxxxx] usable
+
+Virtually all systems have "usable" memory at that position, so until
+now this bug was not noticed!
+
+
+HERE IS THE FIX, A 2-LINER:
+===========================
+
+Ignore any usable memory range not starting below 4GB and
+so avoid the truncation, really just a work around :-)
+
+--- ./src/second.S.orig 2016-04-21 15:12:57.155456806 -0500
++++ ./src/second.S 2016-04-21 15:15:08.918466313 -0500
+@@ -2975,6 +2975,8 @@
+ shrd memmap+8,eax,#10 ; convert to 1k
+ cmp dword memmap,#1024 ; below 1M
+ jb e8go2 ; below 1M, no interest
++ cmp dword memmap,#4*1024*1024 ; above 4G
++ jae e8go2 ; above 4G, no interest
+ cmp esi,memmap+8 ; check size
+ ja e8go2 ; want largest
+ mov edx,memmap ; start (in 1k)
diff --git a/source/a/lilo/liloconfig b/source/a/lilo/liloconfig
index 75e3b0eba..f498da727 100644
--- a/source/a/lilo/liloconfig
+++ b/source/a/lilo/liloconfig
@@ -134,7 +134,7 @@ PROBE() {
fdisk -l $devs 2> /dev/null
done
else # We got output without /dev/ide or /dev/scsi, so it can probably be trusted:
- fdisk -l 2> /dev/null
+ fdisk -l 2> /dev/null | sed -e "s/Linux filesystem/Linux/g"
fi
}